CN108183833A - A kind of response processing method, device and computer readable storage medium - Google Patents

A kind of response processing method, device and computer readable storage medium Download PDF

Info

Publication number
CN108183833A
CN108183833A CN201711225681.1A CN201711225681A CN108183833A CN 108183833 A CN108183833 A CN 108183833A CN 201711225681 A CN201711225681 A CN 201711225681A CN 108183833 A CN108183833 A CN 108183833A
Authority
CN
China
Prior art keywords
response
time
overtime
setting
database
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
CN201711225681.1A
Other languages
Chinese (zh)
Other versions
CN108183833B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201711225681.1A priority Critical patent/CN108183833B/en
Publication of CN108183833A publication Critical patent/CN108183833A/en
Application granted granted Critical
Publication of CN108183833B publication Critical patent/CN108183833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of response processing method, including:Client sets different durations;Judge whether the response in disparate databases business procession is overtime using the different durations of setting.The embodiment of the present invention additionally provides a kind of response processing unit and computer readable storage medium, by implementing said program, since client uses the different durations of setting to judge whether the response in disparate databases business procession is overtime respectively, therefore the corresponding timeout case during database connection foundation had not only been judged well, but also can judge the response timeout situation in database access process well.

Description

A kind of response processing method, device and computer readable storage medium
Technical field
The present invention relates to field of communication technology, espespecially a kind of response processing method, device and computer readable storage medium.
Background technology
The interaction of database MySQL clients and server-side can be divided into three processes:Handshake authentication process, database connect Connect the process of foundation and database access process.
Wherein, process is established in the connection of database and database access process is required for judging whether the response time is overtime, And the response time, whether time-out usually all judged according to this parameter of socketTimeout.
But since the average response time that process is established in database connection is small compared with the response time of database access process Very much, therefore, when socketTimeout is configured larger, the sound during database connection foundation can not be judged well Should whether overtime, and when socketTimeout is configured smaller, the response in database access process can not be judged well It is whether overtime.
Invention content
The main purpose of the embodiment of the present invention is to propose a kind of response processing method, device and computer-readable storage medium Matter can either judge whether the response during database connection foundation is overtime, and can judge database well well Whether the response in access process is overtime.
A kind of response processing method provided in an embodiment of the present invention, including:
Client sets different durations;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
The different durations using setting judge whether the response in disparate databases business procession is overtime, wrap It includes:
Judge whether the response during database connection foundation is overtime using the first duration of setting;
Judge whether is response in database access process using second durations different from first duration of setting Time-out.
It is described to judge whether the response during database connection foundation is overtime using the first duration of setting, including:
It obtains and the time for establishing request itself is connected to server-side transmission data library as at the first time;
Second time was obtained according to the first duration calculation of the first time and setting;
Judge whether the response during the database connection foundation is overtime according to second time.
It is described to judge whether the response during database connection foundation is overtime according to the second time, including:
Judge from before being reached in second time or whether receive that the server-side sends when reaching for institute State the reply that request is established in database connection;
If being directed to for the server-side transmission is all not received by from before being reached in second time and when reaching The reply of request is established in the database connection, determines the response timeout during the database connection foundation.
Whether the response that second durations different from the first duration set is used to judge in database access process Time-out, including:
Itself is obtained to the time of server-side transmission data library access request as the third time;
4th time was obtained according to the second duration calculation of the third time and setting;
Judge whether the response in the database access process is overtime according to the 4th time.
Whether the response judged according to the 4th time in database access process is overtime, including:
Judge from before being reached in the 4th time or whether receive that the server-side sends when reaching for institute State the reply of database access request;
If being directed to for the server-side transmission is all not received by from before being reached in the 4th time and when reaching The reply of the database access request determines the response timeout in the database access process.
A kind of response processing unit that the embodiment of the present invention also provides, which is characterized in that including:Processor, memory with And communication bus;
The communication bus is used to implement the connection communication between the processor and the memory;
The processor is used to perform the response processing routine stored in the memory, to realize following steps:
Different durations are set;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
The processor is additionally operable to perform the response processing routine stored in the memory, to realize following steps:
Judge whether the response during database connection foundation is overtime using the first duration of setting;
Judge whether is response in database access process using second durations different from first duration of setting Time-out.
The processor is additionally operable to perform the response processing routine, to implement following steps:
It obtains client and the time for establishing request is connected to server-side transmission data library as at the first time;
Second time was obtained according to the first time and first duration calculation;
Judge whether the response during the database connection foundation is overtime according to second time.
A kind of computer readable storage medium that the embodiment of the present invention also provides is stored with computer on the storage medium Program, the computer program realize following steps when being executed by processor:
Different durations are set;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
Response processing method, device and the computer readable storage medium that the embodiment of the present invention proposes, client are set not Same duration;Judge whether the response in disparate databases business procession is overtime using the different durations of setting.From the present invention The technical solution of offer is as it can be seen that since client uses the different durations of setting to judge disparate databases business processing mistake respectively Whether the response in journey is overtime, therefore has not only judged the corresponding timeout case during database connection foundation well, but also energy Enough response timeout situations judged well in database access process.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and forms the part of the application, this hair Bright illustrative embodiments and their description do not constitute improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 to realize the present invention the mobile terminal of each embodiment hardware configuration signal;
Fig. 2 is the schematic diagram of communication system for supporting to communicate between mobile terminal of the present invention;
Fig. 3 is a kind of flow diagram of response processing method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of another response processing method provided in an embodiment of the present invention;
Fig. 5 is the flow diagram of another response processing method provided in an embodiment of the present invention;
Fig. 6 is the flow diagram of another response processing method provided in an embodiment of the present invention;
Fig. 7 is the interaction schematic diagram of a kind of client provided in an embodiment of the present invention and server-side;
Fig. 8 is a kind of structure diagram for responding processing unit provided in an embodiment of the present invention.
Realization, functional characteristics and the advantage of purpose of the embodiment of the present invention will be done furtherly with reference to attached drawing in conjunction with the embodiments It is bright.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, using for representing that the suffix of such as " module ", " component " or " unit " of element is only Be conducive to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention can include such as mobile phone, tablet Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable The shiftings such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer The dynamic fixed terminals such as terminal and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special For moving except the element of purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware architecture diagram of its mobile terminal of each embodiment to realize the present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or fewer components, Either combine certain components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receive and send messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, handled to processor 110;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, it penetrates Frequency unit 101 can also communicate with network and other equipment by radio communication.Above-mentioned wireless communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, and must be configured into for mobile terminal is not belonging to, it completely can be according to need It to be omitted in the range for the essence for not changing invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 Formula, speech recognition mode, broadcast reception mode when under isotypes, it is that radio frequency unit 101 or WiFi module 102 are received or The audio data stored in memory 109 is converted into audio signal and exports as sound.Moreover, audio output unit 103 The relevant audio output of specific function performed with mobile terminal 100 can also be provided (for example, call signal receives sound, letter Breath receives sound etc.).Audio output unit 103 can include loud speaker, buzzer etc..
A/V input units 104 are used to receive audio or video signal.A/V input units 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the image data of video obtained in image capture mode by image capture apparatus (such as camera) carry out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, details are not described herein.
Display unit 106 is used to show by information input by user or be supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used Display panel 1061 is configured in forms such as (Organic Light-Emitting Diode, OLED).
User input unit 107 can be used for receiving the number inputted or character information and generation and the use of mobile terminal The key signals input that family is set and function control is related.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect user on it or neighbouring touch operation (for example user uses any suitable objects such as finger, stylus or attachment on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order that processor 110 is sent can be received and performed.It in addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc. It is one or more, do not limit herein specifically.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the component independent as two to realize the function that outputs and inputs of mobile terminal, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) can include wired or wireless head-band earphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for device of the connection with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part is stored in storage by running or performing the software program being stored in memory 109 and/or module and call Data in device 109 perform the various functions of mobile terminal and processing data, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
For the ease of understanding the embodiment of the present invention, below to the communications network system that is based on of mobile terminal of the present invention into Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system The LTE system united as universal mobile communications technology, the LTE system include the UE (User Equipment, the use that communicate connection successively Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers Such as the function of home location register (not shown) etc, and some are preserved in relation to use such as service features, data rates The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201 Address is distributed and other functions, and PCRF2036 is business data flow and the strategy of IP bearing resources and charging control strategic decision-making Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., it does not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Fig. 3 is a kind of response processing method provided in an embodiment of the present invention, as shown in figure 3, this method includes:
Step 301, client set different durations.
It should be noted that the different durations of client setting can be two durations or more than two durations, If two durations, then refer to one duration of setting and the duration for setting another different from the duration.
Step 302 judges whether the response in disparate databases business procession is overtime using the different durations of setting.
Specifically, client judges whether the response in data bank service processing procedure is overtime using the different durations of setting It refers to:Client judges whether the response in a kind of business procession of database is overtime, adopts using a duration of setting Judge whether the response in database another kind business procession is overtime with another duration of setting.
The response processing method that the embodiment of the present invention is provided, client set different durations;Using setting difference when Length judges whether the response in disparate databases business procession is overtime.From technical solution provided by the invention as it can be seen that due to Client judges whether the response in disparate databases business procession is overtime respectively using the different durations of setting, therefore Not only the corresponding timeout case during database connection foundation had been judged well, but also can judge database access well Response timeout situation in the process.
Fig. 4 is another response processing method provided in an embodiment of the present invention, as shown in figure 4, this method includes:
Step 401, client set different durations.
Step 402 judges whether the response during database connection foundation is overtime using the first duration of setting.
It should be noted that the first duration can be expressed as this parameter of socketTimeout.
It refers to establishing the process connecting with database specifically, process is established in database connection connection.
Step 403 judges response in database access process using second durations different from the first duration of setting It is whether overtime.
It should be noted that the second duration can be expressed as this parameter of initCommandSocketTimeout.
Specifically, database access process can include the addition of the query process, data-base recording of data-base recording The deletion process of journey and data-base recording.
The response processing method that the embodiment of the present invention is provided, client set different durations;Using setting difference when Length judges whether the response in disparate databases business procession is overtime.From technical solution provided by the invention as it can be seen that due to Client judges whether the response in disparate databases business procession is overtime respectively using the different durations of setting, therefore Not only the corresponding timeout case during database connection foundation had been judged well, but also can judge database access well Response timeout situation in the process.
Fig. 5 is another response processing method provided in an embodiment of the present invention, as shown in figure 5, this method includes:
Step 501, client set different durations.
Step 502 obtains the time for itself being connected to server-side transmission data library and establishing and asking as at the first time.
Step 503 obtained for the second time according to the first duration calculation of first time and setting.
Specifically, the second time plus the first duration calculation by obtaining at the first time.Database connection was established Response time in journey is shorter, and usually all in the range of 1S~3S, therefore the first duration could be provided as 3S.
Step 504 judges whether the response during database connection foundation is overtime according to the second time.
Step 505 obtains itself to the time of server-side transmission data library access request as the third time.
Specifically, the Sentence format of database access request can be sql sentences.
Step 506 obtained for the 4th time according to the second duration calculation of third time and setting.
Specifically, the 4th time was obtained by the third time plus the second duration calculation.Database connection was established Response time in journey is longer, and usually all in the range of 30S~60S, therefore the second duration could be provided as 60S.
Step 507 judges whether the response in database access process is overtime according to the 4th time.
The response processing method that the embodiment of the present invention is provided, client set different durations;Using setting difference when Length judges whether the response in disparate databases business procession is overtime.From technical solution provided by the invention as it can be seen that due to Client judges whether the response in disparate databases business procession is overtime respectively using the different durations of setting, therefore Not only the corresponding timeout case during database connection foundation had been judged well, but also can judge database access well Response timeout situation in the process.
Fig. 6 is another response processing method provided in an embodiment of the present invention, as shown in fig. 6, including:
Step 601, client set different durations.
Step 602 obtains the time for itself being connected to server-side transmission data library and establishing and asking as at the first time.
Step 603 obtained for the second time according to the first duration calculation of first time and setting.
Specifically, the second time plus the first duration calculation by obtaining at the first time.Database connection was established Response time in journey is shorter, and usually all in the range of 1S~3S, therefore the first duration could be provided as 3S.
Step 604 judges that whether receiving being directed to for server-side transmission before the arrival of the second time or when reaching certainly counts The reply for establishing request is connected according to library.
If step 605 is all not received by being directed to for server-side transmission from before being reached in the second time and when reaching The reply of request is established in database connection, determines the response timeout during database connection foundation.
If specifically, had received from before being reached in the second time or when reaching server-side transmission for database The reply of request is established in connection, determines that the response during the connection foundation of database is not timed-out, and then normally connected Connect foundation.
Step 606 obtains itself to the time of server-side transmission data library access request as the third time.
Specifically, the Sentence format of database access request can be sql sentences.
Step 607 obtained for the 4th time according to the second duration calculation of third time and setting.
Specifically, the 4th time was obtained by the third time plus the second duration calculation.Database connection was established Response time in journey is longer, and usually all in the range of 30S~60S, therefore the second duration could be provided as 60S.
Step 608 judges that whether receiving being directed to for server-side transmission before the arrival of the 4th time or when reaching certainly counts According to the reply of library access request.
If step 609 is all not received by being directed to for server-side transmission from before being reached in the 4th time and when reaching The reply of database access request determines the response timeout in database access process.
If specifically, had received from before being reached in the 4th time or when reaching server-side transmission for database The reply of access request determines that the response in the access process of database is not timed-out.
Specifically, the interaction schematic diagram of client and server-side can be with as shown in fig. 7, client and server-side interact Journey is divided into following three steps:
S1, handshake authentication process.
Process is established in S2, database connection.
S3, database access process.
Wherein, step S1 can be divided into following four sub-step again:
S11, client initiates the connection request with server-side to server-side in verification process of shaking hands.
S12, server-side receive request and the reply for including encryption seed and itself supporting attribute are sent to client.
The attribute generation authentication information that S13, client are supported to server-side according to encryption seed and server-side is sent to Server-side.
S14, server-side are authenticated after receiving certification packet, and certification is verified information by rear to client transmission.
Wherein, step S2 can be divided into following two sub-steps again:
S21, client connects to server-side transmission data library and establishes request during database connection is established.
S22, server-side send the reply that information is established comprising database connection to client after receiving data packet, so that The information and date library after client receives in reply is obtained to be attached.
Wherein, step S3 can be divided into following two sub-steps again:
S31, client send access request with database of the sql sentences into server-side.
S32, server-side have received access request and perform relevant operation according to access request to generate implementing result return To client.
The response processing method that the embodiment of the present invention is provided, client set different durations;Using setting difference when Length judges whether the response in disparate databases business procession is overtime.From technical solution provided by the invention as it can be seen that due to Client judges whether the response in disparate databases business procession is overtime respectively using the different durations of setting, therefore Not only the corresponding timeout case during database connection foundation had been judged well, but also can judge database access well Response timeout situation in the process.
The embodiment of the present invention also provides a kind of response processing unit, as shown in figure 8, the response processing unit 7 includes:Processing Device 71, memory 72 and communication bus 73;
Communication bus 73 is used to implement the connection communication between processor 71 and memory 72.
Processor 71 is used to perform the response processing routine stored in memory 72, to realize following steps:
Different durations are set.
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
Further, processor 71 is additionally operable to perform response processing routine, to realize following steps:
Judge whether the response during database connection foundation is overtime using the first duration of setting.
Judge whether the response in database access process is overtime using second durations different from the first duration of setting.
Further, processor 71 is additionally operable to perform response processing routine, to implement following steps
It obtains client and the time for establishing request is connected to server-side transmission data library as at the first time.
Second time was obtained according to the first duration calculation at the first time with setting.
Judge whether the response during database connection foundation is overtime according to the second time.
Further, processor 71 is for performing response processing routine, to implement following steps:
Judge that client is reached in the second time and connecting for database for server-side transmission whether is received during preceding or arrival Connect the reply for establishing request.
Server-side transmission is all not received by before if client is reached in the second time and when reaching is directed to database The reply of request is established in connection, determines the response timeout during database connection foundation.
Further, processor 71 is additionally operable to perform response processing routine, to implement following steps:
Client is obtained to the time of server-side transmission data library access request as the third time.
4th time was obtained according to the second duration calculation of third time and setting.
Judge whether the response in database access process is overtime according to the 4th time.
Further, processor 71 is for performing response processing routine, to implement following steps:
Judge that client is reached in the 4th time and being visited for database for server-side transmission whether is received during preceding or arrival Ask the reply of request.
Server-side transmission is all not received by before if client is reached in the 4th time and when reaching is directed to database The reply of access request determines the response timeout in database access process.
The response processing unit that the embodiment of the present invention is provided, sets different durations;Judged using the different durations of setting Whether the response in disparate databases business procession is overtime.From technical solution provided by the invention as it can be seen that due to client Judge whether the response in disparate databases business procession is overtime respectively using the different durations of setting, therefore both very well Ground has judged the corresponding timeout case during database connection foundation, and can judge in database access process well Response timeout situation.
The embodiment of the present invention also provides a kind of storage medium, and computer program, computer program are stored on storage medium Following steps are realized when being executed by processor:
Different durations are set;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
Further, following steps are also realized when computer program is executed by processor:
Judge whether the response during database connection foundation is overtime using the first duration of setting.
Judge whether the response in database access process is overtime using second durations different from the first duration of setting.
Further, following steps are also implemented when computer program is executed by processor:
It obtains client and the time for establishing request is connected to server-side transmission data library as at the first time.
Second time was obtained according to the first duration calculation at the first time with setting.
Judge whether the response during database connection foundation is overtime according to the second time.
Further, following steps are implemented when computer program is executed by processor:
Judge that client is reached in the second time and connecting for database for server-side transmission whether is received during preceding or arrival Connect the reply for establishing request;
Server-side transmission is all not received by before if client is reached in the second time and when reaching is directed to database The reply of request is established in connection, determines the response timeout during database connection foundation.
Further, following steps are also implemented when computer program is executed by processor:
Client is obtained to the time of server-side transmission data library access request as the third time.
4th time was obtained according to the second duration calculation of third time and setting.
Judge whether the response in database access process is overtime according to the 4th time.
Further, following steps are also implemented when computer program is executed by processor:
Judge that client is reached in the 4th time and being visited for database for server-side transmission whether is received during preceding or arrival Ask the reply of request.
Server-side transmission is all not received by before if client is reached in the 4th time and when reaching is directed to database The reply of access request determines the response timeout in database access process.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those elements, and And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or device institute Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this Also there are other identical elements in the process of element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), instruct and used so that a station terminal (can be mobile phone, computer is serviced including such as dried fruit Device, air conditioner or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned specific embodiment is only schematical rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, present inventive concept and scope of the claimed protection are not being departed from, can also made very much Form, these are belonged within the protection of the present invention.

Claims (10)

1. a kind of response processing method, which is characterized in that including:
Client sets different durations;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
2. response processing method according to claim 1, which is characterized in that the different durations using setting judge not It is whether overtime with the response in data bank service processing procedure, including:
Judge whether the response during database connection foundation is overtime using the first duration of setting;
Judge whether the response in database access process is overtime using second durations different from first duration of setting.
3. response processing method according to claim 2, which is characterized in that first duration using setting judges number Whether the response during being established according to library connection is overtime, including:
It obtains and the time for establishing request itself is connected to server-side transmission data library as at the first time;
Second time was obtained according to the first duration calculation of the first time and setting;
Judge whether the response during the database connection foundation is overtime according to second time.
4. response processing method according to claim 3, which is characterized in that described to judge that database connects according to the second time Whether the response connect during establishing is overtime, including:
Judge from before being reached in second time or whether receive that the server-side sends when reaching for the number The reply for establishing request is connected according to library;
If be all not received by that the server-side sends from before being reached in second time and when reaching for described The reply of request is established in database connection, determines the response timeout during the database connection foundation.
5. according to claim 2-4 any one of them response processing methods, which is characterized in that described using setting and first The second different duration of duration judges whether the response in database access process is overtime, including:
Itself is obtained to the time of server-side transmission data library access request as the third time;
4th time was obtained according to the second duration calculation of the third time and setting;
Judge whether the response in the database access process is overtime according to the 4th time.
6. response processing method according to claim 5, which is characterized in that described to judge that database is visited according to the 4th time Whether the response during asking is overtime, including:
Judge from before being reached in the 4th time or whether receive that the server-side sends when reaching for the number According to the reply of library access request;
If be all not received by that the server-side sends from before being reached in the 4th time and when reaching for described The reply of database access request determines the response timeout in the database access process.
7. a kind of response processing unit, which is characterized in that including:Processor, memory and communication bus;
The communication bus is used to implement the connection communication between the processor and the memory;
The processor is used to perform the response processing routine stored in the memory, to realize following steps:
Different durations are set;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
8. response processing unit according to claim 7, which is characterized in that the processor is additionally operable to perform the storage The response processing routine stored in device, to realize following steps:
Judge whether the response during database connection foundation is overtime using the first duration of setting;
Judge whether the response in database access process is overtime using second durations different from first duration of setting.
9. response processing unit according to claim 8, which is characterized in that the processor is additionally operable to perform the response Processing routine, to implement following steps:
It obtains client and the time for establishing request is connected to server-side transmission data library as at the first time;
Second time was obtained according to the first time and first duration calculation;
Judge whether the response during the database connection foundation is overtime according to second time.
10. a kind of computer readable storage medium, which is characterized in that computer program is stored on the storage medium, it is described Following steps are realized when computer program is executed by processor:
Different durations are set;
Judge whether the response in disparate databases business procession is overtime using the different durations of setting.
CN201711225681.1A 2017-11-29 2017-11-29 Response processing method and device and computer readable storage medium Active CN108183833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711225681.1A CN108183833B (en) 2017-11-29 2017-11-29 Response processing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711225681.1A CN108183833B (en) 2017-11-29 2017-11-29 Response processing method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108183833A true CN108183833A (en) 2018-06-19
CN108183833B CN108183833B (en) 2021-08-10

Family

ID=62545493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711225681.1A Active CN108183833B (en) 2017-11-29 2017-11-29 Response processing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108183833B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897854A (en) * 2018-06-29 2018-11-27 北京京东金融科技控股有限公司 A kind of monitoring method and device of overtime task
CN108901079A (en) * 2018-06-20 2018-11-27 Oppo(重庆)智能科技有限公司 Time-out time determines method, apparatus, equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105732A1 (en) * 2000-11-17 2003-06-05 Kagalwala Raxit A. Database schema for structure query language (SQL) server
CN1494022A (en) * 2002-10-30 2004-05-05 华为技术有限公司 Method accessing data bank through protocol agency mode
CN101106511A (en) * 2007-08-24 2008-01-16 上海可鲁系统软件有限公司 A secure intercommunication method and device between two independent networks
CN101132344A (en) * 2007-08-24 2008-02-27 上海可鲁系统软件有限公司 Safe intercommunication method and apparatus between two isolated networks
US7340448B2 (en) * 2003-11-13 2008-03-04 International Business Machines Corporation Method, apparatus, and computer program product for implementing enhanced query governor functions
CN102915374A (en) * 2012-11-07 2013-02-06 北京搜狐新媒体信息技术有限公司 Method, device and system for controlling access to database resources
CN103970807A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Method and system for managing database connection
EP2767906A1 (en) * 2013-02-15 2014-08-20 OMRON Corporation Controller, information processing apparatus, and program
CN104281587A (en) * 2013-07-03 2015-01-14 阿里巴巴集团控股有限公司 Connection establishing method and device
CN105025063A (en) * 2014-04-29 2015-11-04 刘广威 Online data transmission method for large-scale terminal equipment
CN106412630A (en) * 2016-09-23 2017-02-15 Tcl集团股份有限公司 Video list switch control method and apparatus
CN106790195A (en) * 2016-12-30 2017-05-31 北京神州绿盟信息安全科技股份有限公司 A kind of SQL injection detection method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105732A1 (en) * 2000-11-17 2003-06-05 Kagalwala Raxit A. Database schema for structure query language (SQL) server
CN1494022A (en) * 2002-10-30 2004-05-05 华为技术有限公司 Method accessing data bank through protocol agency mode
US7340448B2 (en) * 2003-11-13 2008-03-04 International Business Machines Corporation Method, apparatus, and computer program product for implementing enhanced query governor functions
CN101106511A (en) * 2007-08-24 2008-01-16 上海可鲁系统软件有限公司 A secure intercommunication method and device between two independent networks
CN101132344A (en) * 2007-08-24 2008-02-27 上海可鲁系统软件有限公司 Safe intercommunication method and apparatus between two isolated networks
CN102915374A (en) * 2012-11-07 2013-02-06 北京搜狐新媒体信息技术有限公司 Method, device and system for controlling access to database resources
CN103970807A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Method and system for managing database connection
EP2767906A1 (en) * 2013-02-15 2014-08-20 OMRON Corporation Controller, information processing apparatus, and program
CN104281587A (en) * 2013-07-03 2015-01-14 阿里巴巴集团控股有限公司 Connection establishing method and device
CN105025063A (en) * 2014-04-29 2015-11-04 刘广威 Online data transmission method for large-scale terminal equipment
CN106412630A (en) * 2016-09-23 2017-02-15 Tcl集团股份有限公司 Video list switch control method and apparatus
CN106790195A (en) * 2016-12-30 2017-05-31 北京神州绿盟信息安全科技股份有限公司 A kind of SQL injection detection method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
QBW2010: ""ConnectionTimeOut和SocketTimeOut的区别"", 《CSDN博客 HTTPS://BLOG.CSDN.NET/QBW2010/ARTICLE/DETAILS/49305945/》 *
YINGYING ZHENG,ETC.: ""A Reliability Benchmark for Big Data Systems on JointCloud"", 《IEEE 37TH INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOP》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108901079A (en) * 2018-06-20 2018-11-27 Oppo(重庆)智能科技有限公司 Time-out time determines method, apparatus, equipment and storage medium
CN108897854A (en) * 2018-06-29 2018-11-27 北京京东金融科技控股有限公司 A kind of monitoring method and device of overtime task

Also Published As

Publication number Publication date
CN108183833B (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN108052302A (en) Association display methods, terminal and the computer readable storage medium of double-sided screen
CN107133092A (en) Multi-thread synchronization processing method, terminal and computer-readable recording medium
CN107566635A (en) Screen intensity method to set up, mobile terminal and computer-readable recording medium
CN108391190B (en) A kind of noise-reduction method, earphone and computer readable storage medium
CN107682547A (en) A kind of voice messaging regulation and control method, equipment and computer-readable recording medium
CN108566484A (en) Message treatment method, terminal device and computer readable storage medium
CN107181700A (en) Control method, mobile terminal and the storage medium of application program for mobile terminal
CN107707450A (en) A kind of method, apparatus and computer-readable recording medium for transmitting file
CN106953684A (en) A kind of method for searching star, mobile terminal and computer-readable recording medium
CN108172161A (en) Display methods, mobile terminal and computer readable storage medium based on flexible screen
CN107580336A (en) A kind of method for connecting network, terminal and computer-readable recording medium
CN107181865A (en) Processing method, terminal and the computer-readable recording medium of unread short messages
CN107678625A (en) Information Sharing menu display method, mobile terminal and computer-readable recording medium
CN108196777A (en) A kind of flexible screen application process, equipment and computer readable storage medium
CN107483804A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN107124466A (en) One kind prevents caching penetrating method and device, computer-readable recording medium
CN107635232A (en) A kind of network share method, terminal and computer-readable recording medium
CN107896287A (en) Phone number risk monitoring method and mobile terminal
CN108259233A (en) Graphics processor GPU method for parameter configuration and mobile terminal in a kind of mobile terminal
CN109445945A (en) Memory allocation method, mobile terminal, server and the storage medium of application program
CN108121762A (en) A kind of image processing method, mobile terminal and computer storage media
CN108183833A (en) A kind of response processing method, device and computer readable storage medium
CN107133108A (en) Implementation method, terminal, server and the computer-readable recording medium of distributed complex lock
CN107491709A (en) A kind of recognition methods of code figure, terminal and computer-readable recording medium
CN106998553A (en) A kind of equipment identities recognition methods, computer 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
GR01 Patent grant
GR01 Patent grant