CN107545053A - A kind of group system caching query method and apparatus - Google Patents

A kind of group system caching query method and apparatus Download PDF

Info

Publication number
CN107545053A
CN107545053A CN201710734846.1A CN201710734846A CN107545053A CN 107545053 A CN107545053 A CN 107545053A CN 201710734846 A CN201710734846 A CN 201710734846A CN 107545053 A CN107545053 A CN 107545053A
Authority
CN
China
Prior art keywords
interface
time
response time
average response
timed task
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
CN201710734846.1A
Other languages
Chinese (zh)
Other versions
CN107545053B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710734846.1A priority Critical patent/CN107545053B/en
Publication of CN107545053A publication Critical patent/CN107545053A/en
Application granted granted Critical
Publication of CN107545053B publication Critical patent/CN107545053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of group system caching query method and apparatus, including:Determine the average response time of each interface in timed task;If the average response time that interface be present is more than setting time threshold value, when timed task is polled to interface for the first time, the current request state of saving interface;When timed task is polled to interface for the second time, if interface does not receive the returned data of bottom order, cancel this requesting query.The above-mentioned caching query method provided using the application, period of reservation of number can further be reduced, lift Consumer's Experience, interface time-out in traditional buffering scheme can fundamentally be avoided, bottom order is caused to block the problem of ceaselessly waiting, the stability and reliability of distributed cluster system are improved, improves the competitiveness of storage product.

Description

