CN110188119A - Method and apparatus for obtaining data - Google Patents

Method and apparatus for obtaining data Download PDF

Info

Publication number
CN110188119A
CN110188119A CN201910495759.4A CN201910495759A CN110188119A CN 110188119 A CN110188119 A CN 110188119A CN 201910495759 A CN201910495759 A CN 201910495759A CN 110188119 A CN110188119 A CN 110188119A
Authority
CN
China
Prior art keywords
data
acquisition
target
database
circumstances
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
CN201910495759.4A
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910495759.4A priority Critical patent/CN110188119A/en
Publication of CN110188119A publication Critical patent/CN110188119A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

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

Abstract

The embodiment of the present application discloses the method and apparatus for obtaining data, is related to field of cloud calculation.One specific embodiment of the above method comprises determining that the corresponding Target Acquisition condition of target data;Determine in the acquisition set of circumstances being locally stored whether include Target Acquisition condition;In response to determining that obtaining includes Target Acquisition condition in set of circumstances, determine in the data acquisition system being locally stored whether include target data;In response to determining that in data acquisition system do not include target data, data acquisition request is sent to database.Wherein, data acquisition request includes Target Acquisition condition.The embodiment is by being locally stored acquisition set of circumstances, it is possible to reduce the EMS memory occupation of local cache;And by obtaining data from the data acquisition system being locally stored, improve the efficiency of data acquisition;When data acquisition system does not include target data, database is just accessed, it can be ensured that access database can all get data every time, improve the validity of database access.

Description

