CN110019273A - Data processing method, device and system for database - Google Patents

Data processing method, device and system for database Download PDF

Info

Publication number
CN110019273A
CN110019273A CN201711471066.9A CN201711471066A CN110019273A CN 110019273 A CN110019273 A CN 110019273A CN 201711471066 A CN201711471066 A CN 201711471066A CN 110019273 A CN110019273 A CN 110019273A
Authority
CN
China
Prior art keywords
data
database
search condition
attribute
extracted
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
CN201711471066.9A
Other languages
Chinese (zh)
Inventor
朱媛媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201711471066.9A priority Critical patent/CN110019273A/en
Publication of CN110019273A publication Critical patent/CN110019273A/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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Landscapes

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

Abstract

Present disclose provides a kind of data processing methods for database, the database includes first database and the second database, second database includes the data for migrating or being synchronized in the second database from first database, the described method includes: according to the first search condition, at least one the first data for meeting first search condition are extracted from the first database;According to the second search condition, at least one the second data for meeting second search condition are extracted from second database;According to comparison rule, at least one the first data and at least one the second data are compared, acquisition comparing result.

Description

Data processing method, device and system for database
Technical field
This disclosure relates to field of computer technology, more particularly, to a kind of data processing method for database, dress It sets and system.
Background technique
With the fast development of computer technology, various type of database and database schema are more and more Ground is applied to the numerous areas such as work and daily life.In order to improve the feelings such as data exchange efficiency, or guarantee real-time property Condition, it usually needs carry out data synchronization or migration operation among a plurality of databases.However, how to verify synchronous or migration Data between consistency become urgent problem to be solved.
During realizing present inventive concept, at least there are the following problems in the prior art for inventor's discovery, when to more When the carry out consistency desired result of the data of a database, it usually needs it is artificial to participate in comparison verification, it takes time and effort very much, efficiency pole It is low.
Summary of the invention
In view of this, present disclose provides a kind of data processing method and device for being efficiently used for database.
An aspect of this disclosure provides a kind of data processing method for database, and the database includes first Database and the second database, second database include migrating or being synchronized in the second database from first database Data, which comprises according to the first search condition, extracted from the first database and meet first search condition At least one the first data extracted from second database according to the second search condition and meet second searching bar At least one the second data of part, and according to comparison rule, will at least one the first data and described at least one the Two data compare, and obtain comparing result.
In accordance with an embodiment of the present disclosure, it is above-mentioned by least one the first data and at least one the second data into Row comparison, obtaining comparing result includes: for every first data at least one the first data, by first data Compared one by one at least one the second data, judge first data whether at least one the second data One the second data meets the comparison rule.
In accordance with an embodiment of the present disclosure, the above method further include: record at least one the first data and be unsatisfactory for institute State the first data of comparison rule.
In accordance with an embodiment of the present disclosure, above-mentioned first search condition includes at least one first attribute.It is above-mentioned according to first Search condition extracts at least one the first data for meeting first search condition from the first database, comprising: from At least one the first data comprising first attribute are extracted in the first database.
In accordance with an embodiment of the present disclosure, above-mentioned second search condition includes at least one second attribute, it is described at least one Second attribute includes at least one identical particular community at least one described first attribute.It is above-mentioned according to the second searching bar Part extracts at least one the second data for meeting second search condition from second database, comprising: from described the At least one the second data comprising second attribute are extracted in two databases.
In accordance with an embodiment of the present disclosure, above-mentioned comparison rule includes: comparison at least one the first data about described Whether the attribute value of particular community and at least one the second data are identical about the attribute value of the particular community.
Another aspect of the disclosure provides a kind of data processing equipment for database, and the database includes the One database and the second database, second database include migrating or being synchronized in the second database from first database Data, described device includes: the first extraction module, the second extraction module and contrast module.Wherein, the first extraction module root According to the first search condition, at least one the first data for meeting first search condition are extracted from the first database. Second extraction module extracts from second database according to the second search condition and meets second search condition at least One the second data.Contrast module, will at least one the first data and described at least one the second several according to comparison rule According to comparing, comparing result is obtained.
In accordance with an embodiment of the present disclosure, it is above-mentioned by least one the first data and at least one the second data into Row comparison, obtaining comparing result includes: for every first data at least one the first data, by first data Compared one by one at least one the second data, judge first data whether at least one the second data One the second data meets the comparison rule.
In accordance with an embodiment of the present disclosure, above-mentioned apparatus further include: logging modle records at least one the first data It is unsatisfactory for the first data of the comparison rule.
In accordance with an embodiment of the present disclosure, above-mentioned first search condition includes at least one first attribute.It is above-mentioned according to first Search condition extracts at least one the first data for meeting first search condition from the first database, comprising: from At least one the first data comprising first attribute are extracted in the first database.
In accordance with an embodiment of the present disclosure, above-mentioned second search condition includes at least one second attribute, it is described at least one Second attribute includes at least one identical particular community at least one described first attribute.It is above-mentioned according to the second searching bar Part extracts at least one the second data for meeting second search condition from second database, comprising: from described the At least one the second data comprising second attribute are extracted in two databases.
In accordance with an embodiment of the present disclosure, above-mentioned comparison rule includes: comparison at least one the first data about described Whether the attribute value of particular community and at least one the second data are identical about the attribute value of the particular community.
Another aspect of the present disclosure provides a kind of data processing system for database, comprising: at one or more Manage device;Storage device, for storing one or more programs, wherein when one or more of programs are by one or more When a processor executes, so that one or more of processors execute method as described above.
Another aspect of the present disclosure provides a kind of non-volatile memory medium, is stored with computer executable instructions, institute Instruction is stated when executed for realizing method as described above.
Another aspect of the present disclosure provides a kind of computer program, and the computer program, which includes that computer is executable, to be referred to It enables, described instruction is when executed for realizing method as described above.
In accordance with an embodiment of the present disclosure, it can at least be partially solved and need manually to participate in comparison verification in the prior art, It takes time and effort very much, the extremely low problem of efficiency, and the data comparison for being automatically performed multiple databases therefore may be implemented, and improve Compare the technical effect of accuracy.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present disclosure, the above-mentioned and other purposes of the disclosure, feature and Advantage will be apparent from, in the accompanying drawings:
Fig. 1 diagrammatically illustrates the data processing method and dress that can be applied for database according to the embodiment of the present disclosure The exemplary system architecture set;
Fig. 2 diagrammatically illustrates the application of the data processing method and device for database according to the embodiment of the present disclosure Scene;
Fig. 3 diagrammatically illustrates the flow chart of the data processing method for database according to the embodiment of the present disclosure;
Fig. 4 diagrammatically illustrates the process of the data processing method for database according to another embodiment of the disclosure Figure;
Fig. 5 diagrammatically illustrates the block diagram of the data processing equipment for database according to the embodiment of the present disclosure;
Fig. 6 diagrammatically illustrates the block diagram of the data processing equipment for database according to another embodiment of the disclosure; And
Fig. 7 diagrammatically illustrates the department of computer science for being adapted for carrying out data processing method and device according to the embodiment of the present disclosure The block diagram of system.
Specific embodiment
Hereinafter, will be described with reference to the accompanying drawings embodiment of the disclosure.However, it should be understood that these descriptions are only exemplary , and it is not intended to limit the scope of the present disclosure.In addition, in the following description, descriptions of well-known structures and technologies are omitted, with Avoid unnecessarily obscuring the concept of the disclosure.
Term as used herein is not intended to limit the disclosure just for the sake of description specific embodiment.It uses herein The terms "include", "comprise" etc. show the presence of the feature, step, operation and/or component, but it is not excluded that in the presence of Or add other one or more features, step, operation or component.
There are all terms (including technical and scientific term) as used herein those skilled in the art to be generally understood Meaning, unless otherwise defined.It should be noted that term used herein should be interpreted that with consistent with the context of this specification Meaning, without that should be explained with idealization or excessively mechanical mode.
It, in general should be according to this using statement as " at least one in A, B and C etc. " is similar to Field technical staff is generally understood the meaning of the statement to make an explanation (for example, " system at least one in A, B and C " Should include but is not limited to individually with A, individually with B, individually with C, with A and B, with A and C, have B and C, and/or System etc. with A, B, C).Using statement as " at least one in A, B or C etc. " is similar to, generally come Saying be generally understood the meaning of the statement according to those skilled in the art to make an explanation (for example, " having in A, B or C at least One system " should include but is not limited to individually with A, individually with B, individually with C, with A and B, have A and C, have B and C, and/or the system with A, B, C etc.).It should also be understood by those skilled in the art that substantially arbitrarily indicating two or more The adversative conjunction and/or phrase of optional project shall be construed as either in specification, claims or attached drawing A possibility that giving including one of these projects, either one or two projects of these projects.For example, phrase " A or B " should A possibility that being understood to include " A " or " B " or " A and B ".
Embodiment of the disclosure provides a kind of data processing method for database and can be using this method Data processing equipment, wherein the database includes first database and the second database, and the second database includes from the first data The data that library migrates or is synchronized in the second database.This method comprises: according to the first search condition, from first database At least one the first data for meeting the first search condition are extracted, according to the second search condition, are extracted from the second database full At least one the second data of the second search condition of foot, and according to comparison rule, by at least one the first data and at least one The second data of item compare, and obtain comparing result.
Fig. 1 diagrammatically illustrates the data processing method and dress that can be applied for database according to the embodiment of the present disclosure The exemplary system architecture 100 set.It should be noted that being only the system architecture that can apply the embodiment of the present disclosure shown in Fig. 1 Example, to help skilled in the art to understand the technology contents of the disclosure, but be not meant to that the embodiment of the present disclosure can not To be used for other equipment, system, environment or scene.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network according to this embodiment 104 and server 105.Network 104 between terminal device 101,102,103 and server 105 to provide communication link Medium.Network 104 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 101,102,103 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 101,102,103 can be with display screen and support the various electronic equipments of data transmission, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, for example, according to user using terminal device 101,102, 103 search conditions sent are handled (merely illustrative) to the data in database.Back-stage management server can be to reception To the data such as the search condition of user analyze etc. processing, and it is processing result is (such as true according to the search condition of user Fixed comparing result etc.) feed back to terminal device.
It should be noted that the data processing method provided by the embodiment of the present disclosure for database generally can be by taking Business device 105 executes.Correspondingly, the data processing equipment provided by the embodiment of the present disclosure for database generally can be set in In server 105.It can also be by being different from server for the data processing method of database provided by the embodiment of the present disclosure 105 and the server or server cluster that can be communicated with terminal device 101,102,103 and/or server 105 execute.Accordingly Ground, the data processing equipment provided by the embodiment of the present disclosure for database also can be set in be different from server 105 and In the server or server cluster that can be communicated with terminal device 101,102,103 and/or server 105.
For example, multiple databases of the embodiment of the present disclosure can store in one or more servers, terminal device 101, any one in 102 or 103 (for example, terminal device 101, but not limited to this) receive the search condition of user's input, And the search condition is sent to other terminal devices for being stored with multiple database or multiple database capable of being obtained, Server or server cluster, and other terminal devices, server or server cluster by receiving the search condition are held The data processing method of database is used for provided by the row embodiment of the present disclosure, with pair of the data in the multiple database of determination Compare result.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Fig. 2 diagrammatically illustrates the application of the data processing method and device for database according to the embodiment of the present disclosure Scene.
As shown in Fig. 2, the application scenarios include first database 210 and the second database 220.
According to the embodiment of the present disclosure, first database 210 can be relevant database, for example, Oracle, SQLServer, Sybase, Informix, access, DB2 or mysql etc..First database 210 is also possible to non-relationship number According to library, for example, Hbase, Cassandra, SimpleDB, CouchDB, MongoDB or Redis etc..
According to the embodiment of the present disclosure, the second database 220 can be relevant database, for example, Oracle, SQLServer, Sybase, Informix, access, DB2 or mysql etc..Second database 210 is also possible to non-relationship number According to library, for example, Hbase, Cassandra, SimpleDB, CouchDB, MongoDB or Redis etc..
In the embodiments of the present disclosure, first database 210 and the second database 220 can be the database of same type, It is also possible to different types of database.
First database 210 may be implemented to communicate to connect with the second database 220, for example, first database 210 and second It can carry out data transmission between database.
Can be carried out between first database 210 and the second database 220 in the embodiment of the present disclosure data it is synchronous or The operation such as Data Migration, for example, first database data identical with may exist part in the second database.
For example, the high concurrent as existing for relational data reads and writes the bottleneck of demand, data with the rise of web site traffic The search inquiry in library starts gradually to use non-relational database.In the embodiments of the present disclosure, first database 210 can be Mysql database, the second database 220 can be MongoDB database, in order to meet mass data high efficiency read-write and High scalability, can by the content synchronization of first database or move to in the second database.
Data are appreciated that during synchronization or migration, it is possible that mistake.Therefore, present disclose provides A kind of data processing method that the data consistency between the multiple databases of automatic Verification may be implemented.
It should be understood that the number of the database in Fig. 2 is only schematical.According to needs are realized, can have any The database of number.
It should be noted that being only the example that can apply the application scenarios of the embodiment of the present disclosure shown in Fig. 2, to help this Field technical staff understands the technology contents of the disclosure, but be not meant to the embodiment of the present disclosure may not be usable for other equipment, System, environment or scene.
Fig. 3 diagrammatically illustrates the flow chart of the data processing method for database according to the embodiment of the present disclosure.
Wherein, database includes first database and the second database, and the second database includes migrating from first database Or it is synchronized to the data in the second database.
As shown in figure 3, this method includes operation S301~S303.
In operation S301, according to the first search condition, is extracted from first database and meet the first search condition at least One the first data.
According to the embodiment of the present disclosure, data for example can be in the database to be stored in the form of tables of data, such as can be with It goes including multiple attribute columns and multiple records.
In the embodiments of the present disclosure, the first search condition may include at least one first attribute, can search according to first Rope condition extracts at least one the first data comprising first attribute from first database.
For example, first database can be mysql database, the first search condition can be sql sentence, and user can root Sql sentence is determined according to actual conditions, to extract at least one record for the condition that meets from first database according to sql sentence Row.
For example, sql sentence can be " select sku_id from sku2pool a inner join b2b_user_ To_ware b where a.pool_id=b.pool_id and b.userid " (merely illustrative), it is possible to understand that are as follows: it takes The id (userid) of user then pulls quotient all under the userid by user_to_ware user and commodity pond relation table Product pond id (poolid) is then gone to obtain skuid all under all commodity ponds by commodity pond id again, finally be got all Skuid.It is appreciated that the example above, only to assist in understanding, the disclosure does not limit the type of first database, unlimited yet The type of search condition processed, specific search content can also be according to practical feelings user sets itself.
It, can basis for at least one the first data extracted according to the first search condition according to the embodiment of the present disclosure Filtering rule filters out some first data.For example, certain specific skuid can be filtered out, can also filter out with certain The skuid of a little attributes.
It is appreciated that above-mentioned filtering rule also can be written into the first search condition, to be counted according to search condition When according to extracting, just certain data filterings for meeting filtering rule are fallen.Specifically whether need to filter, how filter, this field skill Art personnel may be set according to actual conditions.
In operation S302, according to the second search condition, is extracted from the second database and meet the second search condition at least One the second data.
According to the embodiment of the present disclosure, user can set the second search condition according to actual needs.Second search condition can To include the identical or different search attribute in identical or part from the first search condition.Alternatively, the second searching bar Part is also possible to sky, that is, extracts the data content of the second whole databases.
For example, the second search condition may include at least one second attribute, at least one second attribute and at least one First attribute includes at least one identical particular community.Packet can be extracted from the second database according to the second search condition At least one the second data containing the second attribute.
For example, when the first search condition includes userid, poolid, skuid, the second search condition also may include One or more of userid, poolid, skuid.For example, it is also possible to extract identical userid from the second database Corresponding all skuid.
In operation S303, according to comparison rule, at least one the first data and at least one the second data are compared, Obtain comparing result.
According to the embodiment of the present disclosure, comparison rule is may be set according to actual conditions in user, for example, can only compare each Some attribute value for recording row data can also compare multiple attribute values of each record row data, can also compare each note Record whole attribute values of row data.
According to the embodiment of the present disclosure, at least one the first data are compared at least one the second data be can wrap Include: for every first data in at least one the first data, by first data and at least one the second data carry out by Item comparison, judges whether first data with second data in at least one the second data meet comparison rule.
For example, every first data in at least one the first data can successively be extracted, by first data and at least one The second data of item are compared one by one, if the second data that comparison is regular to satisfaction comparison, then it is assumed that the first data of this It with success, then extracts next the first data and continues to compare at least one the second data, until the of all extractions One data are all completed to compare.
In the embodiments of the present disclosure, when at least one first attribute and at least one second attribute include identical specified genus Property when, comparison rule can be at least one the first data of comparison about the attribute value of the particular community and at least one the second Whether data are identical about the attribute value of particular community.
For example, the skuid in second data of skuid=a line in the first data of a line, and first data of row In userid=second data of row in userid, in poolid=second data of row in first data of row Poolid, it may be considered that the data successful match, otherwise it is assumed that it fails to match.
It is appreciated that the example above is only to help to understand, and the specific comparison rule of the unlimited system of the disclosure, those skilled in the art Member can be set according to the actual situation, for example, comparison rule can be at least one the first data of comparison about the spy Whether the attribute value and at least one the second data for determining attribute about the attribute value of particular community meet preset relation, preset relation It can be identical, be also possible to proportionate relationship, can also be inclusion relation etc..For example, the first data are about particular community Attribute value is skuid1=100, and the second data are skuid2=101 about the attribute value of particular community, if meeting relational expression " skuid1=skuid2-1 ", it is also assumed that the success of the first Data Matching.Such as first data about particular community Attribute value is Zhang San, and the second data are Zhang San 1 about the attribute value of particular community, be also possible to think the first Data Matching at Function.
The embodiment of the present disclosure may be implemented to be automatically performed more by the pre-configured search condition of user and comparison rule The data comparison of a database is not necessarily to manpower intervention, saves checking time, has saved verification cost, and verification can be improved Accuracy.And user can configure different search condition and comparison rule, so that the disclosure according to different application scenarios The method that embodiment provides can be more flexible, can adapt to several scenes.
Fig. 4 diagrammatically illustrates the process of the data processing method for database according to another embodiment of the disclosure Figure.
As shown in figure 4, this method includes operation S301~S303 and operation S401.Wherein, operation S301~S303 with The above-mentioned method described with reference to Fig. 3 is same or like, and details are not described herein.
The first data of comparison rule are unsatisfactory in operation S401, at least one the first data of record.
According to the embodiment of the present disclosure, for every first data in at least one the first data, by first data with At least one the second data are compared one by one, if first data and a certain the second data of item meet comparison rule, are recognized For first Data Matching success, 1 can be added in the record data of successful match, otherwise, then it is assumed that first Data Matching Failure adds 1 in the record data that it fails to match, and records the first data of this.
The embodiment of the present disclosure records comparing result, and then according to user's needs, comparing result is showed user, So that user knows data during migration or synchronization, if mistake occur, mistake occurs in which data, is convenient for The subsequent adjustment and change of user.
Fig. 5 diagrammatically illustrates the block diagram of the data processing equipment 500 for database according to the embodiment of the present disclosure.
Wherein, database includes first database and the second database, and the second database includes migrating from first database Or it is synchronized to the data in the second database.
As shown in figure 5, the data processing equipment 500 for database includes the first extraction module 510, the second extraction module 520 and contrast module 530.
First extraction module 510 extracts from first database according to the first search condition and meets the first search condition At least one the first data.
According to the embodiment of the present disclosure, the first search condition includes at least one first attribute, according to the first search condition, from At least one the first data comprising the first attribute are extracted in first database.
According to the embodiment of the present disclosure, the first extraction module 510 can for example execute the operation above with reference to Fig. 3 description S301, details are not described herein.
Second extraction module 520 extracts from the second database according to the second search condition and meets the second search condition At least one the second data.
According to the embodiment of the present disclosure, the second search condition includes at least one second attribute, at least one second attribute with At least one first attribute includes at least one identical particular community.According to the second search condition, mentioned from the second database Take at least one the second data comprising the second attribute.
According to the embodiment of the present disclosure, the second extraction module 520 can for example execute the operation above with reference to Fig. 3 description S302, details are not described herein.
Contrast module 530 compares at least one the first data and at least one the second data according to comparison rule, Obtain comparing result.
According to the embodiment of the present disclosure, at least one the first data and at least one the second data are compared, are obtained pair It include: for every first data in at least one the first data, by first data and at least one the second numbers than result According to being compared one by one, judge whether first data with second data in at least one the second data meet comparison rule Then.
According to the embodiment of the present disclosure, comparing rule includes: to compare at least one the first attributes of the data about particular community Whether value and at least one the second data are identical about the attribute value of particular community.
According to the embodiment of the present disclosure, contrast module 530 can for example execute the operation S303 above with reference to Fig. 3 description, This is repeated no more.
Fig. 6 diagrammatically illustrates the frame of the data processing equipment 600 for database according to another embodiment of the disclosure Figure.
As shown in fig. 6, the data processing equipment 600 for database includes the first extraction module 510, the second extraction module 520, contrast module 530 and logging modle 540.Wherein, the first extraction module 510, the second extraction module 520 and comparison mould Block 530 is same or like with the above-mentioned module described with reference to Fig. 5, and details are not described herein.
The first data of comparison rule are unsatisfactory in at least one the first data of record of logging modle 540.According to the disclosure Embodiment, logging modle 540 can for example execute the operation S401 above with reference to Fig. 4 description, and details are not described herein.
It is understood that the first extraction module 510, the second extraction module 520, contrast module 530 and logging modle 540 may be incorporated in a module and realize or any one module therein can be split into multiple modules.Alternatively, At least partly function of one or more modules in these modules can be combined at least partly function of other modules, and It is realized in a module.According to an embodiment of the invention, the first extraction module 510, the second extraction module 520, contrast module At least one of 530 and logging modle 540 can at least be implemented partly as hardware circuit, such as field programmable gate Array (FPGA), programmable logic array (PLA), system on chip, the system on substrate, the system in encapsulation, dedicated integrated electricity Road (ASIC), or can be realized with carrying out the hardware such as any other rational method that is integrated or encapsulating or firmware to circuit, Or it is realized with software, the appropriately combined of hardware and firmware three kinds of implementations.Alternatively, the first extraction module 510, second mentioning At least one of modulus block 520, contrast module 530 and logging modle 540 can at least be implemented partly as computer Program module can execute the function of corresponding module when the program is run by computer.
Fig. 7 diagrammatically illustrates the department of computer science for being adapted for carrying out data processing method and device according to the embodiment of the present disclosure The block diagram of system.Computer system shown in Fig. 7 is only an example, function to the embodiment of the present disclosure and should not use model Shroud carrys out any restrictions.
As shown in fig. 7, include processor 701 according to the computer system 700 of the embodiment of the present disclosure, it can be according to storage It is loaded into random access storage device (RAM) 703 in the program in read-only memory (ROM) 702 or from storage section 708 Program and execute various movements appropriate and processing.Processor 701 for example may include general purpose microprocessor (such as CPU), refer to Enable set processor and/or related chip group and/or special microprocessor (for example, specific integrated circuit (ASIC)), etc..Processing Device 701 can also include the onboard storage device for caching purposes.Processor 701 may include for executing with reference to Fig. 3~Fig. 4 Single treatment unit either multiple processing units of the different movements of the method flow according to the embodiment of the present disclosure of description.
In RAM 703, it is stored with system 700 and operates required various programs and data.Processor 701, ROM 702 with And RAM 703 is connected with each other by bus 704.Processor 701 is held by executing the program in ROM 702 and/or RAM 703 Various operations of the row above with reference to Fig. 3~Fig. 4 method according to the embodiment of the present disclosure described.It is noted that described program It can store in one or more memories in addition to ROM 702 and RAM 703.Processor 701 can also pass through execution The program in one or more of memories is stored in execute and implement above with reference to what Fig. 3~Fig. 4 was described according to the disclosure The various operations of the method for example.
In accordance with an embodiment of the present disclosure, system 700 can also include input/output (I/O) interface 705, input/output (I/O) interface 705 is also connected to bus 704.System 700 can also include be connected to I/O interface 705 with one in lower component Item is multinomial: the importation 706 including keyboard, mouse etc.;Including such as cathode-ray tube (CRT), liquid crystal display (LCD) Deng and loudspeaker etc. output par, c 707;Storage section 708 including hard disk etc.;And including such as LAN card, modulatedemodulate Adjust the communications portion 709 of the network interface card of device etc..Communications portion 709 executes communication process via the network of such as internet. Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as disk, CD, magneto-optic disk, semiconductor Memory etc. is mounted on as needed on driver 710, in order to be pacified as needed from the computer program read thereon It is packed into storage section 708.
In accordance with an embodiment of the present disclosure, it may be implemented as computer software journey above with reference to the method for flow chart description Sequence.For example, embodiment of the disclosure includes a kind of computer program product comprising carry meter on a computer-readable medium Calculation machine program, the computer program include the program code for method shown in execution flow chart.In such embodiments, The computer program can be downloaded and installed from network by communications portion 709, and/or be pacified from detachable media 711 Dress.When the computer program is executed by processor 701, the above-mentioned function of limiting in the system of the embodiment of the present disclosure is executed.Root According to embodiment of the disclosure, system as described above, unit, module, unit etc. can by computer program module come It realizes.
It should be noted that computer-readable medium shown in the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.In accordance with an embodiment of the present disclosure, computer-readable medium may include above-described ROM 702 And/or one or more memories other than RAM 703 and/or ROM 702 and RAM 703.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
As on the other hand, the disclosure additionally provides a kind of computer-readable medium, which can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes The equipment executes: according to the first search condition, extracted from the first database meet first search condition to Few first data are extracted from second database according to the second search condition and meet second search condition At least one the second data, and according to comparison rule, will at least one the first data and described at least one the second several According to comparing, comparing result is obtained.
In accordance with an embodiment of the present disclosure, it is above-mentioned by least one the first data and at least one the second data into Row comparison, obtaining comparing result includes: for every first data at least one the first data, by first data Compared one by one at least one the second data, judge first data whether at least one the second data One the second data meets the comparison rule.
In accordance with an embodiment of the present disclosure, the above method further include: record at least one the first data and be unsatisfactory for institute State the first data of comparison rule.
In accordance with an embodiment of the present disclosure, above-mentioned first search condition includes at least one first attribute.It is above-mentioned according to first Search condition extracts at least one the first data for meeting first search condition from the first database, comprising: from At least one the first data comprising first attribute are extracted in the first database.
In accordance with an embodiment of the present disclosure, above-mentioned second search condition includes at least one second attribute, it is described at least one Second attribute includes at least one identical particular community at least one described first attribute.It is above-mentioned according to the second searching bar Part extracts at least one the second data for meeting second search condition from second database, comprising: from described the At least one the second data comprising second attribute are extracted in two databases.
In accordance with an embodiment of the present disclosure, above-mentioned comparison rule includes: comparison at least one the first data about described Whether the attribute value of particular community and at least one the second data are identical about the attribute value of the particular community.
Embodiment of the disclosure is described above.But the purpose that these embodiments are merely to illustrate that, and It is not intended to limit the scope of the present disclosure.Although respectively describing each embodiment above, but it is not intended that each reality Use cannot be advantageously combined by applying the measure in example.The scope of the present disclosure is defined by the appended claims and the equivalents thereof.It does not take off From the scope of the present disclosure, those skilled in the art can make a variety of alternatives and modifications, these alternatives and modifications should all fall in this Within scope of disclosure.