A kind of group system caching query method and apparatus
Technical field
The present invention relates to distributed memory system field, more particularly to a kind of group system caching query method and sets It is standby.
Background technology
In distributed storage management system, in order to improve systematic function, effective solutions to be delayed, traditional such as user are reduced Certainly method is to add caching technology, and the request that time-consuming is put into server timed task, is regularly asked from bottom order line Data, and data persistence, when foreground request, data that persistence is crossed return to foreground, and no longer direct request command OK.
Although period of reservation of number can be greatly decreased in this cache mode, bottom is asked without solving timed task In the problem of command timeout, i.e. timing request bottom command interface, having part of interface, time-consuming, consumption system resource.And service end Mechanism is not perceived, bottom order is sent by the request frequency set always, causes bottom command process to be blocked quickly, can not Respond any request.
Therefore, how to solve the problems, such as because bottom order is because cannot respond to and process is blocked, be those skilled in the art urgently Technical problem to be solved.
The content of the invention
In view of this, it is an object of the invention to provide a kind of group system caching query method and apparatus, can avoid The problem of bottom order is blocked because cannot respond to.Its concrete scheme is as follows:
A kind of group system caching query method, including:
Determine the average response time of each interface in timed task;
If the average response time that interface be present is more than setting time threshold value, it is polled to for the first time in the timed task During the interface, the current request state of the interface is preserved;
When the timed task is polled to the interface for the second time, if the interface does not receive the return number of bottom order According to then cancelling this requesting query.
Preferably, it is true using following manner in above-mentioned group system caching query method provided in an embodiment of the present invention Determine the average response time of each interface in timed task:
Count the response time of total interface in the timed task;
Sampling, the average response time of each interface is extrapolated automatically.
Preferably, in above-mentioned group system caching query method provided in an embodiment of the present invention, if the flat of interface be present The equal response time is more than setting time threshold value, then when the timed task is polled to the interface for the first time, is connect described in preservation The current request state of mouth, is specifically included:
It is easy overtime interface by the interface flag if the average response time that interface be present is more than setting time threshold value;
In easy overtime interface described in the timed task first time poll, the execution of the easily overtime interface is recorded automatically State;
If first time end of polling(EOP), the easily overtime interface does not receive the returned data of bottom order yet, by described in preservation Easy overtime interface is to be carrying out state.
Preferably, in above-mentioned group system caching query method provided in an embodiment of the present invention, it is determined that timed task In each interface average response time while, in addition to:
According to the average response time, the timing request frequency of each interface of automated setting;
According to the timing request frequency, each interface is polled.
The embodiment of the present invention additionally provides a kind of group system caching query equipment, including:
Response time determining module, for determining the average response time of each interface in timed task;
Solicited status preserving module, if being more than setting time threshold value for the average response time of interface be present, in institute Timed task is stated for the first time when being polled to the interface, preserves the current request state of the interface;
Requesting query cancels module, for when the timed task is polled to the interface for the second time, if the interface The returned data of bottom order is not received, then cancels this requesting query.
Preferably, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, the response time is true Cover half block specifically includes:
Statistic unit, for counting the response time of total interface in the timed task;
Projected unit, for sampling, the average response time of each interface is extrapolated automatically.
Preferably, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, the solicited status is protected Storing module specifically includes:
Indexing unit, if being more than setting time threshold value for the average response time of interface be present, by the interface flag For easy overtime interface;
Recording unit is described easy in easy overtime interface described in the timed task first time poll, recording automatically The execution state of overtime interface;
Storage unit, if for first time end of polling(EOP), the easily overtime interface does not receive the return number of bottom order yet According to will preserve the easily overtime interface is to be carrying out state.
Preferably, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, in addition to:
Frequency setting module, for according to the average response time, the timing request frequency of each interface of automated setting Rate;According to the timing request frequency, each interface is polled.
A kind of group system caching query method and apparatus provided by the present invention, including:Determine each in timed task The average response time of interface;If the average response time that interface be present is more than setting time threshold value, in timed task first It is secondary when being polled to interface, the current request state of saving interface;When timed task is polled to interface for the second time, if interface is not received To the returned data of bottom order, then cancel this requesting query., can using above-mentioned caching query method provided by the invention Period of reservation of number is further reduced, lifts Consumer's Experience, can fundamentally avoid interface time-out in traditional buffering scheme, Cause bottom order to block the problem of ceaselessly waiting, improve the stability and reliability of distributed cluster system, improve storage The competitiveness of product.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is group system caching query method flow diagram provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
The present invention provides a kind of group system caching query method, as shown in figure 1, comprising the following steps:
S101, the average response time for determining each interface in timed task;
If S102, the average response time that interface be present are more than setting time threshold value, in timed task first time poll During to interface, the current request state of saving interface;
S103, when timed task is polled to interface for the second time, if interface does not receive the returned data of bottom order, take Disappear this requesting query.
In above-mentioned group system caching query method provided in an embodiment of the present invention, it is first determined each in timed task The average response time of interface;If the average response time that interface be present is more than setting time threshold value, in timed task first It is secondary when being polled to interface, the current request state of saving interface;When timed task is polled to interface for the second time, if interface is not received To the returned data of bottom order, then cancel this requesting query.Using above-mentioned caching query method, use can be further reduced The family stand-by period, Consumer's Experience is lifted, can fundamentally avoid interface time-out in traditional buffering scheme, cause bottom order The problem of ceaselessly waiting is blocked, improves the stability and reliability of distributed cluster system, improves the competitiveness of storage product.
Further, in the specific implementation, in above-mentioned group system caching query method provided in an embodiment of the present invention, The average response time of each interface in timed task is determined using following manner:
First, the response time of total interface in timed task is counted;
Then it is sampled, extrapolates the average response time of each interface automatically.
Further, in the specific implementation, in above-mentioned group system caching query method provided in an embodiment of the present invention, If the average response time that step S102 has interface is more than setting time threshold value, interface is polled to for the first time in timed task When, the current request state of saving interface, specifically it may comprise steps of:
First, it is easy overtime interface by interface flag if the average response time that interface be present is more than setting time threshold value;
Then, in timed task first time poll easily overtime interface, the execution state of automatic record easily overtime interface;
If first time end of polling(EOP), easy overtime interface does not receive the returned data of bottom order yet, will preserve easy time-out and connects Mouth is to be carrying out state.
So by the keeping records interface polls state that time-consuming, these interfaces that time-consuming are polled to every time (i.e. easily Overtime interface), judge that last time inquires about state, if there is no returning result also, just terminate this poll, avoid in bottom order Can not be in the case of returned data, service end still sends inquiry request, accelerates the problem of order line process enters stuck state, Improve the stability of product.
In the specific implementation, in above-mentioned group system caching query method provided in an embodiment of the present invention, it is determined that fixed When task in each interface average response time while, can also comprise the following steps:
According to average response time, the timing request frequency of each interface of automated setting;
According to timing request frequency, each interface is polled.
So by calculating the average response time of interface automatically, intelligence formulates each interface timing request frequency, greatly Improve Consumer's Experience.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of group system caching query equipment, due to this The principle that equipment solves problem is similar to a kind of foregoing group system caching query method, therefore the implementation of the equipment may refer to The implementation of group system caching query method, repeat part and repeat no more.
In the specific implementation, group system caching query equipment provided in an embodiment of the present invention, is specifically included:
Response time determining module, for determining the average response time of each interface in timed task;
Solicited status preserving module, if being more than setting time threshold value for the average response time of interface be present, fixed When task for the first time when being polled to interface, the current request state of saving interface;
Requesting query cancels module, for when timed task is polled to interface for the second time, if interface does not receive bottom life The returned data of order, then cancel this requesting query.
In above-mentioned group system caching query equipment provided in an embodiment of the present invention, it can be connect by what is extrapolated automatically Average time of mouthful response, and by the keeping records interface polls state that time-consuming, it is polled to these every time time-consuming Interface, judge that last time inquires about state, if there is no returning result also, just terminate this poll, it is slow fundamentally to avoid tradition Interface time-out in scheme is deposited, causes bottom order to block the problem of ceaselessly waiting, improves the stability of distributed cluster system And reliability, improve the competitiveness for storing product.
Further, in the specific implementation, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, Response time determining module can specifically include:
Statistic unit, for counting the response time of total interface in timed task;
Projected unit, for sampling, the average response time of each interface is extrapolated automatically.
Further, in the specific implementation, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, Solicited status preserving module can specifically include:
Indexing unit, it is easy by interface flag if being more than setting time threshold value for the average response time of interface be present Overtime interface;
Recording unit, in timed task first time poll easily overtime interface, automatic record easily overtime interface to be held Row state;
Storage unit, if for first time end of polling(EOP), easy overtime interface does not receive the returned data of bottom order yet, will It is to be carrying out state to preserve easily overtime interface.
In addition, in the specific implementation, in above-mentioned group system caching query equipment provided in an embodiment of the present invention, may be used also With including:
Frequency setting module, for according to average response time, the timing request frequency of each interface of automated setting;Root According to timing request frequency, each interface is polled.
A kind of group system caching query method and apparatus provided in an embodiment of the present invention, including:Determine in timed task The average response time of each interface;If the average response time that interface be present is more than setting time threshold value, in timed task When being polled to interface for the first time, the current request state of saving interface;When timed task is polled to interface for the second time, if interface The returned data of bottom order is not received, then cancels this requesting query.Using above-mentioned caching query method provided by the invention, Period of reservation of number can be further reduced, Consumer's Experience is lifted, can fundamentally avoid interface in traditional buffering scheme Time-out, cause bottom order to block the problem of ceaselessly waiting, improve the stability and reliability of distributed cluster system, improve Store the competitiveness of product.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or equipment including a series of elements not only include that A little key elements, but also the other element including being not expressly set out, or also include for this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged Except other identical element in the process including the key element, method, article or equipment being also present.
Group system caching query method and apparatus provided by the present invention is described in detail above, herein should The principle and embodiment of the present invention are set forth with specific case, the explanation of above example is only intended to help and managed Solve the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, There will be changes in embodiment and application, in summary, this specification content should not be construed as to this hair Bright limitation.