Method and apparatus for obtaining data
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for obtaining data.
Background technique
In order to reduce database access bring network overhead and computing cost to promote the performance of application, using often By data buffer storage to local memory, internal storage data then is updated using the mode that timing updates, but when data volume is more and more When, memory cost can also gradually rise, and many useless data also can committed memory, reduce resource utilization.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for obtaining data.
In a first aspect, the embodiment of the present application provides a kind of method for obtaining data, comprising: determine target data pair The Target Acquisition condition answered;Determine in the acquisition set of circumstances being locally stored whether include above-mentioned Target Acquisition condition;In response to It determines to include above-mentioned Target Acquisition condition in above-mentioned acquisition set of circumstances, determines in the data acquisition system being locally stored whether include upper State target data;In response to not including above-mentioned target data in the above-mentioned data acquisition system of determination, data acquisition is sent to database and is asked It asks, wherein above-mentioned data acquisition request includes above-mentioned Target Acquisition condition.
In some embodiments, the above method further include: in response to the above-mentioned acquisition set of circumstances of determination do not include above-mentioned mesh Acquisition condition is marked, presupposed information is exported.
In some embodiments, the above method further include: periodically obtain above-mentioned acquisition set of circumstances from above-mentioned database The first incremental data;According to above-mentioned first incremental data, above-mentioned acquisition set of circumstances is updated.
In some embodiments, the above method further include: determine the corresponding acquisition condition of data in above-mentioned data acquisition system; Periodically corresponding second incremental data of identified acquisition condition is obtained from database;According to above-mentioned second incremental data, more New above-mentioned data acquisition system.
In some embodiments, the above method further include: receive the target data that above-mentioned database returns, and will be above-mentioned Target data is stored in above-mentioned data acquisition system.
Second aspect, the embodiment of the present application provide a kind of for obtaining the device of data, comprising: condition determining unit, It is configured to determine the corresponding Target Acquisition condition of target data;First judging unit is configured to determine obtaining of being locally stored Whether take in set of circumstances includes above-mentioned Target Acquisition condition;Second judgment unit is configured in response to determine above-mentioned acquisition Include above-mentioned Target Acquisition condition in set of circumstances, determines in the data acquisition system being locally stored whether include above-mentioned target data; Request transmitting unit is configured in response to determine do not include above-mentioned target data in above-mentioned data acquisition system, sends to database Data acquisition request, wherein above-mentioned data acquisition request includes above-mentioned Target Acquisition condition.
In some embodiments, above-mentioned apparatus further include: information output unit is configured in response to determine above-mentioned acquisition Set of circumstances does not include above-mentioned Target Acquisition condition, exports presupposed information.
In some embodiments, above-mentioned apparatus further includes the first updating unit, is configured to: periodically from above-mentioned database Obtain the first incremental data of above-mentioned acquisition set of circumstances;According to above-mentioned first incremental data, above-mentioned acquisition set of circumstances is updated.
In some embodiments, above-mentioned apparatus further includes the second updating unit, is configured to: being determined in above-mentioned data acquisition system The corresponding acquisition condition of data;Periodically corresponding second incremental number of identified acquisition condition is obtained from above-mentioned database According to;According to above-mentioned second incremental data, above-mentioned data acquisition system is updated.
In some embodiments, above-mentioned apparatus further include: data storage cell is configured to receive above-mentioned database and returns Target data, and above-mentioned target data is stored in above-mentioned data acquisition system.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising: one or more processors;Storage dress It sets, is stored thereon with one or more programs, when said one or multiple programs are executed by said one or multiple processors, make It obtains said one or multiple processors realizes the method as described in first aspect any embodiment.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in first aspect any embodiment is realized when program is executed by processor.
The method and apparatus provided by the above embodiment for obtaining data of the application, can determine target data first Corresponding Target Acquisition condition.Then, it is determined that whether including above-mentioned Target Acquisition condition in the acquisition set of circumstances being locally stored. If including, it is determined that it whether include target data in the data acquisition system being locally stored.If not including, sent to database Data acquisition request, above-mentioned data acquisition request include Target Acquisition condition.The method of the present embodiment, it can be ensured that access every time Database can get data, without returning to null message, improve the validity of database access.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for obtaining data of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for obtaining data of the application;
Fig. 4 is the flow chart according to another embodiment of the method for obtaining data of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for obtaining data of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for obtaining data of the application or the implementation of the device for obtaining data The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101, server 102 and database 103.Terminal is set Network connection can be passed through between database 103 for 101 and server 102.Network may include various connection types, such as Wired, wireless communication link or fiber optic cables etc..
Terminal device 101 and server 102 can be by the interactions of network and database 103, to read data or write-in number According to etc..Terminal device 101 and server 102 can store the acquisition condition of data, also can store data.
Various telecommunication customer end applications can be installed, such as web browser applications, shopping class are answered on terminal device 101 With, searching class application, instant messaging tools, mailbox client, social platform software etc..User can be connected by terminal device It is connected in above-mentioned types of applications and the server 102 supported is provided, so that server 102 accesses database 103, with from database 103 Obtain data.
Terminal device 101 can be hardware, be also possible to software.When terminal device 101 is hardware, can be with aobvious Display screen and the various electronic equipments for supporting database access, including but not limited to smart phone, tablet computer, e-book reading Device, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio Level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression Standard audio level 4) player, pocket computer on knee and desktop computer etc..When terminal device 101 is software, It may be mounted in above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing in it Distributed Services), single software or software module also may be implemented into.It is not specifically limited herein.
Server 102 can be to provide the server of various services, for example, various answering to what is installed on terminal device 101 With the background server being supported.Background server obtains data from database 103, and data are further processed (forwarding or storage).
It should be noted that server 102 can be hardware, it is also possible to software.When server is hardware, Ke Yishi The distributed server cluster of ready-made multiple server compositions, also may be implemented into individual server.When server 102 is software When, multiple softwares or software module (such as providing Distributed Services) may be implemented into, single software also may be implemented into Or software module.It is not specifically limited herein.
Database 103 can be the database for storing various data.For example, database purchase has terminal device 101 Data required for the types of applications of upper installation.Acquisition set of circumstances can also be stored on database 103, database 103 can Terminal device 101 or server 102 are sent to will acquire set of circumstances.Database 103 can with receiving terminal apparatus 101 or The data acquisition request that server 102 is sent, and is handled data acquisition request, and by processing result (such as number of targets According to) return to terminal device 101 or server 102.
It should be noted that can be by terminal device 101 for obtaining the method for data provided by the embodiment of the present application Or server 102 executes.Correspondingly, it is generally positioned in terminal device 101 or server 102 for obtaining the device of data.
It should be understood that the number of terminal device, server and database in Fig. 1 is only schematical.According to realization It needs, can have any number of terminal device, server and database.
With continued reference to Fig. 2, the process of one embodiment of the method for obtaining data according to the application is shown 200.The method for obtaining data of the present embodiment, comprising the following steps:
Step 201, the corresponding Target Acquisition condition of target data is determined.
In the present embodiment, for obtain the method for data executing subject (such as terminal device shown in FIG. 1 101 or Server 102) it can determine the corresponding Target Acquisition condition of target data first before obtaining target data.Target data It can be executing subject and want the data obtained.For example, target data can be the school report of student.Above-mentioned Target Acquisition condition It can be used for obtaining target data.For example, Target Acquisition condition can be the student number of student, can also be class and surname Name.Acquisition conditions and data is can store in database (such as database 103 shown in FIG. 1).Database can be according to obtaining Condition is taken, determines data.
Step 202, determine in the acquisition set of circumstances being locally stored whether include Target Acquisition condition.
Acquisition set of circumstances has been locally stored in executing subject.Obtain in set of circumstances may include that at least one obtains item Part.Obtain the data in set of circumstances correspondence database.Database can generate according to the full dose data wherein stored and obtain item Part set.In some optional application scenarios, acquisition that database can also will include in the data acquisition request that received Condition is added in acquisition set of circumstances generated.Executing subject can determine local deposit after determining Target Acquisition condition It whether include above-mentioned Target Acquisition condition in the acquisition set of circumstances of storage.If including including number of targets in database of descriptions According to.If not including, database of descriptions does not include target data.
Step 203, in response to determining that obtaining includes Target Acquisition condition in set of circumstances, determines the data set being locally stored It whether include target data in conjunction.
Executing subject determine obtain set of circumstances in include Target Acquisition condition after, may further determine that executing subject It whether include target data in the data acquisition system being locally stored.In the present embodiment, executing subject locally not only can store and obtain Set of circumstances is taken, data acquisition system can also be stored with.The corresponding acquisition condition of data in data acquisition system belongs to acquisition condition set It closes.
In some optional implementations of the present embodiment, the above method can further include in Fig. 2 and be not shown Following steps: in response to determine obtain set of circumstances do not include Target Acquisition condition, export presupposed information.
If executing subject determines that obtaining set of circumstances does not include Target Acquisition condition, does not also include in database of descriptions Target data, then executing subject cannot get target data, can export presupposed information at this time.Above-mentioned presupposed information can be Empty information, or prompt information cannot be acquired for prompting target data at this time.
Step 204, in response to determining that in data acquisition system do not include target data, data acquisition request is sent to database.
If it does not include target data in data acquisition system that executing subject, which determines, data acquisition can be sent to database and asked It asks.Above-mentioned data acquisition request includes Target Acquisition condition.In the present embodiment, if not including in the data acquisition system being locally stored Target data then illustrates that executing subject cannot locally get target data.At this point, executing subject needs to send to database Data acquisition request, to obtain target data from database.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for obtaining data of the present embodiment Figure.In the application scenarios of Fig. 3, terminal device 301, which has been locally stored, obtains set of circumstances and data acquisition system.Terminal device 301 Before obtaining target data student performance, it is first determined the corresponding Target Acquisition condition of student performance is student number.It is then detected that this It whether include Target Acquisition condition student number in the acquisition set of circumstances on ground.If including further determining that local data set It whether include student performance in conjunction.If not including, data acquisition request is sent to database 302, to obtain from database 302 Take student performance.
The method provided by the above embodiment for obtaining data of the application, can determine that first target data is corresponding Target Acquisition condition.Then, it is determined that whether including above-mentioned Target Acquisition condition in the acquisition set of circumstances being locally stored.If packet It includes, it is determined that whether include target data in the data acquisition system being locally stored.If not including, data are sent to database and are obtained Request is taken, above-mentioned data acquisition request includes Target Acquisition condition.The method of the present embodiment has been compared in the prior art at this The full dose data of ground cache database, by the way that acquisition set of circumstances is being locally stored, it is possible to reduce the EMS memory occupation of local cache; And by obtaining data from the data acquisition system being locally stored, improve the efficiency of data acquisition;It does not include mesh in data acquisition system When marking data, database is just accessed, it can be ensured that access database can all get data every time, and that improves database access has Effect property.
With continued reference to Fig. 4, it illustrates the streams according to another embodiment of the method for obtaining data of the application Journey 400.As shown in figure 4, the method for obtaining data of the present embodiment may comprise steps of:
Step 401, the corresponding Target Acquisition condition of target data is determined.
Step 402, determine in the acquisition set of circumstances being locally stored whether include Target Acquisition condition.
Step 403, in response to determining that obtaining includes Target Acquisition condition in set of circumstances, determines the data set being locally stored It whether include target data in conjunction.
Step 404, in response to determining that in data acquisition system do not include target data, data acquisition request is sent to database.
The principle of step 401~404 is similar to step 201~step 204 principle, and details are not described herein again.
Step 405, acquisition set of circumstances is periodically updated.
In the present embodiment, executing subject can periodically update acquisition set of circumstances.Specifically, executing subject can be with the period Property to database send request, to obtain above-mentioned acquisition set of circumstances.
In some optional implementations of the present embodiment, executing subject can pass through following step unshowned in Fig. 4 The rapid update to realize acquisition set of circumstances: the first incremental data of above-mentioned acquisition set of circumstances is periodically obtained from database; First incremental data is increased to and is obtained in set of circumstances.
In this implementation, executing subject can periodically obtain the first increasing of above-mentioned acquisition set of circumstances from database Measure data.Specifically, database can determine the incremental data for obtaining set of circumstances according to database journal.Then, data Library can be sent to executing subject for above-mentioned incremental data as the first incremental data.Then, executing subject can be according to first Incremental data updates and obtains set of circumstances.Specifically, executing subject can be according to the first incremental data, to acquisition set of circumstances The processing such as increased, deleted, being modified.
Step 406, the data in data acquisition system are periodically updated.
In the present embodiment, executing subject can also periodically update the data in data acquisition system.Specifically, executing subject can To determine the corresponding acquisition condition of data in data acquisition system first.Then, executing subject can be obtained periodically from database Take the second incremental data of above-mentioned acquisition condition.Specifically, database can determine that acquisition condition is corresponding according to database journal Incremental data.Then, using above-mentioned incremental data as the second incremental data, it is sent to executing subject.Executing subject can root According to the second incremental data, data acquisition system is updated.Specifically, executing subject can be according to the second incremental data, to acquisition condition set Conjunction such as is increased, is deleted, being modified at the processing.
In some optional implementations of the present embodiment, the above method can further include in Fig. 4 and be not shown Following steps: receive the target data that database returns, and target data be stored in data acquisition system.
In this implementation, executing subject can receive database return after sending data acquisition request to database Target data.Then, target data can be stored in data acquisition system by executing subject.In this way, realizing to data acquisition system Update, executing subject next time obtain target data in, target data can be obtained from the data acquisition system being locally stored.
The method provided by the above embodiment for obtaining data of the application can periodically be updated and is locally stored Set of circumstances and data acquisition system are obtained, the full dose data stored in database is not only can be understood that, has compared existing skill In art in local cache and the full dose data of more new database, it is possible to reduce update the network overhead when data of local cache And computing cost.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind for obtaining number According to device one embodiment, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 5, the device 500 for obtaining data of the present embodiment includes: condition determining unit 501, first sentences Disconnected unit 502, second judgment unit 503 and request transmitting unit 504.
Condition determining unit 501 is configured to determine the corresponding Target Acquisition condition of target data.
Whether first judging unit 502, being configured to determine in the acquisition set of circumstances being locally stored includes Target Acquisition Condition.
Second judgment unit 503 is configured in response to determine that obtaining includes Target Acquisition condition in set of circumstances, determines It whether include target data in the data acquisition system being locally stored.
Request transmitting unit 504 is configured in response to determine that in data acquisition system do not include target data, send out to database Send data acquisition request.Wherein, data acquisition request includes Target Acquisition condition.
In some optional implementations of the present embodiment, above-mentioned apparatus 500, which can further include in Fig. 5, not to be shown Information output unit out is configured in response to determine that obtaining set of circumstances does not include Target Acquisition condition, exports default letter Breath.
In some optional implementations of the present embodiment, above-mentioned apparatus 500, which can further include in Fig. 5, not to be shown The first updating unit out, is configured to: the first incremental data of above-mentioned acquisition set of circumstances is periodically obtained from database;Root According to the first incremental data, updates and obtain set of circumstances.
In some optional implementations of the present embodiment, above-mentioned apparatus 500, which can further include in Fig. 5, not to be shown The second updating unit out, is configured to: determining the corresponding acquisition condition of data in data acquisition system;Periodically obtained from database Corresponding second incremental data of acquisition condition determined by taking;According to the second incremental data, data acquisition system is updated.
In some optional implementations of the present embodiment, above-mentioned apparatus 500, which can further include in Fig. 5, not to be shown Data storage cell out, is configured to receive the target data of database return, and target data is stored in data set In conjunction.
It should be appreciated that for obtaining the unit 501 recorded in the devices 500 of data to unit 504 respectively and in reference Fig. 2 Each step in the method for description is corresponding.As a result, above with respect to the operation and feature of the method description for obtaining data It is equally applicable to device 500 and unit wherein included, details are not described herein.
Below with reference to Fig. 6, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Server or terminal device) 600 structural schematic diagram.Terminal device in embodiment of the disclosure can include but is not limited to all As mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP are (portable Formula multimedia player), the mobile terminal of car-mounted terminal (such as vehicle mounted guidance terminal) etc..Electronic equipment shown in Fig. 6 is only Only an example, should not function to embodiment of the disclosure and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM 603 pass through the phase each other of bus 604 Even.Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device 609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, can also root According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608 It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.It should be noted that computer-readable medium described in embodiment of the disclosure can be with It is computer-readable signal media or computer readable storage medium either the two any combination.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example of computer readable storage medium can include but is not limited to: have The electrical connection of one or more conducting wires, portable computer diskette, hard disk, random access storage device (RAM), 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.In embodiment of the disclosure, computer Readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded execution system, device Either device use or in connection.And in embodiment of the disclosure, computer-readable signal media may include In a base band or as the data-signal that carrier wave a part is propagated, wherein carrying computer-readable program code.It is this The data-signal of propagation can take various forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate Combination.Computer-readable signal media can also be any computer-readable medium other than computer readable storage medium, should Computer-readable signal media can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on computer-readable medium can transmit with any suitable medium, Including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: determining the corresponding Target Acquisition condition of target data;Determine this It whether include Target Acquisition condition in the acquisition set of circumstances of ground storage;It is obtained in response to determining to obtain in set of circumstances including target Condition is taken, determines in the data acquisition system being locally stored whether include target data;In response to determining that in data acquisition system do not include mesh Data are marked, send data acquisition request to database, wherein data acquisition request includes Target Acquisition condition.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, described program design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including condition determining unit, the first judging unit, second judgment unit and request transmitting unit.Wherein, the title of these units The restriction to the unit itself is not constituted under certain conditions, for example, condition determining unit is also described as " determining mesh Mark the unit of the corresponding Target Acquisition condition of data ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member it should be appreciated that embodiment of the disclosure involved in invention scope, however it is not limited to the specific combination of above-mentioned technical characteristic and At technical solution, while should also cover do not depart from foregoing invention design in the case where, by above-mentioned technical characteristic or its be equal Feature carries out any combination and other technical solutions for being formed.Such as disclosed in features described above and embodiment of the disclosure (but It is not limited to) technical characteristic with similar functions is replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for obtaining data, comprising:
Determine the corresponding Target Acquisition condition of target data;
Determine in the acquisition set of circumstances being locally stored whether include the Target Acquisition condition;
In response to including the Target Acquisition condition in the determination acquisition set of circumstances, determine in the data acquisition system being locally stored It whether include the target data;
In response to not including the target data in the determination data acquisition system, data acquisition request is sent to database, wherein The data acquisition request includes the Target Acquisition condition.
2. according to the method described in claim 1, wherein, the method also includes:
Do not include the Target Acquisition condition in response to the determination acquisition set of circumstances, exports presupposed information.
3. according to the method described in claim 1, wherein, the method also includes:
Periodically first incremental data for obtaining set of circumstances is obtained from the database;
According to first incremental data, the acquisition set of circumstances is updated.
4. according to the method described in claim 1, wherein, the method also includes:
Determine the corresponding acquisition condition of data in the data acquisition system;
Periodically corresponding second incremental data of identified acquisition condition is obtained from database;
According to second incremental data, the data acquisition system is updated.
5. according to the method described in claim 1, wherein, the method also includes:
The target data that the database returns is received, and the target data is stored in the data acquisition system.
6. a kind of for obtaining the device of data, comprising:
Condition determining unit is configured to determine the corresponding Target Acquisition condition of target data;
Whether first judging unit, being configured to determine in the acquisition set of circumstances being locally stored includes the Target Acquisition item Part;
Second judgment unit, being configured in response to determine includes the Target Acquisition condition in the acquisition set of circumstances, really It surely whether include the target data in the data acquisition system being locally stored;
Request transmitting unit is configured in response to determine do not include the target data in the data acquisition system, to database Send data acquisition request, wherein the data acquisition request includes the Target Acquisition condition.
7. device according to claim 6, wherein described device further include:
Information output unit is configured in response to determine that the acquisition set of circumstances does not include the Target Acquisition condition, defeated Presupposed information out.
8. device according to claim 6, wherein described device further includes the first updating unit, is configured to:
Periodically first incremental data for obtaining set of circumstances is obtained from the database;
According to first incremental data, the acquisition set of circumstances is updated.
9. device according to claim 6, wherein described device further includes the second updating unit, is configured to:
Determine the corresponding acquisition condition of data in the data acquisition system;
Periodically corresponding second incremental data of identified acquisition condition is obtained from the database;
According to second incremental data, the data acquisition system is updated.
10. device according to claim 6, wherein described device further include: data storage cell is configured to receive The target data that the database returns, and the target data is stored in the data acquisition system.
11. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Such as method as claimed in any one of claims 1 to 5.
CN201910495759.4A 2019-06-10 2019-06-10 Method and apparatus for obtaining data Pending CN110188119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910495759.4A CN110188119A (en) 2019-06-10 2019-06-10 Method and apparatus for obtaining data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910495759.4A CN110188119A (en) 2019-06-10 2019-06-10 Method and apparatus for obtaining data

