CN109933594A - Obtain method, apparatus, electronic equipment and the medium of data - Google Patents

Obtain method, apparatus, electronic equipment and the medium of data Download PDF

Info

Publication number
CN109933594A
CN109933594A CN201910117794.2A CN201910117794A CN109933594A CN 109933594 A CN109933594 A CN 109933594A CN 201910117794 A CN201910117794 A CN 201910117794A CN 109933594 A CN109933594 A CN 109933594A
Authority
CN
China
Prior art keywords
data
change
database
application
obtaining
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
CN201910117794.2A
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 Dami Technology Co Ltd
Original Assignee
Beijing Dami 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 Dami Technology Co Ltd filed Critical Beijing Dami Technology Co Ltd
Priority to CN201910117794.2A priority Critical patent/CN109933594A/en
Publication of CN109933594A publication Critical patent/CN109933594A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

This application discloses a kind of method, apparatus, electronic equipment and media for obtaining data.Wherein, it in the application, is obtaining for after the synchronic command for obtaining data in database, the log services of monitor database, and when detecting in log services there are when change record, according to change record, is obtaining target data.By the technical solution of application the application, corresponding data of interest can be obtained by the change record in the log services for detecting database there are when data change record.And then it can be to avoid existing the drawbacks of needing to scan for just obtaining caused by target data to all data in database, expending period of reservation of number in the related technology.

Description