Claims (8)

  1. A kind of 1. group system caching query method, it is characterised in that including:
    Determine the average response time of each interface in timed task;
    If the average response time that interface be present is more than setting time threshold value, it is polled to for the first time in the timed task described During interface, the current request state of the interface is preserved;
    When the timed task is polled to the interface for the second time, if the interface does not receive the returned data of bottom order, Then cancel this requesting query.
  2. 2. group system caching query method according to claim 1, it is characterised in that timing is determined using following manner The average response time of each interface in task:
    Count the response time of total interface in the timed task;
    Sampling, the average response time of each interface is extrapolated automatically.
  3. 3. group system caching query method according to claim 2, it is characterised in that if the average response of interface be present Time is more than setting time threshold value, then when the timed task is polled to the interface for the first time, preserves working as the interface Preceding solicited status, is specifically included:
    It is easy overtime interface by the interface flag if the average response time that interface be present is more than setting time threshold value;
    In easy overtime interface described in the timed task first time poll, the execution shape of the easily overtime interface is recorded automatically State;
    If first time end of polling(EOP), the easily overtime interface does not receive the returned data of bottom order yet, will preserve described easily super When interface to be carrying out state.
  4. 4. the group system caching query method according to any one of claims 1 to 3, it is characterised in that it is determined that timing In task while the average response time of each interface, in addition to:
    According to the average response time, the timing request frequency of each interface of automated setting;
    According to the timing request frequency, each interface is polled.
  5. A kind of 5. group system caching query equipment, it is characterised in that including:
    Response time determining module, for determining the average response time of each interface in timed task;
    Solicited status preserving module, if being more than setting time threshold value for the average response time of interface be present, described fixed When task for the first time when being polled to the interface, preserve the current request state of the interface;
    Requesting query cancels module, for when the timed task is polled to the interface for the second time, if the interface is not received To the returned data of bottom order, then cancel this requesting query.
  6. 6. group system caching query equipment according to claim 5, it is characterised in that the response time determining module Specifically include:
    Statistic unit, for counting the response time of total interface in the timed task;
    Projected unit, for sampling, the average response time of each interface is extrapolated automatically.
  7. 7. group system caching query equipment according to claim 6, it is characterised in that the solicited status preserving module Specifically include:
    Indexing unit, it is easy by the interface flag if being more than setting time threshold value for the average response time of interface be present Overtime interface;
    Recording unit, in easy overtime interface described in the timed task first time poll, recording the easily time-out automatically The execution state of interface;
    Storage unit, if for first time end of polling(EOP), the easily overtime interface does not receive the returned data of bottom order yet, will The easily overtime interface is preserved to be carrying out state.
  8. 8. the group system caching query equipment according to any one of claim 5 to 7, it is characterised in that also include:
    Frequency setting module, for according to the average response time, the timing request frequency of each interface of automated setting;Root According to the timing request frequency, each interface is polled.