Claims (14)

1. a kind of data processing method for database, the database includes first database and the second database, described Second database includes the data for migrating or being synchronized in the second database from first database, which comprises
According to the first search condition, is extracted from the first database and meet at least one the first of first search condition Data;
According to the second search condition, is extracted from second database and meet at least one the second of second search condition Data;
According to comparison rule, at least one the first data and at least one the second data are compared, acquisition pair Compare result.
It is described by least one the first data and described at least one the 2. according to the method described in claim 1, wherein Two data compare, and obtain comparing result and include:
For every first data at least one the first data, by first data and at least one the second number According to being compared one by one, judge whether first data meet with second data at least one the second data described in Comparison rule.
3. according to the method described in claim 1, further include:
Record the first data that the comparison rule is unsatisfactory at least one the first data.
4. according to the method described in claim 1, wherein:
First search condition includes at least one first attribute;
It is described according to the first search condition, extracted from the first database and meet at least one of first search condition First data, comprising: at least one the first data comprising first attribute are extracted from the first database.
5. according to the method described in claim 4, wherein:
Second search condition includes at least one second attribute, at least one described second attribute and it is described at least one the One attribute includes at least one identical particular community;
It is described according to the second search condition, extracted from second database and meet at least one of second search condition Second data, comprising: at least one the second data comprising second attribute are extracted from second database.
6. according to the method described in claim 5, wherein, the comparison rule includes: comparison at least one the first data About the particular community attribute value and at least one the second data about the particular community attribute value whether phase Together.
7. a kind of data processing equipment for database, the database includes first database and the second database, described Second database includes the data for migrating or being synchronized in the second database from first database, and described device includes:
First extraction module extracts from the first database according to the first search condition and meets first search condition At least one the first data;
Second extraction module extracts from second database according to the second search condition and meets second search condition At least one the second data;
Contrast module carries out at least one the first data and at least one the second data pair according to comparison rule Than obtaining comparing result.
8. device according to claim 7, wherein described by least one the first data and described at least one the Two data compare, and obtain comparing result and include:
For every first data at least one the first data, by first data and at least one the second number According to being compared one by one, judge whether first data meet with second data at least one the second data described in Comparison rule.
9. device according to claim 7, further includes:
Logging modle records the first data that the comparison rule is unsatisfactory at least one the first data.
10. device according to claim 7, in which:
First search condition includes at least one first attribute;
It is described according to the first search condition, extracted from the first database and meet at least one of first search condition First data, comprising: at least one the first data comprising first attribute are extracted from the first database.
11. device according to claim 10, in which:
Second search condition includes at least one second attribute, at least one described second attribute and it is described at least one the One attribute includes at least one identical particular community;
It is described according to the second search condition, extracted from second database and meet at least one of second search condition Second data, comprising: at least one the second data comprising second attribute are extracted from second database.
12. device according to claim 11, wherein the comparison rule includes: comparison at least one the first number According to about the particular community attribute value and at least one the second data about the particular community attribute value whether It is identical.
13. a kind of data processing system for database, comprising:
One or more processors;
Storage device, for storing one or more programs,
Wherein, when one or more of programs are executed by one or more of processors, so that one or more of Method described in processor execution according to claim 1~any one of 6.
14. a kind of computer-readable medium, is stored thereon with executable instruction, which hold processor when being executed by processor Row according to claim 1~any one of 6 described in method.
CN201711471066.9A 2017-12-28 2017-12-28 Data processing method, device and system for database Pending CN110019273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711471066.9A CN110019273A (en) 2017-12-28 2017-12-28 Data processing method, device and system for database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711471066.9A CN110019273A (en) 2017-12-28 2017-12-28 Data processing method, device and system for database

