CN108733704A - Multiple database data processing method, device and storage medium and electronic equipment - Google Patents

Multiple database data processing method, device and storage medium and electronic equipment Download PDF

Info

Publication number
CN108733704A
CN108733704A CN201710261410.5A CN201710261410A CN108733704A CN 108733704 A CN108733704 A CN 108733704A CN 201710261410 A CN201710261410 A CN 201710261410A CN 108733704 A CN108733704 A CN 108733704A
Authority
CN
China
Prior art keywords
database
data
data processing
preset
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710261410.5A
Other languages
Chinese (zh)
Other versions
CN108733704B (en
Inventor
马文军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710261410.5A priority Critical patent/CN108733704B/en
Publication of CN108733704A publication Critical patent/CN108733704A/en
Application granted granted Critical
Publication of CN108733704B publication Critical patent/CN108733704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure is directed to a kind of multiple database data processing method, device and storage medium and electronic equipments.This method includes:It obtains for first database and corresponding first operation requests of the second database and the second operation requests;The first data manipulation to the first database is executed according to first operation requests;The presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, it will be in the operation content information storage to the preset buffer memory of second operation requests;The operation content information is called from the preset buffer memory, and the second data manipulation to second database is executed by preset Java multithread pools.The disclosure can make multiple database data consistency preferable using based on the drawbacks of solving the Data Consistency of multiple database with the technology of multithreading, avoiding using the processing of MQ message modes is cached.

Description

Multiple database data processing method, device and storage medium and electronic equipment
Technical field
This disclosure relates to field of computer technology more particularly to a kind of multiple database data processing method, multiple database number According to the computer readable storage medium and electronic equipment of processing unit and the realization multiple database data processing method.
Background technology
Currently, as data database storing amount and data visit capacity substantially quickly increase, cause do not carrying out a point library In the case of dividing table, with the development of time and business, the table in database can be more and more, and the data volume in table also can be more next It is bigger.Correspondingly, data manipulation, additions and deletions change the expense looked into also can be increasing.In addition, since distributed deployment can not be carried out, And the resource of a server is limited, data volume that final data library can carry, data-handling capacity will all meet with bottle Neck.
In order to alleviate the above problem to a certain extent, largely divide table technology with a point library in database at present.Divide library point Table technology is being stored in originally on the data block storage to multiple databases of a database, being stored in a table originally Data block storage to multiple tables on.A large amount of data can be stored in more data base machines and multiple tables in this way In, for solving the problems, such as the next database access performance of single list library tape and memory space, it is conducive to Data expansion.But data It is the data being related on a service line to divide a problem of library tape, split to have assigned in different databases, and an industry The data manipulation of business line, it is necessary to assure the atom consistency that these related datas execute, otherwise i.e. all success or all mistake It loses.But since data are in different databases, it can not ensure data consistency by the affairs of database.So such as What solves the problems, such as multiple database data consistency, is the first-class difficulty that the database using point library technology each at present is faced Topic.
In the related technology, realize that the mainstream solution of the data consistency of multiple database is by message queue MQ at present The asynchronous execution of (Message Queue) message other wide area information servers operation, ensures data consistency.But related skill The shortcomings that art, is as follows:First, MQ message has that timeliness causes execution sequence inconsistent, i.e., the message first sent may be followed by It receives, this just will appear multiple database manipulation, and the result in final data library has error, can not ensure data consistency, this is Do not allow existing.The amount of money is become 5 as the amount of money is become 10, B message by A message, correctly operation should first carry out A, then hold Row B, but since message sequence can not ensure, as a result final execution sequence is A after first B, and the final amount of money is 10.Secondly, MQ Message is in the presence of the case where may losing, once losing, whole data will have error, can not ensure data consistency. Finally, due to which MQ message is asynchronous execution, normal business operation wishes to solve the problems, such as concurrent processing, but MQ message is different Step can not just solve the problems, such as this, eventually result in that data are inconsistent or even program reports an error.Such as service line logic is A databases The amount of money subtracts 10, and B data library state becomes 1 from 0.If in the case of concurrent, while having the operation of this multiple service line, normally Only there are one operations to run succeeded for situation.But A DB amounts can be led to twice by the way of MQ message asynchronous process Subtract 10, and is abnormal when second of the change of B data library state.Therefore, it is necessary to provide on a kind of new technical solution improves State one or more problem present in scheme.
It should be noted that information is only used for reinforcing the reason to the background of the disclosure disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Invention content
The disclosure be designed to provide a kind of multiple database data processing method, multiple database data processing equipment and Realize the computer readable storage medium and electronic equipment of the multiple database data processing method, and then at least to a certain degree On overcome the problems, such as caused by the limitation and defect of the relevant technologies one or more.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure Practice and acquistion.
According to the first aspect of the embodiments of the present disclosure, a kind of multiple database data processing method is provided, this method includes:
It obtains for first database and corresponding first operation requests of the second database and the second operation requests;
The first data manipulation to the first database is executed according to first operation requests;
The presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, by second operation requests In operation content information storage to the preset buffer memory;
The operation content information is called from the preset buffer memory, and is executed to institute by preset Java multithread pools State the second data manipulation of the second database.
In a kind of exemplary embodiment of the disclosure, the preset buffer memory includes Redis cachings, and the presetting method is institute State the setNx methods in Redis cachings.
In a kind of exemplary embodiment of the disclosure, the method further includes:
After having executed the first data manipulation of the first database according to first operation requests, described first Compensative dispatching table is set in database;Wherein, the operation of second operation requests is stored in the compensative dispatching table Content information;
After successful execution complete second data manipulation to second database, delete in the compensative dispatching table The operation content information.
In a kind of exemplary embodiment of the disclosure, the method further includes:
By preset task scheduling tool, start query task every preset time to obtain in the first database The compensative dispatching table;
Judge whether the operation content information in the compensative dispatching table has deleted, if otherwise extracting the operation Content information, and execute second data manipulation to second database;
After having executed second data manipulation to second database, the operation content information is deleted.
In a kind of exemplary embodiment of the disclosure, the preset task scheduling tool includes Quartz task schedulings of increasing income Tool.
In a kind of exemplary embodiment of the disclosure, the preset time is 5~10 minutes.
In a kind of exemplary embodiment of the disclosure, first data manipulation and the second data manipulation are different data Operation.
According to the second aspect of the embodiment of the present disclosure, a kind of multiple database data processing equipment is provided, which includes:
Operation requests acquisition module, for obtaining for corresponding first operation of first database and the second database Request and the second operation requests;
First operation executing module, for executing the first number to the first database according to first operation requests According to operation;
Concurrent judgment module is cached, for calling the presetting method in preset buffer memory to judge that there is currently no concurrent operations When, it will be in the operation content information storage to the preset buffer memory of second operation requests;
Second operation executing module, for calling the operation content information from the preset buffer memory, and by default Java multithread pools execute the second data manipulation to second database.
According to the third aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, is stored thereon with calculating Machine program, the program realize multiple database data processing method described in any one above-mentioned embodiment when being executed by processor Step.
According to the fourth aspect of the embodiment of the present disclosure, a kind of electronic equipment is provided, including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to execute in any one above-mentioned embodiment via the executable instruction is executed The step of multiple database data processing method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In a kind of embodiment of the disclosure, by above-mentioned multiple database data processing method and device, executes and counted to first After first data manipulation in library, the presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, will described in In the operation content information storage to the preset buffer memory of second operation requests, then the operation is called from the preset buffer memory Content information, and the second data manipulation to the second database is executed by preset Java multithread pools.Thus it is possible, on the one hand, The Data Consistency of multiple database is solved using based on the technology of caching and multithreading, avoids using MQ in the related technology The drawbacks of message mode processing, if the multiple database data in the case of concurrent operations execute abnormal problem, what data manipulation executed Sequence and efficiency etc.;On the other hand, multiple database number may further be made by using the technology based on caching and multithreading It is preferable according to consistency.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.It should be evident that the accompanying drawings in the following description is only the disclosure Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 schematically shows multiple database data processing method flow chart in disclosure exemplary embodiment;
Fig. 2 schematically shows multiple database data processing method flow chart in disclosure exemplary embodiment;
Fig. 3 schematically shows multiple database data processing method flow chart in disclosure exemplary embodiment;
Fig. 4 schematically shows a kind of multiple database data processing equipment schematic diagram in disclosure exemplary embodiment;
Fig. 5 schematically shows a kind of computer readable storage medium schematic diagram in disclosure exemplary embodiment;
Fig. 6 schematically shows a kind of electronic equipment schematic diagram in disclosure exemplary embodiment.
Specific implementation mode
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot Structure or characteristic can be in any suitable manner incorporated in one or more embodiments.
In addition, attached drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical attached drawing mark in figure Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in attached drawing are work( Energy entity, not necessarily must be corresponding with physically or logically independent entity.Software form may be used to realize these work( Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
A kind of multiple database data processing method is provided firstly in this example embodiment.With reference to shown in figure 1, the party Method may comprise steps of:
Step S101:It obtains for first database and corresponding first operation requests of the second database and the second behaviour It asks.
Step S102:The first data manipulation to the first database is executed according to first operation requests.
Step S103:The presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, by described second In the operation content information storage to the preset buffer memory of operation requests.
Step S104:The operation content information is called from the preset buffer memory, and passes through preset Java multithreadings Pond executes the second data manipulation to second database.
Pass through above-mentioned multiple database data processing method, on the one hand, solve using based on the technology of caching and multithreading The Data Consistency of multiple database, the drawbacks of avoiding using the processing of MQ message modes in the related technology, such as concurrent operations feelings Multiple database data under condition execute abnormal problem, sequence and efficiency that data manipulation executes etc.;On the other hand, using base Multiple database data consistency may further be made preferable in the technology of caching and multithreading.
In the following, will be carried out to each step of the above method in this example embodiment referring to figs. 1 to Fig. 5 more detailed Explanation.
In step S101, obtain for first database and corresponding first operation requests of the second database and the Two operation requests.
In this example embodiment, the quantity of database can be two or more, be not restricted to this, more Database is also suitable this method.First operation requests and the second operation requests can belong to the different behaviour of same service line It asks, such as one is data modification request, another is data update request etc..
In step s 102, the first data manipulation to the first database is executed according to first operation requests.
Illustratively, such as according to data modification request the first data manipulation to first database is executed, first number According to operation e.g. data modification operation.For example, an amount of money (such as 100) in the amount of money table in first database can be subtracted 10, i.e., the amount of money is revised as 90.
In step s 103, the presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, will described in In the operation content information storage to the preset buffer memory of second operation requests.
In one exemplary embodiment, the preset buffer memory may include Redis cachings, and the presetting method can be institute State the setNx methods in Redis cachings.Illustratively, the setNx methods during Redis can be called to cache in step S103 are sentenced Disconnected currently to whether there is concurrent operations, there is currently no when concurrent operations, by second operation requests, (such as data update is asked Ask) operation content information (state of a tables of data in the second database is such as become 1 from 0) store to the Redis cache In.
It should be clear that there is currently no when concurrent operations, expression can continue to execute follow-up such as the second operation requests Corresponding such as data update operates.Therefore the second database can be needed the operation content information data storing that executes to described In Redis cachings, called for subsequent multithreading.Current data are submitted after the completion of the execution of presently described first database Library affairs.There is currently the service lines for when concurrent operations, indicating current to have executed, then needs to carry out database time Rolling, terminates this calling.
Only there are one run succeeded when can ensure concurrent using setNx methods in the present exemplary embodiment.Utilize Redis The setNx methods of caching technology can prevent concurrent data library from operating, and asynchronous execution data manipulation asks under solution complications Topic.
In step S104, the operation content information is called from the preset buffer memory, and more by preset Java Thread pool executes the second data manipulation to second database.
In the present example embodiment, the preset Java multithread pools for example can be the thread pool work of Java itself Has ThreadPoolExecutor.First data manipulation and the second data manipulation are different data manipulations, and one is several It is operated according to modification, the other is data update operates.Illustratively, it can be called from Redis cachings in step S104 The operation content information (state of a tables of data in the second database is such as become 1 from 0), and pass through ThreadPoolExecutor executes the second data manipulation to second database, such as will by executing data update operation The state of a tables of data becomes 1 from 0 in second database.The multithread pool of Java itself is used in the present exemplary embodiment The data manipulation for quickly executing other databases other than first database, is solved and is led in the related technology using MQ message modes The sequence and efficiency that the data manipulation of cause executes, so as to preferably ensure final data consistency.
It is on the basis of the above embodiments, described in a kind of exemplary embodiment of the disclosure with reference to shown in figure 2 Method can also include the following steps:
Step S201:After having executed the first data manipulation of the first database according to first operation requests, Compensative dispatching table is set in the first database;Wherein, second operation requests are stored in the compensative dispatching table The operation content information.
Illustratively, a Work record sheet can be inserted into first database as the compensative dispatching table, to use Compensating operation in follow-up data library.Record content in Work record sheets for example can be the second main table of database request slip The update that the state of R0001 becomes 1 from 0 operates relevant execution information.
Step S202:After successful execution complete second data manipulation to second database, the benefit is deleted Repay the operation content information in dispatch list.
Illustratively, after complete second data manipulation to second database of successful execution in step S104, Delete the content in the Work record sheets.That is, after being inserted into Work record sheets, if recorded in Work record sheets Other database manipulations have executed, then can delete the related content in the Work record sheets.If remembered in Work record sheets Other database manipulations of record are also not carried out, then can carry out following database manipulation compensation deals as shown in Figure 3.
With reference to shown in figure 3, in a kind of exemplary embodiment of the disclosure, the method can also include following step Suddenly:
Step S301:By preset task scheduling tool, start query task every preset time to obtain described first The compensative dispatching table in database.
Illustratively, the preset task scheduling tool may include Quartz task scheduling tools of increasing income.It is described default Time can be 5~10 minutes, naturally it is also possible to be other numerical value, self-defined setting being carried out according to business scenario, other are counted Value, however it is not limited to this.The Quartz task schedulings tool can execute one query task in such as 10 minutes every preset time, The work record sheets in first database are inquired, the record being inserted into before taking out 10 minutes.
Step S302:Judge whether the operation content information in the compensative dispatching table has deleted, if otherwise carrying The operation content information is taken, and executes second data manipulation to second database.
Illustratively, continue the example above, be deleted if the record within 10 minutes in Work record sheets is still no, The operation (such as update operation) of corresponding second database of execution information in the record is not shown for some reason not It is performed, needs to compensate it processing.For example, this not deleted record indicates that the database manipulation executed is second The main table R0001 states of request slip become 1 from 0 in database.The execution information in the record can be then extracted, and according to the execution Information executes the update to second database and operates to complete compensation deals.
Step S303:After having executed second data manipulation to second database, the operation content is deleted Information.
Illustratively, such as after the completion of update operation execution, the record of corresponding work record sheets is deleted, is shown This consistent compensating operation of database is finished, and can carry out task scheduling next time.
Using task scheduling come the asynchronous compensation for carrying out database manipulation in the present exemplary embodiment, even if ensureing before Database manipulation is not performed, and also can guarantee final data consistency.Even if so as to solve the feelings such as server delay machine Under condition, also can balanced tool ensure the final consistency of data.
The method and step in above-described embodiment of the disclosure is carried out with reference to a concrete application scene further Explanation.
It is illustrated by taking 3 databases as an example in this application scene.The database being such as related to be A databases, B data library and C data library.Multiple database in this service line executes data manipulation:A databases must be by the corresponding amount of money of request slip R0001 The amount of money of table subtracts 10 yuan (corresponding first data manipulation), and the state of R0001 in the main table of request slip must be updated to 1 by B data library by 0 (corresponding second data manipulation), C data library must delete the record (corresponding third data manipulation) of R0001 in request slip detail list. This service line must ensure the consistency of these three data manipulations, i.e. success simultaneously.
Assuming that the data manipulation of A databases is more important on service line, therefore first turns on the affairs of A databases, in thing Following operating procedure 401~404 is executed in business:
Step 401:The amount of money in the corresponding amount of money tables of R0001 in A databases is subtracted 10.
Step 402:It is inserted into a Work record sheet in A databases, is used for the compensating operation in follow-up data library, task tune Degree executes.The state that compensation record content in Work record sheets is the main table R0001 of B data library request slip becomes 1 from 0, C data Library request slip detail deletion R0001's records relevant execution information.
Step 403:The setNx methods cached by Redis, judgement determine whether that there are concurrent operations.If slow It deposits judgement and executes failure, indicate that is, current service line had executed presently, there are concurrent operations, then carry out database and return Rolling, terminates this calling.If caching judges to run succeeded, indicate, at present without concurrent operations, subsequent operation can be continued to execute. Then the execution information data executed are needed to store into Redis cachings in B data library and C data library, caching KEY values are " R0001-B-C " calls for subsequent multithreading.The operation of current A databases executes completion, submits current database Affairs.
Step 404:B data library and C data are executed by the thread pool tool ThreadPoolExecutor of Java itself The database manipulation in library.
Illustratively, it calls the Redis to cache, the data for needing to execute is obtained by caching KEY values " R0001-B-C " The relevant execution information in library.The relevant execution information is by the state of the main table R0001 of request slip in B data library in the present embodiment The deletion request slip detail list for becoming 1 and C data library from 0.Then database manipulation is executed, by the request slip in B data library The state of the record of main table R0001 is updated to 1 by 0, and by the record deletion of the request slip detail list R0001 in C data library. After database runs succeeded, then the compensation record deletion being used in the Work record sheets of task scheduling will be executed.Because of current B numbers It has been carried out according to the data in library and C data library, is compensated without the scheduling of task based access control again.
If the update operation in B data library or C data library that current multithreading executes is not connected because of database, machine Think highly of and the reasons such as open and can not execute, then after extended meeting data consistency is carried out by the form of task scheduling Work record sheets again Operation.
It makes an explanation below to the compensating operation for carrying out data consistency by task scheduling.It is adopted in this sample application scene With the task scheduling tool Quartz that increases income, executes one query task within such as 10 minutes every preset time, inquire in A databases Work record sheets, the compensation record being inserted into before taking out 10 minutes.If compensation record is still without being deleted within 10 minutes, Show that corresponding B and the operation in C data library are not performed, needs to compensate it processing.
Assuming that this compensation record shows that the database manipulation not being performed is the main table R0001 shapes of request slip in B data library State becomes 1 from 0, and the record of the request slip detail list R0001 in C data library needs to delete.Then extract the execution number of compensation record It is believed that breath, executes two database manipulations (corresponding second data manipulation and the third data behaviour in B data library and C data library respectively Make).The compensation record that corresponding Work record sheets are deleted after the completion of executing shows that this consistent compensating operation of database executes It finishes, carries out task scheduling next time.
A databases, B data library and these three databases of C data library are pertained only in this application scene, if be related to more More databases, this method can be still applicable in.Most important database manipulation is first carried out, other database manipulations are logical It crosses multithreading execution or subsequent task scheduling carries out the compensating operation of data consistency, can be very good to ensure so most According to library data consistency.
It should be noted that although describing each step of method in the disclosure with particular order in the accompanying drawings, This, which does not require that or implies, to execute these steps according to the particular order, or has to carry out the step shown in whole It could realize desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and held by certain steps Row, and/or a step is decomposed into execution of multiple steps etc..In addition, being also easy to understand, these steps can be Such as it is either synchronously or asynchronously executed in multiple module/process/threads.
Further, in this example embodiment, a kind of multiple database data processing equipment is additionally provided.With reference in figure 4 Shown, device 100 may include operation requests acquisition module 101, the first operation executing module 102, the concurrent judgment module of caching 103 and second operation executing module 104.Wherein:
The operation requests acquisition module 101, it is corresponding for first database and the second database for obtaining First operation requests and the second operation requests.
First operation executing module 102, for being executed to the first database according to first operation requests The first data manipulation.
The concurrent judgment module 103 of caching, for calling the presetting method in preset buffer memory to judge that there is currently no simultaneously It, will be in the operation content information storage to the preset buffer memory of second operation requests when hair operation.
Second operation executing module 104 for calling the operation content information from the preset buffer memory, and is led to Cross second data manipulation of the preset Java multithread pools execution to second database.
In a kind of exemplary embodiment of the disclosure, the preset buffer memory includes Redis cachings, and the presetting method is SetNx methods in the Redis cachings.
In a kind of exemplary embodiment of the disclosure, described device 100 can also include that (figure is not for information setup module Show), for after having executed the first data manipulation of the first database according to first operation requests, described first Compensative dispatching table is set in database.Wherein, the operation of second operation requests is stored in the compensative dispatching table Content information.Second operation executing module 104 is additionally operable to when successful execution is complete to described the second of second database After data manipulation, the operation content information in the compensative dispatching table is deleted.
In a kind of exemplary embodiment of the disclosure, described device 100 can also include data manipulation compensating module (figure Do not show), for by preset task scheduling tool, starting query task every preset time to obtain in the first database The compensative dispatching table;Judge whether the operation content information in the compensative dispatching table has deleted, if otherwise carrying The operation content information is taken, and executes second data manipulation to second database;It has executed to described second After second data manipulation of database, the operation content information is deleted.
In a kind of exemplary embodiment of the disclosure, the preset task scheduling tool can include but is not limited to increase income Quartz task scheduling tools etc..
In a kind of exemplary embodiment of the disclosure, the preset time can be 5~10 minutes, be certainly not limited to This.
In a kind of exemplary embodiment of the disclosure, first data manipulation and the second data manipulation can be difference Data manipulation.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
It should be noted that although being referred to several modules or list for acting the equipment executed in above-detailed Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more The feature and function of module either unit can embody in a module or unit.Conversely, an above-described mould Either the feature and function of unit can be further divided into and embodied by multiple modules or unit block.As module or list The component of member display may or may not be physical unit, you can be located at a place, or may be distributed over In multiple network element.Some or all of module therein can be selected according to the actual needs to realize the open scheme of wood Purpose.Those of ordinary skill in the art are without creative efforts, you can to understand and implement.
Refering to what is shown in Fig. 5, in an exemplary embodiment of the disclosure, additionally providing a kind of computer readable storage medium 300, it is stored thereon with computer program, which may be implemented when being executed by such as processor in any one above-mentioned embodiment The step of multiple database data processing method.In some possible embodiments, various aspects of the invention can be with It is embodied as a kind of form of program product comprising program code, it is described when described program product is run on the terminal device Program code is for making the terminal device execute the root described in this specification above-mentioned multiple database data processing method part The step of according to various illustrative embodiments of the invention.
The program product for realizing above-mentioned multiple database data processing method according to the embodiment of the present invention, can To use portable compact disc read only memory (CD-ROM) and include program code, and can be in terminal device, such as individual It is run on computer.However, the program product of the present invention is without being limited thereto, in this document, readable storage medium storing program for executing can be any packet Contain or store the tangible medium of program, which can be commanded the either device use or in connection of execution system, device It uses.
The arbitrary combination of one or more readable mediums may be used in described program product.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or the arbitrary above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include:It is electrical connection, portable disc, hard disk, random access memory (RAM) with one or more conducting wires, read-only Memory (ROM), erasable programmable read only memory (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.
The computer readable storage medium may include the data letter propagated in a base band or as a carrier wave part Number, wherein carrying readable program code.Diversified forms, including but not limited to electromagnetism may be used in the data-signal of this propagation Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, which can send, propagate either transmission for being used by instruction execution system, device or device or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
It can be write with any combination of one or more programming languages for executing the program that operates of the present invention Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It executes on computing device, partly execute on a user device, being executed as an independent software package, partly in user's calculating Upper side point is executed or is executed in remote computing device or server completely on a remote computing.It is being related to far In the situation of journey computing device, remote computing device can pass through the network of any kind, including LAN (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
In an exemplary embodiment of the disclosure, a kind of electronic equipment is also provided, which may include processor, And the memory of the executable instruction for storing the processor.Wherein, the processor is configured to via described in execution Executable instruction is come the step of executing multiple database data processing method described in any one above-mentioned embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, i.e.,:It is complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
The electronic equipment 600 of this embodiment according to the present invention is described referring to Fig. 6.The electronics that Fig. 6 is shown Equipment 600 is only an example, should not bring any restrictions to the function and use scope of the embodiment of the present invention.
As shown in fig. 6, electronic equipment 600 is showed in the form of universal computing device.The component of electronic equipment 600 can wrap It includes but is not limited to:At least one processing unit 610, at least one storage unit 620, (including the storage of connection different system component Unit 620 and processing unit 610) bus 630, display unit 640 etc..
Wherein, the storage unit has program stored therein code, and said program code can be held by the processing unit 610 Row so that the processing unit 610 execute described in this specification above-mentioned multiple database data processing method part according to this The step of inventing various illustrative embodiments.For example, the processing unit 610 can execute step as shown in fig. 1.
The storage unit 620 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 6201 and/or cache memory unit 6202 can further include read-only memory unit (ROM) 6203.
The storage unit 620 can also include program/practicality work with one group of (at least one) program module 6205 Tool 6204, such program module 6205 include but not limited to:Operating system, one or more application program, other programs Module and program data may include the realization of network environment in each or certain combination in these examples.
Bus 630 can be to indicate one or more in a few class bus structures, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use the arbitrary bus structures in a variety of bus structures Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 600 communicate, and/or with make Any equipment that the electronic equipment 600 can be communicated with one or more of the other computing device (such as router, modulation /demodulation Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with By network adapter 660 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 660 can be communicated by bus 630 with other modules of electronic equipment 600.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 600, including but it is unlimited In:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure The technical solution of embodiment can be expressed in the form of software products, the software product can be stored in one it is non-volatile Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server or network equipment etc.) executes the above-mentioned majority according to disclosure embodiment According to library data processing method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by appended Claim is pointed out.

Claims (10)

1. a kind of multiple database data processing method, which is characterized in that this method includes:
It obtains for first database and corresponding first operation requests of the second database and the second operation requests;
The first data manipulation to the first database is executed according to first operation requests;
The presetting method in preset buffer memory is called to judge there is currently no when concurrent operations, by the operation of second operation requests Content information is stored into the preset buffer memory;
It calls the operation content information from the preset buffer memory, and is executed to described the by preset Java multithread pools Second data manipulation of two databases.
2. multiple database data processing method according to claim 1, which is characterized in that the preset buffer memory includes Redis Caching, the presetting method are the setNx methods in Redis cachings.
3. multiple database data processing method according to claim 2, which is characterized in that the method further includes:
After having executed the first data manipulation of the first database according to first operation requests, in first data Compensative dispatching table is set in library;Wherein, the operation content of second operation requests is stored in the compensative dispatching table Information;
After successful execution complete second data manipulation to second database, the institute in the compensative dispatching table is deleted State operation content information.
4. multiple database data processing method according to claim 3, which is characterized in that the method further includes:
By preset task scheduling tool, start query task every preset time with described in obtaining in the first database Compensative dispatching table;
Judge whether the operation content information in the compensative dispatching table has deleted, if otherwise extracting the operation content Information, and execute second data manipulation to second database;
After having executed second data manipulation to second database, the operation content information is deleted.
5. multiple database data processing method according to claim 4, which is characterized in that the preset task scheduling tool packet Include Quartz task scheduling tools of increasing income.
6. multiple database data processing method according to claim 4, which is characterized in that the preset time is 5~10 points Clock.
7. according to any one of the claim 1~6 multiple database data processing method, which is characterized in that first data Operation and the second data manipulation are different data manipulations.
8. a kind of multiple database data processing equipment, which is characterized in that the device includes:
Operation requests acquisition module is directed to first database and corresponding first operation requests of the second database for obtaining With the second operation requests;
First operation executing module grasps the first data of the first database for being executed according to first operation requests Make;
Concurrent judgment module is cached, for calling the presetting method in preset buffer memory to judge, there is currently no when concurrent operations, to incite somebody to action In the operation content information storage to the preset buffer memory of second operation requests;
Second operation executing module, for calling the operation content information from the preset buffer memory, and by preset Java multithread pools execute the second data manipulation to second database.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The step of any one of the claim 1~7 multiple database data processing method is realized when row.
10. a kind of electronic equipment, which is characterized in that including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor be configured to via execute the executable instruction come perform claim require it is any one of 1~7 described more The step of database data processing method.
CN201710261410.5A 2017-04-20 2017-04-20 Multi-database data processing method and device, storage medium and electronic equipment Active CN108733704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710261410.5A CN108733704B (en) 2017-04-20 2017-04-20 Multi-database data processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710261410.5A CN108733704B (en) 2017-04-20 2017-04-20 Multi-database data processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108733704A true CN108733704A (en) 2018-11-02
CN108733704B CN108733704B (en) 2020-11-20

Family

ID=63933614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710261410.5A Active CN108733704B (en) 2017-04-20 2017-04-20 Multi-database data processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108733704B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416955A (en) * 2020-11-18 2021-02-26 四川长虹电器股份有限公司 Cache consistency problem solving method based on high concurrency environment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7290015B1 (en) * 2003-10-02 2007-10-30 Progress Software Corporation High availability via data services
US20120278473A1 (en) * 2011-04-27 2012-11-01 Rackspace Us, Inc. Event Queuing and Distribution System
CN103412786A (en) * 2013-08-29 2013-11-27 苏州科达科技股份有限公司 High performance server architecture system and data processing method thereof
CN105989065A (en) * 2015-02-09 2016-10-05 苏宁云商集团股份有限公司 Flash shot data processing method and system
CN106021335A (en) * 2016-05-06 2016-10-12 北京奇虎科技有限公司 A database accessing method and device
CN106202505A (en) * 2016-07-20 2016-12-07 北京京东尚科信息技术有限公司 Data processing method and system thereof
CN106341345A (en) * 2016-08-18 2017-01-18 北京奇虎科技有限公司 Concurrent request processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7290015B1 (en) * 2003-10-02 2007-10-30 Progress Software Corporation High availability via data services
US20120278473A1 (en) * 2011-04-27 2012-11-01 Rackspace Us, Inc. Event Queuing and Distribution System
CN103412786A (en) * 2013-08-29 2013-11-27 苏州科达科技股份有限公司 High performance server architecture system and data processing method thereof
CN105989065A (en) * 2015-02-09 2016-10-05 苏宁云商集团股份有限公司 Flash shot data processing method and system
CN106021335A (en) * 2016-05-06 2016-10-12 北京奇虎科技有限公司 A database accessing method and device
CN106202505A (en) * 2016-07-20 2016-12-07 北京京东尚科信息技术有限公司 Data processing method and system thereof
CN106341345A (en) * 2016-08-18 2017-01-18 北京奇虎科技有限公司 Concurrent request processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416955A (en) * 2020-11-18 2021-02-26 四川长虹电器股份有限公司 Cache consistency problem solving method based on high concurrency environment
CN112416955B (en) * 2020-11-18 2022-02-22 四川长虹电器股份有限公司 Cache consistency problem solving method based on high concurrency environment

Also Published As

Publication number Publication date
CN108733704B (en) 2020-11-20

Similar Documents

Publication Publication Date Title
US11409425B2 (en) Transactional conversation-based computing system
US20210097043A1 (en) Data processing method, device, and a storage medium
US4805134A (en) Electronic system for accessing graphical and textual information
CN107515795A (en) Multi-task parallel data processing method, device, medium and equipment based on queue
CN108961033A (en) Multiservice system exchange method and device, storage medium, electric terminal
CN104160381A (en) Managing tenant-specific data sets in a multi-tenant environment
CN109906448A (en) Promote the operation on pluggable database using individual logical time stamp service
CN109685295A (en) Cargo, which is pulled, receives dispatching method and device, storage medium, electronic equipment
CN106385329A (en) Processing method and device of resource pool and equipment
EP3815342B1 (en) Adaptive user-interface assembling and rendering
CN108874828A (en) The method and apparatus of Data Migration
CN104471523A (en) Computer system and control method thereof
CN107832448A (en) Database operation method, device and equipment
CN106357791A (en) Method, device and system for processing services
CN102272751A (en) Data integrity in a database environment through background synchronization
CN112052082B (en) Task attribute optimization method, device, server and storage medium
CN111626602A (en) Service processing method, service processing device, storage medium and electronic equipment
CN109800234A (en) Service platform database system, upgrade method, equipment and storage medium
CN104574044A (en) Task originating method in office automation and office automation system
CN104516994B (en) The method and apparatus of computer implemented auxiliary publication planning
CN108733704A (en) Multiple database data processing method, device and storage medium and electronic equipment
CN109460363A (en) Automated testing method, device, electronic equipment and computer-readable medium
CN110019131A (en) A kind of method and apparatus of discs business
CN110083657A (en) Data interchange method, apparatus, terminal and storage medium
CN109377184A (en) Job cardss method, apparatus, storage medium and terminal

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
GR01 Patent grant
GR01 Patent grant