CN117596184A - Communication connection detection method and device - Google Patents

Communication connection detection method and device Download PDF

Info

Publication number
CN117596184A
CN117596184A CN202311549115.1A CN202311549115A CN117596184A CN 117596184 A CN117596184 A CN 117596184A CN 202311549115 A CN202311549115 A CN 202311549115A CN 117596184 A CN117596184 A CN 117596184A
Authority
CN
China
Prior art keywords
state
visible variable
communication request
global
variable
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
CN202311549115.1A
Other languages
Chinese (zh)
Other versions
CN117596184B (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.)
Jiangsu Xinzhi Information Technology Co ltd
Original Assignee
Jiangsu Xinzhi 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 Jiangsu Xinzhi Information Technology Co ltd filed Critical Jiangsu Xinzhi Information Technology Co ltd
Priority to CN202311549115.1A priority Critical patent/CN117596184B/en
Publication of CN117596184A publication Critical patent/CN117596184A/en
Application granted granted Critical
Publication of CN117596184B publication Critical patent/CN117596184B/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
    • 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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)

Abstract

A communication connection detection method and device, the method modifies the state attribute of the global visible variable to allow to decrease at the place where the communication request is sent; judging whether the communication request is interrupted or not, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time when the communication request interruption processing is called back; if the state attribute of the global visible variable is allowable decrementing, executing decrementing operation on the global visible variable; detecting whether the value of the global visible variable becomes a timeout threshold, if so, judging that the communication request is not answered within a set time, and that the communication request is invalid; if the communication request is not interrupted, the communication request is judged to be responded within the set time, the communication request is received by the receiving party, and the state attribute of the global visible variable is modified to be limited to be reduced. According to the invention, a new timer is not required to be introduced, so that a background can clear the buffer area in time, and the system stability is improved.

Description