Publications (1)

Publication Number Publication Date
CN110188119A true CN110188119A (en) 2019-08-30

Family

ID=67720982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910495759.4A Pending CN110188119A (en) 2019-06-10 2019-06-10 Method and apparatus for obtaining data

Country Status (1)

Country Link
CN (1) CN110188119A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836151A (en) * 2020-06-23 2021-12-24 北京大数医达科技有限公司 Data processing method and device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682037A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Data acquisition method, system and device
CN104408138A (en) * 2014-11-28 2015-03-11 国家电网公司 Data search method and device
CN104462096A (en) * 2013-09-13 2015-03-25 北大方正集团有限公司 Public opinion monitoring and analysis method and device
CN106571942A (en) * 2015-10-10 2017-04-19 北京国双科技有限公司 Configuration data updating method, client side and server
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system
CN109344327A (en) * 2018-09-21 2019-02-15 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
US20190087453A1 (en) * 2017-09-20 2019-03-21 Kabushiki Kaisha Toshiba Data search system, data search method, and program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682037A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Data acquisition method, system and device
CN104462096A (en) * 2013-09-13 2015-03-25 北大方正集团有限公司 Public opinion monitoring and analysis method and device
CN104408138A (en) * 2014-11-28 2015-03-11 国家电网公司 Data search method and device
CN106571942A (en) * 2015-10-10 2017-04-19 北京国双科技有限公司 Configuration data updating method, client side and server
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system
US20190087453A1 (en) * 2017-09-20 2019-03-21 Kabushiki Kaisha Toshiba Data search system, data search method, and program product
CN109344327A (en) * 2018-09-21 2019-02-15 百度在线网络技术(北京)有限公司 Method and apparatus for generating information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836151A (en) * 2020-06-23 2021-12-24 北京大数医达科技有限公司 Data processing method and device, electronic equipment and computer readable medium
CN113836151B (en) * 2020-06-23 2024-04-23 北京大数医达科技有限公司 Data processing method, device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN109558246A (en) A kind of load-balancing method, device, electronic equipment and storage medium
CN109656923A (en) A kind of data processing method, device, electronic equipment and storage medium
CN109447635A (en) Information storage means and device for block chain
CN110213614A (en) The method and apparatus of key frame are extracted from video file
CN109993150A (en) The method and apparatus at age for identification
CN110391938A (en) Method and apparatus for deployment services
CN109657174A (en) Method and apparatus for more new data
CN109885593A (en) Method and apparatus for handling information
CN109753332A (en) Method and apparatus for showing information
CN110007936A (en) Data processing method and device
CN110516463A (en) Method and apparatus for generating information
CN110517415A (en) Method and apparatus for output information
CN109697034A (en) A kind of method for writing data, device, electronic equipment and storage medium
CN110619101B (en) Method and apparatus for processing information
CN110188119A (en) Method and apparatus for obtaining data
CN112685075A (en) Gray scale distribution method and device, electronic equipment and computer readable medium
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN109816455A (en) Method and apparatus for handling information
CN111626802A (en) Method and apparatus for processing information
CN110147368A (en) Data capture method and device for server
CN109271224A (en) Method and apparatus for determining position
CN109271397A (en) Method and apparatus for handling information
CN109120743A (en) Contact person's adding method and device, electronic equipment and storage medium
CN110113416A (en) Method and apparatus for showing information
CN109933432A (en) Method and apparatus for sending data

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: 20190830

RJ01 Rejection of invention patent application after publication