CN110069571A - A kind of automated data control methods and device, electronic equipment - Google Patents

A kind of automated data control methods and device, electronic equipment Download PDF

Info

Publication number
CN110069571A
CN110069571A CN201910203329.0A CN201910203329A CN110069571A CN 110069571 A CN110069571 A CN 110069571A CN 201910203329 A CN201910203329 A CN 201910203329A CN 110069571 A CN110069571 A CN 110069571A
Authority
CN
China
Prior art keywords
database
data
name
correlation data
row
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910203329.0A
Other languages
Chinese (zh)
Inventor
何海鲜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910203329.0A priority Critical patent/CN110069571A/en
Publication of CN110069571A publication Critical patent/CN110069571A/en
Priority to PCT/CN2019/117676 priority patent/WO2020186782A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The present invention relates to data synchronization technology field, a kind of automated data control methods and device, electronic equipment are disclosed.The described method includes: receiving the first database search instruction and the instruction of the second database retrieval of user's input;Wherein, first database search instruction is instructed for extracting the first correlation data, the second database retrieval from first database for extracting the second correlation data from the second database;The first correlation data is extracted from first database according to first database search instruction;And the second correlation data is extracted from the second database according to the instruction of the second database retrieval;Analyze the different information between the first correlation data and the second correlation data;Comparing result is generated according to the different information that analysis obtains.As it can be seen that the database retrieval that can be inputted according to user instructs, the correlation data of retrieval is automatically extracted from database, and generate the comparing result after comparison, considerably reduce artificial workload.

Description

