CN106911782A - A kind of method for reading data and device - Google Patents
A kind of method for reading data and device Download PDFInfo
- Publication number
- CN106911782A CN106911782A CN201710114776.XA CN201710114776A CN106911782A CN 106911782 A CN106911782 A CN 106911782A CN 201710114776 A CN201710114776 A CN 201710114776A CN 106911782 A CN106911782 A CN 106911782A
- Authority
- CN
- China
- Prior art keywords
- data
- acquisition request
- caching system
- message
- server
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (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)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Method for reading data and device that the application is provided, after server receives the data acquisition request of client transmission, server parses the data acquisition request, obtains the corresponding data message of the client data to be obtained.Whether comprising the data message in the data cached index that whois lookup is locally stored, if comprising, the data that the client that shows to be stored with caching system asks to obtain, now, directly the reading client from caching system asks the data for obtaining to server, and returns to client.The process is by the direct reading cache data from caching system of server, it is not necessary to calls development language, shortens the response time of data acquisition request, improves data read rates.
Description
Technical field
The invention belongs to field of computer technology, more particularly to a kind of method for reading data and device.
Background technology
With continuing to develop for development of Mobile Internet technology, user requires more and more higher to the ageing of data acquisition.For example,
During the client of user's using terminal side, client generally needs to load data from server, if client is obtained from server
The process of evidence of fetching is excessively slow and time-consuming, causes the loading velocity of client very slow, and this will have a strong impact on the experience of user.
Traditional data loading technique scheme, when user carries out data acquisition operations on the client, client can be produced
Corresponding data acquisition request is simultaneously sent to server.Server receives data acquisition request every time, is required for calling backstage
Development language (because server and caching, database belong to different systems, server cannot directly access cache, database,
Backstage development language access cache, database must be called).Then, development language framework obtains the corresponding data of the request simultaneously
Feed back to client.Additionally, the ordinal response of development language framework ask, i.e. development language respond one request after, just understand after
The continuous next request for the treatment of.Therefore, the process of server calls development language framework treatment request takes very much, causes data to be read
Take speed slow, the ample resources of server is wasted.In the case of high concurrent, if repeating such flow, it will make
Into system crash.
The content of the invention
In view of this, the purpose of the application is to provide a kind of method for reading data and device, to improve digital independent effect
Rate, improves Consumer's Experience.
In a first aspect, the application provides a kind of method for reading data, it is applied in server, including:
Receive data acquisition request;
The data acquisition request is parsed, the data acquisition request is obtained and is asked the corresponding data of data for obtaining to be believed
Breath;
Judge whether include the corresponding data of the data message in caching system;
If including the corresponding data of the data message in the caching system, directly obtained from the caching system
Take the data message corresponding data cached.
Alternatively, the parsing data acquisition request, obtains the data that the data acquisition request asks to obtain
Corresponding data message, including:
The data acquisition request is parsed, the data acquisition request is obtained and is asked the corresponding parameter of data for obtaining to be believed
Breath;
Computing is encrypted to the parameter information using AES, the data message is obtained.
Alternatively, be stored with data cached index in the server, and the data cached index is from the caching system
Middle acquisition;
It is described to judge whether include the corresponding data of the data message in caching system, including:
Whether search in the data cached index comprising the data message;
If including the data message in the data cached index, it is determined that include the number in the caching system
It is believed that ceasing corresponding data;
If not including the data message in the data cached index, it is determined that do not include institute in the caching system
State the corresponding data of data message.
Alternatively, whether the data message is included in the lookup data cached index, including:
The data message is converted to data directory by the server;
Whether search in the data cached index comprising the data directory;
If including the data directory in the data cached index, it is determined that include institute in the data cached index
State data message;
If not including the data directory in the data cached index, it is determined that do not wrapped in the data cached index
Containing the data message.
Alternatively, if including the data message in the data cached index, the server is directly from caching
The data message is obtained in system corresponding data cached, including:
If it is determined that including the data message in the data cached index, then it is converted to according to the data message
Data directory generate data cached read requests, the POST request parameter of the data cached read requests is interface name, institute
The parameter for stating POST request parameter is the parameter of the interface name corresponding interface;
The data cached read requests are sent to caching system, so that caching system response is described data cached
Read requests;
The data message for receiving the caching system return is corresponding data cached.
Alternatively, it is provided with the server in the thread pool of memory-resident, the thread pool comprising multiple threads pair
As after the data acquisition request is received, calling any one of thread object in the thread pool to perform described
Receive each step after data acquisition request.
Alternatively, methods described also includes:
If not including the data message in the caching system, development language is called to be obtained from database described
The corresponding data of data message;
Call development language that the number of targets is obtained from database in the current thread for processing the data acquisition request
According to while, the current thread receives next data acquisition request, and responds next data acquisition request.
Second aspect, the application also provides a kind of digital independent device, is applied in server, including:
Receiving unit, for receiving data acquisition request;
Resolution unit, for parsing the data acquisition request, obtains the number that the data acquisition request asks to obtain
According to corresponding data message;
Judging unit, for whether judging in caching system comprising the corresponding data of the data message;
Data-reading unit, for when in the caching system comprising the data message corresponding data, directly from
The data message is obtained in the caching system corresponding data cached.
Alternatively, it is provided with the server in the thread pool of memory-resident, the thread pool comprising multiple threads pair
As, call any one thread object in the thread pool perform successively the receiving unit, resolution unit, judging unit and
The action of data-reading unit.
Alternatively, described device also includes:
Call unit, for when in the caching system not comprising the data message corresponding data, calling exploitation
Language obtains the corresponding data of the data message from database;
Call development language that the number of targets is obtained from database in the current thread for processing the data acquisition request
According to while, the current thread receives next data acquisition request by the receiving unit, and responds described next
Data acquisition request.
The method for reading data that the application is provided, after server receives the data acquisition request of client transmission, clothes
Business device parses the data acquisition request, obtains the corresponding data message of the client data to be obtained.Whois lookup is local
Whether the data message is included in the data cached index of storage, if comprising showing the client institute that is stored with caching system
The data for obtaining are asked, now, directly the reading client from caching system asks the data for obtaining to server, and returns to
Client.The process is by the direct reading cache data from caching system of server, it is not necessary to calls development language, shortens number
According to the response time for obtaining request, data read rates are improve.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.
Fig. 1 shows a kind of structural representation of data cached reading system of the embodiment of the present application;
Fig. 2 shows a kind of flow chart of method for reading data of the embodiment of the present application;
Fig. 3 show the embodiment of the present application it is a kind of judge in caching system whether the mistake comprising the corresponding data of data message
The flow chart of journey;
Fig. 4 shows the flow chart of the embodiment of the present application another kind method for reading data;
Fig. 5 shows a kind of block diagram of digital independent device of the embodiment of the present application;
Fig. 6 shows a kind of block diagram of judging unit of the embodiment of the present invention;
Fig. 7 shows that the embodiment of the present application a kind of first searches the block diagram of subelement;
Fig. 8 shows a kind of money figure of data-reading unit of the embodiment of the present application;
Fig. 9 shows the block diagram of the embodiment of the present application another kind digital independent device.
Specific embodiment
Traditional data loading scheme, user end to server sends data acquisition request, and server receives number every time
After request is obtained, it is required for calling the development language framework on backstage.Then, judged by development language framework be in caching system
It is no comprising the client data to be obtained, the process of development language framework treatment request takes very much, causes client to obtain
The speed of data is very slow, and in the case of high concurrent, repeating such flow will cause system crash.To solve the problem,
The application provides a kind of method for reading data, after server receives the data acquisition request of client transmission, parses the request,
Obtain the corresponding data message of the client data to be obtained, and search and whether include in the data cached index being locally stored
The data message, if comprising, show the client data to be obtained that are stored with caching system, now, server is direct
The reading client data to be obtained from caching system, and return to client;The method server can be with caching system
System is directly communicated, without calling development language framework, therefore, the response time of data acquisition request is shortened, improve
Data read rates.Technical scheme below in conjunction with specific the embodiment of the present application is described in detail.
Fig. 1 is referred to, a kind of structural representation of data cached reading system of the embodiment of the present application, the system bag is shown
Include server 1, caching 2, database 3;
Server 1 receives the user's request (that is, reading the request of data) that client sends, and user's request is equal through overload
The server of relative free is distributed to after weighing apparatus, then, whether server judges to be obtained comprising the user's request in caching system
The data for taking, if comprising it is corresponding data cached that server 1 directly carries out communication request acquisition with caching 2;Caching 2 to
Server 1 returns corresponding data cached.Data in caching 2 are periodically pushed by database 3 and obtained.
Fig. 2 is referred to, a kind of flow chart of method for reading data of the embodiment of the present application is shown, the method is applied to service
In device, comprise the following steps:
S11, server receives the data acquisition request that client sends.
After client detects the acquisition data manipulation of user, corresponding data acquisition request is produced, and the data are obtained
Take request and be sent to server.The data acquisition request carries the corresponding data message of the data to be obtained, the data message
For making server obtain corresponding data and feed back to client.For example, data message can be the identification information of data.
For example, obtain data operation can be user installed in mobile terminal application program (Application,
APP the action of a certain control is clicked on), now, after APP detects the clicking operation, data acquisition request is generated and is sent to
Server.
S12, server parsing data acquisition request, obtains the corresponding data of the data acquisition request data to be obtained
Information.
Server parsing data acquisition request obtains corresponding data message, so that next step obtains data message correspondence
Data.
In a kind of possible implementation of the application, the corresponding ginseng of the data to be obtained is included in data acquisition request
Number information, in order to ensure the security of data acquisition, it is necessary to the parameter in the data acquisition request that client is sent is sharp
It is encrypted with AES, obtains data message.Data message after transmission encryption increased intercepting and capturing and crack difficulty, improve
The security of data acquisition.Wherein it is possible to be using existing AES, for example, triple DEAs
(Triple Data Encryption Algorithm, TDES), Secure Hash Algorithm (Secure Hash Algorithm,
SHA), Message Digest 55 (Message Digest Algorithm5, MD5).
For example, client request reads film data, corresponding interface is respectively movie/info, what this interface needed
Parameter is " cinemano=1001622&public_signal_short=lxycjntyzx ", then server by utilizing is above-mentioned
AES is to the parameter information " movie/info " and " cinemano=1001622&public_signal_ in request
Short=lxycjntyzx " is encrypted computing, so as to improve security.
Whether S13, server is judged in caching system comprising the data corresponding to data message;If it is, performing
S14;If it is not, then performing S15.
The application provide embodiment, server is unified with the communication mechanism of caching system, for example, server and
Caching system uses the communication signaling of same rule, and so, server can directly be communicated with caching system.Specifically,
Communication mechanism unification is between server and caching system:POST request parameter is interface name, and the parameter of POST request parameter is
The parameter of interface.
For example, above-mentioned example, client request reading film data, corresponding interface is respectively movie/info, this
The parameter that individual interface needs is " cinemano=1001622&public_signal_short=lxycjntyzx ", if one
Individual interface needs multiple parameters, is separated with symbol " & " between parameters.In this example, POST request parameter is " movie/
Info ", the parameter of POST request parameter is " cinemano=1001622&public_signal_short=
lxycjntyzx"。
Server and caching system can be after direct communications, and in a kind of possible implementation of the application, server can
Whether directly to judge in caching system comprising the corresponding data of data message;
In the alternatively possible implementation of the application, caching system sends data cached index, service to server
Whether device stores the data cached index, then, judge in data cached index comprising the data message after obtaining data message.
As shown in figure 3, in judging caching system whether comprising the corresponding data of data message process can include it is following
Step:
Whether S131, the data message is included in the data cached index of whois lookup;If it is, performing S132;
If it is not, then performing S133.
If the data message for obtaining is by encryption, this step server is needed first by data message using default
Algorithm be converted to corresponding data directory, then whether judge in data cached index comprising the data directory, if comprising,
Then perform S132;If do not included, S133 is performed.
S132, server is determined in caching system comprising the corresponding data of the data message.
S133, server determines not including the corresponding data of the data message in caching system.
S14, it is corresponding data cached that server directly obtains the data message from caching system.
If including the corresponding data of the data message in caching system, server is directly led to caching system
Letter, it is corresponding data cached that the data message is read in request from caching system.
Server generates data cached read requests and is sent to caching system according to the corresponding data directory of the data message,
Caching system obtains corresponding data cached according to the data message.Caching system reads the corresponding data of the data directory and returns
Back to server.
S15, server calls development language reads the corresponding data of the data message from database.
If not including the corresponding data of the data message in caching system, need to obtain data letter from database
Corresponding data are ceased, data are read from database to be needed to call development language, reads the number from database by development language
It is believed that ceasing corresponding data.
S16, server is by the corresponding data is activation of the data message to client.
The method for reading data that the present embodiment is provided, after server receives the data acquisition request of client transmission,
Server parses the data acquisition request, obtains the corresponding data message of the client data to be obtained.Whois lookup sheet
Whether the data message is included in the data cached index of ground storage, if comprising showing the client that is stored with caching system
The data for obtaining are asked, now, directly the reading client from caching system asks the data for obtaining to server, and returns
To client.The process is by the direct reading cache data from caching system of server, it is not necessary to calls development language, shortens
The response time of data acquisition request, improve data read rates.
Fig. 4 is referred to, the flow chart of the embodiment of the present application another kind method for reading data is shown, the method is applied to figure
In system shown in 1, as shown in figure 4, the method is comprised the following steps:
S21, user end to server sends data acquisition request.
S22, after server receives the data acquisition request, calls a thread object to process the data from thread pool
Obtain request.
Thread pool is thread object pond, a block space is opened up in internal memory, inside deposits numerous (not dead) threads pair
As when there is thread task, one thread object of taking-up performs the thread task from thread pool, after having performed thread task
Thread object Gui Chi, in such manner, it is possible to avoid creating the performance cost that thread object is brought repeatedly, saves system resource.
S23, current thread parses the data acquisition request, obtains corresponding data message;
Whether S24, the current thread judges include the corresponding data of data message in caching system;If it is, holding
Row S25;If it is not, then performing S26.
S25, current thread directly obtains the corresponding data of the data message from caching system.
S26, current thread calls development language that the corresponding data of the data message are obtained from database.
S27, during current thread awaits development language returned data, current thread receives another Data Data and obtains
Request is taken, and responds another data acquisition request.
The process that current thread responds another data acquisition request is identical with the process of S23~S28, no longer goes to live in the household of one's in-laws on getting married herein
State.
S28, the data is activation that current thread will be obtained is to client.
S29, when server receives next data acquisition request, calls any one thread object from thread pool
Next data acquisition request that treatment is received.
Next data acquisition request may be received at the time point of any one between S23~S28, therefore, S29's
The execution time may be before or after S23~S28 any one step.
The process of thread object treatment next data acquisition request is identical with the process of above-mentioned S23~S28, herein
Repeat no more.
The method for reading data that the present embodiment is provided, server and caching system can direct communication, so, server energy
Enough directly reading is corresponding data cached from caching system, it is not necessary to call development language, therefore, when shortening request response
Between, improve data cached reading rate.And, server open thread pool, after data acquisition request is received directly from
Thread object is called in thread pool to perform corresponding task, it is to avoid create thread object repeatedly, save system resource, together
When, also improve the handling capacity of system treatment request.Additionally, for each thread object, in the language from data that awaits development
During reading data in storehouse, next data acquisition request can be received, further shorten request response time, improved
Data read rates.
For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but
It is that those skilled in the art should know, the present invention is not limited by described sequence of movement, because according to the present invention, certain
A little steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know, be retouched in specification
The embodiment stated belongs to preferred embodiment, necessary to involved action and the module not necessarily present invention.
Corresponding to above-mentioned method for reading data embodiment, present invention also provides digital independent device embodiment.
Fig. 5 is referred to, a kind of block diagram of digital independent device of the embodiment of the present application is shown, the device is applied to server
In, the device includes:Receiving unit 110, resolution unit 120, judging unit 130 and data-reading unit 140.
Receiving unit 110, for receiving data acquisition request.
User end to server sends data acquisition request, and server receives the data acquisition request by receiving unit.
Resolution unit 120, for parsing data acquisition request, obtains the data correspondence that data acquisition request asks to obtain
Data message.
Resolution unit parsing data acquisition request in server obtains corresponding data message, is somebody's turn to do so that next step is obtained
The corresponding data of data message.
In a kind of possible implementation of the application, the corresponding ginseng of the data to be obtained is included in data acquisition request
Number information, in order to ensure the security of data acquisition, it is necessary to the parameter in the data acquisition request that client is sent is sharp
It is encrypted with AES, obtains data message.Data message after transmission encryption increased intercepting and capturing and crack difficulty, improve
The security of data acquisition.Wherein it is possible to be, using existing AES, no longer to describe in detail herein.
Judging unit 130, for whether judging in caching system comprising the corresponding data of data message.
In the embodiment of the present application, just server is unified with the communication mechanism of caching system, for example, server with
Caching system uses the communication signaling of same rule, and so, server can directly be communicated with caching system, and server can
Whether directly to judge in caching system comprising the data to be obtained, if there is then directly reading the data.
In a kind of possible implementation of the application, be stored with data cached index in the server, the caching number
Obtained from the caching system according to index, then, whether server judges include data message in data cached index, if bag
Contain, it is determined that the data to be read are included in caching system;If do not included, it is determined that do not include to be read in caching system
The data for taking.
As shown in fig. 6, judging unit 130 can include that first searches subelement 131, the first determination subelement 132 and the
Two determination subelements 133.
Whether first searches subelement 131, for searching in data cached index comprising the data message;First determines son
Unit 132, for when the data message is included in data cached index, determining in caching system comprising the data message pair
The data answered;Second determination subelement 133, for when data message is not included in data cached index, determining caching system
In do not include the corresponding data of data message.
In a kind of possible implementation of the application, as shown in fig. 7, the first lookup subelement 131 can include:Data
Conversion subunit 1311, for the data message to be converted into data directory;Second searches subelement 1312, for searching
Whether the data directory is included in data cached index;3rd determination subelement 1313, for when in the data cached index
During comprising data directory, determine in data cached index comprising the data message;4th determination subelement 1314, for working as
When stating in data cached index not comprising the data directory, determine to believe not comprising the data in the data cached index
Breath.
Data-reading unit 140, for when in the caching system comprising data message corresponding data, directly postponing
Data message is obtained in deposit system corresponding data cached.
In a kind of possible implementation of the application, data cached read requests are generated according to data message and is sent to
Caching system, as shown in figure 8, the data-reading unit 140, including:
Generation subelement 141, for when it is determined that including the data message in data cached index, being turned according to data message
The data directory got in return generates data cached read requests;
Wherein, the POST request parameter of the data cached read requests is interface name, the parameter of the POST request parameter
It is the parameter of the interface name corresponding interface.
Transmission sub-unit 142, for data cached read requests to be sent into caching system, so that caching system response institute
State data cached read requests;
Receiving subelement 143, the data message for receiving the caching system return is corresponding data cached.
In the alternatively possible implementation of the application, the thread pool of memory-resident, thread pool are provided with server
It is interior comprising multiple thread objects, when data acquisition request is received, call any one thread object in the thread pool
The action of the receiving unit, resolution unit, judging unit and data-reading unit is performed successively.In such manner, it is possible to avoid repeatedly
The performance cost that thread object is brought is created, system resource is saved.
After the digital independent device server that the present embodiment is provided receives the data acquisition request of client transmission, service
Device parses the data acquisition request, obtains the corresponding data message of the client data to be obtained.Whois lookup is locally deposited
Whether the data message is included in the data cached index of storage, if comprising the client that shows to be stored with caching system is asked
The data of acquisition are sought, now, directly the reading client from caching system asks the data for obtaining to server, and returns to visitor
Family end.The process is by the direct reading cache data from caching system of server, it is not necessary to calls development language, shortens data
The response time of request is obtained, data read rates are improve.And, server opens thread pool, when receiving data acquisition
Directly call thread object from thread pool to perform corresponding task after request, it is to avoid create thread object repeatedly, save
System resource, meanwhile, also improve the handling capacity of system treatment request.
Fig. 9 is referred to, the block diagram of the embodiment of the present application another kind digital independent device is shown, the present embodiment is in Fig. 5 institutes
Showing also includes call unit 210 on the basis of embodiment.
Call unit 210, for when in caching system not comprising the data message corresponding data, calling exploitation language
Speech obtains the corresponding data of the data message from database;
If it is determined that unit 130 determines not including the corresponding data of data message in caching system, then development language is called
The corresponding data of the data message are read from database and client is returned to.
Current thread receives single while calling development language to obtain the target data from database by described
Unit receives next data acquisition request, and responds next data acquisition request, when further shorten request response
Between, improve data read rates.
The data acquisition facility that the present embodiment is provided, the data in current thread calls development language reading database
When, next data acquisition request is received, so as to shorten the response time of next data acquisition request, improve data
Reading rate.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation is all difference with other embodiment, between each embodiment identical similar part mutually referring to.
For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part ginseng
See the part explanation of embodiment of the method.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between there is any this actual relation or order.And, term " including ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that
A little key elements, but also other key elements including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", does not arrange
Except also there is other identical element in the process including the key element, method, article or equipment.
The foregoing description of the disclosed embodiments, enables those skilled in the art to realize or uses the present invention.To this
Various modifications of a little embodiments will be apparent for a person skilled in the art, and generic principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with principles disclosed herein and features of novelty most wide
Scope.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of method for reading data, is applied in server, it is characterised in that including:
Receive data acquisition request;
The data acquisition request is parsed, the corresponding data message of data that the data acquisition request asks to obtain is obtained;
Judge whether include the corresponding data of the data message in caching system;
If including the corresponding data of the data message in the caching system, institute is directly obtained from the caching system
State data message corresponding data cached.
2. method according to claim 1, it is characterised in that the parsing data acquisition request, obtains the number
According to the corresponding data message of data that acquisition asks to obtain, including:
The data acquisition request is parsed, the corresponding parameter information of data that the data acquisition request asks to obtain is obtained;
Computing is encrypted to the parameter information using AES, the data message is obtained.
3. method according to claim 1 and 2, it is characterised in that be stored with data cached index in the server, institute
Data cached index is stated to be obtained from the caching system;
It is described to judge whether include the corresponding data of the data message in caching system, including:
Whether search in the data cached index comprising the data message;
If including the data message in the data cached index, it is determined that believe comprising the data in the caching system
Cease corresponding data;
If not including the data message in the data cached index, it is determined that do not include the number in the caching system
It is believed that ceasing corresponding data.
4. method according to claim 3, it is characterised in that whether include institute in the lookup data cached index
Data message is stated, including:
The data message is converted to data directory by the server;
Whether search in the data cached index comprising the data directory;
If including the data directory in the data cached index, it is determined that include the number in the data cached index
It is believed that breath;
If not including the data directory in the data cached index, it is determined that do not include institute in the data cached index
State data message.
5. method according to claim 4, it is characterised in that if believed comprising the data in the data cached index
Breath, then directly to obtain the data message from caching system corresponding data cached for the server, including:
If it is determined that including the data message, the then number being converted to according to the data message in the data cached index
According to the index data cached read requests of generation, the POST request parameter of the data cached read requests is interface name, described
The parameter of POST request parameter is the parameter of the interface name corresponding interface;
The data cached read requests are sent to caching system, so that the caching system responds the data cached reading
Request;
The data message for receiving the caching system return is corresponding data cached.
6. method according to claim 1, it is characterised in that the thread pool of memory-resident is provided with the server,
Comprising multiple thread objects in the thread pool, after the data acquisition request is received, appointing in the thread pool is called
The thread object of meaning one performs described each step received after data acquisition request.
7. method according to claim 6, it is characterised in that methods described also includes:
If not including the data message in the caching system, call development language that the data are obtained from database
The corresponding data of information;
Call development language that the target data is obtained from database in the current thread for processing the data acquisition request
Meanwhile, the current thread receives next data acquisition request, and responds next data acquisition request.
8. a kind of digital independent device, is applied in server, it is characterised in that including:
Receiving unit, for receiving data acquisition request;
Resolution unit, for parsing the data acquisition request, obtains the data pair that the data acquisition request asks to obtain
The data message answered;
Judging unit, for whether judging in caching system comprising the corresponding data of the data message;
Data-reading unit, for when in the caching system comprising the data message corresponding data, directly from described
The data message is obtained in caching system corresponding data cached.
9. device according to claim 8, it is characterised in that the thread pool of memory-resident is provided with the server,
Comprising multiple thread objects in the thread pool, any one thread object in the thread pool is called to perform described connecing successively
Receive the action of unit, resolution unit, judging unit and data-reading unit.
10. device according to claim 9, it is characterised in that described device also includes:
Call unit, for when in the caching system not comprising the data message corresponding data, calling development language
The corresponding data of the data message are obtained from database;
Call development language that the target data is obtained from database in the current thread for processing the data acquisition request
Meanwhile, the current thread receives next data acquisition request by the receiving unit, and responds next data
Obtain request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710114776.XA CN106911782A (en) | 2017-02-28 | 2017-02-28 | A kind of method for reading data and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710114776.XA CN106911782A (en) | 2017-02-28 | 2017-02-28 | A kind of method for reading data and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106911782A true CN106911782A (en) | 2017-06-30 |
Family
ID=59208286
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710114776.XA Pending CN106911782A (en) | 2017-02-28 | 2017-02-28 | A kind of method for reading data and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106911782A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107341266A (en) * | 2017-07-24 | 2017-11-10 | 北京微影时代科技有限公司 | The method and apparatus that a kind of display information obtains |
CN107809431A (en) * | 2017-11-03 | 2018-03-16 | 深圳市沃特沃德股份有限公司 | Onboard system loads the method and onboard system of data to third party |
CN109144770A (en) * | 2018-08-02 | 2019-01-04 | 联想(北京)有限公司 | The data processing method and device of storage system |
CN109558421A (en) * | 2018-10-29 | 2019-04-02 | 中国建设银行股份有限公司 | Data processing method, system, device and storage medium based on caching |
CN109783499A (en) * | 2019-01-18 | 2019-05-21 | 成都宝瓜科技有限公司 | A kind of data cache method, device and server |
CN110232145A (en) * | 2017-10-31 | 2019-09-13 | 中移(苏州)软件技术有限公司 | A kind of data quick access method, apparatus and system |
CN110287007A (en) * | 2019-05-20 | 2019-09-27 | 深圳壹账通智能科技有限公司 | Data call response method, server and computer readable storage medium |
CN110851209A (en) * | 2019-11-08 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN111654741A (en) * | 2019-03-04 | 2020-09-11 | 青岛海尔多媒体有限公司 | Video data acquisition method and device, computer equipment and storage medium |
CN111930781A (en) * | 2020-07-24 | 2020-11-13 | 北京金山云网络技术有限公司 | Method and device for processing data request of cache database |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103747072A (en) * | 2013-12-30 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Data reading and writing method and application server |
CN105119917A (en) * | 2015-08-21 | 2015-12-02 | 福建天晴数码有限公司 | Data safety enhancing method and system |
-
2017
- 2017-02-28 CN CN201710114776.XA patent/CN106911782A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103747072A (en) * | 2013-12-30 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Data reading and writing method and application server |
CN105119917A (en) * | 2015-08-21 | 2015-12-02 | 福建天晴数码有限公司 | Data safety enhancing method and system |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107341266A (en) * | 2017-07-24 | 2017-11-10 | 北京微影时代科技有限公司 | The method and apparatus that a kind of display information obtains |
CN110232145A (en) * | 2017-10-31 | 2019-09-13 | 中移(苏州)软件技术有限公司 | A kind of data quick access method, apparatus and system |
CN107809431A (en) * | 2017-11-03 | 2018-03-16 | 深圳市沃特沃德股份有限公司 | Onboard system loads the method and onboard system of data to third party |
WO2019085038A1 (en) * | 2017-11-03 | 2019-05-09 | 深圳市沃特沃德股份有限公司 | Method for loading data to third party by vehicle-mounted system, and vehicle-mounted system |
CN109144770A (en) * | 2018-08-02 | 2019-01-04 | 联想(北京)有限公司 | The data processing method and device of storage system |
CN109144770B (en) * | 2018-08-02 | 2020-11-20 | 联想(北京)有限公司 | Data processing method and device of storage system |
CN109558421A (en) * | 2018-10-29 | 2019-04-02 | 中国建设银行股份有限公司 | Data processing method, system, device and storage medium based on caching |
CN109783499A (en) * | 2019-01-18 | 2019-05-21 | 成都宝瓜科技有限公司 | A kind of data cache method, device and server |
CN109783499B (en) * | 2019-01-18 | 2023-09-22 | 成都宝瓜科技有限公司 | Data caching method, device and server |
CN111654741A (en) * | 2019-03-04 | 2020-09-11 | 青岛海尔多媒体有限公司 | Video data acquisition method and device, computer equipment and storage medium |
CN110287007A (en) * | 2019-05-20 | 2019-09-27 | 深圳壹账通智能科技有限公司 | Data call response method, server and computer readable storage medium |
CN110851209A (en) * | 2019-11-08 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN111930781A (en) * | 2020-07-24 | 2020-11-13 | 北京金山云网络技术有限公司 | Method and device for processing data request of cache database |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106911782A (en) | A kind of method for reading data and device | |
US20220035775A1 (en) | Data field extraction model training for a data intake and query system | |
US12079175B2 (en) | Streaming synthesis of distributed traces from machine logs | |
CN105550228B (en) | Intelligent storage device and based on the access recognition methods of Intelligent storage device, system | |
US11062016B2 (en) | Systems and methods for verifying user credentials for search | |
CN113316926B (en) | Domain name processing method, device, electronic equipment and storage medium | |
CA2480509A1 (en) | Closed-loop command and response system for automatic communications between interacting computer systems over an audio communications channel | |
US11178160B2 (en) | Detecting and mitigating leaked cloud authorization keys | |
CN110222265A (en) | A kind of method, system, user terminal and the server of information push | |
CN104967630A (en) | Method and apparatus for processing webpage access request | |
US20140229770A1 (en) | Method and system for stack trace clustering | |
CN110471884A (en) | Data managing method, device, equipment, system and computer readable storage medium | |
CN114428972A (en) | Privacy protection query method and device supporting outsourcing calculation and related equipment | |
CN106685902A (en) | User authority management method, client and server | |
CN109937566A (en) | Method and apparatus for carrying out calculating unloading in networked environment | |
US20200012545A1 (en) | Event to serverless function workflow instance mapping mechanism | |
CN108429785A (en) | A kind of generation method, reptile recognition methods and the device of reptile identification encryption string | |
CN106686148A (en) | Method and system for increasing uploading speed of objects in object storage system | |
CN108874876A (en) | A kind of information push method, computer readable storage medium and terminal device | |
CN107046551A (en) | A kind of request of data, update method and related device | |
CN106911554A (en) | A kind of historical information methods of exhibiting and device | |
CN111813529B (en) | Data processing method, device, electronic equipment and storage medium | |
CN110535815A (en) | A kind of method and apparatus identifying URL | |
CN107733709A (en) | Date storage method, device and electronic equipment | |
CN117909335A (en) | Data center resource management method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170630 |