Publications (1)

Publication Number Publication Date
CN110019273A true CN110019273A (en) 2019-07-16

Family

ID=67187123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711471066.9A Pending CN110019273A (en) 2017-12-28 2017-12-28 Data processing method, device and system for database

Country Status (1)

Country Link
CN (1) CN110019273A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1222272A (en) * 1996-06-20 1999-07-07 瑞典保密公司 Method and appts. for data processing
CN102929999A (en) * 2012-10-25 2013-02-13 北京数码大方科技股份有限公司 Method and device for comparing similarities and differences of data
US9104740B2 (en) * 2006-08-14 2015-08-11 International Business Machines Corporation Enhanced attribute synchronization in a content management system
CN105701098A (en) * 2014-11-25 2016-06-22 国际商业机器公司 Method and apparatus for generating index for table in database
CN107122368A (en) * 2016-02-25 2017-09-01 阿里巴巴集团控股有限公司 A kind of data verification method, device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1222272A (en) * 1996-06-20 1999-07-07 瑞典保密公司 Method and appts. for data processing
US9104740B2 (en) * 2006-08-14 2015-08-11 International Business Machines Corporation Enhanced attribute synchronization in a content management system
CN102929999A (en) * 2012-10-25 2013-02-13 北京数码大方科技股份有限公司 Method and device for comparing similarities and differences of data
CN105701098A (en) * 2014-11-25 2016-06-22 国际商业机器公司 Method and apparatus for generating index for table in database
CN107122368A (en) * 2016-02-25 2017-09-01 阿里巴巴集团控股有限公司 A kind of data verification method, device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109413127A (en) A kind of method of data synchronization and device
CN110019125A (en) The method and apparatus of data base administration
CN105518673B (en) Managing data ingestion
CN108897874B (en) Method and apparatus for processing data
CN104050187A (en) Search result display method and system
CN107729399A (en) The method and apparatus of data processing
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN110020376A (en) Data linkage method and system
CN106202438A (en) The method and system of storage associated data
CN111444077A (en) Method and device for generating flow node test data
CN110019263A (en) Information storage means and device
CN110019242A (en) Processing method, device and system for tables of data
CN111339743B (en) Account number generation method and device
WO2022233311A1 (en) Display method and apparatus, and electronic device
CN109992495A (en) The method and apparatus of interface testing
CN109272526A (en) Image processing method, system and electronic equipment
CN109977982A (en) User classification method, system, electronic equipment and computer-readable medium
CN110399397A (en) A kind of data query method and system
CN109408279A (en) Data back up method and device
CN107729394A (en) Data Mart management system and its application method based on Hadoop clusters
CN110019273A (en) Data processing method, device and system for database
CN107832347A (en) Method of Data with Adding Windows, system and electronic equipment
CN110019531A (en) A kind of method and apparatus obtaining analogical object set
CN112000323B (en) Data processing method and device
CN104156358B (en) A kind of batch read method of table for database, device and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190716