A kind of automated data control methods and device, electronic equipment
Technical field
The present invention relates to data synchronization technology field, in particular to a kind of automated data control methods and device, electronics Equipment.
Background technique
In routine work, it will usually same part data are sent to different processing sides, and stored to different databases In.For example, sales order is uploaded to head office system by branch company's system, to store into the database of head office system, together When above-mentioned sales order can be also stored in the database of itself.Therefore, it in order to guarantee the consistency of data, generally requires pair These contents are approximate, compare and analyze from the data of disparate databases, to discovery and correct mistake therein.It is based on This demand, data comparison tool come into being, and can extract the difference between correlation data.
Data comparison tool on the market at present, such as Excel, need manually to inquire data in the database, and according to Fixed format manually pastes the correlation data that inquiry obtains into Excel software, to carry out data comparison.As it can be seen that when answering When data comparison for big data quantity, this mode extremely consumes manpower.
Summary of the invention
In order to solve the problems, such as that manpower consumption present in the relevant technologies is big, the present invention provides a kind of automated datas pair Ratio method and device, electronic equipment.
First aspect of the embodiment of the present invention discloses a kind of automated data control methods, which comprises
Receive the first database search instruction and the instruction of the second database retrieval of user's input;Wherein, first number According to library searching instruction for extracting the first correlation data from first database, the second database retrieval instruction for from The second correlation data is extracted in second database;
First correlation data is extracted from the first database according to the first database search instruction;
And the second comparison number is extracted from second database according to second database retrieval instruction According to;
Analyze the different information between first correlation data and second correlation data;
Comparing result is generated according to the different information that analysis obtains.
As an alternative embodiment, in first aspect of the embodiment of the present invention, in the reception user input After first database search instruction and the instruction of the second database retrieval, the method also includes:
First database title is extracted from the first database search instruction;
And the second database-name is extracted from second database retrieval instruction;
Judge automated data comparison device whether with correspond to the first database title the first database Establish connection;
And judge automated data comparison device whether with correspond to described the of second database-name The connection of two Databases;
If the automated data comparison device and the first database establish connection, and the automated data pair It is connect than device with second Database, execution is described to be counted according to the first database search instruction from described first According to the step of extracting first correlation data in library;
If the automated data comparison device and the first database fail to establish connection or the automation number Fail to establish connection according to comparison device and second database, returns to the prompt information of instruction connection failure.
As an alternative embodiment, the first database is HBase in first aspect of the embodiment of the present invention Database, second database are oracle database;It is described according to the first database search instruction from described first First correlation data is extracted in database, comprising:
The first data table name and first row name are extracted from the first database search instruction;
The first tables of data corresponding with the first data table name is exported from the first database;
The first correlation data corresponding with the first row name is extracted from first tables of data;
It is described that the second comparison number is extracted from second database according to second database retrieval instruction According to, comprising:
The second data table name and secondary series name are extracted from second database retrieval instruction;
The second tables of data corresponding with the second data table name is exported from second database;
The second correlation data corresponding with the secondary series name is extracted from second tables of data.
As an alternative embodiment, in first aspect of the embodiment of the present invention, described from first data The first correlation data corresponding with the first row name is extracted in table, and extract from second tables of data with it is described After corresponding second correlation data of secondary series name, the method also includes:
Judge whether the first row name and the secondary series name are consistent;
If it is determined that the first row name is consistent with the secondary series name out, execute the analysis first correlation data and The step of different information between second correlation data;If it is determined that the first row name and the secondary series name are different out It causes, returns to the wrong prompt information of referred database search instruction.
As an alternative embodiment, determining described first described in first aspect of the embodiment of the present invention After column name is consistent with the secondary series name, and the analysis first correlation data and second correlation data it Between different information before, the method also includes:
For any the first row name that first correlation data is included, extracted from first correlation data pair The value of the first row name described in Ying Yu;
The first row name and the value corresponding to the first row name are added to the first comparison list;
And it for any second row name that second correlation data is included, is mentioned from second correlation data Take out the value for corresponding to the second row name;
The second row name and the value corresponding to the second row name are added to the second comparison list.
As an alternative embodiment, in first aspect of the embodiment of the present invention, analysis first comparison Different information between data and second correlation data, comprising:
The first row list of file names is extracted from the first comparison list;
And the second row list of file names is extracted from the second comparison list;
It, will if the first element number of the first row list of file names is greater than the second element number of the second row list of file names The first row list of file names is as target traversal of lists;If first element number is less than or equal to the second element Number, using the second row list of file names as target traversal of lists;
For the either objective row name of the target traversal of lists, judge to correspond to the mesh in the first comparison list Whether the first object value for marking row name is identical as the second target value of the target line name is corresponded in the second comparison list;
If not identical, the target line name, the first object value and second target value are added to different information In list, to obtain all information of the different information list as first correlation data and second correlation data Between different information.
As an alternative embodiment, in first aspect of the embodiment of the present invention, the method also includes:
For the either objective row name of the target traversal of lists, if in the first comparison list or second pair described Than the target line name is not present in list, the target line name is added in the different information list, described in obtaining All information of different information list are as the different information between first correlation data and second correlation data.
Second aspect of the embodiment of the present invention discloses a kind of automated data comparison device, and described device includes:
Receiving unit, for receiving the first database search instruction and the instruction of the second database retrieval of user's input;Its In, the first database search instruction from first database for extracting the first correlation data, second database Search instruction from the second database for extracting the second correlation data;
Extraction unit, for extracting described from the first database according to the first database search instruction One correlation data;And described second pair is extracted from second database according to second database retrieval instruction Compare data;
Analytical unit, for analyzing the different information between first correlation data and second correlation data;
Generation unit, the different information for being obtained according to analysis generate comparing result.
The third aspect of the embodiment of the present invention discloses a kind of electronic equipment, and the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing When device executes, automated data control methods disclosed in first aspect of the embodiment of the present invention is realized.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, stores computer program, institute Stating computer program makes computer execute automated data control methods disclosed in first aspect of the embodiment of the present invention.
The technical solution that the embodiment of the present invention provides can include the following benefits:
Automated data control methods provided by the present invention includes the following steps: the first database for receiving user's input Search instruction and the instruction of the second database retrieval;Wherein, first database search instruction from first database for extracting First correlation data, the second database retrieval are instructed for extracting the second correlation data from the second database;According to first Database retrieval instruction extracts the first correlation data from first database;It is counted according to the instruction of the second database retrieval from second According to extracting the second correlation data in library;Analyze the different information between the first correlation data and the second correlation data, and according to It analyzes obtained different information and generates comparing result.
Under the method, the database retrieval by receiving user's input is instructed, and can be instructed according to database retrieval automatic Ground extracts the correlation data of retrieval from database, considerably reduces artificial workload;Additionally it is possible to automatically right The first correlation data from first database and the second correlation data from the second database compare, and export Different information between first correlation data and the second correlation data is solved and is led because the data output format of database is incompatible The comparison error problem of cause, improves the intelligence degree and accuracy of data comparison, while decreasing manual intervention, from And promote the efficiency of data comparison.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited Invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and in specification together principle for explaining the present invention.
Fig. 1 is a kind of structural schematic diagram of device disclosed by the embodiments of the present invention;
Fig. 2 is a kind of flow chart of automated data control methods disclosed by the embodiments of the present invention;
Fig. 3 is the flow chart of another automated data control methods disclosed by the embodiments of the present invention;
Fig. 4 is a kind of structural schematic diagram of automated data comparison device disclosed by the embodiments of the present invention;
Fig. 5 is the structural schematic diagram of another automated data comparison device disclosed by the embodiments of the present invention.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Embodiment one
Implementation environment of the invention can be electronic equipment, such as smart phone, tablet computer, desktop computer.
Fig. 1 is a kind of structural schematic diagram of device disclosed by the embodiments of the present invention.Device 100 can be above-mentioned electronics and set It is standby.As shown in Figure 1, device 100 may include following one or more components: processing component 102, memory 104, power supply module 106, multimedia component 108, audio component 110, sensor module 114 and communication component 116.
The integrated operation of the usual control device 100 of processing component 102, such as with display, telephone call, data communication, phase Machine operation and the associated operation of record operation etc..Processing component 102 may include one or more processors 118 to execute Instruction, to complete all or part of the steps of following methods.In addition, processing component 102 may include one or more modules, For convenient for the interaction between processing component 102 and other assemblies.For example, processing component 102 may include multi-media module, use In to facilitate the interaction between multimedia component 108 and processing component 102.
Memory 104 is configured as storing various types of data to support the operation in device 100.These data are shown Example includes the instruction of any application or method for operating on the device 100.Memory 104 can be by any kind of Volatibility or non-volatile memory device or their combination are realized, such as static random access memory (Static RandomAccess Memory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read Only Memory, abbreviation EPROM), programmable read only memory (Programmable Red- Only Memory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic memory, flash Device, disk or CD.It is also stored with one or more modules in memory 104, is configured to for the one or more module It is executed by the one or more processors 118, to complete all or part of step in method as follows.
Power supply module 106 provides electric power for the various assemblies of device 100.Power supply module 106 may include power management system System, one or more power supplys and other with for device 100 generate, manage, and distribute the associated component of electric power.
Multimedia component 108 includes the screen of one output interface of offer between device 100 and user.In some realities It applies in example, screen may include liquid crystal display (Liquid Crystal Display, abbreviation LCD) and touch panel.If Screen includes touch panel, and screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes One or more touch sensors are to sense the gesture on touch, slide, and touch panel.Touch sensor can be sensed not only The boundary of a touch or slide action, but also detect duration and pressure relevant to touch or slide.Screen may be used also To include display of organic electroluminescence (Organic Light Emitting Display, abbreviation OLED).
Audio component 110 is configured as output and/or input audio signal.For example, audio component 110 includes a Mike Wind (Microphone, abbreviation MIC), when device 100 is in operation mode, such as call model, logging mode and speech recognition mould When formula, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 104 or via communication component 116 send.In some embodiments, audio component 110 further includes a loudspeaker, for exporting Audio signal.
Sensor module 114 includes one or more sensors, and the state for providing various aspects for device 100 is commented Estimate.For example, sensor module 114 can detecte the state that opens/closes of device 100, the relative positioning of component, sensor group Part 114 can be with the position change of 100 1 components of detection device 100 or device and the temperature change of device 100.Some In embodiment, which can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 116 is configured to facilitate the communication of wired or wireless way between device 100 and other equipment.Device 100 can access the wireless network based on communication standard, such as WiFi (Wireless-Fidelity, Wireless Fidelity).In the present invention In embodiment, communication component 116 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In embodiments of the present invention, communication component 116 further includes near-field communication (Near Field Communication, abbreviation NFC) module, for promote short range communication.For example, radio frequency identification (Radio Frequency can be based in NFC module Identification, abbreviation RFID) technology, Infrared Data Association (Infrared DataAssociation, abbreviation IrDA) Technology, ultra wide band (Ultra Wideband, abbreviation UWB) technology, Bluetooth technology and other technologies are realized.
In the exemplary embodiment, device 100 can be by one or more application specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), it is digital signal processor, digital signal processing appts, programmable Logical device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components are realized, for executing Following methods.
Embodiment two
Referring to Fig. 2, Fig. 2 is a kind of flow diagram of automated data control methods disclosed by the embodiments of the present invention. The automated data control methods as shown in Figure 2 may comprise steps of:
201, the first database search instruction and the instruction of the second database retrieval of user's input are received;Wherein, the first number According to library searching instruction for extracting the first correlation data from first database, the instruction of the second database retrieval is for from second The second correlation data is extracted in database.
The embodiment of the present invention can be applied to automated data comparison device or electronic equipment, not limit specifically this It is fixed.
In the embodiment of the present invention, first database can be HBase database, and the second database can be Oracle data Library.HBase database and oracle database belong to relevant database, can mutual joining two-dimentional ranks table by multiple Composition.Oracle database is line data library, is write data into data block with behavior unit, when reading specified column, is needed Entire data block is read in into memory, then by traversing several row data, can just read out the content of specified column;And HBase number It is columnar database according to library, is stored using column as element, when reading specified column, it is only necessary to has the column block of specified column to read storage Enter memory, the content of specified column can be read.As it can be seen that the data of HBase database and oracle database storage with it is defeated Format is different from out, and HBase database is suitable for extensive, high concurrent data query, and oracle database is suitable for again Miscellaneous inquiry and additions and deletions, which are looked into, changes operation.
As an alternative embodiment, step 201 may comprise steps of:
Receive first database title, the first data table name and the first row name and the second database name of user's input Title, the second data table name and secondary series name;
According to first database title, the first data table name and first row name, the type phase with first database is generated The first database search instruction matched;And according to the second database-name, the second data table name and secondary series name, generate with The second database retrieval instruction that the type of second database matches.
For example, user is intended to the employee ID letter to the new registration employee table being respectively stored in database A and database B Breath compares, then in the interaction page of corresponding automated data comparison device, user only needs defeated for the first data Enter region input (or selecting by list) new registration employee table name-employee ID of database A-, and is inputted in the second data Input database B- new registration employee table name-employee ID in region can compare device automatically generated data library by automated data Search instruction, to extract correlation data from different databases.
Further, user can also merely enter first database title, the first data table name, the second database-name and Second data table name is defaulted carry out pair to the data for all corresponding to same column name in the first tables of data and the second tables of data at this time Than obtaining the comparing result of the first tables of data and the second tables of data.
202, the first correlation data is extracted from first database according to first database search instruction, and, according to The instruction of second database retrieval extracts the second correlation data from the second database.
203, the different information between the first correlation data and the second correlation data is analyzed.
204, comparing result is generated according to the different information that analysis obtains.
In the embodiment of the present invention, different information may include between the first correlation data and the second correlation data for same The different row data (including the row name lacked and the corresponding different value with a line name) of column name, and in the form of Visual Chart Comparing result is generated, to show user.
As it can be seen that implementing method described in Fig. 2, the database retrieval by receiving user's input is instructed, can be according to number The correlation data for automatically extracting retrieval from database according to library searching instruction, considerably reduces artificial workload;This Outside, additionally it is possible to number automatically be compared to the first correlation data from first database and second from the second database According to comparing, and the different information between the first correlation data and the second correlation data is exported, solves the number because of database According to the incompatible caused comparison error problem of output format, the intelligence degree and accuracy of data comparison are improved, simultaneously Manual intervention is decreased, to promote the efficiency of data comparison.
Embodiment three
Referring to Fig. 3, Fig. 3 is the process signal of another automated data control methods disclosed by the embodiments of the present invention Figure.As shown in figure 3, the automated data control methods may comprise steps of:
301, the first database search instruction and the instruction of the second database retrieval of user's input are received;Wherein, the first number According to library searching instruction for extracting the first correlation data from first database, the instruction of the second database retrieval is for from second The second correlation data is extracted in database.
302, first database title is extracted from first database search instruction, and, from the second database retrieval The second database-name is extracted in instruction.
303, judge whether automated data comparison device is established with the first database for corresponding to first database title Connection;And judge whether automated data comparison device connects with the second Database for corresponding to the second database-name It connects;If automated data comparison device and first database establish connection, and automated data comparison device and the second data Connection is established in library, executes step 305~step 307;Otherwise, step 304 is executed.
304, the prompt information of instruction connection failure is returned.
As it can be seen that implementing 302~step 304 of above-mentioned steps, by ensuring that automated data compares device and first database Connection is all normally established with the second database, can be avoided because connection failure wastes the unnecessary waiting time, guarantee retrieval pair Process than data is normally carried out.
305, the first correlation data is extracted from first database according to first database search instruction, and, according to The instruction of second database retrieval extracts the second correlation data from the second database.
As an alternative embodiment, extracting first from first database according to first database search instruction Correlation data, specifically includes the following steps:
The first data table name and first row name are extracted from first database search instruction;
The first tables of data corresponding with the first data table name is exported from first database;
The first correlation data corresponding with first row name is extracted from the first tables of data.
And the second correlation data is extracted from the second database according to the instruction of the second database retrieval, it specifically includes Following steps:
The second data table name and secondary series name are extracted from the instruction of the second database retrieval;
The second tables of data corresponding with the second data table name is exported from the second database;
The second correlation data corresponding with secondary series name is extracted from the second tables of data.
Further, as an alternative embodiment, it is corresponding with first row name being extracted from the first tables of data The first correlation data, and after extracting the second correlation data corresponding with secondary series name in the second tables of data, may be used also With the following steps are included:
Judge whether first row name is consistent with secondary series name;
If it is determined that first row name is consistent with secondary series name out, execute between the first correlation data of analysis and the second correlation data Different information the step of;If it is determined that first row name and secondary series name are inconsistent out, it is wrong to return to referred database search instruction Prompt information.
As it can be seen that by extracting the comparison number corresponding to same column name respectively from the first tables of data and the second tables of data According to can be realized the comparison for carrying out precisely arriving field and value to the first tables of data and the second tables of data.
Still further, determine first row name it is consistent with secondary series name after, and analyze the first correlation data And before the second different information between correlation data, can also include:
For any the first row name that the first correlation data is included, extract from the first correlation data corresponding to first The value of row name;
The first row name and the value corresponding to the first row name are added to the first comparison list;
And for any second row name that the second correlation data is included, correspondence is extracted from the second correlation data In the value of the second row name;
Second row name and the value corresponding to the second row name are added to the second comparison list.
It is appreciated that since first database (HBase database) is columnar database, and the second database (Oracle Database) it is line data library, the data output format of the two is different, in order to guarantee the accuracy of data comparison, is being counted Before comparison, need the format of unified first correlation data and the second correlation data for two-dimentional row-column list, the two dimension row-column list For storing all row names, all column names that first/second correlation data includes and the value corresponding to specific row, column name.It can See, by the format of unified first correlation data and the second correlation data, the output format for being able to solve correlation data is incompatible Problem reduces comparison error rate.
306, the different information between the first correlation data and the second correlation data is analyzed.
As an alternative embodiment, carrying out unified formatting to the first correlation data and the second correlation data, And after obtaining the first comparison list and the second comparison list, step 306 is specifically included:
The first row list of file names is extracted from the first comparison list;
And the second row list of file names is extracted from the second comparison list;
If the first element number of the first row list of file names is greater than the second element number of the second row list of file names, by the first row name List is as target traversal of lists;If the first element number be less than or equal to second element number, using the second row list of file names as Target traversal of lists;
For the either objective row name of target traversal of lists, judge to correspond to the first of target line name in the first comparison list Whether target value is identical as the second target value of target line name is corresponded in the second comparison list;
If not identical, target line name, first object value and the second target value are added in different information list, to obtain All information of different information list are as the different information between the first correlation data and the second correlation data.
As it can be seen that needing after determining the field (column) that needs compare for the first comparison list and the second comparison list In correspond respectively to the first object value of same target line name and the second target value is matched.By from the first row list of file names and Pick out the row list of file names comprising more multielement (row name) number in second row list of file names, and as target traversal of lists, It enables to all row names in the first comparison list and the second comparison list to be traversed, guarantees the integrality of data comparison.
It is further alternative, this programme further include:
For the either objective row name of target traversal of lists, if not deposited in the first comparison list or the second comparison list In target line name, target line name is added in different information list, to obtain all information of different information list as Different information between one correlation data and the second correlation data.
As it can be seen that implement optional embodiment, by all row names in traversal target traversal of lists it can obtain first/ Non-shared row name in second comparison list, and as the discrepancy of the first correlation data and the second correlation data.
307, comparing result is generated according to the different information that analysis obtains.
As an alternative embodiment, in the first database search instruction and the second database that receive user's input Before search instruction, user's login interface can be provided, receives the account information of active user's input, is to verify active user It is no that there is operating right;Also, when determining that active user has operating right, the first database for receiving user's input is executed The step of search instruction and the second database retrieval instruct.
Further, after generating comparing result, the comparing result of generation can also be sent to binding mailbox automatically Or binding terminal, reading data and comparison are executed to inform that relevant treatment personnel active user compares device by automated data The concrete condition of operation and the data comparison result of acquisition.As it can be seen that it is capable of the legitimacy of monitoring data contrast operation in this way, with And rapidly comparing result is notified to give relevant treatment personnel.
As it can be seen that method described in implementing Fig. 3, the database retrieval by receiving user's input is instructed, can be according to number The correlation data for automatically extracting retrieval from database according to library searching instruction, considerably reduces artificial workload;This Outside, additionally it is possible to number automatically be compared to the first correlation data from first database and second from the second database According to comparing, and the different information between the first correlation data and the second correlation data is exported, solves the number because of database According to the incompatible caused comparison error problem of output format, the intelligence degree and accuracy of data comparison are improved, simultaneously Manual intervention is decreased, to promote the efficiency of data comparison;In addition, by ensuring that automated data compares device and first Database and the second database all normally establish connection, can be avoided because connection failure wastes the unnecessary waiting time, guarantee The process of retrieval correlation data is normally carried out;Also, by extracting correspondence respectively from the first tables of data and the second tables of data In the correlation data of same column name, pair for carrying out precisely arriving field and value to the first tables of data and the second tables of data can be realized Than;Further, by the format of unified first correlation data and the second correlation data, the output lattice of correlation data are able to solve Formula incompatibility problem reduces comparison error rate;Still further, by being selected from the first row list of file names and the second row list of file names Out include the row list of file names of more multielement (row name) number, and as target traversal of lists, the first comparison is enabled to arrange All row names are traversed in table and the second comparison list, guarantee the integrality of data comparison, additionally it is possible to obtain first/second pair The row name more non-shared than in list, and as the discrepancy of the first correlation data and the second correlation data.
Example IV
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of automated data comparison device disclosed by the embodiments of the present invention. As shown in figure 4, automated data comparison device may include: receiving unit 401, extraction unit 402,403 and of analytical unit Generation unit 404, wherein
Receiving unit 401, for receiving the first database search instruction and the instruction of the second database retrieval of user's input; Wherein, for extracting the first correlation data from first database, the second database retrieval refers to first database search instruction It enables for extracting the second correlation data from the second database.
As an alternative embodiment, receiving unit 401, specifically for receiving the first database name of user's input Title, the first data table name and first row name and the second database-name, the second data table name and secondary series name;And according to First database title, the first data table name and first row name generate the first data to match with the type of first database Library searching instruction;And according to the second database-name, the second data table name and secondary series name, generate and the second database The second database retrieval instruction that type matches.
For example, user is intended to the employee ID letter to the new registration employee table being respectively stored in database A and database B Breath compares, then in the interaction page of corresponding automated data comparison device, user only needs defeated for the first data Enter region input (or selecting by list) new registration employee table name-employee ID of database A-, and is inputted in the second data Input database B- new registration employee table name-employee ID in region can compare device automatically generated data library by automated data Search instruction, to extract correlation data from different databases.
Further, user can also merely enter first database title, the first data table name, the second database-name and Second data table name is defaulted carry out pair to the data for all corresponding to same column name in the first tables of data and the second tables of data at this time Than obtaining the comparing result of the first tables of data and the second tables of data.
Extraction unit 402, for extracting the first comparison number from first database according to first database search instruction According to;And the second correlation data is extracted from the second database according to the instruction of the second database retrieval.
Analytical unit 403, for analyzing the different information between the first correlation data and the second correlation data.
Generation unit 404, the different information for being obtained according to analysis generate comparing result.
As it can be seen that implementing device described in Fig. 4, the database retrieval by receiving user's input is instructed, can be according to number The correlation data for automatically extracting retrieval from database according to library searching instruction, considerably reduces artificial workload;This Outside, additionally it is possible to number automatically be compared to the first correlation data from first database and second from the second database According to comparing, and the different information between the first correlation data and the second correlation data is exported, solves the number because of database According to the incompatible caused comparison error problem of output format, the intelligence degree and accuracy of data comparison are improved, simultaneously Manual intervention is decreased, to promote the efficiency of data comparison.
Embodiment five
Referring to Fig. 5, Fig. 5 is the structural representation of another automated data comparison device disclosed by the embodiments of the present invention Figure.It is that automated data comparison device as shown in Figure 4 optimizes that automated data shown in fig. 5, which compares device,. Compared with automated data shown in Fig. 4 comparison device, automated data comparison device shown in fig. 5 can also include: to sentence Disconnected unit 405 and prompt unit 406, wherein
Extraction unit 402 is also used to receive the first database search instruction and second of user's input in receiving unit 401 After database retrieval instruction, first database title is extracted from first database search instruction;And from the second data The second database-name is extracted in library searching instruction.
Judging unit 405, for judge automated data comparison device whether with correspond to the of first database title The connection of one Database;And judge automated data comparison device whether with correspond to the second database-name second Database connection.
Extraction unit 402 is used to extract the first correlation data from first database according to first database search instruction Mode specifically:
Extraction unit 402, for determining automated data comparison device and first database foundation in judging unit 405 Connection, and automated data comparison device is extracted from first database search instruction when connecting with the second Database First data table name and first row name out;And the first data corresponding with the first data table name are exported from first database Table;And the first correlation data corresponding with first row name is extracted from the first tables of data.
Prompt unit 406 fails for determining automated data comparison device in judging unit 405 with first database Connection or automated data comparison device and the second database are established when failing to establish connection, returns and indicates connection failure Prompt information.
As an alternative embodiment, extraction unit 402 is used to be counted according to the instruction of the second database retrieval from second According to the mode for extracting the second correlation data in library specifically:
Extraction unit 402, for extracting the second data table name and secondary series name from the instruction of the second database retrieval;With And the second tables of data corresponding with the second data table name is exported from the second database;And it is extracted from the second tables of data The second correlation data corresponding with secondary series name.
Further, as an alternative embodiment, judging unit 405, is also used in extraction unit 402 from first The first correlation data corresponding with first row name is extracted in tables of data, and is extracted and secondary series name from the second tables of data After corresponding second correlation data, judge whether first row name is consistent with secondary series name.
Analytical unit 403, specifically for judging unit 405 determine first row name it is consistent with secondary series name when, analysis Different information between first correlation data and the second correlation data.
Prompt unit 406 is also used to when judging unit 405 determines first row name and secondary series name is inconsistent, is returned The wrong prompt information of referred database search instruction.
Still further, extraction unit 402, is also used to determine first row name and secondary series name one in judging unit 405 After cause, and before the different information that analytical unit 403 analyzes between the first correlation data and the second correlation data, for Any the first row name that first correlation data is included, extracts the value corresponding to the first row name from the first correlation data;With And the first row name and value corresponding to the first row name are added to the first comparison list;And it is wrapped for the second correlation data Any second row name contained, extracts the value corresponding to the second row name from the second correlation data;And by the second row name and right The second comparison list should be added in the value of the second row name.
Analytical unit 403 is used to analyze the different information between first correlation data and second correlation data Mode specifically:
Analytical unit 403, for extracting the first row list of file names from the first comparison list;And it is arranged from the second comparison The second row list of file names is extracted in table;And it is greater than the of the second row list of file names in the first element number of the first row list of file names When Was Used number, using the first row list of file names as target traversal of lists;It is less than or equal to second element in the first element number When number, using the second row list of file names as target traversal of lists;And the either objective row name for target traversal of lists, sentence Whether the first object value for corresponding to target line name in disconnected first comparison list compares with second corresponds to target line name in list The second target value it is identical;And in first object value and not identical the second target value, by target line name, first object value It is added in different information list with the second target value, to obtain all information of different information list as the first correlation data With the different information between the second correlation data.
Analytical unit 403 is also used to the either objective row name for target traversal of lists, in the first comparison list or the When target line name is not present in two comparison lists, target line name is added in different information list, to obtain different information column All information of table are as the different information between the first correlation data and the second correlation data.
As an alternative embodiment, automated data comparison device can also include authentication unit and notification sheet Member, wherein
Authentication unit, for instructing it in the first database search instruction and the second database retrieval that receive user's input Before, user's login interface is provided, receives the account information of active user's input, to verify whether active user has operating rights Limit;Also, when determining that active user has operating right, so that receiving unit 401 executes the first number for receiving user's input The step of according to library searching instruction and the instruction of the second database retrieval.
Notification unit, for after generating comparing result, the comparing result of generation is sent to automatically bind mailbox or Terminal is bound, to inform that relevant treatment personnel active user compares device execution reading data by automated data and comparison is grasped The concrete condition of work and the data comparison result of acquisition.As it can be seen that it is capable of the legitimacy of monitoring data contrast operation in this way, and Rapidly comparing result is notified to give relevant treatment personnel.
As it can be seen that implementing device described in Fig. 5, the database retrieval by receiving user's input is instructed, can be according to number The correlation data for automatically extracting retrieval from database according to library searching instruction, considerably reduces artificial workload;This Outside, additionally it is possible to number automatically be compared to the first correlation data from first database and second from the second database According to comparing, and the different information between the first correlation data and the second correlation data is exported, solves the number because of database According to the incompatible caused comparison error problem of output format, the intelligence degree and accuracy of data comparison are improved, simultaneously Manual intervention is decreased, to promote the efficiency of data comparison;In addition, by ensuring that automated data compares device and first Database and the second database all normally establish connection, can be avoided because connection failure wastes the unnecessary waiting time, guarantee The process of retrieval correlation data is normally carried out;Also, by extracting correspondence respectively from the first tables of data and the second tables of data In the correlation data of same column name, pair for carrying out precisely arriving field and value to the first tables of data and the second tables of data can be realized Than;Further, by the format of unified first correlation data and the second correlation data, the output lattice of correlation data are able to solve Formula incompatibility problem reduces comparison error rate;Still further, by being selected from the first row list of file names and the second row list of file names Out include the row list of file names of more multielement (row name) number, and as target traversal of lists, the first comparison is enabled to arrange All row names are traversed in table and the second comparison list, guarantee the integrality of data comparison, additionally it is possible to obtain first/second pair The row name more non-shared than in list, and as the discrepancy of the first correlation data and the second correlation data.
The present invention also provides a kind of electronic equipment, which includes:
Processor;
Memory is stored with computer-readable instruction on the memory, when which is executed by processor, Realize automated data control methods as previously shown.
The electronic equipment can be Fig. 1 shown device 100.
In one exemplary embodiment, the present invention also provides a kind of computer readable storage mediums, are stored thereon with calculating Machine program when the computer program is executed by processor, realizes automated data control methods as previously shown.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of automated data control methods, which is characterized in that the described method includes:
Receive the first database search instruction and the instruction of the second database retrieval of user's input;Wherein, the first database Search instruction from first database for extracting the first correlation data, and the second database retrieval instruction is for from second The second correlation data is extracted in database;
First correlation data is extracted from the first database according to the first database search instruction;
And second correlation data is extracted from second database according to second database retrieval instruction;
Analyze the different information between first correlation data and second correlation data;
Comparing result is generated according to the different information that analysis obtains.
2. the method according to claim 1, wherein the first database retrieval in the reception user input refers to It enables after being instructed with the second database retrieval, the method also includes:
First database title is extracted from the first database search instruction;
And the second database-name is extracted from second database retrieval instruction;
Judge whether automated data comparison device is established with the first database for corresponding to the first database title Connection;
And judge whether the automated data comparison device counts with described second corresponding to second database-name Connection is established according to library;
If the automated data comparison device and the first database establish connection, and automated data comparison dress Set and connect with second Database, execute it is described according to the first database search instruction from the first database In the step of extracting first correlation data;
If the automated data comparison device and the first database fail to establish connection or the automated data pair Fail to establish connection than device and second database, returns to the prompt information of instruction connection failure.
3. according to the method described in claim 2, it is characterized in that, the first database be HBase database, described second Database is oracle database;It is described that institute is extracted from the first database according to the first database search instruction State the first correlation data, comprising:
The first data table name and first row name are extracted from the first database search instruction;
The first tables of data corresponding with the first data table name is exported from the first database;
The first correlation data corresponding with the first row name is extracted from first tables of data;
It is described that second correlation data is extracted from second database according to second database retrieval instruction, it wraps It includes:
The second data table name and secondary series name are extracted from second database retrieval instruction;
The second tables of data corresponding with the second data table name is exported from second database;
The second correlation data corresponding with the secondary series name is extracted from second tables of data.
4. according to the method described in claim 3, it is characterized in that, it is described extracted from first tables of data with it is described Corresponding first correlation data of first row name, and corresponding with the secondary series name is extracted from second tables of data After two correlation datas, the method also includes:
Judge whether the first row name and the secondary series name are consistent;
If it is determined that the first row name is consistent with the secondary series name out, the analysis first correlation data and described is executed The step of different information between second correlation data;If it is determined that the first row name and the secondary series name are inconsistent out, return It returns designation date library searching and instructs the wrong prompt information.
5. according to the method described in claim 4, it is characterized in that, determining the first row name and the secondary series described Different information after name is consistent, and between the analysis first correlation data and second correlation data it Before, the method also includes:
For any the first row name that first correlation data is included, extracts and correspond to from first correlation data The value of the first row name;
The first row name and the value corresponding to the first row name are added to the first comparison list;
And it for any second row name that second correlation data is included, is extracted from second correlation data Value corresponding to the second row name;
The second row name and the value corresponding to the second row name are added to the second comparison list.
6. according to the method described in claim 5, it is characterized in that, the analysis first correlation data and second pair described Than the different information between data, comprising:
The first row list of file names is extracted from the first comparison list;
And the second row list of file names is extracted from the second comparison list;
It, will be described if the first element number of the first row list of file names is greater than the second element number of the second row list of file names The first row list of file names is as target traversal of lists;It, will if first element number is less than or equal to the second element number The second row list of file names is as target traversal of lists;
For the either objective row name of the target traversal of lists, judge to correspond to the target line in the first comparison list Whether the first object value of name is identical as the second target value of the target line name is corresponded in the second comparison list;
If not identical, the target line name, the first object value and second target value are added to different information list In, to obtain all information of the different information list as between first correlation data and second correlation data Different information.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
For the either objective row name of the target traversal of lists, if in the first comparison list or the second comparison column The target line name is not present in table, the target line name is added in the different information list, to obtain the difference All information of information list are as the different information between first correlation data and second correlation data.
8. a kind of automated data compares device, which is characterized in that described device includes:
Receiving unit, for receiving the first database search instruction and the instruction of the second database retrieval of user's input;Wherein, institute First database search instruction is stated for extracting the first correlation data from first database, second database retrieval refers to It enables for extracting the second correlation data from the second database;
Extraction unit, for extracting described first pair from the first database according to the first database search instruction Compare data;And the second comparison number is extracted from second database according to second database retrieval instruction According to;
Analytical unit, for analyzing the different information between first correlation data and second correlation data;
Generation unit, the different information for being obtained according to analysis generate comparing result.
9. a kind of electronic equipment, including memory and processor, the memory are stored with computer program, which is characterized in that The step of processor realizes method according to any one of claims 1 to 7 when executing the computer program.
10. a kind of computer readable storage medium, which is characterized in that it stores computer program, and the computer program makes Computer perform claim requires 1~7 described in any item automated data control methods.
CN201910203329.0A 2019-03-18 2019-03-18 A kind of automated data control methods and device, electronic equipment Pending CN110069571A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910203329.0A CN110069571A (en) 2019-03-18 2019-03-18 A kind of automated data control methods and device, electronic equipment
PCT/CN2019/117676 WO2020186782A1 (en) 2019-03-18 2019-11-12 Automated data comparison method and device, electronic device, computer non-volatile readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910203329.0A CN110069571A (en) 2019-03-18 2019-03-18 A kind of automated data control methods and device, electronic equipment