Communication connection detection method and device
Technical Field
The invention belongs to the technical field of communication detection, and particularly relates to a communication connection detection method and device.
Background
Currently, background communication generally uses heartbeat packets to detect whether a connection between two ends is still valid; if the TCP protocol periodically sends a detection packet to judge whether the opposite end still exists; however, the implementation of the method is matched with the two parties, and the heartbeat packet occupies certain flow.
Specifically, in the existing detection mode for sending the heartbeat packet, the foreground periodically sends the heartbeat packet to the background, if the background has a response, the foreground can normally communicate, so that the control is inconvenient, the heartbeat packet is not required to be sent during normal communication, the heartbeat packet is only required to be sent during idle, and the judgment of when to idle and the flow waste are required; if the communication is streaming communication, the background needs to process the data stream according to frames, and preferably, when a request sent by the foreground cannot be received for a long time, the buffer area is cleaned, so that dirty data accumulation is avoided, the subsequent communication is influenced, and the system stability is improved; however, heartbeat packets can result in the background having no way of knowing when the buffer is cleared.
Disclosure of Invention
Therefore, the invention provides a communication connection detection method and device, which solve the problems that the heartbeat packet detection mode in the prior art is inconvenient, wastes flow and cannot clear buffer data in time.
In order to achieve the above object, the present invention provides the following technical solutions: a communication connection detection method, comprising:
the method comprises the steps of carrying out global visible variable definition in advance, wherein the state attribute of the global visible variable comprises a limit decrementing state and an allowable decrementing state;
modifying a state attribute of the globally visible variable to allow decrementing where a communication request is issued;
judging whether the communication request is interrupted or not, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time in the calling back process of the communication request interruption processing;
if the state attribute of the global visible variable is allowed to be decremented, executing decrementing operation on the global visible variable;
detecting whether the value of the global visible variable becomes a timeout threshold or not, if so, judging that the communication request is not answered in a set time, and that the communication request is invalid;
if the communication request is not interrupted, judging that the communication request is responded within a set time, wherein the communication request is received by a receiving party, modifying the state attribute of the global visible variable into limit decrease, and ending the communication connection detection.
As a preferable scheme of the communication connection detection method, the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state;
when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
As a preferable scheme of the communication connection detection method, the value of the global visible variable is subtracted by a preset interval value at the place where all communication requests are sent, so that the global visible variable is changed from a limited decrementing state to a permitted decrementing state.
As a preferable mode of the communication connection detection method, the value of the global visible variable is restored to the state initial value at the place where all communication requests are received, and the global visible variable is changed from the allowable decremental state to the limited decremental state.
As a preferable scheme of the communication connection detection method, when the value of the global visible variable is subjected to the decrementing operation, if the value of the global visible variable is detected to be 0, the communication request is judged to be unanswered within the set time, and the communication request is judged to be invalid.
The invention also provides a communication connection detection device, which comprises:
the variable definition module is used for carrying out global visible variable definition in advance, and the state attribute of the global visible variable comprises a limit decrementing state and an allowable decrementing state;
the first state adjustment module is used for modifying the state attribute of the global visible variable to be allowed to be decremented at the place where the communication request is sent;
the callback processing module is used for judging whether the communication request is interrupted or not, if the communication request is interrupted, callback is carried out on the communication request interruption processing through a timer, and the state attribute of the global visible variable is checked regularly during callback processing on the communication request interruption processing;
the state judging module is used for executing the decrementing operation on the global visible variable if the state attribute of the global visible variable is allowable decrementing;
the overtime threshold judging module is used for detecting whether the value of the global visible variable becomes an overtime threshold or not, and judging that the communication request is not answered within a set time if the value of the global visible variable becomes the overtime threshold;
and the second state adjustment module is used for judging that the communication request is responded within a set time if the communication request is not interrupted, the communication request is received by a receiver, the state attribute of the global visible variable is modified to be limited and decremented, and the communication connection detection is ended.
As a preferable scheme of the communication connection detection device, in the variable definition module, the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state;
when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
As a preferable mode of the communication connection detecting device, in the first state adjusting module, the value of the global visible variable is subtracted by a preset interval value at a place where all communication requests are sent, so that the global visible variable is changed from a limited decrementing state to a permitted decrementing state.
As a preferable mode of the communication connection detecting device, in the second state adjusting module, where all communication requests are received, the value of the global visible variable is restored to the state initial value, and the global visible variable is changed from the allowable decrementing state to the limited decrementing state.
As a preferable mode of the communication connection detection device, the timeout threshold judgment module is configured to judge that the communication request is not answered within a set time when the value of the global visible variable is detected to be 0, and the communication request fails when the value of the global visible variable is subjected to a decrementing operation.
The method has the beneficial effects that the definition of the global visible variable is performed in advance, and the state attribute of the global visible variable comprises two states of limiting decrementing and allowing decrementing; modifying a state attribute of the globally visible variable to allow decrementing where a communication request is issued; judging whether the communication request is interrupted or not, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time in the calling back process of the communication request interruption processing; if the state attribute of the global visible variable is allowed to be decremented, executing decrementing operation on the global visible variable; detecting whether the value of the global visible variable becomes a timeout threshold or not, if so, judging that the communication request is not answered in a set time, and that the communication request is invalid; if the communication request is not interrupted, judging that the communication request is responded within a set time, wherein the communication request is received by a receiving party, modifying the state attribute of the global visible variable into limit decrease, and ending the communication connection detection. The invention only needs to modify the foreground program; the timeout time is convenient to adjust, and the timeout time of each instruction can be accurately controlled; a new timer is not required to be introduced, and the new timer is only required to be simply modified in the existing system time update callback; the background can clean the buffer area in time, and the system stability is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It will be apparent to those skilled in the art from this disclosure that the drawings described below are merely exemplary and that other embodiments may be derived from the drawings provided without undue effort.
The structures, proportions, sizes, etc. shown in the present specification are shown only for the purposes of illustration and description, and are not intended to limit the scope of the invention, which is defined by the claims, so that any structural modifications, changes in proportions, or adjustments of sizes, which do not affect the efficacy or the achievement of the present invention, should fall within the scope of the invention.
Fig. 1 is a schematic flow chart of a communication connection detection method according to an embodiment of the present invention;
fig. 2 is a logic flow of a communication connection detection method according to an embodiment of the present invention;
FIG. 3 is a timing processing logic of a communication connection detection method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a communication connection detection device structure according to an embodiment of the present invention.
Detailed Description
Other advantages and advantages of the present invention will become apparent to those skilled in the art from the following detailed description, which, by way of illustration, is to be read in connection with certain specific embodiments, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, 2 and 3, embodiment 1 of the present invention provides a communication connection detection method, which includes the following steps:
s1, defining global visible variables in advance, wherein the state attribute of the global visible variables comprises a limit decrementing state and an allowable decrementing state;
s2, modifying the state attribute of the global visible variable to be allowed to be decremented at the place where the communication request is sent;
s3, judging whether the communication request is interrupted, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time in the calling back process of the communication request interruption processing;
s4, if the state attribute of the global visible variable is allowed to be decremented, executing decrementing operation on the global visible variable;
s5, detecting whether the value of the global visible variable becomes a timeout threshold, if so, judging that the communication request is not answered within a set time, and that the communication request is invalid;
and S6, if the communication request is not interrupted, judging that the communication request is responded within a set time, wherein the communication request is received by a receiver, modifying the state attribute of the global visible variable into limit decrease, and ending the communication connection detection.
In this embodiment, in step S1, the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state; when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
Specifically, by defining a global visible variable which is visible in a full range, the global visible variable adopts a integer value; the globally visible variable has two states, limit decrementing and allow decrementing; if 60 indicates that the limit is decreased, the limit is allowed to decrease if less than 60, so that the response timeout time of the current request is 60 seconds.
In one possible embodiment, the implementation defines a globally visible variable that is globally visible, the globally visible variable using the core code of the integer value as follows:
“uint32_t dev_response_out_time;
static constexpr uint32_ t m _devresponseouttime=60; the device responds to the maximum interval.
In this embodiment, in step S2, where all communication requests are sent, the value of the global visible variable is subtracted by a preset interval value, so that the global visible variable is changed from the limited decremental state to the allowed decremental state.
Specifically, the state of the global visible variable is changed to be allowed to be decremented at the place where all communication requests are sent, and the state initial value is 60, and 1 is reduced to 59; the method can be specifically adjusted according to the instruction so as to realize accurate control; for some requests the execution time may be longer, such as loading the configuration, where the state initial value configuration may be correspondingly larger.
In one possible embodiment, the core code implementing the fine control according to instruction tuning is as follows:
in this embodiment, in step S5, when the value of the global visible variable is decremented, if the value of the global visible variable is detected to be 0, it is determined that the communication request is not responded within a set time, and the communication request fails.
Specifically, in the interrupt processing callback of the timer, checking the global visible variable in the step S1 at regular time, performing a decrementing operation, and if the detected value becomes a timeout threshold, for example, 0, indicating that the request is not answered for a long time, and disconnecting the communication; if time-sharing control is needed, combining the command code with the overtime, detecting the command code and the overtime at the same time, and then carrying out different treatments according to the detection result.
In one possible embodiment, the core code for timeout determination is as follows:
in this embodiment, in step S6, where all communication requests are received, the value of the globally visible variable is restored to the state initial value, and the globally visible variable is changed from the allowed decremental state to the restricted decremental state. Taking the initial value of the state as 60 as an example, the value of the global visible variable is reduced to 60 at the place where all communication requests are received.
In one possible embodiment, the core code that restores the value of the globally visible variable to the state initial value is as follows:
“m_visitor->UnitGlobalInfo()->SetDevResponseOutTime(UnitEV::m_devRespons eOutTime)”。
in summary, the embodiment of the present invention defines a global visible variable in advance, where the state attribute of the global visible variable includes two states of limiting decrementing and allowing decrementing; modifying a state attribute of the globally visible variable to allow decrementing where a communication request is issued; judging whether the communication request is interrupted or not, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time in the calling back process of the communication request interruption processing; if the state attribute of the global visible variable is allowed to be decremented, executing decrementing operation on the global visible variable; detecting whether the value of the global visible variable becomes a timeout threshold or not, if so, judging that the communication request is not answered in a set time, and that the communication request is invalid; if the communication request is not interrupted, judging that the communication request is responded within a set time, wherein the communication request is received by a receiving party, modifying the state attribute of the global visible variable into limit decrease, and ending the communication connection detection. The invention defines a variable which is visible in a full range, has two states and can not be decremented and can be decremented; changing the state of the variable to be decrementable at the place where all communication requests are issued; the method can be specifically adjusted according to the instruction and accurately controlled; changing the state of the variable to be non-decrementable where all communication requests are received; the non-decrementable state is timing time, and the state can be changed into the decrementable state only by subtracting 1; the current time of a status bar is displayed at the bottom of a general foreground program, and a timer is started to be continuously decremented and updated by acquiring an initial value when the program is started; and (3) checking the variable of 1 at regular time by using the interrupt processing callback of the timer, performing decrementing operation, and if the detected value becomes a timeout threshold value, such as 0, indicating that the request is not answered for a long time and the communication is invalid. The invention only needs to modify the foreground program; the timeout time is convenient to adjust, and the timeout time of each instruction can be accurately controlled; no new timer is required to be introduced, and only simple modification in the existing system time update callback is required.
It should be noted that the method of the embodiments of the present disclosure may be performed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of embodiments of the present disclosure, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes some embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Example 2
Referring to fig. 4, embodiment 2 of the present invention provides a communication connection detection apparatus, including:
the variable definition module 1 is used for carrying out global visible variable definition in advance, and the state attribute of the global visible variable comprises a limit decrementing state and an allowable decrementing state;
a first state adjustment module 2, configured to modify, at a place where a communication request is sent, a state attribute of the globally visible variable to allow decrementing;
the callback processing module 3 is used for judging whether the communication request is interrupted, if the communication request is interrupted, callback is carried out on the communication request interruption processing through a timer, and the state attribute of the global visible variable is checked regularly during callback processing on the communication request interruption processing;
the state judging module 4 is configured to execute a decrementing operation on the global visible variable if the state attribute of the global visible variable is allowable decrementing;
the overtime threshold judging module 5 is used for detecting whether the value of the global visible variable becomes an overtime threshold or not, and judging that the communication request is not answered within a set time if the value of the global visible variable becomes the overtime threshold;
and the second state adjustment module 6 is configured to determine that the communication request is responded within a set time if the communication request is not interrupted, receive the communication request by the receiver, modify the state attribute of the global visible variable to be limited and decremented, and end communication connection detection.
In this embodiment, in the variable definition module 1, the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state;
when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
In this embodiment, in the first state adjustment module 2, where all communication requests are sent, the value of the global visible variable is subtracted by a preset interval value, so that the global visible variable is changed from the limited decremental state to the allowed decremental state.
In this embodiment, in the timeout threshold determining module 5, when the value of the global visible variable performs the decrementing operation, if the value of the global visible variable is detected to be 0, it is determined that the communication request is not answered within the set time, and the communication request fails.
In this embodiment, in the second state adjustment module 6, where all communication requests are received, the value of the globally visible variable is restored to the state initial value, and the globally visible variable is changed from the allowed decremental state to the restricted decremental state.
It should be noted that, because the content of information interaction and execution process between the modules of the above-mentioned apparatus is based on the same concept as the method embodiment in embodiment 1 of the present application, the technical effects brought by the content are the same as the method embodiment of the present application, and specific content can be referred to the description in the foregoing illustrated method embodiment of the present application, which is not repeated herein.
Example 3
Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium having stored therein program code of a communication connection detection method, the program code including instructions for performing the communication connection detection method of embodiment 1 or any possible implementation thereof.
Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk, SSD), etc.
Example 4
Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
the processor and the memory complete communication with each other through a bus; the memory stores program instructions executable by the processor, which invokes the program instructions to perform the communication connection detection method of embodiment 1 or any possible implementation thereof.
Specifically, the processor may be implemented by hardware or software, and when implemented by hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor, implemented by reading software code stored in a memory, which may be integrated in the processor, or may reside outside the processor, and which may reside separately.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.).
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
While the invention has been described in detail in the foregoing general description and specific examples, it will be apparent to those skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.