CN201710734846.1A 2017-08-24 2017-08-24 Cluster system cache query method and device Active CN107545053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710734846.1A CN107545053B (en) 2017-08-24 2017-08-24 Cluster system cache query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710734846.1A CN107545053B (en) 2017-08-24 2017-08-24 Cluster system cache query method and device

Publications (2)

Publication Number Publication Date
CN107545053A true CN107545053A (en) 2018-01-05
CN107545053B CN107545053B (en) 2021-01-22

Family

ID=60958850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710734846.1A Active CN107545053B (en) 2017-08-24 2017-08-24 Cluster system cache query method and device

Country Status (1)

Country Link
CN (1) CN107545053B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769017A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Data request processing method and device, storage medium and processor
CN111552579A (en) * 2020-03-02 2020-08-18 成都新潮传媒集团有限公司 Method and device for remotely scheduling Jenkins
CN111858086A (en) * 2020-06-15 2020-10-30 福建天泉教育科技有限公司 Queue timeout processing method in request task processing and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862576A (en) * 2005-08-19 2006-11-15 华为技术有限公司 Method for obtaining timing task carrying-out time
CN101562543A (en) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 Cache data processing method and processing system and device thereof
CN101859260A (en) * 2010-05-14 2010-10-13 中国科学院计算技术研究所 Timer management device and management method for operating system
CN101901164A (en) * 2009-05-27 2010-12-01 北京金山软件有限公司 Time plan scheduler module and method
CN103812709A (en) * 2014-02-28 2014-05-21 上海斐讯数据通信技术有限公司 Light ray road administration end system and data statistics method thereof
CN105630585A (en) * 2015-12-21 2016-06-01 北京奇虎科技有限公司 Periodic task processing method and apparatus
CN106844214A (en) * 2017-01-23 2017-06-13 北京思特奇信息技术股份有限公司 A kind of automatic method and device that sectional drawing is carried out to page rendering

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862576A (en) * 2005-08-19 2006-11-15 华为技术有限公司 Method for obtaining timing task carrying-out time
CN101562543A (en) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 Cache data processing method and processing system and device thereof
EP2435916A1 (en) * 2009-05-25 2012-04-04 Alibaba Group Holding Limited Cache data processing using cache cluster with configurable modes
CN101901164A (en) * 2009-05-27 2010-12-01 北京金山软件有限公司 Time plan scheduler module and method
CN101859260A (en) * 2010-05-14 2010-10-13 中国科学院计算技术研究所 Timer management device and management method for operating system
CN103812709A (en) * 2014-02-28 2014-05-21 上海斐讯数据通信技术有限公司 Light ray road administration end system and data statistics method thereof
CN105630585A (en) * 2015-12-21 2016-06-01 北京奇虎科技有限公司 Periodic task processing method and apparatus
CN106844214A (en) * 2017-01-23 2017-06-13 北京思特奇信息技术股份有限公司 A kind of automatic method and device that sectional drawing is carried out to page rendering

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769017A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Data request processing method and device, storage medium and processor
CN111552579A (en) * 2020-03-02 2020-08-18 成都新潮传媒集团有限公司 Method and device for remotely scheduling Jenkins
CN111858086A (en) * 2020-06-15 2020-10-30 福建天泉教育科技有限公司 Queue timeout processing method in request task processing and storage medium
CN111858086B (en) * 2020-06-15 2023-07-21 福建天泉教育科技有限公司 Processing method and storage medium for queue timeout in request task processing

