Data acquiring method and device
A data acquisition and data source technology, applied in the Internet field, can solve the problems of increasing the amount of back-end data source requests and longer response time, and achieve the effect of reducing data request time and improving processing speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] Embodiment 1, data acquisition method.
[0028] Wherein, the method of this embodiment is mainly implemented by computer equipment; the computer equipment here includes but not limited to PCs (such as desktop PCs), mobile terminals, and clouds composed of several PCs.
[0029] image 3 It is a flow chart of the data acquisition method in this embodiment.
[0030] image 3 Among them, the method of this embodiment mainly includes: step S100, step S110, step S120, step S130, step S140, and step S150.
[0031] S100. Create a transaction for the data acquisition request.
[0032] The data acquisition request is, for example, a user's request for searching with a keyword, and the data to be acquired is a search result of a page containing the keyword or related to the keyword.
[0033]A transaction is a unit of program execution that accesses and possibly updates various data items in a database. Transactions are usually caused by the execution of user programs written ...
Embodiment 2
[0057] Embodiment 2, a specific data acquisition method. The procedure of this method is as follows image 3 shown.
[0058] Figure 4 In this embodiment, when a data acquisition request is received, go to step S200.
[0059] S200. Start processing the data acquisition request, for example, select a thread from the thread pool, and use the thread to process the data acquisition request.
[0060] S210. Create a transaction for the data acquisition request. For example, a transaction identifier is set for the data acquisition request, and the transaction identifier is bound to the thread variable (threadlocal) corresponding to the thread that processes the current data acquisition request, so that the thread that processes the current data acquisition request clearly knows that a transaction has been completed. create. Allocate a context cache space for the transaction in the local cache space, and bind the allocated context cache space to the thread variable (threadlocal) ...
Embodiment 3
[0074] Embodiment 3, data acquisition device.
[0075] Such as Figure 4 As shown, a data acquisition device 3 includes: a creation unit 300, creating a transaction for a data acquisition request; a determination unit 310, within the transaction, determining a plurality of initial data requests for different data sources and using each data source Subsequent data requests for the response data returned by the multiple initial data requests; the generating unit 320 generates the multiple initial data requests; the requesting unit 330, according to the multiple initial data requests, concurrently within the transaction Request data from the corresponding data source in the form of: receiving cache unit 340, receiving and caching the response data returned by the data source; providing unit 350, using the cached response data to provide corresponding responses for subsequent data requests in the transaction data.
[0076] Optionally, the receiving cache unit 340 caches the resp...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