Claims (10)

1. A communication connection detection method, comprising:
the method comprises the steps of carrying out global visible variable definition in advance, wherein the state attribute of the global visible variable comprises a limit decrementing state and an allowable decrementing state;
modifying a state attribute of the globally visible variable to allow decrementing where a communication request is issued;
judging whether the communication request is interrupted or not, if the communication request is interrupted, calling back the communication request interruption processing through a timer, and checking the state attribute of the global visible variable at regular time in the calling back process of the communication request interruption processing;
if the state attribute of the global visible variable is allowed to be decremented, executing decrementing operation on the global visible variable;
detecting whether the value of the global visible variable becomes a timeout threshold or not, if so, judging that the communication request is not answered in a set time, and that the communication request is invalid;
if the communication request is not interrupted, judging that the communication request is responded within a set time, wherein the communication request is received by a receiving party, modifying the state attribute of the global visible variable into limit decrease, and ending the communication connection detection.
2. The method of claim 1, wherein the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state;
when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
3. A communication connection detection method according to claim 2, characterized in that the value of the global visible variable is subtracted by a preset interval value at the place where all communication requests are issued, so that the global visible variable is changed from a limited decrementing state to a permitted decrementing state.
4. A communication connection detection method according to claim 2, characterized in that the value of the global visible variable is restored to the state initial value and the global visible variable is changed from the allowed decremental state to the limited decremental state at the point where all communication requests are received.
5. The method according to claim 2, wherein when the value of the global visible variable is decremented, if the value of the global visible variable is detected to be 0, it is determined that the communication request is not acknowledged within a set time, and the communication request fails.
6. A communication connection detection apparatus, comprising:
the variable definition module is used for carrying out global visible variable definition in advance, and the state attribute of the global visible variable comprises a limit decrementing state and an allowable decrementing state;
the first state adjustment module is used for modifying the state attribute of the global visible variable to be allowed to be decremented at the place where the communication request is sent;
the callback processing module is used for judging whether the communication request is interrupted or not, if the communication request is interrupted, callback is carried out on the communication request interruption processing through a timer, and the state attribute of the global visible variable is checked regularly during callback processing on the communication request interruption processing;
the state judging module is used for executing the decrementing operation on the global visible variable if the state attribute of the global visible variable is allowable decrementing;
the overtime threshold judging module is used for detecting whether the value of the global visible variable becomes an overtime threshold or not, and judging that the communication request is not answered within a set time if the value of the global visible variable becomes the overtime threshold;
and the second state adjustment module is used for judging that the communication request is responded within a set time if the communication request is not interrupted, the communication request is received by a receiver, the state attribute of the global visible variable is modified to be limited and decremented, and the communication connection detection is ended.
7. The communication connection detection apparatus according to claim 6, wherein in the variable definition module, the global visible variable is an integer value; the global visible variable is configured with a state initial value; when the value of the global visible variable is equal to the state initial value, the global visible variable is in a limited decremental state;
when the value of the globally visible variable is less than the state initial value, the globally visible variable is in a state of allowed decrement.
8. The apparatus according to claim 7, wherein the first state adjustment module subtracts the value of the global visible variable by a preset interval value at a place where all communication requests are issued, so that the global visible variable is changed from a limited decrementing state to a permitted decrementing state.
9. The communication connection detection apparatus according to claim 7, wherein the second state adjustment module restores the value of the global visible variable to the state initial value and changes the global visible variable from the allowable decrementing state to the limited decrementing state at a place where all communication requests are received.
10. The apparatus according to claim 7, wherein the timeout threshold judgment module is configured to judge that the communication request is not answered within a set time and that the communication request is invalid when the value of the global visible variable is detected as 0.
CN202311549115.1A 2023-11-20 2023-11-20 Communication connection detection method and device Active CN117596184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311549115.1A CN117596184B (en) 2023-11-20 2023-11-20 Communication connection detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311549115.1A CN117596184B (en) 2023-11-20 2023-11-20 Communication connection detection method and device

Publications (2)

Publication Number Publication Date
CN117596184A true CN117596184A (en) 2024-02-23
CN117596184B CN117596184B (en) 2024-05-28

Family

ID=89914451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311549115.1A Active CN117596184B (en) 2023-11-20 2023-11-20 Communication connection detection method and device

Country Status (1)

Country Link
CN (1) CN117596184B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578234A (en) * 2003-07-29 2005-02-09 华为技术有限公司 Detecting method for Link routine state
US20050198314A1 (en) * 2004-02-06 2005-09-08 Coon Tony T. Method and apparatus for characterizing a network connection
US20110179153A1 (en) * 2010-01-15 2011-07-21 Apple Inc. Method and apparatus for idling a network connection
CN107734001A (en) * 2017-09-25 2018-02-23 龙尚科技(上海)有限公司 A kind of method whether disconnected that judges to communicate based on timing asynchronous mechanism
CN112433872A (en) * 2020-10-23 2021-03-02 深圳点猫科技有限公司 Interface request timeout reminding method, system and storage medium
CN112492704A (en) * 2020-12-11 2021-03-12 Oppo(重庆)智能科技有限公司 Session management method, session management device, terminal equipment and computer-readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578234A (en) * 2003-07-29 2005-02-09 华为技术有限公司 Detecting method for Link routine state
US20050198314A1 (en) * 2004-02-06 2005-09-08 Coon Tony T. Method and apparatus for characterizing a network connection
US20110179153A1 (en) * 2010-01-15 2011-07-21 Apple Inc. Method and apparatus for idling a network connection
CN107734001A (en) * 2017-09-25 2018-02-23 龙尚科技(上海)有限公司 A kind of method whether disconnected that judges to communicate based on timing asynchronous mechanism
CN112433872A (en) * 2020-10-23 2021-03-02 深圳点猫科技有限公司 Interface request timeout reminding method, system and storage medium
CN112492704A (en) * 2020-12-11 2021-03-12 Oppo(重庆)智能科技有限公司 Session management method, session management device, terminal equipment and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈粤, 李志蜀, 罗奕: "基于J2ME平台的手机通讯程序分析与实现", 计算机应用, no. 05, 28 May 2003 (2003-05-28) *