Publications (1)

Publication Number Publication Date
CN110069571A true CN110069571A (en) 2019-07-30

Family

ID=67365306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910203329.0A Pending CN110069571A (en) 2019-03-18 2019-03-18 A kind of automated data control methods and device, electronic equipment

Country Status (2)

Country Link
CN (1) CN110069571A (en)
WO (1) WO2020186782A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078738A (en) * 2019-11-25 2020-04-28 泰康保险集团股份有限公司 Data processing method and device, electronic equipment and storage medium
CN111241047A (en) * 2020-04-26 2020-06-05 北京信安世纪科技股份有限公司 File synchronization method and device
WO2020186782A1 (en) * 2019-03-18 2020-09-24 平安普惠企业管理有限公司 Automated data comparison method and device, electronic device, computer non-volatile readable storage medium
CN115905273A (en) * 2022-11-10 2023-04-04 贝壳找房(北京)科技有限公司 Data detection method in digital warehouse table, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103733633A (en) * 2011-05-12 2014-04-16 索林科集团 Video analytics system
CN106528674A (en) * 2016-10-31 2017-03-22 厦门服云信息科技有限公司 Method and device for high-performance query based on Hbase row keys
CN106599300A (en) * 2016-12-28 2017-04-26 中国建设银行股份有限公司 Structural comparison method and apparatus for distributed system databases
CN106682139A (en) * 2016-12-19 2017-05-17 深圳盒子支付信息技术有限公司 Method and system for achieving HBase multi-condition query based on Solr
CN107679054A (en) * 2017-06-12 2018-02-09 平安科技(深圳)有限公司 Data comparison method, device and readable storage medium storing program for executing
CN107688664A (en) * 2017-09-25 2018-02-13 平安科技(深圳)有限公司 Chart generation method, device, computer equipment and storage medium
CN107784102A (en) * 2017-10-27 2018-03-09 中国电子科技集团公司第二十八研究所 A kind of data difference comparative approach based on oracle database
CN107818412A (en) * 2017-10-18 2018-03-20 福州大学 A kind of extensive bus passenger OD parallel calculating methods based on MapReduce
CN108304522A (en) * 2018-01-25 2018-07-20 深圳市买买提信息科技有限公司 Comparison method, device and the terminal device of difference between a kind of database
US20180373585A1 (en) * 2017-06-22 2018-12-27 Uber Technologies, Inc. Checksum tree generation for improved data accuracy verification

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170091228A1 (en) * 2013-03-26 2017-03-30 Google Inc. Method and system for reading consistent data from a multi-master replicated database
TW201502812A (en) * 2013-07-01 2015-01-16 Univ Nat Yunlin Sci & Tech Text abstract editing system, text abstract scoring system and method thereof
CN109408520A (en) * 2018-09-26 2019-03-01 青岛农业大学 A kind of law online updating method, system, equipment and computer program product
CN109446417B (en) * 2018-10-12 2021-09-21 湖北计研数字科技有限公司 Intelligent retrieval method and device
CN110069571A (en) * 2019-03-18 2019-07-30 平安普惠企业管理有限公司 A kind of automated data control methods and device, electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103733633A (en) * 2011-05-12 2014-04-16 索林科集团 Video analytics system
CN106528674A (en) * 2016-10-31 2017-03-22 厦门服云信息科技有限公司 Method and device for high-performance query based on Hbase row keys
CN106682139A (en) * 2016-12-19 2017-05-17 深圳盒子支付信息技术有限公司 Method and system for achieving HBase multi-condition query based on Solr
CN106599300A (en) * 2016-12-28 2017-04-26 中国建设银行股份有限公司 Structural comparison method and apparatus for distributed system databases
CN107679054A (en) * 2017-06-12 2018-02-09 平安科技(深圳)有限公司 Data comparison method, device and readable storage medium storing program for executing
US20180373585A1 (en) * 2017-06-22 2018-12-27 Uber Technologies, Inc. Checksum tree generation for improved data accuracy verification
CN107688664A (en) * 2017-09-25 2018-02-13 平安科技(深圳)有限公司 Chart generation method, device, computer equipment and storage medium
CN107818412A (en) * 2017-10-18 2018-03-20 福州大学 A kind of extensive bus passenger OD parallel calculating methods based on MapReduce
CN107784102A (en) * 2017-10-27 2018-03-09 中国电子科技集团公司第二十八研究所 A kind of data difference comparative approach based on oracle database
CN108304522A (en) * 2018-01-25 2018-07-20 深圳市买买提信息科技有限公司 Comparison method, device and the terminal device of difference between a kind of database

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020186782A1 (en) * 2019-03-18 2020-09-24 平安普惠企业管理有限公司 Automated data comparison method and device, electronic device, computer non-volatile readable storage medium
CN111078738A (en) * 2019-11-25 2020-04-28 泰康保险集团股份有限公司 Data processing method and device, electronic equipment and storage medium
CN111241047A (en) * 2020-04-26 2020-06-05 北京信安世纪科技股份有限公司 File synchronization method and device
CN115905273A (en) * 2022-11-10 2023-04-04 贝壳找房(北京)科技有限公司 Data detection method in digital warehouse table, electronic equipment and storage medium
CN115905273B (en) * 2022-11-10 2023-09-26 贝壳找房(北京)科技有限公司 Data detection method in digital bin table, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2020186782A1 (en) 2020-09-24