Also Published As

Publication number Publication date
CN107545053B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN107888428A (en) A kind of bandwidth adjusting method, device, equipment and readable storage medium storing program for executing
CN107545053A (en) A kind of group system caching query method and apparatus
CN101393527B (en) Centralized polling service
CN104219235B (en) A kind of distributed transaction requesting method and device
US20120198254A1 (en) Capping power consumption in a data storage system
US20140101470A1 (en) Idle duration reporting for power management
US20190250836A1 (en) Data storage, reading, and cleansing method and device, and cloud storage system
US20140258223A1 (en) Adaptive high-performance database redo log synchronization
WO2021093365A1 (en) Gpu video memory management control method and related device
CN106034137A (en) Intelligent scheduling method for distributed system, and distributed service system
WO2020000668A1 (en) Server cluster-based task execution method and server
CN101394347B (en) Service data management method and system
CN107766160A (en) Queue message processing method and terminal device
CN106293523A (en) A kind of I/O Request response method to non-volatile memories and device
CN101827120A (en) Cluster storage method and system
CN104199729B (en) A kind of method for managing resource and system
CN107798111A (en) A kind of method that data are in high volume exported in distributed environment
EP2776941B1 (en) Managing capacity in a data center by suspending tenants
CN101170433A (en) Database storage method
CN110493353A (en) Communication means, device and server
CN115794446B (en) Message processing method and device, electronic equipment and storage medium
CN109189336A (en) A kind of storage system thread method of adjustment, system and electronic equipment and storage medium
WO2024051138A1 (en) Monitoring processing method, system and device for storage cluster interface, and storage medium
WO2020224218A1 (en) Hbase-based data writing method, system, device, and readable storage medium
CN114064226A (en) Resource coordination method and device for container cluster 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201202

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant