CN107545050A - Data query method and device, electronic equipment - Google Patents
Data query method and device, electronic equipment Download PDFInfo
- Publication number
- CN107545050A CN107545050A CN201710722831.3A CN201710722831A CN107545050A CN 107545050 A CN107545050 A CN 107545050A CN 201710722831 A CN201710722831 A CN 201710722831A CN 107545050 A CN107545050 A CN 107545050A
- Authority
- CN
- China
- Prior art keywords
- thread
- data
- data query
- target data
- application 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
Abstract
This specification one or more embodiment provides a kind of data query method and device, electronic equipment.In one embodiment, a kind of data query method includes:Receive the request for inquiring about target data;In response to the request, the thread object of inquiry data query thread corresponding with the target data in application server caching, the data query thread is used to perform the operation for inquiring about the target data from database;If inquiring the thread object, read the target data from application server caching and return;If not inquiring the thread object, create the data query thread and write the thread object of the data query thread in the application server caching;Start the data query thread being created and perform the operation;After the operation is performed successfully, by the target data in the application server caching is write.
Description
Technical field
This specification one or more embodiment is related to database technical field, more particularly to a kind of data query method and
Device, electronic equipment.
Background technology
After application server access database, by the local cache that the data inquired are deposited in application server
(cache) in so that, can be directly from local slow when next request for inquiring about same data reaches application server
Middle acquisition data are deposited, and without accessing database again, this greatly reduces the visit capacity to database, alleviates database
Pressure.
In the scene of some high concurrents request, it is possible that the phenomenon of the data failure in caching.When in caching
After data failure, if receiving mass data inquiry request in the short time, the action of query caching can be skipped and directly performed
The operation of data is inquired about from database, this causes huge pressure to database, or even causes the collapse of database.
The content of the invention
In view of this, this specification one or more embodiment provides a kind of data query method and device, electronic equipment.
To achieve the above object, the technical scheme that this specification one or more embodiment provides is as follows:
In one aspect, there is provided a kind of data query method, including:
Receive the request for inquiring about target data;
In response to the request, the inquiry data query thread corresponding with the target data in application server caching
Thread object, the data query thread is used to perform inquires about the operation of the target data from database;
If inquiring the thread object, read the target data from application server caching and return;
If not inquiring the thread object, the data query thread is created and by the thread of the data query thread
Object is write in the application server caching;
Start the data query thread being created and perform the operation;
After the operation is performed successfully, the target data is write in the application server caching.
In another aspect, there is provided a kind of data query arrangement, including:Receiving unit, query unit, reading unit,
Creating unit, the first start unit and writing unit;
The receiving unit receives the request for inquiring about target data;
The query unit is in response to the request, and inquiry is corresponding with the target data in application server caching
The thread object of data query thread, the data query thread are used to perform the behaviour for inquiring about the target data from database
Make;
The reading unit reads the target after the thread object is inquired from application server caching
Data simultaneously return;
The creating unit creates the data query thread and by the data after the thread object is not inquired
The thread object for inquiring about thread is write in the application server caching;
First start unit starts the data query thread being created and performs the operation;
Said write unit writes the application server after the operation is performed successfully, by the target data and delayed
In depositing.
In another aspect, there is provided a kind of electronic equipment, including:
Processor;
For storing the memory of processor-executable instruction;
The processor is configured as:
Receive the request for inquiring about target data;
In response to the request, the inquiry data query thread corresponding with the target data in application server caching
Thread object, the data query thread is used to perform inquires about the operation of the target data from database;
If inquiring the thread object, read the target data from application server caching and return;
If not inquiring the thread object, the data query thread is created and by the thread of the data query thread
Object is write in the application server caching;
Start the data query thread being created and perform the operation;
After the operation is performed successfully, the target data is write in the application server caching.
It can be seen that by above technical scheme after being activated due to data query thread, it is corresponding with the thread to look into
The operation for asking the target data is only successfully executed once, and the target data can be write to described answer after running succeeded
With in server buffer.After subsequently received other are used to inquire about the request of the target data, directly it can be read from caching
The target data is taken, and avoids data base querying target data, so as to alleviate in the scene of high concurrent request because slow
The data failure deposited and to pressure caused by database.
Brief description of the drawings
Fig. 1 shows a kind of exemplary system architecture diagram;
Fig. 2 shows a kind of flow chart for data query method that an exemplary embodiment provides;
Fig. 3 shows the processing procedure of reply high concurrent inquiry request;
Fig. 4 shows the flow chart for another data query method that an exemplary embodiment provides;
Fig. 5 shows a kind of module map for data query arrangement that an exemplary embodiment provides;
Fig. 6 shows the module map for another data query arrangement that an exemplary embodiment provides;
Fig. 7 shows the structure for a kind of electronic equipment that an exemplary embodiment provides.
Embodiment
Fig. 1 shows a kind of exemplary system architecture diagram, and the system includes:User equipment (User Equipment,
UE application server, database and the application server caching (hereinafter referred to as " caching ")), interacted with user equipment, application
The presence of server buffer is to alleviate the pressure of database.Wherein, application server caching can be the sheet of application server
Ground caches (i.e. the internal memory of application server).The principle for accessing database is as follows:Looked into when user equipment is sent to application server
After the request for asking target data, if the request is that (" first " can be the in a collection of concurrent request to access request first
One) because the target data of inquiry needed for not stored in caching when accessing first, application server needs to hold
Row inquires about the operation of target data from database, and caching is write target data into after target data is inquired first
In.After subsequently received other are used to inquire about the request of above-mentioned target data, then target data can be obtained from caching simultaneously
Return to user equipment.As can be seen that as long as the data in caching are effective, then can be moved without carrying out the access to database
Make, the access action to database only needs performing first once, greatly reduces the access pressure to database.When
So, data cached in order to flexibly update, the data in caching are typically arranged with the out-of-service time (such as:1 day).
UE can be fixed or move.UE is also referred to as another term, such as mobile station (MS), user terminal
(UT), subscriber station (SS), mobile terminal (MT) or wireless device.UE can be such as:Computer, mobile phone, personal digital assistant
(PDA), wrist-watch etc..
In the related art, in the scene of some high concurrents request, it is possible that the data failure in caching shows
As.Such as:When Database Systems just start, the data in caching are sky;Or certain machine (some node in server cluster)
Flow enter for a long time by carrying-off and without request, then caching is by whole failures.After data failure in caching, if
Mass data inquiry request is received in short time, then can skip the action of query caching and directly perform and number is inquired about from database
According to operation, this causes huge pressure to database, or even causes the collapse of database.To solve the above problems, propose
Following technical scheme.
Fig. 2 shows a kind of flow chart for data query method that an exemplary embodiment provides.As shown in Fig. 2 one
In embodiment, this method can be applied to server, and this method comprises the steps:
Step 101:Receive the request for inquiring about target data.The request may come from UE.
Step 103:In response to the request, data query thread corresponding with the target data is inquired about in the buffer
Thread object.If the thread object is inquired, into step 109;If not inquiring the thread object, enter step
Rapid 105.
Wherein, the noun being related to is defined as follows:
Data query thread:For performing a thread of the operation that the target data is inquired about from database.
Thread object:The data related to thread, these data may include but be not limited to:Looked into needed for thread identification, thread
The target data ID of inquiry, all kinds of parameters of thread, readjustment result of thread etc..
Usually, a collection of in the high concurrent inquiry request of same target data, for the request of first entrance,
A new data query thread can be created and deposit in the thread object of the thread in caching.So, please for first
Other requests after asking, then can inquire from caching and be asked at first into fashionable created thread object.Namely
Say, if step 103 does not inquire thread object, it is first request to show the request, if step 103 inquires thread
Object, then it is not first request to show the request.
In one embodiment, the data query thread can be asynchronous thread, so as to be shared by multiple requests, i.e.,
It is multiple to ask into fashionable, can utilize the thread go to obtain needed for inquiry data.But target data is inquired about from database
Operation be only successfully executed once and (i.e. after being successfully executed once, be just no longer performed).When the operation is by success
After execution, data query thread can write the target data inquired in caching.
Step 105:Create data query thread corresponding with the target data.
Step 106:By thread object write-in caching corresponding to the thread of establishment.
Step 107:Start the data query thread.
Step 109:Judge whether the data query thread is successfully started up.If being successfully started up, into step
111;If not successfully started up, return to step 107.
The reason for setting the step 109 is:If other after first inquiry request ask into fashionable, not start number
It is investigated that ask thread and directly obtain the readjustment result of data query thread, and if now data query thread it is not actuated into
Work(, this results in the readjustment result that other requests wait thread always.Finally, follow-up inquiry request is caused to wait down always
Go, business can not continue.
In view of the foregoing, enter in each request inquired about for same data fashionable, be required to attempt to start institute
State data query thread.In order to ensure only to make a successful access to database, it is necessary to rely on the idempotence of thread startup interface.
That is, data query thread, once being successfully started up, follow-up trial start-up operation will not all restart the data query
Thread, only when thread is not successfully started up, it can just restart thread.The idempotence that thread starts interface may rely on
The state of thread, such as:State when thread is created can be original state (INIT), once thread is activated success, then will
Its state is set in execution (RUNNING).After thread is activated successfully, if subsequently again attempting to start same thread,
Because thread finds that oneself state in performing (RUNNING), will no longer carry out start-up operation.
Step 111:Target data is obtained using the data query thread and is returned.
On the step 111, the following two kinds situation can be divided into:
1., for the first request in a collection of concurrent request, after creating thread and starting the thread successfully, can perform
Once to the inquiry operation of database.After target data is inquired from database, the mesh can be returned to user equipment
Data are marked, also, can be write the target data as thread parameter in thread object.
2., other requests for being equally used for inquiring about the target data for entering after first request because first
The request successful execution inquiry operation of database, and the target data found is written to thread object (cached
In) in, then without performing the inquiry operation of database again, but the target data is directly read from caching and is returned to
User equipment, until the out-of-service time arrival of thread.
Certainly, if it is first request start thread failure or access database with search the operation of target data not into
Work(, then enter fashionable in subsequent request, may proceed to start the thread or continues executing with the operation for accessing database, until thread starts
Success or operation are successfully executed.In a word, in the term of validity of thread, only meeting successful execution once grasp by the access to database
Make.
As set forth above, it is possible to a term of validity is set for each thread being created, in favor of data cached renewal.
In one embodiment, after the step 106, methods described can also include:
Step 113:In the out-of-service time (can be a time point or a time slice) of the data query thread
After arrival, the thread object corresponding with the data query thread stored in the caching is deleted.
In other embodiments, the step 113 can be removed.For example, artificial triggering acts to data cached removing.
Fig. 3 shows a kind of processing procedure for tackling high concurrent inquiry request.From figure 3, it can be seen that for one not by
Be stored in caching in target data, when occurring a large amount of requesting queries target data in the short time, first arrival please
Data query thread can be created and thread is put into caching by asking, can be in the short period because creating thread and being put into the operation of caching
Interior completion, therefore during follow-up other request arrival, thread will be no longer created, but inquire reached in first request in the buffer
When the thread that has created.So, no matter for above-mentioned target data concurrent request quantity how many, all will be based at first
The thread that is created obtains data when request reaches.In other words, multiple inquiry requests for same target data, it is final to receive
Hold back the single data query operation in same thread.
It can be seen that by above technical scheme after being activated due to data query thread, it is corresponding with the thread to look into
The operation for asking the target data is only successfully executed once, can be write the target data after running succeeded described slow
In depositing.After subsequently received other are used to inquire about the request of the target data, the target can be directly read from caching
Data, and data base querying target data is avoided, so as to alleviate in the scene of high concurrent request because of the data in caching
Fail and give pressure caused by database.
Fig. 4 shows the flow chart for another data query method that an exemplary embodiment provides.As shown in figure 4,
In one embodiment, this method can be applied to application server, and this method comprises the steps:
Step 201:Receive the request for inquiring about target data.The request may come from UE.
Step 203:In response to the request, data query thread corresponding with the target data is inquired about in the buffer
Thread object.If the thread object is inquired, into step 211;If not inquiring the thread object, enter step
Rapid 205.
Step 205:Create data query thread.
Step 206:By in the thread object write-in caching of the data query thread.
Step 207:Start thread and the operation of the target data is inquired about from database in execution after successfully starting up.
Step 209:The target data inquired is returned to user equipment, and the target data is write and cached.
Wherein, step 207 and step 209 can be after first request reaches, the quilts before second request is not reaching to
Perform.
Step 211:Target data is read from caching and is returned.
Before step 211, the complete step 207 of usual executed and step 209, therefore required target data has been present
In caching, therefore avoid and inquiry operation is performed in database.
Step 213:In the out-of-service time (can be a time point or a time slice) of the data query thread
After arrival, the thread object corresponding with the data query thread stored in the caching is deleted.In other embodiments, should
Step 213 can be removed.
So far, after being activated due to data query thread, the operation of the inquiry target data corresponding with the thread
Only it is successfully executed once, the target data can be being write after running succeeded in the caching.It is subsequently received its
He is used for after inquiring about the request of the target data, and the target data can be directly read from caching, and avoids database
Target data is inquired about, so as to alleviate in the scene of high concurrent request caused by the data failure in caching and to database
Pressure.
In a feasible embodiment, when it is first for target data request reach and create a new thread it
Afterwards, the thread can not be started at once.For example, target is directed to n-th (2≤n, n value can be random, can also specify) is individual
When the request of data reaches, start the thread and go to the operation of data base querying data.Certainly, no matter in which request
Reach and start above-mentioned thread, the operation of target data is finally inquired about in database can only be successfully executed once, and the line
The readjustment result (i.e. target data) of journey can be shared by all requests.
It is corresponding with the above method, a kind of data query arrangement is also provided herein, the data query arrangement can wrap
Include each code module in software.
As shown in figure 5, in one embodiment, a kind of data query arrangement 200 may include:Receiving unit 210, query unit
220th, reading unit 230, creating unit 240, the first start unit 250 and writing unit 260, wherein:
The receiving unit 210 can receive the request for inquiring about target data;
The query unit 220 can inquire about number corresponding with the target data in the buffer in response to the request
It is investigated that asking the thread object of thread, the data query thread is used to perform the behaviour for inquiring about the target data from database
Make;
The reading unit 230 can read the number of targets after the thread object is inquired from the caching
According to and return;
The creating unit 240 can create the data query thread and incite somebody to action after the thread object is not inquired
The thread object of the data query thread is write in the caching;
First start unit 250 can start the data query thread being created and perform the operation;
The target data can be write the caching by said write unit 260 after the operation is performed successfully
In.
In an optional embodiment, the reading unit 230 can inquire the thread object and the data
After inquiry thread is successfully started up, the target data is read from the caching and is returned.
In an optional embodiment, first start unit 250 can after the data query thread is created,
Receive next for before inquiring about the request of the target data, starting the data query thread and successfully starting up the number
It is investigated that perform the operation after asking thread.
In an optional embodiment, described device 200 can also include deleting unit 270, and the deletion unit 270 can
It is being stored in the caching with the data query thread pair after the out-of-service time of the data query thread arrives, to delete
The thread object answered, in order to data cached renewal.
As shown in fig. 6, in one embodiment, on the basis of Fig. 5, described device 200 can also include second and start list
Member 280, second start unit 280 can inquire the thread object and the data query thread is not opened successfully
After dynamic, start the data query thread and perform the operation after the data query thread is successfully started up.Opened second
, can be by writing unit 260 by target data write-in caching after moving cell inquires required target data.Pass through
Two start units 280 can be avoided because thread is activated failure, and other requests for causing this follow-up wait returning for thread always
Adjust result.Finally, follow-up inquiry request is caused to be stayed always etc., business can not continue.
As shown in fig. 7, this specification one or more embodiment provides a kind of electronic equipment (such as:Individual server, end
The equipment that end equipment, server cluster, user equipment etc. have computing capability), the electronic equipment can include processor, inside
Bus, network interface, memory (including internal memory and nonvolatile memory), are also possible that required for other business certainly
Hardware.Processor can be CPU (CPU), processing unit, process circuit, processor, application specific integrated circuit
(ASIC), one or more of other of microprocessor or executable instruction processing logic example.Processor is from non-volatile
Program into internal memory and then is run corresponding to being read in memory.Certainly, in addition to software realization mode, this specification one
Or multiple embodiments are not precluded from other implementations, such as mode of logical device or software and hardware combining etc., that is,
Say that the executive agent of following handling process is not limited to each logic unit or hardware or logical device.
In one embodiment, processor can be configured as:
Receive the request for inquiring about target data;
In response to the thread pair of the request, in the buffer inquiry data query thread corresponding with the target data
As the data query thread is used to perform the operation for inquiring about the target data from database;
If inquiring the thread object, the target data is read from the caching and is returned;
If not inquiring the thread object, the data query thread is created and by the thread of the data query thread
Object is write in the caching;
Start the data query thread being created and perform the operation;
After the operation is performed successfully, the target data is write in the caching.
In another embodiment, processor can be configured as:
Receive the request for inquiring about target data;
In response to the thread pair of the request, in the buffer inquiry data query thread corresponding with the target data
As the data query thread is used to perform the operation for inquiring about the target data from database;
If inquiring the thread object and the data query thread being successfully started up, institute is read from the caching
State target data and return, the target data is performed in the operation and is successfully written into afterwards in the caching;
If inquiring the thread object and the data query thread not being successfully started up, start the data query line
Journey simultaneously performs the operation after the data query thread is successfully started up;
If not inquiring the thread object, the data query thread is created and by the thread of the data query thread
Object is write in the caching.
Each embodiment in this specification is described by the way of progressive, identical between each embodiment/similar
Part is mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for equipment
For embodiment, device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part
Illustrate referring to the part of embodiment of the method.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity,
Or realized by the product with certain function.One kind typically realizes that equipment is computer, and the concrete form of computer can
To be personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment
The combination of any several equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented
The function of each unit can be realized in same or multiple softwares and/or hardware during specification one or more embodiment.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flashRAM).Internal memory is showing for computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only deposit
Reservoir (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc
Read-only storage (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk are deposited
Storage or other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.
Defined according to herein, computer-readable medium does not include temporary computer readable media (transitorymedia), such as modulates
Data-signal and carrier wave.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of this specification one or more embodiment can be provided as method, be
System or computer program product.Therefore, this specification one or more embodiment can use complete hardware embodiment, complete software
The form of embodiment in terms of embodiment or combination software and hardware.Moreover, this specification one or more embodiment can use
The computer-usable storage medium for wherein including computer usable program code in one or more (includes but is not limited to disk
Memory, CD-ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more embodiment can computer executable instructions it is general on
Described in hereafter, such as program module.Usually, program module includes performing particular task or realizes particular abstract data type
Routine, program, object, component, data structure etc..Can also put into practice in a distributed computing environment this specification one or
Multiple embodiments, in these DCEs, by being performed by communication network and connected remote processing devices
Task.In a distributed computing environment, the local and remote computer that program module can be located at including storage device is deposited
In storage media.
The embodiment of this specification one or more embodiment is the foregoing is only, is not limited to this specification
One or more embodiments.To those skilled in the art, this specification one or more embodiment can have it is various more
Change and change.It is all this specification one or more embodiment spirit and principle within made any modification, equivalent substitution,
Improve etc., it should be included within the right of this specification one or more embodiment.
Claims (11)
1. a kind of data query method, including:
Receive the request for inquiring about target data;
In response to the request, the line of inquiry data query thread corresponding with the target data in application server caching
Journey object, the data query thread are used to perform the operation for inquiring about the target data from database;
If inquiring the thread object, read the target data from application server caching and return;
If not inquiring the thread object, the data query thread is created and by the thread object of the data query thread
Write in the application server caching;
Start the data query thread being created and perform the operation;
After the operation is performed successfully, the target data is write in the application server caching.
2. according to the method for claim 1, if described inquire the thread object, from application server caching
Read the target data and return, including:
If inquiring the thread object and the data query thread being successfully started up, from application server caching
Read the target data and return.
3. according to the method for claim 2, methods described also includes:
If inquiring the thread object and the data query thread not being successfully started up, start the data query thread simultaneously
The operation is performed after the data query thread is successfully started up.
4. according to the method for claim 1, described start the data query thread being created and perform the operation,
Including:
Receive it is next be used to inquire about the request of the target data before, start the data query thread that is created and
The operation is performed after successfully starting up the data query thread.
5. the thread object of the data query thread according to the method for claim 1, is being write into the application service
After in device caching, methods described also includes:
After the out-of-service time of the data query thread arrives, delete storing with the number in application server caching
It is investigated that ask thread object corresponding to thread.
6. a kind of data query arrangement, including:Receiving unit, query unit, reading unit, creating unit, the first start unit
And writing unit;
The receiving unit receives the request for inquiring about target data;
The query unit is in response to the request, the inquiry data corresponding with the target data in application server caching
The thread object of thread is inquired about, the data query thread is used to perform the operation for inquiring about the target data from database;
The reading unit reads the target data after the thread object is inquired from application server caching
And return;
The creating unit creates the data query thread and by the data query after the thread object is not inquired
The thread object of thread is write in the application server caching;
First start unit starts the data query thread being created and performs the operation;
Said write unit writes the application server after the operation is performed successfully, by the target data and cached
In.
7. device according to claim 6, the reading unit is inquiring the thread object and the data query
After thread is successfully started up, read the target data from application server caching and return.
8. device according to claim 7, described device also includes the second start unit, and second start unit is being looked into
Ask the thread object and after the data query thread do not successfully started up, start the data query thread and in success
The operation is performed after starting the data query thread.
9. device according to claim 6, first start unit after the data query thread is created, receiving
It is used for next before inquiring about the request of the target data, starts the data query thread and looked into successfully starting up the data
The operation is performed after asking thread.
10. device according to claim 6, described device also includes deleting unit, and the deletion unit is in the data
Inquire about thread out-of-service time arrive after, delete stored in application server caching it is corresponding with the data query thread
Thread object.
11. a kind of electronic equipment, including:
Processor;
For storing the memory of processor-executable instruction;
The processor is configured as:
Receive the request for inquiring about target data;
In response to the request, the line of inquiry data query thread corresponding with the target data in application server caching
Journey object, the data query thread are used to perform the operation for inquiring about the target data from database;
If inquiring the thread object, read the target data from application server caching and return;
If not inquiring the thread object, the data query thread is created and by the thread object of the data query thread
Write in the application server caching;
Start the data query thread being created and perform the operation;
After the operation is performed successfully, the target data is write in the application server caching.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710722831.3A CN107545050A (en) | 2017-08-22 | 2017-08-22 | Data query method and device, electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710722831.3A CN107545050A (en) | 2017-08-22 | 2017-08-22 | Data query method and device, electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107545050A true CN107545050A (en) | 2018-01-05 |
Family
ID=60958661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710722831.3A Pending CN107545050A (en) | 2017-08-22 | 2017-08-22 | Data query method and device, electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107545050A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110493291A (en) * | 2018-05-14 | 2019-11-22 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus handling HTTP request |
CN110968778A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Media material processing method and device, storage medium and server |
CN112486956A (en) * | 2020-12-10 | 2021-03-12 | 北京字节跳动网络技术有限公司 | Data access method and device and electronic equipment |
CN113065054A (en) * | 2021-03-31 | 2021-07-02 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment and storage medium |
CN115361448A (en) * | 2022-10-19 | 2022-11-18 | 北京挪拉斯坦特芬通信设备有限公司 | Data processing method, HSS, electronic device and computer storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106383826A (en) * | 2015-07-29 | 2017-02-08 | 阿里巴巴集团控股有限公司 | Database checking method and apparatus |
CN107229623A (en) * | 2016-03-23 | 2017-10-03 | 泰康保险集团股份有限公司 | Data query processing method and processing device |
-
2017
- 2017-08-22 CN CN201710722831.3A patent/CN107545050A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106383826A (en) * | 2015-07-29 | 2017-02-08 | 阿里巴巴集团控股有限公司 | Database checking method and apparatus |
CN107229623A (en) * | 2016-03-23 | 2017-10-03 | 泰康保险集团股份有限公司 | Data query processing method and processing device |
Non-Patent Citations (1)
Title |
---|
匿名: "缓存常见问题及分析", 《HTTPS://WWW.JIANSHU.COM/P/283F20FCA19B》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110493291A (en) * | 2018-05-14 | 2019-11-22 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus handling HTTP request |
CN110968778A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Media material processing method and device, storage medium and server |
CN112486956A (en) * | 2020-12-10 | 2021-03-12 | 北京字节跳动网络技术有限公司 | Data access method and device and electronic equipment |
CN113065054A (en) * | 2021-03-31 | 2021-07-02 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment and storage medium |
CN113065054B (en) * | 2021-03-31 | 2024-03-01 | 北京达佳互联信息技术有限公司 | Request processing method, request processing device, electronic equipment and storage medium |
CN115361448A (en) * | 2022-10-19 | 2022-11-18 | 北京挪拉斯坦特芬通信设备有限公司 | Data processing method, HSS, electronic device and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107545050A (en) | Data query method and device, electronic equipment | |
JP6876806B2 (en) | Blockchain Consensus Formation Methods and Devices | |
US20180121466A1 (en) | Replicating data across data centers | |
CN113010818B (en) | Access current limiting method, device, electronic equipment and storage medium | |
CN107153644B (en) | Data synchronization method and device | |
CN108846100A (en) | The method and apparatus of fast search boarding application | |
CN105335512B (en) | Data query method and device | |
CN110795171B (en) | Service data processing method, device, computer equipment and storage medium | |
US10776179B2 (en) | Multi-application-oriented user data management method and system | |
CN106202082B (en) | Method and device for assembling basic data cache | |
CN107463422A (en) | Code dispositions method and device, electronic equipment | |
CN104657435A (en) | Storage management method for application data and network management system | |
EP4310691A1 (en) | Blockchain-based data processing method, apparatus, and device, and storage medium | |
CN112579595A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN112148736A (en) | Method, device and storage medium for caching data | |
CN115470156A (en) | RDMA-based memory use method, system, electronic device and storage medium | |
CN109542612A (en) | A kind of hot spot keyword acquisition methods, device and server | |
CN117130792B (en) | Processing method, device, equipment and storage medium for cache object | |
CN111383038A (en) | Advertisement display method and device of mobile terminal, mobile terminal and storage medium | |
CN113282580A (en) | Method, storage medium and server for executing timed task | |
CN110764930B (en) | Request or response processing method and device based on message mode | |
CN112926002A (en) | Service request processing method and device | |
CN116204133A (en) | Method, system, equipment and storage medium for quickly reading metadata | |
CN110489138A (en) | A kind of application update method, device and storage medium | |
CN111625500B (en) | File snapshot method and device, electronic equipment and storage medium |
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: 20180105 |
|
RJ01 | Rejection of invention patent application after publication |