Also Published As

Publication number Publication date
CN117596184B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
US9501319B2 (en) Method and apparatus for scheduling blocking tasks
US10541833B2 (en) System and method for automatically selecting baud rate in a CAN network
US7934007B2 (en) Server side TFTP flow control
CN105874773B (en) Task processing device, intelligent equipment, task processing method and baseband processor
CN111534970B (en) Method and device for controlling laundry, electronic equipment and storage medium
KR0147509B1 (en) Timeout process circuit and receiver including this timeout process circuit
CN112988433A (en) Method, apparatus and computer program product for fault management
CN110738156B (en) Face recognition system and method based on message middleware
US10327206B2 (en) Method and apparatus for controlling TCP packets in communication system
CN110109772A (en) A kind of method for restarting of CPU, communication equipment and readable storage medium storing program for executing
CN117596184B (en) Communication connection detection method and device
CN113452770B (en) Data synchronization method, device, computer equipment and storage medium
CN116541167A (en) System flow control method, device, electronic equipment and computer readable medium
CN106910448B (en) Display screen refresh rate control method and system based on mobile terminal
CN112925478B (en) Camera storage space control method, intelligent terminal and computer readable storage medium
US11122146B2 (en) Information processing method, electronic device and computer program product
KR20150118410A (en) Method and apparatus for controlling an aperiodic traffic in electronic device
CN112491993A (en) Communication establishing method and device, electronic equipment and computer readable storage medium
WO2020206703A1 (en) Terminal control method and apparatus, storage medium, and electronic device
CN114546910A (en) Access control method, device, storage medium and electronic device
CN114125045B (en) Data processing method, device and electronic system
CN112163985B (en) Image processing method, image processing device, storage medium and electronic equipment
CN114338357B (en) Method and device for transmitting data message in network
CN115150400B (en) Service fault processing method and device, cloud service platform and storage medium
CN111177636B (en) Recursive scheduling method and system for webpage request

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