Similar Documents

Publication Publication Date Title
CN110069571A (en) A kind of automated data control methods and device, electronic equipment
US8185877B1 (en) System and method for testing applications
CN108009784B (en) A kind of inside and outside collaborative office management system based on project document
CN103577310A (en) Method and device for recording software debugging logs
CN113688288B (en) Data association analysis method, device, computer equipment and storage medium
CN107832035B (en) Voice input method of intelligent terminal
CN110489433A (en) A kind of message treatment method and device, electronic equipment based on MongoDB
CN104599692A (en) Recording method and device and recording content searching method and device
CN109144799A (en) Integrated testing method, apparatus, computer equipment and storage medium
CN103092981A (en) Method and electronic equipment for building speech marks
CN101976391A (en) Positioning management system and management method of articles
CN113220597B (en) Test method, test device, electronic equipment and storage medium
CN103123651A (en) Method of rapidly searching multiple same-kind paper, device and mobile equipment
CN104216977A (en) Time series data search method and device
CN102663205B (en) Software realization method and system for vehicle assembly shop tooling site management
CN107577802A (en) A kind of data base management method and device
CN101662394B (en) Automated testing system and automated testing method
CN110377811A (en) A kind of display methods of device name, device, storage medium and electronic equipment
CN101354722B (en) Method, apparatus and system for controlling version
CN104216986A (en) Device and method for improving data query efficiency through pre-operation according to data update period
CN101452495A (en) Method for adding geometric element
CN104239047B (en) The method and its device of a kind of information gathering
CN112632687A (en) BIM forward design method, system, computer equipment and storage medium
CN113043265A (en) Android-based library robot control method and device
CN101976255A (en) Method and device for large-quantity export of webpage information to generate WORD document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary)

Applicant after: Pingan Pu Hui Enterprise Management Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A

Applicant before: Pingan Pu Hui Enterprise Management Co., Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination