CN111782650B - Dynamic data warehousing method and device, electronic equipment and storage medium - Google Patents

Dynamic data warehousing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111782650B
CN111782650B CN202010596835.3A CN202010596835A CN111782650B CN 111782650 B CN111782650 B CN 111782650B CN 202010596835 A CN202010596835 A CN 202010596835A CN 111782650 B CN111782650 B CN 111782650B
Authority
CN
China
Prior art keywords
field
sequence
warehousing
field sequence
changed
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.)
Active
Application number
CN202010596835.3A
Other languages
Chinese (zh)
Other versions
CN111782650A (en
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202010596835.3A priority Critical patent/CN111782650B/en
Publication of CN111782650A publication Critical patent/CN111782650A/en
Application granted granted Critical
Publication of CN111782650B publication Critical patent/CN111782650B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

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

Abstract

The invention relates to a dynamic data warehousing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: after the table file is imported into a database, the table file with changed table content is obtained; obtaining a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed; warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table; and warehousing the field content of the warehoused field in the table file imported into the database. The embodiment of the invention can realize automatic storage of dynamic data without reestablishing a database table, so that the operation of a developer is simpler, the working efficiency of the developer is improved, and the resource consumption of a server and a database is reduced.

Description

Dynamic data warehousing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for storing dynamic data, an electronic device, and a storage medium.
Background
At present, simple data warehouse storage is generally realized by using an EXCEL table, namely, the EXCEL table is utilized to automatically enter data into a database, the data warehouse storage is realized by the EXCEL table, and a fixed mapping relation exists between the content in the EXCEL table and the corresponding data content in the database.
However, for irregular dynamic data, such as: the data of the field sequence and name of the EXCEL table or the number of the field sequence and name of the EXCEL table cannot realize the dynamic conversion of the content in the EXCEL table and the corresponding content in the database and the conversion of the corresponding relation.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a dynamic data warehousing method, a dynamic data warehousing device, electronic equipment and a storage medium.
In a first aspect, the present application provides a dynamic data importing method, where the method includes:
after the table file is imported into a database, the table file with changed table content is obtained;
obtaining a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed;
warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table;
and warehousing the field content of the warehoused field in the table file imported into the database.
Optionally, the warehousing the changed field in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table includes:
matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one;
if the second field sequence is determined to have a new field relative to the first field sequence according to the matching result, determining a new position of the new field;
and adding the new field at the new position.
Optionally, the warehousing the field content of the warehoused field in the table file imported into the database includes:
searching field contents corresponding to the newly added fields in the table file after the table contents are changed;
and adding the searched field content to a content position corresponding to the newly added field.
Optionally, the warehousing the changed field in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table includes:
if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result;
if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed;
and replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence.
Optionally, the warehousing the field content of the warehoused field in the table file imported into the database includes:
searching field contents corresponding to the replaced fields in the table file imported into the database;
and moving the searched field content to a content position corresponding to the replaced field.
Optionally, the warehousing the changed field in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table includes:
if the field sequence of the second field sequence relative to the first field sequence is not changed according to the matching result, determining whether a field with a changed field name and unchanged field content exists in the second field sequence relative to the first field sequence according to the matching result;
if a change field which changes relative to the first field sequence exists in the second field sequence according to the matching result, determining the change position of the change field;
and replacing the field in the change position in the first field sequence with the field in the corresponding field position in the second field sequence.
Optionally, the warehousing the field content of the warehoused field in the table file imported into the database includes:
determining whether the field content corresponding to the change field changes according to the warehousing rule table;
if the field content corresponding to the changed field is changed, searching the field content corresponding to the changed field in the table file after the table content is changed;
and adding the searched field content to a content position corresponding to the change field.
In a second aspect, the present application provides a dynamic data importing apparatus, the apparatus including:
the first acquisition module is used for acquiring the table file after the table content is changed after the table file is imported into the database;
the second obtaining module is configured to obtain a corresponding entry rule table according to the table file, where the entry rule table includes: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed;
the first warehousing module is used for warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table;
and the second warehousing module is used for warehousing the field content of the warehoused field in the table file imported into the database.
Optionally, the first warehousing module is further configured to:
matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one;
if the second field sequence is determined to have a new field relative to the first field sequence according to the matching result, determining a new position of the new field;
and adding the new field at the new position.
Optionally, the second warehousing module is further configured to:
searching field contents corresponding to the newly added fields in the table file after the table contents are changed;
and adding the searched field content to a content position corresponding to the newly added field.
Optionally, the first warehousing module is further configured to:
if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result;
if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed;
and replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence.
Optionally, the second warehousing module is further configured to: searching field contents corresponding to the replaced fields in the table file imported into the database;
and moving the searched field content to a content position corresponding to the replaced field.
Optionally, the first warehousing module is further configured to:
if the field sequence of the second field sequence relative to the first field sequence is not changed according to the matching result, determining whether a field with a changed field name and unchanged field content exists in the second field sequence relative to the first field sequence according to the matching result;
if a change field which changes relative to the first field sequence exists in the second field sequence according to the matching result, determining the change position of the change field;
and replacing the field in the change position in the first field sequence with the field in the corresponding field position in the second field sequence.
Optionally, the second warehousing module is further configured to: determining whether the field content corresponding to the change field changes according to the warehousing rule table;
if the field content corresponding to the changed field is changed, searching the field content corresponding to the changed field in the table file after the table content is changed;
and adding the searched field content to a content position corresponding to the change field.
In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the dynamic data warehousing method according to any one of the first aspect when executing the program stored in the memory.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a program for a dynamic data warehousing method, which when executed by a processor, implements the steps of any one of the dynamic data warehousing methods of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the embodiment of the invention, after the table file is imported into a database, the table file with changed table content is obtained, and a corresponding warehousing rule table is obtained according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed; warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table; and warehousing the field content of the warehoused field in the table file imported into the database.
According to the embodiment of the invention, the fields which are changed in the first field sequence in the table file and are imported into the database can be warehoused according to the warehouse-in rule table, and the field contents of the warehoused fields in the table file and are imported into the database are warehoused, so that the automatic warehouse-in of dynamic data is realized, the database table is not required to be reestablished, the operation of a developer is simpler, the working efficiency of the developer is improved, and the resource consumption of a server and the database is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a dynamic data importing method according to an embodiment of the present application;
FIG. 2 is a block diagram of a dynamic data importing apparatus according to an embodiment of the present application;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
Since in the prior art, for irregular dynamic data, such as: the data of the field sequence and name of the EXCEL table or the number of the field sequence and name of the EXCEL table cannot realize the dynamic conversion of the content in the EXCEL table and the corresponding content in the database and the conversion of the corresponding relation. To this end, an embodiment of the present invention provides a method, an apparatus, an electronic device, and a storage medium for importing dynamic data, where the method for importing dynamic data may be applied to a server, as shown in fig. 1, and the method for importing dynamic data may include the following steps:
step S101, after a table file is imported into a database, the table file with changed table content is obtained;
in the embodiment of the invention, the form file may refer to an EXCEL form file, dynamic data is stored in the form file, the dynamic data refers to data changed along with time change in system application, the data directly reflects transaction process, such as inventory data, website access amount, online population, daily sales and the like, when the trigger condition of warehousing (such as time is up) is met, the form file can be warehoused, and after the form file is warehoused, a form file with the same form content as the form file before the warehouse is created in a database.
Since the dynamic data often changes with time, after the table file is put in storage, the table content of the table file changes with the time, so in this step, the table file may be acquired again at intervals after the table file is imported into the database, or after the maintainer finds that the table content changes, the server may be triggered to acquire the table file again by triggering operation, etc.
Step S102, obtaining a corresponding warehousing rule table according to the table file.
In an embodiment of the present invention, the binning rule table includes: the first field sequence in the table file which is imported into the database and the second field sequence in the table file after the table content is changed, in practical application, the warehousing rule table may be configured by a developer according to practical requirements, and the first field sequence may include: the table file imported into the database is located in a field of a header, and the second field sequence may include: the table file after the table content change is located in the field of the table header, and the arrangement order of the fields in the first field sequence and the second field sequence may be according to the arrangement order of the fields in the table header of the table file, for example: the header of the table file imported into the database includes three fields from left to right: name, gender and age, then three fields are also included in the first field sequence: name, gender, and age, and in the same order as in the header of the table file; such as: five fields are included in the header of the table file after the table content is changed from left to right: name, gender, age, home address and academy, five fields are also included in the second field sequence: name, gender, age, home address and academic, and the order is the same as in the header of the table file;
in this step, the matched entry rule table can be searched in the storage space for storing the entry rule table according to the file name of the table file and the field sequence of the field in the table file after the table content is changed.
Step S103, according to the second field sequence in the warehousing rule table, warehousing the changed fields in the first field sequence in the table file imported into the database;
in this step, the second field sequence and the first field sequence may be compared to obtain a field that changes in the first field sequence, for example: newly added fields, fields with changed orders or fields with changed field names, etc.
When the changed field exists in the first field sequence, the changed field can be put in storage by utilizing the field which is positioned at the corresponding position with the changed field in the second field sequence.
Step S104, the field content of the fields which are imported into the table file of the database and put into storage is put into storage.
Since in practical applications, each field will generally have corresponding field contents, such as: the field content corresponding to the field name is reddish, the field content corresponding to the field gender is woman, the field content corresponding to the field age is 19, and the like, so that after the changed field finishes warehousing, the field content corresponding to the field, which is changed along with the field, is generally required to be warehoused.
According to the embodiment of the invention, after the table file is imported into a database, the table file with changed table content is obtained, and a corresponding warehousing rule table is obtained according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed; warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table; and warehousing the field content of the warehoused field in the table file imported into the database.
According to the embodiment of the invention, the fields which are changed in the first field sequence in the table file and are imported into the database can be warehoused according to the warehouse-in rule table, and the field contents of the warehoused fields in the table file and are imported into the database are warehoused, so that the automatic warehouse-in of dynamic data is realized, the database table is not required to be reestablished, the operation of a developer is simpler, the working efficiency of the developer is improved, and the resource consumption of a server and the database is reduced.
In yet another embodiment of the present invention, the step S103 includes:
matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one;
if the second field sequence is determined to have a new field relative to the first field sequence according to the matching result, determining a new position of the new field;
and adding the new field at the new position.
For example: the first field sequence includes three fields: name, gender and age, the second field sequence includes five fields: the name, sex, age, home address and academic, and the changed field in the first field sequence can be determined as the 'age' field by comparing the field sequences, and the changed field is put in storage, namely: the "home address" field and the "academic" field in the second field sequence at the fourth field position and the fifth field position are added to the "age" field.
Accordingly, the step S104 includes:
searching field contents corresponding to the newly added fields in the table file after the table contents are changed;
and adding the searched field content to a content position corresponding to the newly added field.
The method comprises the following steps of: when the "home address" field and the "academic" field located at the fourth field position and the fifth field position in the second field sequence are added to the "age" field, since the "home address" field and the "academic" field are newly added fields, the field content corresponding to the newly added fields only exists in the table file after the table content is changed, so that the field content "xx province xx city xx region" corresponding to the field "home address" and the field content "Gramineae" corresponding to the field "academic" in the table file after the table content is changed can be put in storage.
The embodiment of the invention can automatically warehouse the newly added field and the field content corresponding to the newly added field, realize the automatic warehouse entry of the dynamic data, avoid reestablishing the database table, simplify the operation of developers, improve the working efficiency of the developers and reduce the resource consumption of the server and the database.
In yet another embodiment of the present invention, the step S103 includes:
if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result;
if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed;
and replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence.
Such as: the first field sequence includes three fields: name, gender and age, the second field sequence includes five fields: the names, ages and sexes can be determined that the sequence of the sexes and ages in the first field sequence is changed through the comparison of the field sequences, namely, the changed fields are a gender field and an age field, and the changed fields are put in storage, namely: the "age" field in the second field sequence is used for replacing the "sex" field in the second field sequence in the second field position, and the "sex" field in the second field sequence in the third field position is used for replacing the "age" field in the first field sequence in the third field position.
Accordingly, the step S104 includes:
searching field contents corresponding to the replaced fields in the table file imported into the database;
and moving the searched field content to a content position corresponding to the replaced field.
Such as: the method comprises the following steps of: when the "age" field located at the second field position in the second field sequence is used for replacing the "sex" field located at the second field position in the first field sequence, and the "sex" field located at the third field position in the second field sequence is used for replacing the "age" field located at the third field position in the first field sequence, the "sex" field and the corresponding field content thereof are all fields existing in the table file imported into the database, so that the content positions of the corresponding field contents of the fields can be directly exchanged.
The embodiment of the invention can automatically warehouse fields with changed field sequences and the field contents corresponding to the fields, realize automatic warehouse entry of dynamic data, avoid reestablishing database tables, simplify the operation of developers, improve the working efficiency of the developers and reduce the resource consumption of servers and databases.
In yet another embodiment of the present invention, the step S103 includes:
if the field sequence of the second field sequence relative to the first field sequence is not changed according to the matching result, determining whether a field with a changed field name and unchanged field content exists in the second field sequence relative to the first field sequence according to the matching result;
if a change field which changes relative to the first field sequence exists in the second field sequence according to the matching result, determining the change position of the change field;
and replacing the field in the change position in the first field sequence with the field in the corresponding field position in the second field sequence.
Such as: the first field sequence includes three fields: name, gender and age, the second field sequence includes five fields: the name, the age and the home address can be compared by the field sequence to determine that the 'age' field in the first field sequence is changed, and the changed field is put in storage, namely: the "home address" field in the third field position in the second field sequence is used to replace the "age" field in the third field position in the first field sequence.
Accordingly, the step S104 includes:
determining whether the field content corresponding to the change field changes according to the warehousing rule table;
if the field content corresponding to the changed field is changed, searching the field content corresponding to the changed field in the table file after the table content is changed;
and adding the searched field content to a content position corresponding to the change field.
Such as: the method comprises the following steps of: when the "home address" field located at the third field position in the second field sequence is used to replace the "age" field located at the third field position in the first field sequence, the field content corresponding to the "home address" field in the table file after the table content is changed can be put in storage and stored in the content position corresponding to the "home address" field.
The embodiment of the invention can automatically warehouse the changed fields and the field content corresponding to the changed fields, realize the automatic warehouse entry of dynamic data, avoid reestablishing a database table, simplify the operation of developers, improve the working efficiency of the developers and reduce the resource consumption of the server and the database.
In still another embodiment of the present invention, there is also provided a dynamic data importing apparatus, as shown in fig. 2, including:
a first obtaining module 11, configured to obtain a table file after a table content change after the table file is imported into a database;
the second obtaining module 12 is configured to obtain a corresponding entry rule table according to the table file, where the entry rule table includes: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed;
a first warehousing module 13, configured to warehouse, according to the second field sequence in the warehousing rule table, a field that changes in a first field sequence in the table file that has been imported into the database;
and a second warehousing module 14, configured to warehouse field contents of the warehoused fields in the table file imported into the database.
Optionally, the first warehousing module is further configured to:
matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one;
if the second field sequence is determined to have a new field relative to the first field sequence according to the matching result, determining a new position of the new field;
and adding the new field at the new position.
Optionally, the second warehousing module is further configured to:
searching field contents corresponding to the newly added fields in the table file after the table contents are changed;
and adding the searched field content to a content position corresponding to the newly added field.
Optionally, the first warehousing module is further configured to:
if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result;
if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed;
and replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence.
Optionally, the second warehousing module is further configured to: searching field contents corresponding to the replaced fields in the table file imported into the database;
and moving the searched field content to a content position corresponding to the replaced field.
Optionally, the first warehousing module is further configured to:
if the field sequence of the second field sequence relative to the first field sequence is not changed according to the matching result, determining whether a field with a changed field name and unchanged field content exists in the second field sequence relative to the first field sequence according to the matching result;
if a change field which changes relative to the first field sequence exists in the second field sequence according to the matching result, determining the change position of the change field;
and replacing the field in the change position in the first field sequence with the field in the corresponding field position in the second field sequence.
Optionally, the second warehousing module is further configured to: determining whether the field content corresponding to the change field changes according to the warehousing rule table;
if the field content corresponding to the changed field is changed, searching the field content corresponding to the changed field in the table file after the table content is changed;
and adding the searched field content to a content position corresponding to the change field.
In yet another embodiment of the present invention, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the dynamic data warehousing method according to the embodiment of the method when executing the program stored in the memory.
According to the electronic equipment provided by the embodiment of the invention, after the table file is imported into the database by executing the program stored in the memory, the processor acquires the table file with changed table content, and acquires the corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed; warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table; the method comprises the steps of warehousing field contents of the fields which are imported into the table file of the database, warehousing the fields which are imported into the table file of the database and change in a first field sequence of the table file of the database according to a warehousing rule table, warehousing the field contents of the fields which are imported into the table file of the database, realizing automatic warehousing of dynamic data, and having no need of reestablishing a database table, the operation of developers is simpler, the working efficiency of the developers is improved, and the resource consumption of the server and the database is reduced.
The communication bus 1140 mentioned above for the electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus, etc. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 3, but not only one bus or one type of bus.
The communication interface 1120 is used for communication between the electronic device and other devices described above.
The memory 1130 may include Random Access Memory (RAM) or non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor 1110 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In still another embodiment of the present invention, there is further provided a computer readable storage medium having stored thereon a program of a dynamic data warehousing method, which when executed by a processor, implements the steps of the dynamic data warehousing method described in the foregoing method embodiment.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for dynamic data warehousing, the method comprising:
after the table file is imported into a database, the table file with changed table content is obtained;
obtaining a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed;
warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table;
the step of warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table comprises the following steps:
matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one;
if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result;
if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed;
replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence;
and warehousing the field content of the warehoused field in the table file imported into the database.
2. The method of claim 1, wherein the warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table comprises:
if the second field sequence is determined to have a new field relative to the first field sequence according to the matching result, determining a new position of the new field;
and adding the new field at the new position.
3. The method for dynamic data warehousing according to claim 2, wherein said warehousing the field contents of the fields which have been warehoused in the table file which has been imported into the database, comprises:
searching field contents corresponding to the newly added fields in the table file after the table contents are changed;
and adding the searched field content to a content position corresponding to the newly added field.
4. The method for dynamic data warehousing according to claim 1, wherein said warehousing field contents of the fields which have been warehoused in the table file which has been imported into the database, comprises:
searching field contents corresponding to the replaced fields in the table file imported into the database;
and moving the searched field content to a content position corresponding to the replaced field.
5. The method of claim 1, wherein the warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table comprises:
if the field sequence of the second field sequence relative to the first field sequence is not changed according to the matching result, determining whether a field with a changed field name and unchanged field content exists in the second field sequence relative to the first field sequence according to the matching result;
if a change field which changes relative to the first field sequence exists in the second field sequence according to the matching result, determining the change position of the change field;
and replacing the field in the change position in the first field sequence with the field in the corresponding field position in the second field sequence.
6. The method for dynamic data warehousing according to claim 5, wherein warehousing the field contents of the fields which have been warehoused in the table file which has been imported into the database comprises:
determining whether the field content corresponding to the change field changes according to the warehousing rule table;
if the field content corresponding to the changed field is changed, searching the field content corresponding to the changed field in the table file after the table content is changed;
and adding the searched field content to a content position corresponding to the change field.
7. A dynamic data warehousing apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the table file after the table content is changed after the table file is imported into the database;
the second obtaining module is configured to obtain a corresponding entry rule table according to the table file, where the entry rule table includes: a first field sequence in the table file which is imported into the database and a second field sequence in the table file after the table content is changed;
the first warehousing module is used for warehousing the changed fields in the first field sequence in the table file imported into the database according to the second field sequence in the warehousing rule table; the first warehouse-in module is further used for: matching the second fields located at different positions in the second field sequence with the first fields at corresponding positions in the first field sequence in the table file imported into the database one by one; if no new field exists in the second field sequence relative to the first field sequence according to the matching result, determining whether the field sequence of the second field sequence relative to the first field sequence is changed according to the matching result; if the field sequence of the second field sequence relative to the first field sequence is determined to be changed according to the matching result, determining the field position of the field sequence to be changed; replacing the field in the first field sequence at the field position with the field in the second field sequence at the corresponding field position according to the field in the second field sequence;
and the second warehousing module is used for warehousing the field content of the warehoused field in the table file imported into the database.
8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the dynamic data warehousing method according to any one of claims 1 to 6 when executing the program stored in the memory.
9. A computer readable storage medium, wherein a program of a dynamic data warehousing method is stored on the computer readable storage medium, and the program of the dynamic data warehousing method realizes the steps of the dynamic data warehousing method according to any one of claims 1 to 6 when executed by a processor.
CN202010596835.3A 2020-06-28 2020-06-28 Dynamic data warehousing method and device, electronic equipment and storage medium Active CN111782650B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010596835.3A CN111782650B (en) 2020-06-28 2020-06-28 Dynamic data warehousing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010596835.3A CN111782650B (en) 2020-06-28 2020-06-28 Dynamic data warehousing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111782650A CN111782650A (en) 2020-10-16
CN111782650B true CN111782650B (en) 2024-04-05

Family

ID=72760294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010596835.3A Active CN111782650B (en) 2020-06-28 2020-06-28 Dynamic data warehousing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111782650B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08314951A (en) * 1995-05-12 1996-11-29 Hitachi Ltd Structure display method for relational data base and relational data base system
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device
JP2018136939A (en) * 2017-02-20 2018-08-30 株式会社 ビーアイマトリックスBi Matrix Co.,Ltd Method for updating database based on spreadsheet for generating update data-categorized optimal query sentence
CN110019478A (en) * 2017-12-28 2019-07-16 贵州白山云科技股份有限公司 Data lead-in method, medium, equipment and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9639542B2 (en) * 2014-02-14 2017-05-02 Sap Se Dynamic mapping of extensible datasets to relational database schemas

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08314951A (en) * 1995-05-12 1996-11-29 Hitachi Ltd Structure display method for relational data base and relational data base system
JP2018136939A (en) * 2017-02-20 2018-08-30 株式会社 ビーアイマトリックスBi Matrix Co.,Ltd Method for updating database based on spreadsheet for generating update data-categorized optimal query sentence
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device
CN110019478A (en) * 2017-12-28 2019-07-16 贵州白山云科技股份有限公司 Data lead-in method, medium, equipment and device

Also Published As

Publication number Publication date
CN111782650A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
EP1830312A1 (en) Rules base systems and methods with circumstance translation
RU2013143815A (en) COMPUTER SYSTEM, DATABASE AND USE SUCH
CN105488201A (en) Log inquiry method and system
CN114064690A (en) Data processing method and device
CN105488125A (en) Page access method and apparatus
CN112579898A (en) Enterprise information management method and device and server
CN112182014A (en) Database query method, device, equipment and storage medium
CN110704486A (en) Data processing method, device, system, storage medium and server
US11829356B2 (en) Object-based search processing
CN110046235B (en) Knowledge base assessment method, device and equipment
CN112732742A (en) Query page creating method and device, computer equipment and storage medium
CN110457401B (en) Data storage method and device, computer equipment and storage medium
CN111782650B (en) Dynamic data warehousing method and device, electronic equipment and storage medium
CN110750238B (en) Method and device for determining product demand and electronic equipment
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN109040311B (en) Service information push processing method and device
US20190286671A1 (en) Algorithmic computation of entity information from ip address
CN110874365A (en) Information query method and related equipment thereof
US20160226722A1 (en) Impact Analysis of Service Modifications in a Service Oriented Architecture
CN107977378B (en) Distributed data aggregation method and device
CN107688581B (en) Data model processing method and device
CN112685572B (en) Heterogeneous data fusion method and device
CN110647568B (en) Method and device for converting graph database data into programming language data
CN110321461B (en) Bill processing method, system, computer device and storage medium
CN113343072A (en) Label query method, device, equipment and storage 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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant