[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104462447A - Access timeout data processing method and device - Google Patents

Access timeout data processing method and device Download PDF

Info

Publication number
CN104462447A
CN104462447A CN201410779513.7A CN201410779513A CN104462447A CN 104462447 A CN104462447 A CN 104462447A CN 201410779513 A CN201410779513 A CN 201410779513A CN 104462447 A CN104462447 A CN 104462447A
Authority
CN
China
Prior art keywords
time
querying attributes
access
actual
querying
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.)
Granted
Application number
CN201410779513.7A
Other languages
Chinese (zh)
Other versions
CN104462447B (en
Inventor
赖华贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410779513.7A priority Critical patent/CN104462447B/en
Publication of CN104462447A publication Critical patent/CN104462447A/en
Application granted granted Critical
Publication of CN104462447B publication Critical patent/CN104462447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an access timeout data processing method and device. The method includes acquiring the query attribute of an access request used for characterizing the type of the access request; acquiring the correspondence of the query attribute and the exceeding time, namely the time exceeding the preset access waiting time; determining the actual exceeding time of the access request according to the correspondence. By the aid of the method, the problems that in the prior art, if only one fixed exceeding time is estimated, all the query conditions are difficult to meet, a fixed exceeding time shared by all the query conditions is difficult to determine, even though the exceeding time is determined successfully, the system performance can be influenced are solved.

Description

The data processing method of access time-out and device
Technical field
The present invention relates to database field, in particular to a kind of data processing method and device of accessing time-out.
Background technology
At present, in infosystem, a large amount of database that adopts carries out data storage.And during to data base querying, generally adopt sql like language.When adopting sql like language Query Database, in order to reduce the possibility of data base access deadlock state and reduce the burden of database, generally need to arrange a time-out time.When the time that SQL script performs exceedes this time-out time, stop performing this script.When the time that SQL script performs does not exceed this time-out time, continue to perform this script.
Time-out time is very large on the impact of system, if time-out time arranges too short, then a large amount of SQL scripts can be caused to perform time-out, and then cause system unavailable; And if time-out time arranges long, then a large amount of SQL scripts extremely consuming time can be caused to perform and to can not get terminating, and then system resource can be caused unavailable owing to exhausting.Therefore, determine that the rational time-out time of SQL script is extremely important.
In the related, generally can according to the actual conditions of system, estimate a fixing time-out time.But, due to the querying condition of many middle types may be there is in system, therefore, iff the fixed-timeouts time of estimation, then be difficult to meet all querying conditions, moreover such fixed-timeouts time being all querying conditions share also is difficult to determine, namely allow to successfully determine, also may impact the performance of system.
For in correlation technique iff the fixed-timeouts time of estimation, then be difficult to meet all querying conditions, moreover, such fixed-timeouts time being all querying conditions share also is difficult to determine, namely allow to successfully determine, the problem that also may impact the performance of system, not yet proposes effective solution at present.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of data processing method and device of accessing time-out, to solve in correlation technique iff the fixed-timeouts time of estimation, then be difficult to meet all querying conditions, moreover, such fixed-timeouts time being all querying conditions share also is difficult to determine, namely allow to successfully determine, the problem that also may impact the performance of system.
To achieve these goals, according to an aspect of the present invention, a kind of data processing method of accessing time-out is provided.The method comprises: the querying attributes obtaining request of access, and above-mentioned querying attributes is for characterizing the type of above-mentioned request of access; Obtain the corresponding relation of above-mentioned querying attributes and time-out time, above-mentioned time-out time is the time exceeding default access latency; And the actual time-out time of above-mentioned request of access is determined according to above-mentioned corresponding relation.
Further, before the corresponding relation obtaining above-mentioned querying attributes and time-out time, above-mentioned data processing method also comprises: judge that whether above-mentioned querying attributes is the querying attributes of discretize, wherein, if judge that above-mentioned querying attributes is the querying attributes of above-mentioned discretize, then perform the step of the corresponding relation obtaining above-mentioned querying attributes and time-out time; If judge that above-mentioned querying attributes is not the querying attributes of above-mentioned discretize, then first sliding-model control is carried out to above-mentioned querying attributes, then perform the step of the corresponding relation obtaining above-mentioned querying attributes and time-out time.
Further, the querying attributes of above-mentioned discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of above-mentioned first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of above-mentioned discretize by the following method: carry out actual queries according to the combinations thereof querying attributes of above-mentioned request of access; Record the time-out time of above-mentioned request of access in actual queries; And using the time-out time of above-mentioned request of access in actual queries as the time-out time corresponding with the querying attributes of above-mentioned discretize.
Further, the querying attributes of above-mentioned discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of above-mentioned first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of above-mentioned discretize by the following method: carry out repeatedly actual queries according to the combinations thereof querying attributes of above-mentioned request of access; Record the repeatedly time-out time of above-mentioned request of access in actual queries; Time is averaging to the repeatedly time-out time of above-mentioned request of access in actual queries; And using above-mentioned averaging time as the time-out time corresponding with the querying attributes of above-mentioned discretize.
Further, after the actual time-out time determining above-mentioned request of access according to above-mentioned corresponding relation, above-mentioned data processing method also comprises: obtain the max-timeout time preset; Judge whether above-mentioned actual time-out time is greater than the above-mentioned max-timeout time; If judge that above-mentioned actual time-out time is greater than the above-mentioned max-timeout time, then using the above-mentioned max-timeout time as final actual time-out time; And if judge that above-mentioned actual time-out time is not more than the above-mentioned max-timeout time, then using above-mentioned actual time-out time as above-mentioned actual time-out time finally.
To achieve these goals, according to a further aspect in the invention, a kind of data processing equipment of accessing time-out is provided.This device comprises: the first acquiring unit, and for obtaining the querying attributes of request of access, above-mentioned querying attributes is for characterizing the type of above-mentioned request of access; Second acquisition unit, for obtaining the corresponding relation of above-mentioned querying attributes and time-out time, above-mentioned time-out time is the time exceeding default access latency; And first determining unit, for determining the actual time-out time of above-mentioned request of access according to above-mentioned corresponding relation.
Further, above-mentioned data processing equipment also comprises: the first judging unit, for before the corresponding relation obtaining above-mentioned querying attributes and time-out time, judge that whether above-mentioned querying attributes is the querying attributes of discretize, wherein, if judge that above-mentioned querying attributes is the querying attributes of above-mentioned discretize, then perform the function of above-mentioned second acquisition unit; If judge that above-mentioned querying attributes is not the querying attributes of above-mentioned discretize, then first sliding-model control is carried out to above-mentioned querying attributes, then perform the function of above-mentioned second acquisition unit.
Further, the querying attributes of above-mentioned discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of above-mentioned first querying attributes and the second querying attributes, above-mentioned data processing equipment also comprises: the second determining unit, for by determining the time-out time corresponding with the querying attributes of above-mentioned discretize with lower device, wherein, above-mentioned second determining unit has: the first enquiry module, carries out actual queries for the combinations thereof querying attributes according to above-mentioned request of access; First logging modle, for recording the time-out time of above-mentioned request of access in actual queries; And first determination module, for using the time-out time of above-mentioned request of access in actual queries as the time-out time corresponding with the querying attributes of above-mentioned discretize.
Further, the querying attributes of above-mentioned discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of above-mentioned first querying attributes and the second querying attributes, above-mentioned data processing equipment also comprises: the 3rd determining unit, for by determining the time-out time corresponding with the querying attributes of above-mentioned discretize with lower device, wherein, above-mentioned 3rd determining unit has: the second enquiry module, carries out repeatedly actual queries for the combinations thereof querying attributes according to above-mentioned request of access; Second logging modle, for recording the repeatedly time-out time of above-mentioned request of access in actual queries; Computing module, for being averaging the time to the repeatedly time-out time of above-mentioned request of access in actual queries; And second determination module, for using above-mentioned averaging time as the time-out time corresponding with the querying attributes of above-mentioned discretize.
Further, above-mentioned data processing equipment also comprises: the 3rd acquiring unit, for after the actual time-out time determining above-mentioned request of access according to above-mentioned corresponding relation, obtains the max-timeout time preset; Second judging unit, for judging whether above-mentioned actual time-out time is greater than the above-mentioned max-timeout time; 4th determining unit, for when judging that above-mentioned actual time-out time is greater than the above-mentioned max-timeout time, using the above-mentioned max-timeout time as final actual time-out time; And the 5th determining unit, for when judging that above-mentioned actual time-out time is not more than the above-mentioned max-timeout time, using above-mentioned actual time-out time as above-mentioned actual time-out time finally.
By the present invention, adopt the querying attributes obtaining request of access, querying attributes is for characterizing the type of request of access; Obtain the corresponding relation of querying attributes and time-out time, time-out time is the time exceeding default access latency; And according to the actual time-out time of corresponding relation determination request of access, solve in correlation technique iff the fixed-timeouts time of estimation, then be difficult to meet all querying conditions, moreover, such fixed-timeouts time being all querying conditions share also is difficult to determine, namely allow to successfully determine, the problem that also may impact the performance of system, and then reach and determine that time-out time is to meet the effect of the requirement of different querying conditions dynamically.
Accompanying drawing explanation
The accompanying drawing forming a application's part is used to provide a further understanding of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the data processing method of access time-out according to the embodiment of the present invention; And
Fig. 2 is the schematic diagram of the data processing equipment of access time-out according to the embodiment of the present invention.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The application's scheme is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the embodiment of the application's part, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
It should be noted that, term " first ", " second " etc. in the instructions of the application and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that the embodiment of the application described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
According to embodiments of the invention, provide a kind of data processing method of accessing time-out.The data processing method of this access time-out may operate on computer-processing equipment.
Fig. 1 is the process flow diagram of the data processing method of access time-out according to the embodiment of the present invention.As shown in Figure 1, the method comprises following step S102 to step S106:
Step S102, obtain the querying attributes of request of access, querying attributes is for characterizing the type of request of access.
It should be noted that, in embodiments of the present invention, request of access can be the request of access of accessing database, and such as, it can be SQL query request.Querying attributes can comprise one or more, the present invention does not do any restriction to it, such as, its can be data query number attribute, whether there is the attribute of filtercondition, whether have the attribute etc. of sequence, accordingly, the type characterizing request of access can be the request of data query number respectively, whether has the request of filtercondition, whether have the request etc. of sequence.
Due to data query number, whether there is filtercondition and whether have sequence etc. to be the principal element affecting query time, therefore, obtain request of access querying attributes after, can mainly using querying attributes corresponding for above-mentioned several key element as the initial conditions determining time-out time.
Step S104, obtains the corresponding relation of querying attributes and time-out time.Time-out time is the time exceeding default access latency.
Time-out time is the time exceeding default access latency, also, after client initiates request of access, and the time-out time of database response.During enforcement, time-out time corresponding to each querying attributes can be pre-determined according to historical query record or experimental data, and the corresponding relation of the time-out time obtained and each querying attributes and corresponding time-out time is stored in overtime form, use in order to during actual access database.
Step S106, according to the actual time-out time of corresponding relation determination request of access.
During enforcement, when needing the time-out time determining an inquiry request, first can obtain each querying attributes of this inquiry request, i.e. each querying condition, and in above-mentioned overtime form, search corresponding time-out time according to these querying conditions, and the actual time-out time using the time-out time of this correspondence as request of access, also, the time-out time of actual queries.
Pass through the embodiment of the present invention, due to can according to the querying attributes of each request of access, dynamically determine a time-out time for data base querying, thus as far as possible many inquiries can be allowed not overtime, and avoid consuming system resource excessively, reach and determine that time-out time is to meet the effect of the requirement of different querying conditions dynamically. as far as possible
Preferably, in embodiments of the present invention, before the corresponding relation that step S104 obtains querying attributes and time-out time, this data processing method can also comprise:
S2, judges that whether querying attributes is the querying attributes of discretize.Wherein, if judge that querying attributes is the querying attributes of discretize, then perform the step that step S104 obtains the corresponding relation of querying attributes and time-out time; If judge that querying attributes is not the querying attributes of discretize, then first sliding-model control is carried out to querying attributes, then perform the step that step S104 obtains the corresponding relation of querying attributes and time-out time.
Because querying attributes can be divided into continuous type querying attributes and discrete type querying attributes according to inquiry meaning, also be, determine that the initial conditions of time-out time can be divided into two classes: continuous type initial conditions and discrete type initial conditions, such as, the attribute of data query number is continuous type querying attributes, and whether there is the attribute of filtration and whether have the attribute of sequence to be discrete type querying attributes, thus when implementing, for each continuous type initial conditions, need first by it discretize, re-use the initial conditions after discretize in above-mentioned overtime form, search corresponding time-out time, and using this time-out time found as the time-out time of actual queries, also be, final time-out time.
Wherein, the treatment scheme of discretize is as follows: first determine the maximal value that this continuous type initial conditions is inquired about in systems in which and minimum value, gather some points according to predetermined interval between a minimum value and a maximum value again, put the discrete form of corresponding value as this continuity initial conditions with these.
Further preferably, in embodiments of the present invention, the querying attributes of discretize comprises: the first querying attributes and the second querying attributes, query composition attribute can be the querying attributes of the combination of the first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of discretize by the following method:
S4, carries out actual queries according to the query composition attribute of request of access;
S6, the time-out time of record access request in actual queries; And
S8, using the time-out time of request of access in actual queries as the time-out time corresponding with the querying attributes of discretize.
Preferably, in embodiments of the present invention, the querying attributes of discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of the first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of discretize by the following method:
S10, carries out repeatedly actual queries according to the query composition attribute of request of access;
S12, the repeatedly time-out time of record access request in actual queries;
S14, is averaging the time to the repeatedly time-out time of request of access in actual queries; And
S16, using averaging time as the time-out time corresponding with the querying attributes of discretize.
During enforcement, can first obtain each initial conditions, for being left intact of initial conditions of inherently discretize, then first sliding-model control is done for the initial conditions of continuous type time itself, obtain the initial conditions of discrete type, then the initial conditions of these discrete types is combined, thus structure inquiry request carries out actual queries, and record the time-out time of each group polling, and calculate the average of these time-out times, to expend time in t using this average as the typical query of this group polling condition, also be, the time-out time corresponding with the querying attributes of discretize.
Further, an overtime Coefficient m can also be determined, the time-out time according to each group polling condition of following formulae discovery: T=mt.After calculating is complete, records the time-out time of each group polling condition, and record result is stored in an overtime form.
Preferably, in embodiments of the present invention, after step S106 is according to the actual time-out time of corresponding relation determination request of access, this data processing method can also comprise:
S18, obtains the max-timeout time preset;
S20, judges whether actual time-out time is greater than the max-timeout time;
S22, if judge that actual time-out time is greater than the max-timeout time, then using the max-timeout time as final actual time-out time; And
S24, if judge that actual time-out time is not more than the max-timeout time, then using actual time-out time as final actual time-out time.
Because the time-out time obtained according to above-mentioned enforcement may be very large, and then cause system resource to be consumed excessively, therefore, in order to avoid the time-out time of the SQL of dynamic calculation is excessive, first appointment max-timeout time Tmax is needed, if the time-out time of the SQL of dynamic calculation is no more than this max-timeout time Tmax, then using the time-out time of the SQL of dynamic calculation as final actual time-out time, otherwise, then using the max-timeout time Tmax that specifies as final actual time-out time.
The present invention is elaborated below with a specific embodiment:
First, the max-timeout time Tmax=5 minute of appointing system; Select the following querying attributes of request of access as the initial conditions determining time-out time, as shown in table 1:
Table 1
The querying attributes of data query number
Whether there is the querying attributes of filtercondition
Whether there is the querying attributes of sequence
For above-mentioned querying attributes, querying attributes due to data query number is the querying attributes of continuous type, therefore, suppose that the possible value of the data query number that this attribute is corresponding is in actual applications 0-500, suppose that the time interval of sliding-model control is 100, by data query number discretize, then the value of inquiring about number is: 1,100,200,300,400,500.And for the querying attributes of other two discretizes, their span is: be, no.
For the querying attributes of the discretize of data query number and whether having filtercondition querying attributes and whether having sequence three initial conditions querying attributes of discretize, suppose to be combined as following structure inquiry request successively, and repeatedly inquire about according to these inquiry request, the inquiry obtained equal value record consuming time is as shown in table 2, wherein, suppose that overtime coefficient is 1.2, then can calculate the time-out time under each condition:
Table 2
Suppose there is now following inquiry request: inquiry number is 360, filtercondition whether is had to be no, whether sequence is yes, so in order to obtain the time-out time of this inquiry request, need to inquire about number discretize, because what determine is time-out time herein, therefore need upwards to get discrete point, namely inquire about number and get 400, and then discrete point corresponding to querying condition is as follows: inquiry number is 400, whether be yes, the time-out time that can inquire in upper table now according to this condition should be set to 840ms if having filtercondition to be no whether sequence.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
According to embodiments of the invention, provide a kind of data processing equipment of accessing time-out.It should be noted that, the data processing method of the access time-out that the embodiment of the present invention provides can be performed by the data processing equipment of the access time-out of the embodiment of the present invention, and the data processing equipment of the access time-out of the embodiment of the present invention also may be used for the data processing method of the access time-out performing the embodiment of the present invention.
Fig. 2 is the schematic diagram of the data processing equipment of access time-out according to the embodiment of the present invention.As shown in Figure 2, this device comprises: the first acquiring unit 10, second acquisition unit 20 and the first determining unit 30.
First acquiring unit 10 is for obtaining the querying attributes of request of access, and querying attributes is for characterizing the type of request of access.
It should be noted that, in embodiments of the present invention, request of access can be the request of access of accessing database, and such as, it can be SQL query request.Querying attributes can comprise one or more, the present invention does not do any restriction to it, such as, its can be data query number attribute, whether there is the attribute of filtercondition, whether have the attribute etc. of sequence, accordingly, the type characterizing request of access can be the request of data query number respectively, whether has the request of filtercondition, whether have the request etc. of sequence.
Due to data query number, whether there is filtercondition and whether have sequence etc. to be the principal element affecting query time, therefore, obtain request of access querying attributes after, can mainly using querying attributes corresponding for above-mentioned several key element as the initial conditions determining time-out time.
Second acquisition unit 20 is for obtaining the corresponding relation of querying attributes and time-out time, and time-out time is the time exceeding default access latency.
Time-out time is the time exceeding default access latency, also, after client initiates request of access, and the time-out time of database response.During enforcement, time-out time corresponding to each querying attributes can be pre-determined according to historical query record or experimental data, and the corresponding relation of the time-out time obtained and each querying attributes and corresponding time-out time is stored in overtime form, use in order to during actual access database.
First determining unit 30 is for the actual time-out time according to corresponding relation determination request of access.
During enforcement, when needing the time-out time determining an inquiry request, first can obtain each querying attributes of this inquiry request, i.e. each querying condition, and in above-mentioned overtime form, search corresponding time-out time according to these querying conditions, and the actual time-out time using the time-out time of this correspondence as request of access, also, the time-out time of actual queries.
Pass through the embodiment of the present invention, due to can according to the querying attributes of each request of access, dynamically determine a time-out time for data base querying, thus as far as possible many inquiries can be allowed not overtime, and avoid consuming system resource excessively, reach and determine that time-out time is to meet the effect of the requirement of different querying conditions dynamically. as far as possible
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the first judging unit.First judging unit is used for before the corresponding relation obtaining querying attributes and time-out time, judges that whether querying attributes is the querying attributes of discretize, wherein, if judge that querying attributes is the querying attributes of discretize, then performs the function of second acquisition unit; If judge that querying attributes is not the querying attributes of discretize, then first sliding-model control is carried out to querying attributes, then perform the function of second acquisition unit.
Because querying attributes can be divided into continuous type querying attributes and discrete type querying attributes according to inquiry meaning, also be, determine that the initial conditions of time-out time can be divided into two classes: continuous type initial conditions and discrete type initial conditions, such as, the attribute of data query number is continuous type querying attributes, and whether there is the attribute of filtration and whether have the attribute of sequence to be discrete type querying attributes, thus when implementing, for each continuous type initial conditions, need first by it discretize, re-use the initial conditions after discretize in above-mentioned overtime form, search corresponding time-out time, and using this time-out time found as the time-out time of actual queries, also be, final time-out time.
Wherein, the treatment scheme of discretize is as follows: first determine the maximal value that this continuous type initial conditions is inquired about in systems in which and minimum value, gather some points according to predetermined interval between a minimum value and a maximum value again, put the discrete form of corresponding value as this continuity initial conditions with these.
Further preferably, in embodiments of the present invention, the querying attributes of discretize can comprise: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of the first querying attributes and the second querying attributes, like this, this data processing equipment can also comprise: the second determining unit.Second determining unit may be used for by determining the time-out time corresponding with the querying attributes of discretize with lower device, and wherein, the second determining unit can have: the first enquiry module, the first logging modle and the first determination module.First enquiry module is used for carrying out actual queries according to the query composition attribute of request of access; First logging modle is used for the time-out time of record access request in actual queries; And first determination module be used for the time-out time of request of access in actual queries as the time-out time corresponding with the querying attributes of discretize.
Preferably, in embodiments of the present invention, the querying attributes of discretize can comprise: the first querying attributes and the second querying attributes, and query composition attribute is the querying attributes of the combination of the first querying attributes and the second querying attributes, like this, this data processing equipment can also comprise: the 3rd determining unit.3rd determining unit is used for by determining the time-out time corresponding with the querying attributes of discretize with lower device, and wherein, the 3rd determining unit can have: the second enquiry module, the second logging modle, computing module and the second determination module.Second enquiry module is used for carrying out repeatedly actual queries according to the query composition attribute of request of access; Second logging modle is used for the repeatedly time-out time of record access request in actual queries; Computing module is used for being averaging the time to the repeatedly time-out time of request of access in actual queries; And second determination module be used for using averaging time as the time-out time corresponding with the querying attributes of discretize.
During enforcement, can first obtain each initial conditions, for being left intact of initial conditions of inherently discretize, then first sliding-model control is done for the initial conditions of continuous type time itself, obtain the initial conditions of discrete type, then the initial conditions of these discrete types is combined, thus structure inquiry request carries out actual queries, and record the time-out time of each group polling, and calculate the average of these time-out times, to expend time in t using this average as the typical query of this group polling condition, also be, the time-out time corresponding with the querying attributes of discretize.
Further, an overtime Coefficient m can also be determined, the time-out time according to each group polling condition of following formulae discovery: T=mt.After calculating is complete, records the time-out time of each group polling condition, and record result is stored in an overtime form.
Because the time-out time obtained according to above-mentioned enforcement may be very large, and then cause system resource to be consumed excessively, therefore, in order to avoid the time-out time of the SQL of dynamic calculation is excessive, first appointment max-timeout time Tmax is needed, if the time-out time of the SQL of dynamic calculation is no more than this max-timeout time Tmax, then using the time-out time of the SQL of dynamic calculation as final actual time-out time, otherwise, then using the max-timeout time Tmax that specifies as final actual time-out time.
It should be noted that, in the above embodiment of the present invention, 3rd determining unit and the second determining unit can be same unit, and accordingly, the first enquiry module, the first logging modle and the first determination module can be respectively the second enquiry module, the second logging modle and the second determination module.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the 3rd acquiring unit, the second judging unit,
3rd acquiring unit, for after according to the actual time-out time of corresponding relation determination request of access, obtains the max-timeout time preset;
Second judging unit, for judging whether actual time-out time is greater than the max-timeout time;
4th determines form unit, for when judging that actual time-out time is greater than the max-timeout time, using the max-timeout time as final actual time-out time; And
5th determining unit, for when judging that actual time-out time is not more than the max-timeout time, using actual time-out time as final actual time-out time.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. access a data processing method for time-out, it is characterized in that, comprising:
Obtain the querying attributes of request of access, described querying attributes is for characterizing the type of described request of access;
Obtain the corresponding relation of described querying attributes and time-out time, described time-out time is the time exceeding default access latency; And
The actual time-out time of described request of access is determined according to described corresponding relation.
2. the data processing method of access time-out according to claim 1, is characterized in that, before the corresponding relation obtaining described querying attributes and time-out time, described data processing method also comprises:
Judge that whether described querying attributes is the querying attributes of discretize,
Wherein, if judge that described querying attributes is the querying attributes of described discretize, then perform the step of the corresponding relation obtaining described querying attributes and time-out time; If judge that described querying attributes is not the querying attributes of described discretize, then first sliding-model control is carried out to described querying attributes, then perform the step of the corresponding relation obtaining described querying attributes and time-out time.
3. the data processing method of access time-out according to claim 2, it is characterized in that, the querying attributes of described discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of described first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of described discretize by the following method:
Actual queries is carried out according to the described query composition attribute of described request of access;
Record the time-out time of described request of access in actual queries; And
Using the time-out time of described request of access in actual queries as the time-out time corresponding with the querying attributes of described discretize.
4. the data processing method of access time-out according to claim 2, it is characterized in that, the querying attributes of described discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of described first querying attributes and the second querying attributes, determines the time-out time corresponding with the querying attributes of described discretize by the following method:
Repeatedly actual queries is carried out according to the described query composition attribute of described request of access;
Record the repeatedly time-out time of described request of access in actual queries;
Time is averaging to the repeatedly time-out time of described request of access in actual queries; And
Using described averaging time as the time-out time corresponding with the querying attributes of described discretize.
5. the data processing method of access time-out according to claim 1, it is characterized in that, after the actual time-out time determining described request of access according to described corresponding relation, described data processing method also comprises:
Obtain the max-timeout time preset;
Judge whether described actual time-out time is greater than the described max-timeout time;
If judge that described actual time-out time is greater than the described max-timeout time, then using the described max-timeout time as final actual time-out time; And
If judge that described actual time-out time is not more than the described max-timeout time, then using described actual time-out time as described actual time-out time finally.
6. access a data processing equipment for time-out, it is characterized in that, comprising:
First acquiring unit, for obtaining the querying attributes of request of access, described querying attributes is for characterizing the type of described request of access;
Second acquisition unit, for obtaining the corresponding relation of described querying attributes and time-out time, described time-out time is the time exceeding default access latency; And
First determining unit, for determining the actual time-out time of described request of access according to described corresponding relation.
7. the data processing equipment of access time-out according to claim 6, it is characterized in that, described data processing equipment also comprises:
First judging unit, for before the corresponding relation obtaining described querying attributes and time-out time, judges that whether described querying attributes is the querying attributes of discretize,
Wherein, if judge that described querying attributes is the querying attributes of described discretize, then the function of described second acquisition unit is performed; If judge that described querying attributes is not the querying attributes of described discretize, then first sliding-model control is carried out to described querying attributes, then perform the function of described second acquisition unit.
8. the data processing equipment of access time-out according to claim 7, it is characterized in that, the querying attributes of described discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of described first querying attributes and the second querying attributes, described data processing equipment also comprises: the second determining unit, for by determining the time-out time corresponding with the querying attributes of described discretize with lower device, wherein, described second determining unit has:
First enquiry module, carries out actual queries for the described query composition attribute according to described request of access;
First logging modle, for recording the time-out time of described request of access in actual queries; And
First determination module, for using the time-out time of described request of access in actual queries as the time-out time corresponding with the querying attributes of described discretize.
9. the data processing equipment of access time-out according to claim 7, it is characterized in that, the querying attributes of described discretize comprises: the first querying attributes and the second querying attributes, query composition attribute is the querying attributes of the combination of described first querying attributes and the second querying attributes, described data processing equipment also comprises: the 3rd determining unit, for by determining the time-out time corresponding with the querying attributes of described discretize with lower device, wherein, described 3rd determining unit has:
Second enquiry module, carries out repeatedly actual queries for the described query composition attribute according to described request of access;
Second logging modle, for recording the repeatedly time-out time of described request of access in actual queries;
Computing module, for being averaging the time to the repeatedly time-out time of described request of access in actual queries; And
Second determination module, for using described averaging time as the time-out time corresponding with the querying attributes of described discretize.
10. the data processing equipment of access time-out according to claim 6, it is characterized in that, described data processing equipment also comprises:
3rd acquiring unit, for after the actual time-out time determining described request of access according to described corresponding relation, obtains the max-timeout time preset;
Second judging unit, for judging whether described actual time-out time is greater than the described max-timeout time;
4th determining unit, for when judging that described actual time-out time is greater than the described max-timeout time, using the described max-timeout time as final actual time-out time; And
5th determining unit, for when judging that described actual time-out time is not more than the described max-timeout time, using described actual time-out time as described actual time-out time finally.
CN201410779513.7A 2014-12-15 2014-12-15 Access the data processing method and device of time-out Active CN104462447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410779513.7A CN104462447B (en) 2014-12-15 2014-12-15 Access the data processing method and device of time-out

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410779513.7A CN104462447B (en) 2014-12-15 2014-12-15 Access the data processing method and device of time-out

Publications (2)

Publication Number Publication Date
CN104462447A true CN104462447A (en) 2015-03-25
CN104462447B CN104462447B (en) 2018-04-03

Family

ID=52908482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410779513.7A Active CN104462447B (en) 2014-12-15 2014-12-15 Access the data processing method and device of time-out

Country Status (1)

Country Link
CN (1) CN104462447B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543988A (en) * 2018-11-16 2019-03-29 中国银行股份有限公司 The method, apparatus and storage medium of optimization transaction overtime threshold
CN110166572A (en) * 2019-06-06 2019-08-23 北京达佳互联信息技术有限公司 Network processing method, device, electronic equipment and storage medium
CN110162384A (en) * 2019-04-19 2019-08-23 深圳壹账通智能科技有限公司 Time-out time dynamic adjusting method and system based on Redis distributed lock
CN110333942A (en) * 2019-07-05 2019-10-15 中国工商银行股份有限公司 Electronic equipment and the task processing method executed by electronic equipment
CN110795367A (en) * 2019-10-23 2020-02-14 北京达佳互联信息技术有限公司 Storage access control method and device
CN112002069A (en) * 2020-08-19 2020-11-27 成都川衡科技有限公司 Shared mobile phone charging equipment based on Internet of things and charging method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1151551A (en) * 1995-10-10 1997-06-11 国际商业机器公司 System and method for dynamically varying low level file system operation timeout parameters in network systems of variable bandwidth
CN1863033A (en) * 2005-05-14 2006-11-15 腾讯科技(深圳)有限公司 Method for obtaining network time over retransmission space and data transmission method in network
CN1882933A (en) * 2003-12-31 2006-12-20 思科技术公司 Dynamic timeout in a client-server system
CN101459496A (en) * 2008-12-18 2009-06-17 北京大学 Regulating method and apparatus for timeout interval for messages
US20090313198A1 (en) * 2008-06-17 2009-12-17 Yutaka Kudo Methods and systems for performing root cause analysis

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1151551A (en) * 1995-10-10 1997-06-11 国际商业机器公司 System and method for dynamically varying low level file system operation timeout parameters in network systems of variable bandwidth
CN1882933A (en) * 2003-12-31 2006-12-20 思科技术公司 Dynamic timeout in a client-server system
CN1863033A (en) * 2005-05-14 2006-11-15 腾讯科技(深圳)有限公司 Method for obtaining network time over retransmission space and data transmission method in network
US20090313198A1 (en) * 2008-06-17 2009-12-17 Yutaka Kudo Methods and systems for performing root cause analysis
CN101459496A (en) * 2008-12-18 2009-06-17 北京大学 Regulating method and apparatus for timeout interval for messages

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543988A (en) * 2018-11-16 2019-03-29 中国银行股份有限公司 The method, apparatus and storage medium of optimization transaction overtime threshold
CN110162384A (en) * 2019-04-19 2019-08-23 深圳壹账通智能科技有限公司 Time-out time dynamic adjusting method and system based on Redis distributed lock
WO2020211382A1 (en) * 2019-04-19 2020-10-22 深圳壹账通智能科技有限公司 Dynamic timeout period adjustment method and system for redis-based distributed lock
CN110166572A (en) * 2019-06-06 2019-08-23 北京达佳互联信息技术有限公司 Network processing method, device, electronic equipment and storage medium
CN110333942A (en) * 2019-07-05 2019-10-15 中国工商银行股份有限公司 Electronic equipment and the task processing method executed by electronic equipment
CN110795367A (en) * 2019-10-23 2020-02-14 北京达佳互联信息技术有限公司 Storage access control method and device
CN112002069A (en) * 2020-08-19 2020-11-27 成都川衡科技有限公司 Shared mobile phone charging equipment based on Internet of things and charging method thereof

Also Published As

Publication number Publication date
CN104462447B (en) 2018-04-03

Similar Documents

Publication Publication Date Title
CN104462447A (en) Access timeout data processing method and device
CN110535777B (en) Access request control method and device, electronic equipment and readable storage medium
US9594780B1 (en) Database system with user-directed application-side control of data movement among storage tiers
EP2705433B1 (en) Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device
US20080133447A1 (en) Multi-partition query governor in a computer database system
CN109240876B (en) Instance monitoring method, computer-readable storage medium, and terminal device
US20100162251A1 (en) System, method, and computer-readable medium for classifying problem queries to reduce exception processing
CN110928739B (en) Process monitoring method and device and computing equipment
CN106713028A (en) Service degradation method and apparatus, and distributed task scheduling system
CN110807145A (en) Query engine acquisition method, device and computer-readable storage medium
US9483377B2 (en) Apparatus and method for enabling a user to monitor skew of resource usage across different components of a large database system
CN113010315A (en) Resource allocation method, resource allocation device and computer-readable storage medium
US8973000B2 (en) Determining multiprogramming levels
EP3779720B1 (en) Transaction processing method and system, and server
CN102904946B (en) Method and device for managing nodes in cluster
CN111159131A (en) Performance optimization method, device, equipment and computer readable storage medium
CN112306383B (en) Method for executing operation, computing node, management node and computing equipment
WO2015150792A1 (en) An improved database access control method and system
CN107682228A (en) A kind of method for monitoring state and its device of OpenStack clusters
CN112711710A (en) Tracking method, system, server and storage medium for multi-number terminal
CN108780452A (en) A kind of storing process processing method and processing device
CN110377418A (en) CPU multicore utilization rate optimized treatment method and device for single server
KR100906449B1 (en) Database tool identifying apparatus and method thereof
CN111221847B (en) Monitoring data storage method, device and computer readable storage medium
JP2001142898A (en) Execution propriety judging method of inquiry processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Access timeout data processing method and device

Effective date of registration: 20190531

Granted publication date: 20180403

Pledgee: Shenzhen Black Horse World Investment Consulting Co.,Ltd.

Pledgor: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Registration number: 2019990000503

PE01 Entry into force of the registration of the contract for pledge of patent right
CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
PP01 Preservation of patent right

Effective date of registration: 20240604

Granted publication date: 20180403

PP01 Preservation of patent right