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

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

Info

Publication number
CN111782650A
CN111782650A CN202010596835.3A CN202010596835A CN111782650A CN 111782650 A CN111782650 A CN 111782650A CN 202010596835 A CN202010596835 A CN 202010596835A CN 111782650 A CN111782650 A CN 111782650A
Authority
CN
China
Prior art keywords
field
changed
sequence
field sequence
database
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.)
Granted
Application number
CN202010596835.3A
Other languages
Chinese (zh)
Other versions
CN111782650B (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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings 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

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/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 storage method, a dynamic data storage device, electronic equipment and a storage medium, wherein the method comprises the following steps: after the table file is imported into a database, acquiring the table file with changed table content; acquiring a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes; according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database; and warehousing the field contents of the filed in the table file imported into the database. The embodiment of the invention can realize automatic storage of dynamic data without re-establishing a database table, so that the operation of developers is simpler, the working efficiency of the developers is improved, and the resource consumption of a server and the database is reduced.

Description

Dynamic data storage method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a dynamic data storage method and apparatus, an electronic device, and a storage medium.
Background
At present, simple data warehouse storage is generally realized by using an EXCEL table, that is, data is automatically stored by using the EXCEL table, data warehouse storage is realized by using the EXCEL table, and a fixed mapping relation exists between contents in the EXCEL table and corresponding data contents in a database.
However, for irregular dynamic data, such as: the data with changed field sequence and name or changed quantity in the EXCEL table cannot realize the dynamic conversion of the contents in the EXCEL table and the corresponding contents in the database and the conversion of the corresponding relationship.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a dynamic data storage method, a dynamic data storage device, an electronic device and a storage medium.
In a first aspect, the present application provides a dynamic data importing method, including:
after the table file is imported into a database, acquiring the table file with changed table content;
acquiring a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes;
according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database;
and warehousing the field contents of the filed in the table file imported into the database.
Optionally, the warehousing, according to the second field sequence in the warehousing rule table, the field that has changed in the first field sequence in the form file that has been imported into the database, includes:
matching second fields located at different positions in the second field sequence with first fields located 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 newly added field relative to the first field sequence according to the matching result, determining a newly added position of the newly added field;
and adding the newly added field at the newly added position.
Optionally, the entering the field content of the entered field in the form 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 the content position corresponding to the newly added field.
Optionally, the warehousing, according to the second field sequence in the warehousing rule table, the field that has changed in the first field sequence in the form file that has been imported into the database, includes:
if the second field sequence is determined to have no added fields 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 with the changed field sequence;
and replacing the field at the field position in the first field sequence with the field at the corresponding field position in the second field sequence according to the fields in the second field sequence.
Optionally, the entering the field content of the entered field in the form file imported into the database includes:
searching field content corresponding to the replaced field in the table file imported into the database;
and moving the searched field content to the content position corresponding to the replaced field.
Optionally, the warehousing, according to the second field sequence in the warehousing rule table, the field that has changed in the first field sequence in the form file that has been imported into the database, 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 the second field sequence is determined to have a changed field relative to the first field sequence according to the matching result, determining the change position of the changed field;
replacing the field at the changed position in the first field sequence with the field at the corresponding field position in the second field sequence.
Optionally, the entering the field content of the entered field in the form file imported into the database includes:
determining whether the field content corresponding to the changed 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 changed field.
In a second aspect, the present application provides a dynamic data importing apparatus, including:
the first acquisition module is used for acquiring the table file with changed table content after the table file is imported into a database;
a second obtaining module, configured to obtain a corresponding warehousing rule table according to the form file, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes;
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 field contents of warehoused fields in the form file imported into the database.
Optionally, the first warehousing module is further configured to:
matching second fields located at different positions in the second field sequence with first fields located 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 newly added field relative to the first field sequence according to the matching result, determining a newly added position of the newly added field;
and adding the newly added field at the newly added 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 the content position corresponding to the newly added field.
Optionally, the first warehousing module is further configured to:
if the second field sequence is determined to have no added fields 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 with the changed field sequence;
and replacing the field at the field position in the first field sequence with the field at the corresponding field position in the second field sequence according to the fields in the second field sequence.
Optionally, the second warehousing module is further configured to: searching field content corresponding to the replaced field in the table file imported into the database;
and moving the searched field content to the 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 the second field sequence is determined to have a changed field relative to the first field sequence according to the matching result, determining the change position of the changed field;
replacing the field at the changed position in the first field sequence with the field at 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 changed 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 changed 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 mutual communication through the communication bus;
a memory for storing a computer program;
and a processor configured to implement the dynamic data entry 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, where a program of a dynamic data-entering method is stored, and when executed by a processor, the program of the dynamic data-entering method implements the steps of the dynamic data-entering method according to any one of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
in the embodiment of the present invention, after a 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, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes; according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database; and warehousing the field contents of the filed 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 files which are imported into the database can be warehoused according to the warehousing rule table, and the field contents of the warehoused fields in the table files which are imported into the database can be warehoused, so that the automatic warehousing of the dynamic data is realized, the database table does not need to be reestablished, the operation of developers is simpler, the working efficiency of developers 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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a dynamic data importing method according to an embodiment of the present disclosure;
fig. 2 is a structural diagram of a dynamic data importing apparatus according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, for irregular dynamic data, such as: the data with changed field sequence and name or changed quantity in the EXCEL table cannot realize the dynamic conversion of the contents in the EXCEL table and the corresponding contents in the database and the conversion of the corresponding relationship. To this end, an embodiment of the present invention provides a dynamic data importing method, an apparatus, an electronic device, and a storage medium, where the dynamic data reciprocal method may be applied in a server, as shown in fig. 1, and the dynamic data importing method 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 can refer to an EXCEL form file, dynamic data is stored in the form file, the dynamic data refers to data which changes along with time in system application, and directly reflects data of a transaction process, such as inventory data, website access amount, online number of people, daily sales amount and the like, when a warehousing triggering condition is met (such as timed time is up) the form file can be warehoused, and after the form file is warehoused, a form file with the same form content as that of the form file before warehousing can be created in a database.
Since the dynamic data is changed frequently with time, the table content of the table file changes with the time after the table file is put in storage, so in this step, the table file can be obtained again at intervals after the table file is imported into the database, or the server can be triggered to obtain the table file again by triggering operation after the maintenance personnel find that the table content changes.
And step S102, acquiring a corresponding warehousing rule table according to the table file.
In this embodiment of the present invention, the warehousing rule table includes: in practical application, the warehousing rule table may be configured by a developer according to actual requirements, and the first field sequence may include: the table file imported into the database is located in a header field, and the second field sequence may include: the table file with changed table content is located in the fields of the 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 header of the table file, such as: the table header of the table file that has been imported into the database includes three fields from left to right: name, gender and age, the first sequence of fields also includes three fields: name, gender and age, and in the same order as in the header of the form file; such as: the header of the form file after the form content is changed comprises five fields from left to right: name, gender, age, home address, and school calendar, the second sequence of fields also includes five fields: name, gender, age, home address and school calendar, and the sequence is the same as in the header of the form 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 change of the table content, and since the file names of different table files are different and the field sequence after the change of the table content every time is different, the uniquely matched entry rule table can be searched according to the file name and the field sequence of each file.
Step S103, according to the second field sequence in the warehousing rule table, warehousing the changed fields in the first field sequence in the form file imported into the database;
in this step, the second field sequence may be compared with the first field sequence to obtain a changed field in the first field sequence, such as: newly added fields, fields with changed sequence 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 using the field which is located at the corresponding position of the changed field in the second field sequence.
And step S104, warehousing the field contents of the filed fields in the form file imported into the database.
Since in practical applications, each field will generally have corresponding field contents, such as: the content of the field corresponding to the field "name" is "small red", the content of the field corresponding to the field "gender" is "female", the content of the field corresponding to the field "age" is "19", and so on, so after the changed field is put in storage, the content of the field corresponding to the field which changes with the field generally needs to be put in storage along with the changed field.
In the embodiment of the present invention, after a 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, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes; according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database; and warehousing the field contents of the filed 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 files which are imported into the database can be warehoused according to the warehousing rule table, and the field contents of the warehoused fields in the table files which are imported into the database can be warehoused, so that the automatic warehousing of the dynamic data is realized, the database table does not need to be reestablished, the operation of developers is simpler, the working efficiency of developers is improved, and the resource consumption of a server and the database is reduced.
In another embodiment of the present invention, the step S103 includes:
matching second fields located at different positions in the second field sequence with first fields located 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 newly added field relative to the first field sequence according to the matching result, determining a newly added position of the newly added field;
and adding the newly added field at the newly added position.
For example: the first field sequence includes three fields: name, gender and age, the second sequence of fields includes five fields: comparing the field sequence, the field with the changed field in the first field sequence can be determined to be the 'age' field, and the changed field is put in storage, namely: 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.
Correspondingly, 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 the content position corresponding to the newly added field.
When the changed fields are put in storage, the method comprises the following steps: when the 'home address' field and the 'academic record' field located at the fourth field position and the fifth field position in the second field sequence are added into the 'age' field, the 'home address' field and the 'academic record' are newly added fields, and the field content corresponding to the newly added field only exists in the form file after the form content is changed, so that the field content 'xx province xx city xx area' corresponding to the field 'home address' in the form file after the form content is changed and the field content 'subject' corresponding to the field 'academic record' can be put into storage.
The embodiment of the invention can automatically put the newly added fields and the field contents corresponding to the newly added fields in storage, realizes the automatic storage of dynamic data, does not need to reestablish a database table, is simpler for developers to operate, improves the working efficiency of the developers, and reduces the resource consumption of a server and a database.
In another embodiment of the present invention, the step S103 includes:
if the second field sequence is determined to have no added fields 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 with the changed field sequence;
and replacing the field at the field position in the first field sequence with the field at the corresponding field position in the second field sequence according to the fields in the second field sequence.
Such as: the first field sequence includes three fields: name, gender and age, the second sequence of fields includes five fields: the name, age and gender can be determined through comparing field sequences, the sequence of the gender and age in the first field sequence is changed, namely the changed fields are a 'gender' field and an 'age' field, and the changed fields are put in a warehouse, namely: the "gender" field at the second field position in the first field sequence is replaced with the "age" field at the second field position in the second field sequence and the "age" field at the third field position in the first field sequence is replaced with the "gender" field at the third field position in the second field sequence.
Correspondingly, the step S104 includes:
searching field content corresponding to the replaced field in the table file imported into the database;
and moving the searched field content to the content position corresponding to the replaced field.
Such as: when the changed fields are put in storage, the method comprises the following steps: when the 'age' field at the second field position in the second field sequence is used for replacing the 'gender' field at the second field position in the first field sequence, and the 'gender' field at the third field position in the first field sequence is replaced by the 'gender' field at the third field position in the second field sequence, the 'age' field and the corresponding field content are the 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 put the fields with changed field sequences and the field contents corresponding to the fields into a warehouse, realizes the automatic warehousing of dynamic data, does not need to reestablish a database table, is simpler for developers to operate, improves the working efficiency of the developers, and reduces the resource consumption of a server and a database.
In 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 the second field sequence is determined to have a changed field relative to the first field sequence according to the matching result, determining the change position of the changed field;
replacing the field at the changed position in the first field sequence with the field at the corresponding field position in the second field sequence.
Such as: the first field sequence includes three fields: name, gender and age, the second sequence of fields includes five fields: the name, age and home address can be compared with the field sequence to determine that the 'age' field in the first field sequence is changed, and the changed field is put in a warehouse, namely: the "age" field at the third field position in the first field sequence is replaced with the "home address" field at the third field position in the second field sequence.
Correspondingly, the step S104 includes:
determining whether the field content corresponding to the changed 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 changed field.
Such as: when the changed fields are put in storage, the method comprises the following steps: 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 form file after the form content is changed may be stored in a library and stored in the content position corresponding to the "home address" field.
The embodiment of the invention can automatically put the changed fields and the field contents corresponding to the changed fields in storage, realizes the automatic storage of dynamic data, does not need to reestablish a database table, is simpler for developers to operate, improves the working efficiency of the developers, and reduces the resource consumption of a server and a database.
In another embodiment of the present invention, there is also provided a dynamic data importing apparatus, as shown in fig. 2, the apparatus including:
the first obtaining module 11 is configured to obtain a table file with changed table content after the table file is imported into a database;
a second obtaining module 12, configured to obtain a corresponding warehousing rule table according to the table file, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes;
the first warehousing module 13 is configured to warehouse, according to the second field sequence in the warehousing rule table, a field that has changed in the first field sequence in the form file that has been imported into the database;
and the second warehousing module 14 is configured to warehouse field contents of warehoused fields in the form file imported into the database.
Optionally, the first warehousing module is further configured to:
matching second fields located at different positions in the second field sequence with first fields located 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 newly added field relative to the first field sequence according to the matching result, determining a newly added position of the newly added field;
and adding the newly added field at the newly added 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 the content position corresponding to the newly added field.
Optionally, the first warehousing module is further configured to:
if the second field sequence is determined to have no added fields 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 with the changed field sequence;
and replacing the field at the field position in the first field sequence with the field at the corresponding field position in the second field sequence according to the fields in the second field sequence.
Optionally, the second warehousing module is further configured to: searching field content corresponding to the replaced field in the table file imported into the database;
and moving the searched field content to the 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 the second field sequence is determined to have a changed field relative to the first field sequence according to the matching result, determining the change position of the changed field;
replacing the field at the changed position in the first field sequence with the field at 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 changed 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 changed field.
In another embodiment of the present invention, an electronic device is further provided, which includes 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 storage method in the embodiment of the method when executing the program stored in the memory.
In the electronic device provided by the embodiment of the present invention, the processor implements, by executing the program stored in the memory, that after a table file is imported into the database, the table file with changed table content is obtained, and a corresponding warehousing rule table is obtained according to the table file, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes; according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database; the method comprises the steps of warehousing field contents of warehoused fields in table files imported into the database, ensuring that the fields which change in a first field sequence in the table files imported into the database can be warehoused according to a warehousing rule table, warehousing the field contents of the warehoused fields in the table files imported into the database, achieving automatic warehousing of dynamic data, avoiding the need of re-establishing a database table, being simpler to operate by developers, improving the working efficiency of developers, and reducing resource consumption of servers and databases.
The communication bus 1140 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. 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 this does not mean only one bus or one type of bus.
The communication interface 1120 is used for communication between the electronic device and other devices.
The memory 1130 may include a Random Access Memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The processor 1110 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, on which a program of a dynamic data-entering method is stored, and when executed by a processor, the program of the dynamic data-entering method implements the steps of the dynamic data-entering method described in the foregoing method embodiment.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present 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 (10)

1. A method for dynamic data import, the method comprising:
after the table file is imported into a database, acquiring the table file with changed table content;
acquiring a corresponding warehousing rule table according to the table file, wherein the warehousing rule table comprises: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes;
according to the second field sequence in the warehousing rule table, warehousing fields which are changed in the first field sequence in the table file imported into the database;
and warehousing the field contents of the filed in the table file imported into the database.
2. The dynamic data import method according to claim 1, wherein the importing fields that have changed in the first field sequence in the table file imported into the database according to the second field sequence in the import rule table includes:
matching second fields located at different positions in the second field sequence with first fields located 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 newly added field relative to the first field sequence according to the matching result, determining a newly added position of the newly added field;
and adding the newly added field at the newly added position.
3. The dynamic data import method according to claim 2, wherein the importing the field contents of the fields that are already imported into the table file of 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 the content position corresponding to the newly added field.
4. The dynamic data import method according to claim 2, wherein the importing fields that have changed in the first field sequence in the table file imported into the database according to the second field sequence in the import rule table includes:
if the second field sequence is determined to have no added fields 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 with the changed field sequence;
and replacing the field at the field position in the first field sequence with the field at the corresponding field position in the second field sequence according to the fields in the second field sequence.
5. The dynamic data import method according to claim 4, wherein the importing the field contents of the fields that are imported into the table file of the database comprises:
searching field content corresponding to the replaced field in the table file imported into the database;
and moving the searched field content to the content position corresponding to the replaced field.
6. The dynamic data import method according to claim 4, wherein the importing fields that have changed in the first field sequence in the table file imported into the database according to the second field sequence in the import 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 the second field sequence is determined to have a changed field relative to the first field sequence according to the matching result, determining the change position of the changed field;
replacing the field at the changed position in the first field sequence with the field at the corresponding field position in the second field sequence.
7. The dynamic data import method according to claim 6, wherein the importing the field contents of the fields that are imported into the form file of the database comprises:
determining whether the field content corresponding to the changed 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 changed field.
8. A dynamic data import apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the table file with changed table content after the table file is imported into a database;
a second obtaining module, configured to obtain a corresponding warehousing rule table according to the form file, where the warehousing rule table includes: a first field sequence in the table file imported into the database and a second field sequence in the table file after table content changes;
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 field contents of warehoused fields in the form file imported into the database.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the dynamic data entry method according to any one of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a program of a dynamic data-binning method is stored, which, when executed by a processor, implements the steps of the dynamic data-binning method of any of claims 1 to 7.
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 true CN111782650A (en) 2020-10-16
CN111782650B 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 (5)

* 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
US20150234870A1 (en) * 2014-02-14 2015-08-20 Srinivasan Kumar Dynamic mapping of extensible datasets to relational database schemas
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

Patent Citations (5)

* 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
US20150234870A1 (en) * 2014-02-14 2015-08-20 Srinivasan Kumar Dynamic mapping of extensible datasets to relational database schemas
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
CN111782650B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN108156022B (en) Service calling method and device and electronic equipment
CN107870989A (en) webpage generating method and terminal device
CN109284321B (en) Data loading method, device, computing equipment and computer readable storage medium
CN102968418A (en) Website information search method and system
CN112685415A (en) Data import method and device, computer equipment and storage medium
CN109871408B (en) Multi-type database adaptation method, device, electronic equipment and storage medium
CN110046235B (en) Knowledge base assessment method, device and equipment
CN111563199A (en) Data processing method and device
CN105653678A (en) Data chart subscription method and data chart subscription system
CN107239542A (en) A kind of data statistical approach, device, server and storage medium
CN109086414B (en) Method, apparatus and storage medium for searching blockchain data
CN111709327B (en) Fuzzy matching method and device based on OCR (optical character recognition)
CN111431962B (en) Cross-domain resource access Internet of things service discovery method based on context awareness calculation
US12056201B2 (en) Systems and methods for automatic and adaptive browser bookmarks
CN111782650A (en) Dynamic data storage method and device, electronic equipment and storage medium
CN107977378B (en) Distributed data aggregation method and device
CN112685572B (en) Heterogeneous data fusion method and device
CN111914165B (en) Target object recommendation method, device, equipment and storage medium
CN110647568B (en) Method and device for converting graph database data into programming language data
CN110008264B (en) Data acquisition method and device of cost accounting system
CN109885710B (en) User image depicting method based on differential evolution algorithm and server
CN113343072A (en) Label query method, device, equipment and storage medium
CN111309673A (en) Snapshot data generation method and device of incremental data
CN113535770B (en) Data query method and device
CN114925145B (en) Data storage method and device, storage medium and electronic equipment

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
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.

GR01 Patent grant
GR01 Patent grant