CN116303428A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN116303428A
CN116303428A CN202310069537.2A CN202310069537A CN116303428A CN 116303428 A CN116303428 A CN 116303428A CN 202310069537 A CN202310069537 A CN 202310069537A CN 116303428 A CN116303428 A CN 116303428A
Authority
CN
China
Prior art keywords
identification information
identifier
data
query
target
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
CN202310069537.2A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310069537.2A priority Critical patent/CN116303428A/en
Publication of CN116303428A publication Critical patent/CN116303428A/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • 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/24Querying
    • G06F16/248Presentation of query results
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a data processing method and device, and relates to the technical field of computers, the field of big data and the field of financial science and technology. One specific implementation mode of the method comprises the steps of obtaining an instruction request, and analyzing to obtain first identification information, second identification information and mapping rule information; searching a first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and filling the target data into the empty table to obtain a second table; according to the relation between the first table and the second table, the first identification information and the second identification information are associated and stored in a database table; acquiring a query request, and analyzing to obtain a query identifier; and screening the target identifiers associated with the query identifiers from the database table, and importing the target identifiers into a specified template to generate a display interface. Therefore, the embodiment of the invention can solve the technical problems of low efficiency and lack of visual display of the data dependency relationship in the prior art.

Description

Data processing method and device
Technical Field
The invention relates to the technical field of computers, the field of big data and the field of financial science and technology, in particular to a data processing method and device.
Background
At present, the application of the data mapping tool is very common, and a convenient and quick data generation function is provided for users.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
when users enjoy convenient and efficient data mapping and generating functions, the problem of missing dependency relationship records among data is common, and great difficulty is caused in the management of data dependency relationships. The prior art only comprises two methods of manually combing the data dependency relationship and identifying the data dependency relationship by the program code. The manual carding method has low efficiency, the accuracy cannot be guaranteed, and the carding result cannot be visually displayed intuitively. The program carding method has higher requirements on the compatible processing performance of the program language, and usually, the accuracy of the carding result is affected because the program language is not compatible, and the carding result cannot be visually displayed.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a data processing method and device, which can solve the technical problems of low efficiency and lack of visual display of data dependency in the existing data dependency management.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a data processing method, including obtaining an instruction request, parsing to obtain first identification information, second identification information, and mapping rule information; searching and obtaining a corresponding first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table; according to the dependency relationship between the first table and the second table, the first identification information and the second identification information are associated and stored in a database table in a structuring mode; acquiring a query request, and analyzing to obtain a query identifier; and screening a target identifier which is associated with the query identifier from a database table, and importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
Optionally, the method comprises:
the instruction request includes a plurality of sub-instruction requests that are sequentially executed, wherein each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information.
Optionally, the mapping rule information includes:
a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier, and a second table data type.
Optionally, processing the first table according to the mapping rule information to obtain target data and correspondingly filling the target data into the empty table to obtain a second table, including: screening the first table to obtain corresponding source data based on a first table column identifier and a first table row identifier in the mapping rule information; determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information; processing the source data according to the mapping model to obtain target data; and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier.
Optionally, screening the first table to obtain corresponding source data includes:
and reading the designated attribute of the first table row identifier, judging whether the designated attribute is a first target value, and if so, updating the source data to be all data corresponding to the first table column identifier in the first table.
Optionally, associating the first identification information with the second identification information and storing the same in a database table in a structured manner includes:
the first identification information is stored in a first set of database tables, the second identification information is stored in a second set of database tables, and the first identification information and the second identification information are associated in the database tables.
Optionally, screening the target identifier associated with the query identifier in the database table includes:
searching the query identifications in the first set and the second set of the database table respectively, and acquiring the identifications associated in the second set and the first set corresponding to the query identifications existing in the first set and the second set respectively to obtain target identifications.
Optionally, the method further comprises:
the query request comprises a plurality of sub-query requests which are sequentially executed, and a target identifier obtained by querying each sub-query request is used as a query identifier corresponding to the next sub-query request.
Optionally, the method further comprises:
monitoring the first table update, and determining first identification information corresponding to the first table; searching first identification information in a database table, determining second identification information associated with the first identification information, and searching through the second identification information to obtain a corresponding second table; and screening and obtaining updated data in the first table, and calling a mapping model corresponding to the first table to process the updated data according to the mapping model so as to correspondingly update the second table.
In addition, the invention also provides a data processing device, which comprises a mapping module, a data processing module and a data processing module, wherein the mapping module is used for acquiring an instruction request and analyzing to obtain first identification information, second identification information and mapping rule information; searching and obtaining a corresponding first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table; the database table module is used for associating the first identification information and the second identification information according to the dependency relationship of the first table and the second table and storing the first identification information and the second identification information in the database table in a structuring way; the target identification is used for screening in a database table to obtain a target identification which is associated with the query identification; the query module is used for acquiring a query request and analyzing to obtain a query identifier; the method is used for importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
Optionally, the method further comprises: the mapping module is further configured to determine that the instruction request includes a plurality of sub-instruction requests that are sequentially executed, where each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information.
Optionally, the method further comprises: the mapping module is further configured to determine that the mapping rule information includes a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier, and a second table data type.
Optionally, the method further comprises: the mapping module is also used for screening and obtaining corresponding source data in the first table based on a first table column identifier and a first table row identifier in the mapping rule information; determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information; processing the source data according to the mapping model to obtain target data; and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier.
Optionally, the method further comprises: and the mapping module is also used for reading the designated attribute of the first table row identifier when the corresponding source data is obtained by screening in the first table, judging whether the designated attribute is a first target value, and if so, updating the source data to be all data corresponding to the first table column identifier in the first table.
Optionally, the method further comprises: and the database table module is also used for storing the first identification information into a first set of the database table, storing the second identification information into a second set of the database table and associating the first identification information and the second identification information in the database table when associating the first identification information with the second identification information and structuralizing the first identification information and the second identification information into the database table.
Optionally, the method further comprises: and the database table module is also used for searching the query identifiers in the first set and the second set of the database table respectively when the target identifiers which are associated with the query identifiers are obtained by screening in the database table, and obtaining the identifiers which are associated in the second set and the first set and correspond to the query identifiers in the first set and the second set respectively to obtain the target identifiers.
Optionally, the method further comprises: and the query module is also used for determining that the query request comprises a plurality of sub-query requests which are sequentially executed, and taking a target identifier obtained by querying each sub-query request as a query identifier corresponding to the next sub-query request.
Optionally, the method further comprises: and the mapping module is also used for monitoring the updating of the first table and determining first identification information corresponding to the first table.
Optionally, the method further comprises: the database table module is further used for searching the first identification information in the database table and determining second identification information associated with the first identification information.
Optionally, the method further comprises: and the mapping module is also used for searching the corresponding second table through the second identification information, screening the updated data in the first table, and calling a mapping model corresponding to the first table so as to process the updated data according to the mapping model and correspondingly update the second table.
One embodiment of the above invention has the following advantages or benefits: according to the method, the first identification information, the second identification information and the mapping rule information are obtained through analysis by obtaining the instruction request, so that the process of receiving the data mapping instruction and clarifying specific operation is realized; in addition, the corresponding first table is obtained through searching according to the first identification information, so that the effect of locking the source data table is achieved, and data sources and data supports are provided for subsequent data mapping operation; meanwhile, the invention creates the corresponding empty table according to the second identification information, processes the first table according to the mapping rule information to obtain the target data and correspondingly fills the target data into the empty table to obtain the second table, thereby realizing the effect of creating and filling the target data table, and further realizing the purposes of effectively utilizing the existing data resources and generating new data resources in a fusion way based on the data mapping instruction; in addition, the invention associates the first identification information and the second identification information according to the dependency relationship of the first table and the second table and stores the first identification information and the second identification information in the database table in a structuring way, thereby achieving the effect of accurately recording the data dependency relationship between the source data table and the target data table, ensuring that the data dependency relationship corresponding to each data table is circulated by the configuration of the database table, and avoiding the subsequent operation of manually combing the data dependency relationship with high cost and low efficiency in a low-cost real-time table record mode; finally, the query request is obtained through analysis, the query identifier is obtained through analysis, the target identifier which is related to the query identifier is obtained through screening in a database table, the target identifier is imported into a preset template to generate a corresponding dependency relationship display interface, the process of inquiring the data dependency relationship in the database table is realized, and the query result is displayed more clearly and intuitively through the configuration of the preset visual display template.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an instruction request according to an embodiment of the present invention;
FIG. 3 is a first schematic diagram of a dependency presentation interface in accordance with an embodiment of the present invention;
FIG. 4 is a second schematic diagram of a dependency presentation interface in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main flow of a data processing method according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention;
FIG. 7 is a schematic diagram of main modules of a data processing apparatus according to a first embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 9 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main flow of a data processing method according to a first embodiment of the present invention, and as shown in fig. 1, the data processing method includes:
step S101, an instruction request is acquired, and the first identification information, the second identification information and the mapping rule information are obtained through analysis.
In some embodiments, to improve the data processing efficiency of the present invention, it may be determined that the instruction request includes a plurality of sub-instruction requests that are sequentially executed, where each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information. For example, as shown in the instruction request structure template of fig. 2, the area between each pair of "$sql_begin" and "$sql_end" is the area of the first identification information, the second identification information and the mapping rule information corresponding to each sub instruction request; and the number of the "$SQL_BEGIN" and the "$SQL_END" included in each instruction request is the number of the sub-instruction requests included in the instruction request. Meanwhile, for naming of each sub-instruction request, the numerical number between the characters "$SQL" and the characters "BEGIN" or "END" indicates the execution order of the corresponding sub-instruction request; for example, "$SQL_1_BEGIN" in FIG. 2 indicates that the corresponding sub-instruction request is the first executed sub-instruction request.
In an embodiment, the structure template of each instruction request may be as shown in the first sub-instruction request in the middle of "$sql_1_begin" and "$sql_1_end" of fig. 2, from top to bottom: the contents of lines 1-2 correspond substantially to the second identification information, the contents of lines 3-11 correspond substantially to the mapping rule information, the contents of lines 12-15 correspond substantially to the first identification information and the mapping rule information, and the contents of lines 16-18 correspond substantially to the mapping rule information.
For example, the first identification information may be in a sub-instruction request: "Source table owner", "Source table English name", "Source table Chinese name", "Source table alias", "Association type", and "Association relationship"; the first table can be obtained by searching in the database according to the source table owner and the source table English name; the corresponding Chinese names of the first table obtained by searching can be checked again according to the 'source table Chinese names', so that the searching of the first table is ensured to be accurate; the data calling mode of the first table can be obtained according to the association type and the association relation, so that data format errors or interface errors are avoided in the process of using the first table; the configuration "source table alias" may use a short character in the divided instruction request to temporarily replace the "source table owner" and "source table english name" of the first table, thereby enhancing the readability of the divided instruction request.
For example, the second identification information may be in a sub-instruction request: "database user name", "physical table name", "logical table name", "physical table alias", "designer", "statistics collection", "process cycle", and "process type"; so that a table ID uniquely corresponding to the second table can be determined from the "database user name" and the "physical table name"; the Chinese name corresponding to the second table can be determined according to the logical table name; configuring a "physical table alias" to temporarily replace the "database user name" and "physical table name" of the second table with a short character in the split instruction request; the generation process and the use purpose of the second table can be correspondingly recorded according to the designer and the statistical information collection; according to the processing period and the processing type, the corresponding data generation period and data generation mode can be defined in the instruction request.
In some embodiments, in order to perform accurate mapping processing on the source data according to the mapping rule information, when the mapping rule information is acquired, a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier and a second table data type respectively included in the mapping rule information may be identified. Illustratively, the first table column is identified as the corresponding portions of the "source table field name" and "source table field description" of lines 5-11 in the first partial instruction request of FIG. 2; the first table row is identified as the corresponding part of the 12 th-15 th rows of the first sub-instruction request of fig. 2, namely, whether to unset according to the main key, a main key field and an ordering field; the first table data type is the corresponding part of the source table field data type of lines 5-11 in the first sub-instruction request of fig. 2; the second table column is identified as the corresponding parts of the "target field name" and the "target field description" of lines 5-11 in the first divided instruction request of fig. 2; the second table row is identified as the corresponding part of the "target field data type" of the 5 th-11 th row in the first sub-instruction request of fig. 2; the mapping model is the corresponding parts of "processing rule description", "processing rule code" (i.e. the code for uniformly preprocessing the source data), "mapping processing rule" (i.e. the mapping function calculation corresponding to the preprocessed source data), "where" (i.e. the rule for screening the source data), "group by" (i.e. the rule for grouping the source data), and "order by" (i.e. the rule for ordering the source data) in the first sub-instruction request of fig. 2.
Step S102, searching and obtaining a corresponding first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table; and according to the dependency relationship between the first table and the second table, associating the first identification information and the second identification information and structuralizing and storing the first identification information and the second identification information into a database table.
In an embodiment, the second table may be a table to be created, or may be an existing table, that is, after searching for the corresponding first table according to the first identification information, searching for the second table according to the second identification information first, if the corresponding table is obtained by searching for the second table, determining that the table is the second table, and if the corresponding table is not obtained by searching for the second table, correspondingly creating the second table according to the second identification information.
In some embodiments, to ensure accuracy of data filling of the second table, the corresponding source data may be screened from the first table based on the first table column identifier and the first table row identifier in the mapping rule information; determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information; processing the source data according to the mapping model to obtain target data; and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier. Through the operation of the step, the process of screening the source data, processing the source data and mapping the source data to the corresponding target table is realized, the effects of accurately analyzing the instruction request content, combining a plurality of mapping rules to obtain a mapping model, and accordingly, carrying out accurate mapping processing and filling on the source data are achieved, and the effective utilization of data resources is realized.
In some embodiments, in order to improve the efficiency of screening the source data, when the first table row identifier is identified, the specified attribute of the first table row identifier may be read, and whether the specified attribute is the first target value is determined, if yes, the source data is updated to be all data corresponding to the first table column identifier in the first table. For example, the above specified attribute may be the corresponding information of "whether to be set according to the primary key" in fig. 2, if not, it indicates that the screening of the target row is not required for the first table; if yes, it indicates that the screening of the target row needs to be performed on the first table, and the corresponding information of the key field of the next column is the corresponding screening condition. The processing of the step greatly improves the simplicity and the readability of each sub-instruction request, avoids the condition of excessive content and overlong space of the sub-instruction request, reasonably summarizes the extraction rule of the row identification, and does not mechanically move by pieces.
In some embodiments, to clarify the structured storage of the first identification information and the second identification information, respectively, the first identification information may be stored into a first set of database tables, the second identification information may be stored into a second set of database tables, and the first identification information and the second identification information may be associated in the database tables. The first set and the second set are respectively configured in the database table, so that the effect of clearly dividing all the stored first identification information and second identification information can be achieved, and the orientation of the associated first identification information and second identification information is ensured.
Step S103, obtaining a query request, and analyzing to obtain a query identifier; and screening a target identifier which is associated with the query identifier from a database table, and importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
In some embodiments, in order to improve query efficiency, after obtaining a query request, it may be determined that the query request includes a plurality of sub-query requests that are sequentially executed, and a target identifier obtained by querying each sub-query request is used as a query identifier corresponding to a next sub-query request. Through the processing of the step, the multi-level target identification related to the query identification can be continuously queried, the function of the query request is enriched, and repeated manual operation is avoided, so that the query efficiency is improved.
In some embodiments, in order to perform comprehensive searching on the target identifier having a correlation degree with the query identifier, the query identifier may be searched in a first set and a second set of the database table, and identifiers associated in the second set and the first set corresponding to the query identifiers existing in the first set and the second set may be obtained respectively, so as to obtain the target identifier.
In an embodiment, in order to visually and visually display the query result, a preset model may be configured, so that the display effect is as shown in fig. 3 and fig. 4, that is, the directionality between the query identifier and the target identifier is clearly displayed, so that the dependency relationship of the corresponding table is clear at a glance.
In some embodiments, to update the generated table in real time to ensure accuracy of the data, the first table update may be monitored, and first identification information corresponding to the first table is determined; searching first identification information in a database table, determining second identification information associated with the first identification information, and searching through the second identification information to obtain a corresponding second table; and screening and obtaining updated data in the first table, and calling a mapping model corresponding to the first table to process the updated data according to the mapping model so as to correspondingly update the second table.
Fig. 5 is a schematic diagram of the main flow of a data processing method according to a second embodiment of the present invention, the data processing method including:
in step S501, an instruction request is acquired.
In step S502, the instruction request includes an ordered plurality of sub-instruction requests.
Step S503, sequentially analyzing to obtain the first identification information, the second identification information and the mapping rule information corresponding to each sub-instruction request, and processing.
Step S504, searching and obtaining a corresponding first table according to the first identification information.
Preferably, the first identification information includes a first table english name, a first table chinese name, and a first table owner.
Step S505, creating a corresponding empty table according to the second identification information.
Preferably, the second identification information includes a second table english name, a second table chinese name, and a second table owner.
Step S506, reading the first table primary key information in the mapping rule information.
Step S507, determining whether the primary key information of the first table is the first target value, if yes, executing step S508, and if not, executing step S509.
In step S508, it is determined that the first table row is identified as an arbitrary value.
Step S509, reading the first table row identifier in the mapping rule information.
Step S510, determining a corresponding first table row identifier, and screening the first table to obtain corresponding source data based on a first table column identifier in the mapping rule information.
In step S511, a corresponding source data processing rule is determined based on the first table data type, the source data mapping rule, and the second table data type in the mapping rule information.
Step S512, the source data is processed according to the source data processing rule to obtain the target data.
Step S513, creating a corresponding column identifier in the empty table according to the second table column identifier in the mapping rule information, so as to fill the target data into the corresponding column of the column identifier.
Step S514, according to the dependency relationship between the first table and the second table, the first identification information is stored in the source identification module of the database table, the second identification information is stored in the target identification module of the database table, and the first identification information and the second identification information are associated.
Preferably, the identification information recorded in the database table includes a corresponding table english name, column identification, primary key information, and data type.
Step S515, the query request is acquired, and the query identifier and the query hierarchy are obtained through parsing.
Step S516, determining a query identifier included in a source identifier module of the database table, and screening identifiers associated with the query identifier in a target identifier module to obtain a first target identifier of a first level.
Step S517, determining a query identifier included in a target identifier module of the database table, and screening identifiers associated with the query identifier in a source identifier module to obtain a second target identifier of the first level.
Step S518, determining a first identifier of a first level included in a source identifier module of a database table, and screening identifiers associated with the first identifier of the first level in a target identifier module to obtain a first target identifier of a second level.
Step S519, determining a second identifier of the first level included in the target identifier module of the database table, and screening the identifier associated with the query identifier in the source identifier module to obtain a second target identifier of the second level.
Step S520, repeating the above operations until the first target identifier and the second target identifier corresponding to the query hierarchy are obtained.
Step S521, importing all the first target identifiers and the second target identifiers into a preset template according to a preset sequence to generate a corresponding dependency relationship display interface.
Fig. 6 is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention, the data processing method including:
step S601, an instruction request is acquired, and the first identification information, the second identification information and the mapping rule information are obtained through analysis.
Step S602, determining whether the first table english name of the first identification information includes a target value, if yes, executing step S603, and if not, executing step S604.
In step S603, the first identification information included in the target identification module of the database table is selected, and the identification associated with the first identification information in the source identification module is selected to replace the first identification information.
Step S604, searching to obtain a corresponding first table according to the first identification information.
Step S605, in response to the existence of the table corresponding to the second identification information, takes the table as a second table.
Step S606, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the corresponding position of the second table.
In step S607, in response to completion of the filling of the second table, the first identification information and the second identification information are associated and stored in the database in a structured manner.
Step S608, obtaining the query request, and analyzing to obtain the query identifier and the query hierarchy.
Step S609, screening the identification related to the query identification in the database table to obtain the target identification of the first level.
Step S610, screening the identification related to the first-level target identification in the database table to obtain a second-level target identification.
Step S611, repeating the above operation until the target identifier corresponding to the query level is obtained.
Step S612, importing all the target identifiers into a preset template to generate a corresponding dependency relationship visualization display interface.
Fig. 7 is a schematic diagram of main modules of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 7, the data processing apparatus 700 includes a mapping module 701, a database table module 702, and a query module 703. The mapping module 701 is configured to obtain the instruction request, and parse the instruction request to obtain first identification information, second identification information, and mapping rule information; searching and obtaining a corresponding first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table; the database table module 702 is configured to associate the first identification information and the second identification information according to the dependency relationship between the first table and the second table, and store the first identification information and the second identification information in the database table in a structured manner; the target identification is used for screening in a database table to obtain a target identification which is associated with the query identification; the query module 703 is configured to obtain a query request, and parse the query request to obtain a query identifier; the method is used for importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
In some embodiments, the mapping module 701 is further configured to determine that the instruction request includes a plurality of sub-instruction requests that are sequentially executed, where each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information.
In some embodiments, the mapping module 701 is further configured to determine that the mapping rule information includes a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier, and a second table data type.
In some embodiments, the mapping module 701 is further configured to screen the first table for corresponding source data based on a first table column identifier and a first table row identifier in the mapping rule information; determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information; processing the source data according to the mapping model to obtain target data; and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier.
In some embodiments, the mapping module 701 is further configured to, when the corresponding source data is screened from the first table, read a specified attribute of the first table row identifier, determine whether the specified attribute is a first target value, and if yes, update the source data to all data corresponding to the first table column identifier in the first table.
In some embodiments, the database table module 702 is further configured to store the first identification information in a first set of database tables, store the second identification information in a second set of database tables, and associate the first identification information and the second identification information in the database tables when associating the first identification information with the second identification information and structuring the first identification information to the database tables.
In some embodiments, the database table module 702 is further configured to, when the target identifier associated with the query identifier is obtained by screening in the database table, search the query identifier in the first set and the second set of the database table, and obtain the identifiers associated in the second set and the first set corresponding to the query identifiers existing in the first set and the second set, respectively, to obtain the target identifier.
In some embodiments, the query module 703 is further configured to determine that the query request includes a plurality of sub-query requests that are sequentially executed, and use a target identifier obtained by querying each sub-query request as a query identifier corresponding to a next sub-query request.
In some embodiments, the mapping module 701 is further configured to monitor the first table update and determine first identification information corresponding to the first table.
In some embodiments, the database table module 702 is further configured to search the database table for the first identification information, and determine the second identification information associated with the first identification information.
In some embodiments, the mapping module 701 is further configured to find a corresponding second table according to the second identification information, screen updated data in the first table, and call a mapping model corresponding to the first table, so as to process the updated data according to the mapping model, so as to update the second table accordingly.
In the present invention, the data processing method and the data processing apparatus have a corresponding relationship in terms of implementation, and therefore, the description of the repeated contents is omitted.
Fig. 8 illustrates an exemplary system architecture 800 in which a data processing method or data processing apparatus of an embodiment of the present invention may be applied.
As shown in fig. 8, a system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 805 through the network 804 using the terminal devices 801, 802, 803 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 801, 802, 803.
The terminal devices 801, 802, 803 may be various electronic devices having a page display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 805 may be a server providing various services, such as a background management server (by way of example only) providing support for users with the terminal devices 801, 802, 803. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that the data processing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the computing device is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, there is illustrated a schematic diagram of a computer system 900 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the computer system 900 are also stored. The CPU901, ROM902, and RAM903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 905 including a keyboard, a mouse, and the like; an output portion 906 including a Cathode Ray Tube (CRT), a liquid crystal page display processor (LCD), and the like, and a speaker, and the like; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 901.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a mapping module, a database table module, and a query module. The names of these modules do not constitute a limitation on the module itself in some cases.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise.
According to the technical scheme provided by the embodiment of the invention, the technical problems of low efficiency and lack of visual display of the data dependency relationship in the prior art can be solved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (23)

1. A method of data processing, comprising:
the method comprises the steps of obtaining an instruction request, and analyzing to obtain first identification information, second identification information and mapping rule information;
Searching and obtaining a corresponding first table according to the first identification information;
creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table;
according to the dependency relationship between the first table and the second table, the first identification information and the second identification information are associated and stored in a database table in a structuring mode;
acquiring a query request, and analyzing to obtain a query identifier;
and screening a target identifier which is associated with the query identifier from a database table, and importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
2. The method according to claim 1, characterized in that it comprises:
the instruction request includes a plurality of sub-instruction requests that are sequentially executed, wherein each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information.
3. The method of claim 1, wherein the mapping rule information comprises:
a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier, and a second table data type.
4. A method according to claim 1 or 3, wherein processing the first table according to the mapping rule information to obtain target data and correspondingly filling the target data into the empty table to obtain a second table, and comprising:
screening the first table to obtain corresponding source data based on a first table column identifier and a first table row identifier in the mapping rule information;
determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information;
processing the source data according to the mapping model to obtain target data;
and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier.
5. The method of claim 4, wherein screening the first table for the corresponding source data comprises:
and reading the designated attribute of the first table row identifier, judging whether the designated attribute is a first target value, and if so, updating the source data to be all data corresponding to the first table column identifier in the first table.
6. The method of claim 1, wherein associating the first identification information with the second identification information and storing the first identification information in a structured database table comprises:
The first identification information is stored in a first set of database tables, the second identification information is stored in a second set of database tables, and the first identification information and the second identification information are associated in the database tables.
7. The method of claim 6, wherein screening the database table for the target identifier associated with the query identifier comprises:
searching the query identifications in the first set and the second set of the database table respectively, and acquiring the identifications associated in the second set and the first set corresponding to the query identifications existing in the first set and the second set respectively to obtain target identifications.
8. The method according to claim 1, characterized in that it comprises:
the query request comprises a plurality of sub-query requests which are sequentially executed, and a target identifier obtained by querying each sub-query request is used as a query identifier corresponding to the next sub-query request.
9. A method according to claim 3 or 4, comprising:
monitoring the first table update, and determining first identification information corresponding to the first table;
searching first identification information in a database table, determining second identification information associated with the first identification information, and searching through the second identification information to obtain a corresponding second table;
And screening and obtaining updated data in the first table, and calling a mapping model corresponding to the first table to process the updated data according to the mapping model so as to correspondingly update the second table.
10. A data processing apparatus, further comprising:
the mapping module is used for acquiring the instruction request, analyzing and obtaining first identification information, second identification information and mapping rule information; searching and obtaining a corresponding first table according to the first identification information; creating a corresponding empty table according to the second identification information, processing the first table according to the mapping rule information to obtain target data, and correspondingly filling the target data into the empty table to obtain a second table;
the database table module is used for associating the first identification information and the second identification information according to the dependency relationship of the first table and the second table and storing the first identification information and the second identification information in the database table in a structuring way; the target identification is used for screening in a database table to obtain a target identification which is associated with the query identification;
the query module is used for acquiring a query request and analyzing to obtain a query identifier; the method is used for importing the target identifier into a preset template to generate a corresponding dependency relationship display interface.
11. The apparatus as claimed in claim 10, comprising:
the mapping module is further configured to determine that the instruction request includes a plurality of sub-instruction requests that are sequentially executed, where each sub-instruction request includes corresponding first identification information, corresponding second identification information, and corresponding mapping rule information.
12. The apparatus as claimed in claim 10, comprising:
the mapping module is further configured to determine that the mapping rule information includes a first table column identifier, a first table row identifier, a first table data type, a mapping model, a second table column identifier, and a second table data type.
13. The apparatus according to claim 10 or 12, characterized by comprising:
the mapping module is also used for screening and obtaining corresponding source data in the first table based on a first table column identifier and a first table row identifier in the mapping rule information; determining a corresponding mapping model based on the first table data type, the mapping model and the second table data type in the mapping rule information; processing the source data according to the mapping model to obtain target data; and creating a corresponding column identifier in the empty table according to a second table column identifier in the mapping rule information so as to fill the target data into a corresponding column of the column identifier.
14. The apparatus as claimed in claim 13, comprising:
and the mapping module is also used for reading the designated attribute of the first table row identifier when the corresponding source data is obtained by screening in the first table, judging whether the designated attribute is a first target value, and if so, updating the source data to be all data corresponding to the first table column identifier in the first table.
15. The apparatus as claimed in claim 10, comprising:
and the database table module is also used for storing the first identification information into a first set of the database table, storing the second identification information into a second set of the database table and associating the first identification information and the second identification information in the database table when associating the first identification information with the second identification information and structuralizing the first identification information and the second identification information into the database table.
16. The apparatus as claimed in claim 15, comprising:
and the database table module is also used for searching the query identifiers in the first set and the second set of the database table respectively when the target identifiers which are associated with the query identifiers are obtained by screening in the database table, and obtaining the identifiers which are associated in the second set and the first set and correspond to the query identifiers in the first set and the second set respectively to obtain the target identifiers.
17. The apparatus as claimed in claim 10, comprising:
and the query module is also used for determining that the query request comprises a plurality of sub-query requests which are sequentially executed, and taking a target identifier obtained by querying each sub-query request as a query identifier corresponding to the next sub-query request.
18. The apparatus according to claim 12 or 13, characterized by comprising:
and the mapping module is also used for monitoring the updating of the first table and determining first identification information corresponding to the first table.
19. The apparatus of claim 18, wherein after determining the first identification information corresponding to the first table, comprising:
the database table module is further used for searching the first identification information in the database table and determining second identification information associated with the first identification information.
20. The apparatus of claim 19, wherein after determining the second identification information associated with the first identification information, comprising:
and the mapping module is also used for searching the corresponding second table through the second identification information, screening the updated data in the first table, and calling a mapping model corresponding to the first table so as to process the updated data according to the mapping model and correspondingly update the second table.
21. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
22. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
23. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-9.
CN202310069537.2A 2023-02-06 2023-02-06 Data processing method and device Pending CN116303428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310069537.2A CN116303428A (en) 2023-02-06 2023-02-06 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310069537.2A CN116303428A (en) 2023-02-06 2023-02-06 Data processing method and device

Publications (1)

Publication Number Publication Date
CN116303428A true CN116303428A (en) 2023-06-23

Family

ID=86829556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310069537.2A Pending CN116303428A (en) 2023-02-06 2023-02-06 Data processing method and device

Country Status (1)

Country Link
CN (1) CN116303428A (en)

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
CN111177231A (en) Report generation method and report generation device
CN108572963A (en) Information acquisition method and device
CN109194714B (en) File pushing method and device, terminal device and storage medium
CN109903105B (en) Method and device for perfecting target commodity attributes
CN113485781A (en) Report generation method and device, electronic equipment and computer readable medium
CN113760948A (en) Data query method and device
CN113051460A (en) Elasticissearch-based data retrieval method and system, electronic device and storage medium
CN110188113B (en) Method, device and storage medium for comparing data by using complex expression
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN112947919A (en) Method and device for constructing service model and processing service request
CN108959294B (en) Method and device for accessing search engine
CN112905178A (en) Method, device, equipment and medium for generating business function page
CN112818026A (en) Data integration method and device
CN110704481B (en) Method and device for displaying data
CN113536748A (en) Method and device for generating chart data
CN109271224B (en) Method and apparatus for determining position
CN116204428A (en) Test case generation method and device
CN112148705A (en) Data migration method and device
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN116303428A (en) Data processing method and device
CN114818635A (en) Data report generation method and device, electronic equipment and storage medium
CN113742321A (en) Data updating method and device
CN112988857A (en) Service data processing method and device
CN116301869B (en) Front-end page configuration management and control system, method, equipment and medium

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