Obtain method, apparatus, electronic equipment and the medium of data
Technical field
Data processing technique involved in the application, especially a kind of method, apparatus, electronic equipment and Jie for obtaining data Matter.
Background technique
Due to the rise of communication era and society, smart machine is constantly sent out with the use of more and more users Exhibition.
Further, gradually popularizing along with internet information, enterprise can possess more and more data informations.Example Such as, mail data information, user data information, webpage data information etc..By taking internet retailer as an example, whenever consumer's benefit With electric terminal when choosing a collection of commodity on its webpage, it is required to generate the consumption data information about the user.Into One step, in face of the data information of magnanimity, in the related technology, it will usually Various types of data information is stored using database.However, In the related art, when obtaining data from database, it usually needs the more time is spent, to affect user experience.
Summary of the invention
The embodiment of the present invention provides a kind of method, apparatus, electronic equipment and medium for obtaining data.
Wherein, according to the one aspect of the embodiment of the present application, a kind of method of the acquisition data provided, which is characterized in that Include:
Synchronic command is obtained, the synchronic command from database for obtaining data;
Monitor the log services of the database;
When detecting in the log services there are when data change record, according to the change record, number of targets is obtained According to.
Optionally, in another embodiment based on the application above method, the log of the monitoring database Service, comprising:
The first solicited message is sent to the database, first solicited message includes first from library mark, described First identifies from library for monitoring the log services from the identity request in library with first, described first from library be the database Under any one from library;
When receiving replying instruction, the log services of the database are monitored.
Optionally, described according to the change record in another embodiment based on the application above method, it obtains Target data, comprising:
When receiving the change record, the change record is parsed, obtains change mark;
It is identified based on the change, obtains the target data.
Optionally, described to be identified based on the change in another embodiment based on the application above method, it obtains Target data, comprising:
The change is identified and is matched with preset acquisition strategy, corresponding matching result is generated;
When the matching result conforms to a predetermined condition, according to the matching result, the target data is obtained.
Optionally, described that the change is identified and preset in another embodiment based on the application above method Acquisition strategy match, generate corresponding matching result, comprising:
It is identified according to the change, obtains change time and the change object of the data change record;
The change time and change object are matched with the acquisition strategy, generate the corresponding matching knot Fruit.
Optionally, in another embodiment based on the application above method, before the acquisition synchronic command, also Include:
Obtain the total data in the database;
Total data in the database is stored into target partition.
Optionally, in another embodiment based on the application above method, the log clothes ought be detected described There are when data change record in business, according to the change record, after obtaining target data, further includes:
By target data storage into the target partition.
According to the other side of the embodiment of the present application, a kind of device of the acquisition data provided, comprising:
First obtains module, is configured as obtaining synchronic command, the synchronic command from database for obtaining data;
Monitoring modular is configured as monitoring the log services of the database;
Second obtains module, is configured as when detecting in the log services there are when data change record, according to institute Change record is stated, target data is obtained.
According to the another aspect of the embodiment of the present application, a kind of electronic equipment that provides, comprising:
Memory, for storing executable instruction;And
Display completes any of the above-described described obtain for showing with the memory to execute the executable instruction The operation of the method for evidence of fetching.
According to the still another aspect of the embodiment of the present application, a kind of computer readable storage medium provided, based on storing The instruction that calculation machine can be read, described instruction are performed the operation for executing any of the above-described method for obtaining data.
In the application, obtaining for after the synchronic command for obtaining data in database, the log of monitor database to be taken Business, and when detecting in log services there are when change record, according to change record, obtain target data.By applying this Shen Technical solution please can pass through the change record in the log services for detecting database there are when data change record Obtain corresponding data of interest.And then it can need to carry out all data in database to avoid existing in the related technology The drawbacks of search can just obtain caused by target data, expend period of reservation of number.
Below by drawings and examples, the technical solution of the application is described in further detail.
Detailed description of the invention
The attached drawing for constituting part of specification describes embodiments herein, and together with description for explaining The principle of the application.
The application can be more clearly understood according to following detailed description referring to attached drawing, in which:
Fig. 1 is the system architecture schematic diagram for the method that the application obtains data.
Fig. 2 is the flow chart that the application obtains another embodiment of the method for data.
Fig. 3 is the flow chart that the application obtains another embodiment of the method for data.
Fig. 4 is the flow chart for the method further embodiment that the application obtains data.
Fig. 5 is the flow chart for the method a still further embodiment that the application obtains data.
Fig. 6 is the structural schematic diagram for the device that the application obtains data.
Fig. 7 is that the application shows electronic devices structure schematic diagram.
Specific embodiment
The various exemplary embodiments of the application are described in detail now with reference to attached drawing.It should also be noted that unless in addition having Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally The range of application.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality Proportionate relationship draw.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, not as to the application and Its any restrictions applied or used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable In the case of, the technology, method and apparatus should be considered as part of specification.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
It is to be appreciated that the directional instruction (such as up, down, left, right, before and after ...) of institute is only used in the embodiment of the present application In explaining in relative positional relationship, the motion conditions etc. under a certain particular pose (as shown in the picture) between each component, if should When particular pose changes, then directionality instruction also correspondingly changes correspondingly.
In addition, the description for being such as related to " first ", " second " in this application is used for description purposes only, and should not be understood as Its relative importance of indication or suggestion or the quantity for implicitly indicating indicated technical characteristic.Define as a result, " first ", The feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present application, " multiples' " contains Justice is at least two, such as two, three etc., unless otherwise specifically defined.
In this application unless specifically defined or limited otherwise, term " connection ", " fixation " etc. shall be understood in a broad sense, For example, " fixation " may be a fixed connection, it may be a detachable connection, or integral;It can be mechanical connection, be also possible to Electrical connection;It can be directly connected, the connection inside two elements or two can also be can be indirectly connected through an intermediary The interaction relationship of a element, unless otherwise restricted clearly.It for the ordinary skill in the art, can basis Concrete condition understands the concrete meaning of above-mentioned term in this application.
It in addition, the technical solution between each embodiment of the application can be combined with each other, but must be general with this field Based on logical technical staff can be realized, it will be understood that when the combination of technical solution appearance is conflicting or cannot achieve this The combination of technical solution is not present, also not this application claims protection scope within.
It is described below with reference to Fig. 1 to Fig. 5 according to the application illustrative embodiments for obtain the side of data Method.It should be noted that following application scenarios are merely for convenience of understanding spirit herein and principle and showing, the application's Embodiment is unrestricted in this regard.On the contrary, presently filed embodiment can be applied to applicable any scene.
Fig. 1 is shown can be using the exemplary of the device of the method or acquisition data of the acquisition data of the embodiment of the present application The schematic diagram of system architecture 100.
As shown in Figure 1, system architecture 100 may include one of terminal device 101,102,103 or a variety of, network 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..
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.For example server 105 can be multiple server compositions Server cluster 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..Terminal device 101,102,103 can be the various electronic equipments with display screen, including but not limited to intelligent hand Machine, tablet computer, portable computer and desktop computer etc..
Terminal device 101,102,103 in the application can be to provide the terminal device of various services.Such as user is logical After crossing terminal device 103 (being also possible to terminal device 101 or 102) acquisition synchronic command, terminal device 103 can be with monitoring data The log in library: such as monitoring binlog service, and when monitoring in binlog service there are when change record, according to change record, Obtain target data.
It should be noted that the method for the acquisition data of photographic device provided by the embodiment of the present application can be by end One or more of end equipment 101,102,103, and/or, server 105 executes, and correspondingly, the embodiment of the present application is provided The devices of acquisition data be generally positioned in counterpart terminal equipment, and/or, in server 105, but the application is without being limited thereto.
The application also proposes a kind of method, apparatus, target terminal and medium for obtaining data.
Fig. 2 schematically shows the flow diagrams according to the methods of acquisition data of the application embodiment a kind of. As shown in Fig. 2, this method comprises:
S101 obtains synchronic command, and synchronic command is for obtaining data from Mysql database.
Firstly the need of explanation, the application does not do concrete restriction to the acquisition modes of synchronic command.For example, can be by electricity Sub- equipment generates synchronic command after detection reaches predetermined condition, and synchronizing for user's generation can also be received by electronic equipment and is referred to It enables, and according to the subsequent operation of instruction execution.
It should also be noted that, not being specifically limited to the equipment for obtaining synchronic command, in the application for example, the application The synchronic command that user generates can be obtained by smart machine, the synchronic command that user generates can also be obtained by server.
In addition, not being specifically limited to smart machine in the application, i.e., smart machine can be arbitrary smart machine, For example, mobile phone, electronic memo, PDA etc..
Optionally, in the application, synchronic command from database for obtaining data.In in practice, Mysql database It is that the common database of one kind is described in detail by taking Mysql database as an example below for convenience of explanation.It needs to illustrate It is that the present invention is not intended to limit specific database implementations, the database of other modes includes being not limited to: DB2, SQLServer, Access, PostgreSQL, Informix, FlockDB, HBase, Redis etc..
Mysql database is that a kind of relevant database usually stores in terms of rows and columns in Mysql database Data, user, being capable of data in searching database using inquiry (Query) sentence.It is recognised that for other databases, Also there are its corresponding data storage method and corresponding query statement.
S102, the log services of monitor database.Equally, different types of database is corresponding with corresponding log recording, For the convenience of description, being described by taking the binlog service in Mysql database as an example below.Binlog is Mysql sever A kind of binary log of layer maintenance, is entirely different log with the redo/undolog in innodb engine;It is mainly For recording to the update of mysql data or the potential SQL statement updated, and it is stored in disk in the form of " affairs ". Optionally, in the application, after obtaining synchronic command, the binlog service for monitoring Mysql database can be started.Wherein, The binlog service of Mysql database is in record Mysql database, the change of all database table structures (such as CREATE, ALTER TABLE ...) and table data modification (INSERT, UPDATE, DELETE ...) binary log.It should be understood that Binlog by detecting Mysql database is serviced, in available Mysql database, all data records for sending change.
It should be noted that not limited the specific format of the binlog service of monitoring Mysql database in the application. Wherein, can be present in Mysql database with multiple formats in binlog service.For example, as shown in table 1 below:
As can be seen from Table 1, the application can monitor the statement of binlog service.Wherein, statement is The part of all SQL statements changed present in binlog service.Alternatively, the application can also monitor binlog service Row, wherein row be binlog service present in every row real data change part.Again or, the application can also be with Monitor the mixed of binlog service, wherein mixed is the mixed of statement and row format present in binlog service Close part.
It should be noted that not doing specific limit to the mode of the binlog service of monitoring Mysql database in the application It is fixed, i.e. the application binlog service that Mysql database can be monitored in real time, the application can also in every prescribed time period, The binlog for starting to monitor Mysql database is serviced.
S103, according to change record, obtains number of targets when detecting in binlog service there are when data change record According to.
Optionally, in the application, synchronic command is being obtained, and after monitoring the binlog service of Mysql database, it can be with Further when detecting in binlog service there are when change record, according to change record, target data is obtained.
It should be noted that not being specifically limited to the type of change record in the application, i.e., change record can be The newly-increased data change record of the data occurred in Mysql database, change record may be to occur in Mysql database The data change record that data are deleted, change record can also be the data change of the data modification occurred in Mysql database Record.Likewise, the application is not also specifically limited the data type of change data, i.e. change data can be consumption data Category information, enterprise's data class data information, enterprise's commodity class data information etc..In a kind of possible preferred embodiment, The data type of change data in the application can be consumer according to enterprise product order class data information generated.Its In, when the type for changing data is order class data information, change data can be with to become when order class data information When more, data information generated.
For example, server is directed to after user's first has chosen corresponding commodity on the website of certain enterprise using electric terminal The behavior generates order class data information A.Further, which is needed due to personal after a period of time that places an order Shipping Address is changed, then first need to log on the website of the enterprise, and after finding data information A, modify in data information A Shipping Address one.For the behavior, for relevant database, in the data of user's first modification data information A Rong Hou, then relevant database generates corresponding, the data change record about user's first.
In the application, obtaining for after the synchronic command for obtaining data in database, the log of monitor database to be taken Business, and when detecting in log services there are when change record, according to change record, obtain target data.By applying this Shen Technical solution please can pass through the change record in the log services for detecting database there are when data change record Obtain corresponding data of interest.And then it can need to carry out all data in database to avoid existing in the related technology The drawbacks of search can just obtain caused by target data, expend period of reservation of number.
It is further alternative, in a kind of embodiment of the application, in S102 (log services of monitor database), It further include a kind of specific embodiment, as shown in Figure 3, comprising:
S201 obtains synchronic command.
S202 sends the first solicited message to database, and the first solicited message includes first to identify from library, and first from library Identify for first from the identity request monitoring journal service in library, first from library be any one under database from library.
Optionally, in the application, can using master library-from library mode, such as: can be equipped under Mysql primary database It is multiple from database, with functions such as the backups of realizing data.Therefore it includes first that the application can be sent to Mysql database The first solicited message identified from library.Wherein, it first identifies from library for being taken with first from the identity request in library monitoring binlog Business, first from library be any one under Mysql database from library.
Further, in operation due to relevant database, external electronic equipments is not allowed to carry out real-time data The transmission of record.Therefore, impacted in order not to the continuous service to Mysql database, in the application, by with first from library Identity makes requests the service of real-time monitoring binlog to Mysql database.It should be noted that first can be from library In Mysql database, there is currently any one multiple from library from library.First is also possible to from library based on Mysql number One generated according to library be exclusively used in request monitoring binlog service from library.
S203 is monitored the log services of database when receiving replying instruction.
Optionally, in the application, obtain synchronic command, and to database send the first solicited message after, can be real-time It monitors whether to receive the replying instruction generated for first solicited message, and permits receiving for monitoring journal service Replying instruction after, start the log services of monitor database.
S204, according to change record, obtains target data when detecting in log services there are when data change record.
In the application, obtaining for including to database transmission after the synchronic command for obtaining data in database First solicited message identified from library, and after receiving replying instruction, monitoring journal service, then when detecting in log services There are when change record, according to change record, target data is obtained.By application the application technical solution, can by from The log services of the identity monitor database in library, and pass through the change there are when data change record in detecting log services More record obtains corresponding data of interest.And then it can need to avoid existing in the related technology to all numbers in database The drawbacks of according to scanning for just obtaining caused by target data, expending period of reservation of number.
It is further alternative, in a kind of embodiment of the application, in S103 (when detecting that there are numbers in log services When according to change record, according to change record, target data is obtained) among, it further include a kind of specific embodiment, such as Fig. 4 institute Show, comprising:
S301 obtains synchronic command.
S302, the log services of monitor database.
S303 parses change record when receiving change record, obtains change mark.
Optionally, synchronic command is being obtained in the application, and after the log services of monitor database, can will received Change record parsed, and then obtain change mark so that it is subsequent according to the change identify, obtain corresponding number of targets According to.
In a kind of possible embodiment of the application, change record is parsed, obtains the mode of change mark are as follows:
Change mark is matched with preset acquisition strategy, generates corresponding matching result.
Wherein, in a kind of optional embodiment, change mark is matched with preset acquisition strategy, is generated corresponding Matching result can be generated to obtain by following manner:
S304 is identified according to change, obtains change time and the change object of change record;
Optionally, in the application, change record can be parsed first, and identify according to the change that parsing obtains.Wherein, become More multiple information about corresponding data change record can be carried in mark.For example, may include having data change note The change time of record, changes region, changing category etc. at change object.In a kind of possible embodiment, the application can be with It is identified according to the change, determines change time and the change object of the data change record.
Further, due to for for the user for obtaining target data, may needing to obtain in predetermined amount of time or The corresponding data of the change record of person's predetermined object.Therefore, in the application, can determine simultaneously the change time of change record with And change object.
For example, user's second has chosen phase on the website of certain enterprise using its electric terminal in 2018.12.12 day 8 After the commodity answered, server generates order class data information B for the behavior.Further, user's first is 3 small in lower list Shi Hou needs to change Shipping Address due to personal, then user's second logs in the website of the enterprise in 11 points on the same day, and is finding After data information B, Shipping Address one in data information B is modified.For the behavior, for relevant database, After user's second modifies the data content of data information B, then relevant database was generated in 2018.12.12 day 11, about with The change data of family second.Still further, user's second is in 2018.12.13 day 9, and because personal reason needs are repaired Change contact method, then user's second logs on the website of the enterprise in 9 points of next day, and after finding data information B, modifies data Contact method in information B one.For the behavior, for Mysql relevant database, number is modified again in user's second It is believed that then relevant database generates the change number in 2018.12.13 day 9, about user's second after the data content of breath B According to record.It is corresponding, after obtaining and parsing the change data record, the change time of the available data change record (9 points of 2018.12.13 day) and change object (user's second).So that subsequent searching the purchaser record data for being directed to user's second When, corresponding purchase data can be known directly according to the data change record.So as to avoid needs in relevant database Used time longer drawback brought by the middle purchaser record data for carrying out the available user's second of global search.
In another example user third is in 2018.12.18 day 20, using its electric terminal, for the first time in certain EFL teaching class The Foreign Language Curriculum of a length of 1 hour when having carried out on website, server generate course class data information C for the behavior.Into One step, for the behavior, for relevant database, after user third completes Foreign Language Curriculum, then relational data Library was generated in 2018.12.18 day 20, the class hour change data record about user third.Namely it generates about user's third The data change record that class hour data changed to 60 minutes from 0 minute is completed.It is corresponding, when obtaining and parse the change data After record, the change time (20 points of 2018.12.18 day) of the available data change record and change object (user The third).So that subsequent searching for when class hour data are completed of user third, can be obtained directly according to the data change record Know and corresponding class hour data is completed.Global search just available use is carried out in relevant database so as to avoid needs The longer drawback of used time brought by class hour data is completed in family third.
Change time and change object are matched with acquisition strategy, generate corresponding matching result by S305.
Optionally, it in parsing change record in the application, and is identified according to the change that parsing obtains, determines that the data change After the change time of record and change object, the change time and change object can also be matched with acquisition strategy, Generate corresponding matching result.
Also according to the example above, it is possible to understand that, it is 2018.12.13 when the change time obtained according to change mark 9 points of day, when change object is user's second, it is determined that the data change record is what user's second was generated at day 9 2018.12.13 Data change record about change Shipping Address.It further, will be in the change time and change object and acquisition strategy Request time range and request object match with the data change record so that subsequent according to the matching knot Fruit decides whether to obtain target data from the data change record.
S306, according to matching result, obtains target data when matching result conforms to a predetermined condition.
It should be understood that when the change time and change request time range in object and acquisition strategy and When the matching result that request object and the data change record match conforms to a predetermined condition, then data change note is determined Record is the interested data change record of user, and then is identified according to the change of the data change record, obtains corresponding target Data.
It is further alternative, in the application, when receiving the inquiry instruction for target data, displaying target number According to.
Optionally, in the application, after obtaining target data, it can further be stored into local, so that after Continue when receiving the inquiry instruction about the target data, it may not be necessary to can just be found carrying out global search to database The data, but local data file is stored in by inquiry, the target data is directly acquired, and it will be shown in respective areas Domain.So as to greatly alleviate the online computation burden of database.
Its electric terminal is equally utilized with user third, for the first time when having carried out on the website of certain EFL teaching class a length of 1 For the Foreign Language Curriculum of hour.Further, then relevant database generates and class hour data is completed from 0 point about user third Clock changes to 60 minutes data change records.It further, is to use for the corresponding target data of data change record The course hours at family third.Therefore, it receives when electronic equipment about the inquiry instruction searched for each user course hours are completed When, then it can be based on the data change record, when a length of 60 minutes course hours that are completed of user third are shown to correspondence Position.
It is further alternative, in a kind of embodiment of the application, (before obtaining synchronic command, further include in S101 A kind of specific embodiment, as shown in Figure 5, comprising:
S401 obtains the total data in database.
Optionally, it is easy to influence database performance brought by target data in order to avoid obtaining by database online Drawback can also be complete by all data existing in database using redundancy technique for until current time in the application Portion backups to local, so that it is subsequent when searching for target data, it can directly be carried out by backuping to local database data Search.
S402 stores the total data in database into target partition.
Optionally, the application can further will acquire in database after obtaining the total data in database Total data store into target partition.It should be understood that when user needs the data to Mysql database to retrieve When, it may not be necessary to it is made requests to database and corresponding data just can be obtained, but directly search the complete of the database being locally stored Portion's data and obtain.
Further alternative, the application can also carry out advanced processing to data, form index information or index file.Example Such as: for Mysql database, key characteristics scanning being carried out to it using regular expression, hiting data is carried out at rejecting Reason, and be stored in temporary file.After to all data scannings to be selected, the data in temporary file are summarized, and raw At corresponding search listing.Since this method does not use database service, the service of Mysql database will not influence Can, data to be selected are complete, and scan task need to only execute once, and consumption system resource is small.
S403 obtains synchronic command.
S404, the log services of monitor database.
S405, according to change record, obtains target data when detecting in log services there are when change record.
S406, by target data storage into target partition.
It optionally,, can be similarly by target data after getting target data according to change record in the application Store in the target partition in S402 so that it is subsequent receive search data information inquiry instruction when, can be direct It is searched in target partition.
In another embodiment of the application, as shown in fig. 6, the application also provides a kind of dress for obtaining data It sets, which includes the first acquisition module 501, and monitoring modular 502, second obtains module 503, wherein
First obtains module 501, is configured as obtaining synchronic command, the synchronic command from database for obtaining number According to;
Monitoring modular 502 is configured as monitoring the log services of the database;
Second obtains module 503, is configured as when detecting in the log services there are when data change record, according to The change record obtains target data.
In the application, obtaining for after the synchronic command for obtaining data in database, the log of monitor database to be taken Business, and when detecting in log services there are when change record, according to change record, obtain target data.By applying this Shen Technical solution please can pass through the change record in the log services for detecting database there are when data change record Obtain corresponding data of interest.And then it can need to carry out all data in database to avoid existing in the related technology The drawbacks of search can just obtain caused by target data, expend period of reservation of number.
It optionally, in the another embodiment of the application, further include sending module 504, in which:
Sending module 504 is configured as sending the first solicited message to the database, and first solicited message includes There is first to identify from library, described first identifies from library for monitoring the log services from the identity request in library with first, described First from library be any one under the database from library;
Sending module 504 is additionally configured to when receiving replying instruction, monitors the log services of the database.
It in the another embodiment of the application, further include that it further includes that receiving unit obtains that second, which obtains module 503, Take unit, in which:
Receiving unit is configured as when receiving the change record, parses the change record, obtains change mark Know;
Acquiring unit is configured as being identified based on the change, obtains the target data.
It in the another embodiment of the application, further include that it further includes that generation unit obtains that second, which obtains module 503, Take unit, in which:
Generation unit is configured as matching change mark with preset acquisition strategy, generates corresponding matching As a result;
Acquiring unit is configured as when the matching result conforms to a predetermined condition, and according to the matching result, obtains mesh Mark data.
In the another embodiment of the application, second obtains module 503, further includes, in which:
Generation unit, be configured as according to the change identify, obtain the data change record the change time and Change object;
Acquiring unit is configured as matching the change time and change object with the acquisition strategy, generate The corresponding matching result.
It in the another embodiment of the application, further include that third obtains module 505, in which:
Third obtains module 505, is configured as obtaining the total data in the database;
Third obtains module 505, is configured as storing the total data in the database into target partition.
In the another embodiment of the application, third obtains module 505, further includes: storage unit, in which:
Storage unit is configured as storing the target data into the target partition.
Fig. 7 is the logical construction block diagram of a kind of electronic equipment shown according to an exemplary embodiment.For example, electronic equipment 600 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, and medical treatment is set It is standby, body-building equipment, personal digital assistant etc..
Referring to Fig. 7, electronic equipment 600 may include following one or more components: processor 601 and memory 602.
Processor 601 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 601 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 601 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 601 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 601 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 602 may include one or more computer readable storage mediums, which can To be non-transient.Memory 602 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 602 can Storage medium is read for storing at least one instruction, at least one instruction performed by processor 601 for realizing this Shen Please in embodiment of the method provide interaction special efficacy scaling method.
In some embodiments, electronic equipment 600 is also optional includes: peripheral device interface 603 and at least one periphery Equipment.It can be connected by bus or signal wire between processor 601, memory 602 and peripheral device interface 603.It is each outer Peripheral equipment can be connected by bus, signal wire or circuit board with peripheral device interface 603.Specifically, peripheral equipment includes: to penetrate At least one in frequency circuit 604, touch display screen 605, camera 606, voicefrequency circuit 607, positioning component 608 and power supply 609 Kind.
Peripheral device interface 603 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 601 and memory 602.In some embodiments, processor 601, memory 602 and peripheral equipment Interface 603 is integrated on same chip or circuit board;In some other embodiments, processor 601, memory 602 and outer Any one or two in peripheral equipment interface 603 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 604 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 604 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 604 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 604 wraps It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 604 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 604 may be used also To include the related circuit of NFC (Near Field Communication, wireless near field communication), the application is not subject to this It limits.
Display screen 605 is for showing UI (User Interface, user interface).The UI may include figure, text, figure Mark, video and its their any combination.When display screen 605 is touch display screen, display screen 605 also there is acquisition to show The ability of the touch signal on the surface or surface of screen 605.The touch signal can be used as control signal and be input to processor 601 are handled.At this point, display screen 605 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or Soft keyboard.In some embodiments, display screen 605 can be one, and the front panel of electronic equipment 600 is arranged;In other realities It applies in example, display screen 605 can be at least two, be separately positioned on the different surfaces of electronic equipment 600 or in foldover design;? In still other embodiments, display screen 605 can be flexible display screen, is arranged on the curved surface of electronic equipment 600 or folds On face.Even, display screen 605 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 605 can be adopted With LCD (Liquid Crystal Display, liquid crystal display), (Organic Light-Emitting Diode, has OLED Machine light emitting diode) etc. materials preparation.
CCD camera assembly 606 is for acquiring image or video.Optionally, CCD camera assembly 606 include front camera and Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 606 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 607 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 601, to be handled, or is input to radio circuit 604 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of electronic equipment 600 to be multiple. Microphone can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 601 or radio frequency will to be come from The electric signal of circuit 604 is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramics loudspeaking Device.When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, can also be incited somebody to action Electric signal is converted to the sound wave that the mankind do not hear to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 607 can be with Including earphone jack.
Positioning component 608 is used for the current geographic position of Positioning Electronic Devices 600, to realize navigation or LBS (Location Based Service, location based service).Positioning component 608 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 609 is used to be powered for the various components in electronic equipment 600.Power supply 609 can be alternating current, direct current Electricity, disposable battery or rechargeable battery.When power supply 609 includes rechargeable battery, which can support wired Charging or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, electronic equipment 600 further includes having one or more sensors 610.The one or more passes Sensor 610 includes but is not limited to: acceleration transducer 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615 and proximity sensor 616.
Acceleration transducer 611 can detecte the acceleration in three reference axis of the coordinate system established with electronic equipment 600 Spend size.For example, acceleration transducer 611 can be used for detecting component of the acceleration of gravity in three reference axis.Processor The 601 acceleration of gravity signals that can be acquired according to acceleration transducer 611, control touch display screen 605 with transverse views or Longitudinal view carries out the display of user interface.Acceleration transducer 611 can be also used for game or the exercise data of user Acquisition.
Gyro sensor 612 can detecte body direction and the rotational angle of electronic equipment 600, gyro sensor 612 can cooperate with acquisition user to act the 3D of electronic equipment 600 with acceleration transducer 611.Processor 601 is according to gyroscope The data that sensor 612 acquires, may be implemented following function: action induction (for example changed according to the tilt operation of user UI), image stabilization, game control and inertial navigation when shooting.
The lower layer of side frame and/or touch display screen 605 in electronic equipment 600 can be set in pressure sensor 613.When When the side frame of electronic equipment 600 is arranged in pressure sensor 613, user can detecte to the gripping signal of electronic equipment 600, Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 613 acquires by processor 601.Work as pressure sensing When the lower layer of touch display screen 605 is arranged in device 613, grasped by processor 601 according to pressure of the user to touch display screen 605 Make, realization controls the operability control on the interface UI.Operability control include button control, scroll bar control, At least one of icon control, menu control.
Fingerprint sensor 614 is used to acquire the fingerprint of user, collected according to fingerprint sensor 614 by processor 601 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 614 according to the identity of collected fingerprint recognition user.It is identifying When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 601 Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Electronics can be set in fingerprint sensor 614 Front, the back side or the side of equipment 600.When being provided with physical button or manufacturer Logo on electronic equipment 600, fingerprint sensor 614 can integrate with physical button or manufacturer Logo.
Optical sensor 615 is for acquiring ambient light intensity.In one embodiment, processor 601 can be according to optics The ambient light intensity that sensor 615 acquires controls the display brightness of touch display screen 605.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 605 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 605 is bright Degree.In another embodiment, the ambient light intensity that processor 601 can also be acquired according to optical sensor 615, dynamic adjust The acquisition parameters of CCD camera assembly 606.
Proximity sensor 616, also referred to as range sensor are generally arranged at the front panel of electronic equipment 600.Proximity sensor 616 for acquiring the distance between the front of user Yu electronic equipment 600.In one embodiment, when proximity sensor 616 is examined When measuring the distance between the front of user and electronic equipment 600 and gradually becoming smaller, touch display screen 605 is controlled by processor 601 Breath screen state is switched to from bright screen state;When proximity sensor 616 detect between user and the front of electronic equipment 600 away from When from becoming larger, touch display screen 605 being controlled by processor 601 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that structure shown in Fig. 7 does not constitute the restriction to electronic equipment 600, it can To include perhaps combining certain components than illustrating more or fewer components or being arranged using different components.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 620 of electronic equipment 600 and be broadcast with completing above-mentioned video Method is put, this method includes obtaining synchronic command, and the synchronic command from database for obtaining data;Monitor the data The log services in library;When detecting in the log services there are when data change record, according to the change record, mesh is obtained Mark data.Optionally, above-metioned instruction can also be executed by the processor 620 of electronic equipment 600 to complete above-mentioned example implementation Other steps involved in example.For example, the non-transitorycomputer readable storage medium can be ROM, arbitrary access is deposited Reservoir (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of application program/computer program product is additionally provided, including one or more refers to It enables, which can be executed by the processor 620 of electronic equipment 600, to complete above-mentioned scaling method, this method It include: acquisition synchronic command, the synchronic command from database for obtaining data;Monitor the log clothes of the database Business;When detecting in the log services there are when data change record, according to the change record, target data is obtained.It can Selection of land, above-metioned instruction can also be executed involved in the above exemplary embodiments to complete by the processor 620 of electronic equipment 600 Other steps.
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 including 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 following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (10)

1. a kind of method for obtaining data characterized by comprising
Synchronic command is obtained, the synchronic command from database for obtaining data;
Monitor the log services of the database;
When detecting in the log services there are when data change record, according to the change record, target data is obtained.
2. the method as described in claim 1, which is characterized in that the log services of the monitoring database, comprising:
To the database send the first solicited message, first solicited message include first from library identify, described first From library mark for monitoring the log services from the identity request in library with first, described first from library be under the database Any one is from library;
When receiving replying instruction, the log services of the database are monitored.
3. the method as described in claim 1, which is characterized in that it is described according to the change record, obtain target data, packet It includes:
When receiving the change record, the change record is parsed, obtains change mark;
It is identified based on the change, obtains the target data.
4. method as claimed in claim 3, which is characterized in that it is described to be identified based on the change, obtain target data, packet It includes:
The change is identified and is matched with preset acquisition strategy, corresponding matching result is generated;
When the matching result conforms to a predetermined condition, according to the matching result, the target data is obtained.
5. method as claimed in claim 4, which is characterized in that described by change mark and preset acquisition strategy phase Match, generate corresponding matching result, comprising:
It is identified according to the change, obtains change time and the change object of the data change record;
The change time and change object are matched with the acquisition strategy, generate the corresponding matching result.
6. the method as described in claim 1, which is characterized in that before the acquisition synchronic command, further includes:
Obtain the total data in the database;
Total data in the database is stored into target partition.
7. method as claimed in claim 6, which is characterized in that ought detect that there are data changes in the log services described When more recording, according to the change record, after obtaining target data, further includes:
By target data storage into the target partition.
8. a kind of device for obtaining data characterized by comprising
First obtains module, is configured as obtaining synchronic command, the synchronic command from database for obtaining data;
Monitoring modular is configured as monitoring the log services of the database;
Second obtains module, is configured as when detecting in the log services there are when data change record, according to the change It more records, obtains target data.
9. a kind of electronic equipment characterized by comprising
Memory, for storing executable instruction;And
It is any in claim 1-7 to complete to execute the executable instruction for showing with the memory for processor The operation of the method for obtaining data.
10. a kind of computer readable storage medium, for storing computer-readable instruction, which is characterized in that described instruction It is performed the operation that perform claim requires any method for obtaining data in 1-7.
CN201910117794.2A 2019-02-15 2019-02-15 Obtain method, apparatus, electronic equipment and the medium of data Pending CN109933594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910117794.2A CN109933594A (en) 2019-02-15 2019-02-15 Obtain method, apparatus, electronic equipment and the medium of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910117794.2A CN109933594A (en) 2019-02-15 2019-02-15 Obtain method, apparatus, electronic equipment and the medium of data

Publications (1)

Publication Number Publication Date
CN109933594A true CN109933594A (en) 2019-06-25

Family

ID=66985609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910117794.2A Pending CN109933594A (en) 2019-02-15 2019-02-15 Obtain method, apparatus, electronic equipment and the medium of data

Country Status (1)

Country Link
CN (1) CN109933594A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532170A (en) * 2019-07-18 2019-12-03 北京文渊佳科技有限公司 Build method, apparatus, electronic equipment and the medium of test environment
CN111966747A (en) * 2020-07-23 2020-11-20 深圳市科脉技术股份有限公司 Data synchronization method, system, terminal device and storage medium
CN113449948A (en) * 2020-12-31 2021-09-28 北京新氧科技有限公司 Service processing method, device, electronic equipment and medium
CN113761051A (en) * 2020-07-01 2021-12-07 北京沃东天骏信息技术有限公司 Message pushing method, data acquisition method, device, system, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678415A (en) * 2012-09-25 2014-03-26 腾讯科技(深圳)有限公司 Method and device for processing project log data
US20150278355A1 (en) * 2014-03-28 2015-10-01 Microsoft Corporation Temporal context aware query entity intent
US20180004813A1 (en) * 2015-01-23 2018-01-04 Attivio, Inc. Querying across a composite join of multiple database tables using a search engine index
CN108399256A (en) * 2018-03-06 2018-08-14 北京慧萌信安软件技术有限公司 Heterogeneous database content synchronization method, device and middleware
CN109033312A (en) * 2018-07-17 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for obtaining information
CN109241174A (en) * 2018-06-26 2019-01-18 东软集团股份有限公司 Method of data synchronization, device, readable storage medium storing program for executing and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678415A (en) * 2012-09-25 2014-03-26 腾讯科技(深圳)有限公司 Method and device for processing project log data
US20150278355A1 (en) * 2014-03-28 2015-10-01 Microsoft Corporation Temporal context aware query entity intent
US20180004813A1 (en) * 2015-01-23 2018-01-04 Attivio, Inc. Querying across a composite join of multiple database tables using a search engine index
CN108399256A (en) * 2018-03-06 2018-08-14 北京慧萌信安软件技术有限公司 Heterogeneous database content synchronization method, device and middleware
CN109241174A (en) * 2018-06-26 2019-01-18 东软集团股份有限公司 Method of data synchronization, device, readable storage medium storing program for executing and electronic equipment
CN109033312A (en) * 2018-07-17 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for obtaining information

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532170A (en) * 2019-07-18 2019-12-03 北京文渊佳科技有限公司 Build method, apparatus, electronic equipment and the medium of test environment
CN110532170B (en) * 2019-07-18 2023-08-08 北京文渊佳科技有限公司 Method and device for building test environment, electronic equipment and medium
CN113761051A (en) * 2020-07-01 2021-12-07 北京沃东天骏信息技术有限公司 Message pushing method, data acquisition method, device, system, equipment and medium
CN111966747A (en) * 2020-07-23 2020-11-20 深圳市科脉技术股份有限公司 Data synchronization method, system, terminal device and storage medium
CN113449948A (en) * 2020-12-31 2021-09-28 北京新氧科技有限公司 Service processing method, device, electronic equipment and medium
CN113449948B (en) * 2020-12-31 2024-05-03 北京新氧科技有限公司 Service processing method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
KR102198778B1 (en) Method, apparatus and mobile terminal associating notification message
CN109933594A (en) Obtain method, apparatus, electronic equipment and the medium of data
CN110097429A (en) Electronic order generation method, device, terminal and storage medium
CN109918669A (en) Entity determines method, apparatus and storage medium
CN110046018A (en) Show method, apparatus, electronic equipment and the medium of message
CN110400180A (en) Display methods, device and storage medium based on recommendation information
CN110362762A (en) Content-data methods of exhibiting, device, electronic equipment and storage medium
CN111104402A (en) Method, device, electronic equipment and medium for searching data
CN112181573A (en) Media resource display method, device, terminal, server and storage medium
CN110532170A (en) Build method, apparatus, electronic equipment and the medium of test environment
CN109902089B (en) Query method and device using heterogeneous index, electronic equipment and medium
CN111970523A (en) Information display method, device, terminal, server and storage medium
CN110096525A (en) Calibrate method, apparatus, equipment and the storage medium of interest point information
CN110147380A (en) Data-updating method, device, server and storage medium
CN110007981A (en) Start method, apparatus, electronic equipment and the medium of application program
CN110597801B (en) Database system and establishing method and device thereof
CN110020690A (en) A kind of cheating detection method, device and storage medium
CN110149408B (en) Service data display method and device, terminal and server
CN109995804A (en) Display methods, information providing method and the device of target resource information
CN113987326B (en) Resource recommendation method and device, computer equipment and medium
CN110109770A (en) Adjustment method, device, electronic equipment and medium
CN109871497A (en) The method and apparatus of sharing information
CN113204724B (en) Method, device, electronic equipment and storage medium for creating interaction information
CN113051485B (en) Group searching method, device, terminal and storage medium
CN111125095B (en) Method, device, electronic equipment and medium for adding data prefix

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

Application publication date: 20190625

RJ01 Rejection of invention patent application after publication