CN114338477A - Communication link monitoring method, device, equipment and storage medium - Google Patents

Communication link monitoring method, device, equipment and storage medium Download PDF

Info

Publication number
CN114338477A
CN114338477A CN202111551080.6A CN202111551080A CN114338477A CN 114338477 A CN114338477 A CN 114338477A CN 202111551080 A CN202111551080 A CN 202111551080A CN 114338477 A CN114338477 A CN 114338477A
Authority
CN
China
Prior art keywords
kernel
information
communication link
link
monitoring
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
CN202111551080.6A
Other languages
Chinese (zh)
Other versions
CN114338477B (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.)
China Automotive Innovation Co Ltd
Original Assignee
China Automotive Innovation 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 China Automotive Innovation Co Ltd filed Critical China Automotive Innovation Co Ltd
Priority to CN202111551080.6A priority Critical patent/CN114338477B/en
Publication of CN114338477A publication Critical patent/CN114338477A/en
Application granted granted Critical
Publication of CN114338477B publication Critical patent/CN114338477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a communication link monitoring method, a communication link monitoring device, a communication link monitoring equipment and a storage medium. The method is applied to first electronic equipment, wherein the first electronic equipment comprises a first kernel and a second kernel, and the method comprises the following steps: the first kernel sends a link monitoring instruction to the second kernel under the condition that the first time length information meets a time length condition, wherein a first communication link is a user data packet protocol link between the first kernel and the second electronic equipment; the second core sends monitoring information to the second electronic equipment based on a second communication link under the condition of receiving the link monitoring instruction, wherein the second communication link is a transmission control protocol link; the second core determines the state information of the first communication link based on the response result of the second electronic device to the monitoring information. Whether the UDP link is disconnected is detected based on the TCP link, so that the effect of detecting the state of the UDP link in real time is achieved; the two links are arranged in different kernels, and the two kernels are matched with each other, so that the load of the kernels can be balanced, and the running efficiency of the kernels can be improved.

Description

Communication link monitoring method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, a device, and a storage medium for monitoring a communication link.
Background
With the rapid development of automobile electronic technology, automobile intellectualization and networking gradually become a new trend, more data needs to be collected, transmitted and processed, and higher requirements are placed on indexes such as data transmission bandwidth, time delay and jitter.
A User Datagram Protocol (UDP) and a Transmission Control Protocol (TCP) are transport layer protocols, and both implement sending and receiving of data through a socket mechanism. When the socket is disconnected, the data transmission link fails, and the retransmission of the data is invalid, which causes waste of network resources. TCP is a reliable and connection-oriented protocol, has a perfect data transmission verification mechanism, has high reliability, but has low data transmission efficiency and low channel utilization rate; UDP is a data packet protocol without reliability, and cannot sense whether a current link state is available, and even if a link is disconnected, a UDP sending end continues to send data, which causes resource waste of computing power and network bandwidth of a control Unit (MCU).
Disclosure of Invention
The application provides a communication link monitoring method, a communication link monitoring device, a communication link monitoring equipment and a storage medium, which can at least solve the technical problem that the transmission link state of a UDP protocol cannot be determined in the prior art.
According to an aspect of the present application, there is provided a communication link monitoring method applied to a first electronic device, where the first electronic device includes a first core and a second core, the method including:
the first kernel sends a link monitoring instruction to the second kernel when first time length information meets a time length condition, wherein the starting time of the first time length information is the time for the first kernel to receive and send information based on a first communication link, the ending time of the first time length information is the current time, and the first communication link is a user data packet protocol link between the first kernel and second electronic equipment;
the second kernel sends monitoring information to the second electronic equipment based on a second communication link under the condition that the second kernel receives the link monitoring instruction, wherein the second communication link is a transmission control protocol link;
the second inner core determines the state information of the first communication link based on the response result of the second electronic equipment to the monitoring information.
In one possible implementation manner, the determining, by the second core, the state information of the first communication link based on the response result of the second electronic device to the monitoring information includes:
and the second kernel determines that the state information is unconnected state information under the condition that no response information is received in a target time period, wherein the response information is generated by the second electronic equipment in response to the monitoring information.
In one possible implementation, the method further includes:
and the first kernel interrupts communication between the first kernel and the second electronic device when the state information is the unconnected state information.
In a possible implementation manner, if the state information is the unconnected state information, the interrupting, by the first kernel, communication between the first kernel and the second electronic device includes:
when the first kernel initiates communication, the state information is obtained based on a lock-free double-cache mechanism;
and the first kernel interrupts communication between the first kernel and the second electronic device when the acquired state information is the unconnected state information.
In a possible implementation manner, the sending, by the first core, the link monitoring instruction to the second core when the first duration information satisfies the duration condition includes:
and the first kernel sends the link monitoring instruction to the second kernel based on an event processing mechanism under the condition that the first time length information meets a time length condition.
In one possible implementation manner, the determining, by the second core, the state information of the first communication link based on the response result of the second electronic device to the monitoring information includes:
and the second kernel determines that the state information is connected state information under the condition that the second kernel receives response information in a target time period, wherein the response information is generated by the second electronic device in response to the monitoring information.
In one possible implementation, the method further includes:
when the second kernel determines the state information and the state information is connected state information, the first kernel starts timing from zero and obtains second duration information;
the first kernel sends the link monitoring instruction to the second kernel under the condition that the second duration information meets the duration condition;
and returning to the step that the second kernel sends monitoring information to the second electronic equipment based on a second communication link under the condition that the second kernel receives the link monitoring instruction.
According to another aspect of the present application, a communication link monitoring apparatus is provided, which is applied to a first electronic device, where the first electronic device includes a first core and a second core;
the first kernel is configured to send a link monitoring instruction to the second kernel when first duration information satisfies a duration condition, where a start time of the first duration information is a time for the first kernel to receive and send information based on a first communication link, an end time of the first duration information is a current time, and the first communication link is a user data packet protocol link between the first kernel and a second electronic device;
the second core is configured to send monitoring information to the second electronic device based on a second communication link when receiving the link monitoring instruction, where the second communication link is a transmission control protocol link;
the second core is further configured to determine status information of the first communication link based on a response result of the second electronic device to the monitoring information.
According to another aspect of the present application, there is provided a communication link monitoring apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the above method.
According to another aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
The first communication link (UDP link) in the prior art cannot detect whether itself is broken. The method is based on a multi-core platform, combines the UDP and the TCP, can automatically, real-timely and dynamically detect the current link state, and realizes reasonable utilization of network resources. In the application, whether the UDP link is disconnected is detected based on the TCP link, and the state of the UDP link is represented by the state of the TCP link, so that the effect of detecting the state of the UDP link in real time is achieved. In addition, in the application, the two links are arranged in different kernels and are matched with each other, the UDP link is arranged in the first kernel, and the TCP link is arranged in the second kernel, so that the load of the kernels can be balanced, and the running efficiency of the kernels can be 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 is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method of communication link monitoring in accordance with an exemplary embodiment;
fig. 2 is a flow diagram illustrating a method of communication link monitoring according to another exemplary embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present application. It will be understood by those skilled in the art that the present application may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present application.
The application can be applied to the field of Ethernet communication of an automotive electronic and electrical architecture and is applied to vehicle-mounted Ethernet communication software. The vehicle-mounted Ethernet is a novel local area network technology for connecting electronic units in a vehicle, the vehicle-mounted Ethernet follows a layered structure of the traditional Ethernet and is divided into 4 Protocol layers, a link layer, a network layer, a Transmission layer and an application layer are sequentially arranged from bottom to top, wherein the Transmission layer mainly comprises a User data packet Protocol (UDP) and a Transmission Control Protocol (TCP), and the UDP and the TCP of the two protocols realize the sending and receiving of data through a socket mechanism. When the socket state is disconnected, the data transmission link fails, and the retransmission of the data is invalid, which causes waste of network resources.
The present application provides a method, an apparatus, a device and a storage medium for monitoring a communication link, which can at least solve the technical problem in the prior art that the transmission link status of the UDP protocol cannot be determined.
With reference to fig. 1 to fig. 2, a communication link monitoring method provided in an embodiment of the present specification is applied to a first electronic device, where the first electronic device includes a first core and a second core. The first electronic device in the embodiments of the present specification may communicate with the second electronic device, and the first electronic device and the second electronic device may be a server, a client, an electronic control unit, or the like. The first electronic device may include a plurality of cores that may be used to perform all computations, accept or store commands, process data, etc.
The communication link monitoring method provided by the embodiment of the specification comprises the following steps:
step S101: the first kernel sends a link monitoring instruction to the second kernel when the first time length information meets a time length condition, the starting time of the first time length information is the time for the first kernel to receive and send information based on the first communication link, the ending time of the first time length information is the current time, and the first communication link is a user datagram protocol link (UDP link) between the first kernel and the second electronic device.
In this embodiment of the present specification, the first core may communicate with the second electronic device based on a UDP link, and the first core may send information to the second electronic device or receive information from the second electronic device. The duration condition may be a duration threshold, which may be set according to actual requirements. Satisfying the duration condition may refer to being greater than or equal to a duration threshold. Optionally, in a case that the first duration information does not satisfy the duration condition, the first kernel may periodically acquire the first duration information until the first duration information satisfies the duration condition.
In one example, the first core may periodically obtain a current time and a time the first core last sent or received information; the first time length information may thus be determined in real time based on the difference between the current time and the time at which the information was last transmitted or received.
In another example, the first core may start a timer when the first core finishes sending or receiving information, and control the timer to start timing from zero, so as to obtain the first duration information; the first core may periodically obtain the first duration information from the timer. For example, when the information a is received or the information B is sent, the first core may start a timer and start to record the time length from the time when the information a is received, or start the timer and start to record the time length from the time when the information B is sent, where the recorded time length information corresponds to the information identifier.
The first time length information is the time length between the current time and the time when the information is transmitted or received last time; the first core can clear the timing information when the first core starts to send or receive the information again, so that the first time length information can be obtained again after the sending or receiving is finished; the first core may also clear the first duration information when sending the link monitoring instruction to the second core.
Step S102: and the second core sends monitoring information to the second electronic equipment based on a second communication link under the condition of receiving the link monitoring instruction, wherein the second communication link is a transmission control protocol link (TCP link).
In this embodiment of the present specification, the second core may communicate with the second electronic device based on a TCP link, and the second core may send information to the second electronic device or receive information from the second electronic device. The link monitoring instruction is used for triggering the second core to send monitoring information, the monitoring information may be a heartbeat packet based on TCP, the heartbeat packet may be a heartbeat detection message, and the message content may include: local socket link information and current link state information; the local socket link information may include a socket number socket id, a protocol address (IP address), a port number, and the like.
Step S103: the second core determines the state information of the first communication link based on the response result of the second electronic device to the monitoring information.
In this embodiment of the present description, if a communication link between the first electronic device and the second electronic device is normal, after the second core sends the monitoring information to the second electronic device, the second electronic device may respond to the monitoring information and send response information to the second core based on the TCP link. Therefore, if the second core receives the response information of the second electronic device, it may be stated that the communication link between the second core and the second electronic device is normal, and it may be stated that the first communication link between the first core and the second electronic device is normal. If the second core does not receive the response message of the second electronic device, it may indicate that the communication link between the second core and the second electronic device is disconnected, and may indicate that the first communication link between the first core and the second electronic device is abnormal.
The first communication link (UDP link) in the prior art cannot detect whether itself is broken. The embodiment of the specification is based on a multi-core platform, combines with a transport layer protocol UDP and a TCP, can automatically, dynamically detect the current link state in real time, and realizes reasonable utilization of network resources. In the embodiment of the description, whether the UDP link is disconnected is detected based on the TCP link, and the state of the UDP link is represented by the state of the TCP link, so that the effect of detecting the state of the UDP link in real time is achieved. In addition, in the embodiment of the present specification, two links are arranged in different cores, the two cores are mutually matched, a UDP link is arranged in the first core, and a TCP link is arranged in the second core, so that the core load can be balanced, and the core operation efficiency can be improved.
In one possible implementation, step S103 includes step S1031: and the second kernel determines that the state information is unconnected state information under the condition that the response information is not received in the target time period, wherein the response information is generated by the second electronic equipment in response to the monitoring information.
In this embodiment of the present specification, the target time period may be a time period from when the second core sends the monitoring information, and a duration of the target time period may be a preset value. The unconnected state information may characterize a UDP link disconnection. In this embodiment of the present specification, whether the communication link is normal is determined according to whether the second core receives the response information, and the state information can be determined quickly and accurately.
In one possible implementation, the method further includes step S104: and the first kernel interrupts the communication between the first kernel and the second electronic equipment under the condition that the state information is the unconnected state information.
In this embodiment of the present specification, the form of the state information may be a global graph bitmap, and 0 and 1 may be used to indicate the type of the state information, where if data in the graph bitmap is 0, the type of the state information may be indicated as unconnected state information, and if data in the graph bitmap is 1, the type of the state information may be indicated as connected state information. In the event that the UDP link is broken, the first core may discontinue data communication over the first communication link, cease transmitting data to the second electronic device based on the first communication link, and cease receiving data from the second electronic device based on the first communication link. In the embodiment of the present description, not only the connection state of the UDP link may be determined quickly and accurately, but also data transceiving based on the UDP link may be stopped when the UDP link is disconnected, so as to avoid invalid data transceiving performed by the first core, avoid a waste of computing power of the first electronic device, and avoid a waste of network bandwidth.
In one possible implementation, step S104 includes:
when a first kernel initiates communication, state information is acquired based on a lock-free double-cache mechanism;
and the first kernel interrupts the communication between the first kernel and the second electronic device under the condition that the acquired state information is the unconnected state information.
In this embodiment of the present description, when the first core initiates data communication, that is, when the first core starts to send data or starts to receive data, the state information may be actively queried, and if a queried graph bitmap is 0, the first core may immediately interrupt communication between the first core and the second electronic device. The data communication initiated by the first kernel may be a data sending process or a data receiving process. In this embodiment of the present description, a precondition for acquiring the state information is that the first kernel initiates communication, that is, the first kernel does not need to acquire the state information under other conditions, which may save computational resources of the first kernel and improve operation efficiency of the first kernel.
In order to improve the utilization rate of the memory, a chart bitmap is adopted to store socket link information in a lock-free double-cache mechanism. Aiming at the graph bitmaps, the first kernel only has read operation, the second kernel only has write operation, and the graph bitmaps belong to more-read-write-less operation.
In one possible implementation, step S101 includes: and the first kernel sends a link monitoring instruction to the second kernel based on the event processing mechanism under the condition that the first time length information meets the time length condition. An event handling mechanism is an event handling framework designed to invoke relevant event handlers for processing. In this embodiment of the present description, the first kernel sends the link monitoring instruction to the second kernel based on the event handling mechanism, so that the instruction validity and timeliness between the first kernel and the second kernel can be ensured.
In another possible implementation manner, the first core may also send the link monitoring instruction to the second core based on a soft interrupt manner with higher real-time performance.
In a possible implementation manner, step S103 further includes step S1032: and the second kernel determines that the state information is connected state information under the condition that the second kernel receives response information in the target time period, wherein the response information is generated by the second electronic equipment in response to the monitoring information.
In an embodiment of this specification, the method further includes: the first kernel continues to maintain communication between the first kernel and the second electronic device on the first communication link under the condition that the state information is not connected with the state information, and the first kernel can continue to receive and transmit data based on the first communication link without affecting data receiving and transmitting in a normal state.
In one possible implementation, the method further includes:
when the second kernel determines the state information and the state information is the connected state information, the first kernel starts timing from zero and obtains second duration information;
the first kernel sends a link monitoring instruction to the second kernel under the condition that the second duration information meets the duration condition;
the process returns to step S102.
In this embodiment of the present specification, when the state information is not connected to the state information, it is described that the UDP link is normal, but communication may still not be performed between the first core and the second electronic device, and therefore, at this time, the second core is still required to continue to periodically send the TCP heartbeat packet to monitor the link connection state. The value of the second duration information may change with the passage of time, and when the second duration information satisfies the duration condition, the first core sends the link monitoring instruction to the second core again. The embodiment of the specification can monitor the state of the UDP link periodically and in real time, and can timely monitor the communication of the terminal UDP link under the condition that the UDP link is disconnected, thereby avoiding the waste of calculation power. The duration condition may be a duration threshold, which may be set according to actual requirements. Satisfying the duration condition may refer to being greater than or equal to a duration threshold.
In a possible implementation manner, before step S101, the method further includes: the first inner core starts timing from zero when the first communication link finishes information receiving and sending, and first time length information is obtained.
In a possible implementation manner, before step S101, the method further includes: the first kernel establishes a first communication link; the second core establishes a second communication link.
The UDP network status monitoring mechanism in this embodiment is implemented based on the TCP protocol, which is stateful and has high reliability. By means of the platform advantages of the current multi-core MCU, a UDP network for normally transmitting data runs in a first core; establishing a default TCP link on the second kernel, which can be called a keep-alive TCP, and taking charge of socket link state information broadcasting and updating maintenance of the first electronic equipment and the second electronic equipment, wherein the keep-alive TCP and the normal UDP have a one-to-many mapping relation; the keep-alive TCP instance is deployed on the second kernel, and performance influence on data receiving and sending of the first kernel is reduced as much as possible. The heartbeat detection message occupies certain network resources, when the UDP network normally transmits data, the service data message can be multiplexed, a detection timer is established aiming at each socket link based on the UDP, the period of the detection timer is supported to be configurable, the detection timer is reset when the service data is sent or received, when the detection timer is overtime, a keep-alive TCP instance which is notified to a second inner core is sent based on an Event mechanism, the local socket configuration information and the state information are packaged into the heartbeat detection message and sent to second electronic equipment, after the second electronic equipment receives the heartbeat detection message, the message is analyzed, the UDP network state is synchronously updated and maintained, and the transmission of the heartbeat detection message is reduced.
In order to improve the utilization rate of the memory, the mechanism adopts a chart bitmap to store socket link information. Aiming at the graph bitmaps, the first kernel only has read operation, the second kernel only has write operation, and the graph bitmaps belong to more-read-write-less operation.
In the embodiment of the present specification, after the system is powered on and the first kernel is started, the second kernel is started after verifying that the application program has no problem. And creating a global chart bitmap, wherein each bit mark corresponds to the state of the socketId, and the initialization default value is 0. When the bit value is 0, the socket state is disconnected (Offline), and when the bit value is 1, the socket link is normal (Online). And a default socket instance is created on the second kernel, socket parameters are set, and the protocol type sets the TCP. Creating a socket instance on the first kernel, wherein the protocol type is set to be UDP; and simultaneously starting a detection timer, wherein the period of the detection timer is supported to be configurable, and the detection timer is reset every time data is sent or received. If the detection timer is overtime, triggering a TCP (transmission control protocol) instance on a second inner core to send a heartbeat detection message to second electronic equipment based on an inter-core Event mechanism, wherein the message content is local socket information and the current state, and after the second electronic equipment receives the heartbeat detection message, analyzing the message to obtain state information corresponding to the socket and updating the state information into a global graph bitmap.
A UDP based socket on the first core initiates data communication. And inquiring a global graph bitmap according to the socket Id before applying for a buffer for a sending process, if the current socket state is Online, continuing a normal message sending process, and if not, interrupting data sending and reporting abnormal information to a user side. And aiming at the receiving process, when an RxIndication function is called to process the received message, the message information is analyzed to obtain the corresponding socket Id, the global graph bitmap is inquired, if the current socket state is Online, the normal message sending process is continued, otherwise, the data receiving process is interrupted, and abnormal information is reported to the user side.
In addition, an embodiment of the present specification further provides a communication link monitoring apparatus, which is applied to a first electronic device, where the first electronic device includes a first core and a second core;
the first kernel is used for sending a link monitoring instruction to the second kernel under the condition that the first time length information meets a time length condition, the starting time of the first time length information is the time for the first kernel to receive and send information based on the first communication link, the ending time of the first time length information is the current time, and the first communication link is a user data packet protocol link between the first kernel and the second electronic equipment;
the second core is used for sending monitoring information to the second electronic equipment based on a second communication link under the condition of receiving the link monitoring instruction, wherein the second communication link is a transmission control protocol link;
the second core is further used for determining the state information of the first communication link based on the response result of the second electronic equipment to the monitoring information.
The first communication link (UDP link) in the prior art cannot detect whether itself is broken. The embodiment of the specification is based on a multi-core platform, combines with a transport layer protocol UDP and a TCP, can automatically, dynamically detect the current link state in real time, and realizes reasonable utilization of network resources. In the embodiment of the description, whether the UDP link is disconnected is detected based on the TCP link, and the state of the UDP link is represented by the state of the TCP link, so that the effect of detecting the state of the UDP link in real time is achieved. In addition, in the embodiment of the present specification, two links are arranged in different cores, the two cores are mutually matched, a UDP link is arranged in the first core, and a TCP link is arranged in the second core, so that the core load can be balanced, and the core operation efficiency can be improved.
In a possible implementation manner, the second core is further configured to determine that the status information is unconnected status information if no response information is received within the target time period, where the response information is generated by the second electronic device in response to the monitoring information.
In a possible implementation manner, the first core is further configured to interrupt communication between the first core and the second electronic device if the state information is unconnected state information.
In one possible implementation, the first core is further configured to:
when communication is initiated, state information is acquired based on a lock-free double-cache mechanism;
and if the acquired state information is the unconnected state information, interrupting the communication between the first kernel and the second electronic equipment.
In one possible implementation, the first core is further configured to: and sending a link monitoring instruction to the second inner core based on the event processing mechanism under the condition that the first time length information meets the time length condition.
In one possible implementation, the second core is further configured to: and under the condition that the response information is received in the target time period, determining that the state information is connected state information, wherein the response information is generated by the second electronic equipment in response to the monitoring information.
In one possible implementation, the first core is further configured to: when the second kernel determines the state information and the state information is the connected state information, timing from zero and obtaining second duration information;
and sending a link monitoring instruction to the second kernel under the condition that the second duration information meets the duration condition.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
An embodiment of the present specification further provides a communication link monitoring device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the communication link monitoring method described above.
Furthermore, embodiments of the present specification also provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, which when executed by a processor implement the above-mentioned communication link monitoring method.
The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present application.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present application may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry can execute computer-readable program instructions to implement aspects of the present application by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A communication link monitoring method is applied to a first electronic device, wherein the first electronic device comprises a first kernel and a second kernel, and the method comprises the following steps:
the first kernel sends a link monitoring instruction to the second kernel when first time length information meets a time length condition, wherein the starting time of the first time length information is the time for the first kernel to receive and send information based on a first communication link, the ending time of the first time length information is the current time, and the first communication link is a user data packet protocol link between the first kernel and second electronic equipment;
the second kernel sends monitoring information to the second electronic equipment based on a second communication link under the condition that the second kernel receives the link monitoring instruction, wherein the second communication link is a transmission control protocol link;
the second inner core determines the state information of the first communication link based on the response result of the second electronic equipment to the monitoring information.
2. The communication link monitoring method of claim 1, wherein the second core determining the status information of the first communication link based on the response result of the second electronic device to the monitoring information comprises:
and the second kernel determines that the state information is unconnected state information under the condition that no response information is received in a target time period, wherein the response information is generated by the second electronic equipment in response to the monitoring information.
3. The communication link monitoring method of claim 2, wherein the method further comprises:
and the first kernel interrupts communication between the first kernel and the second electronic device when the state information is the unconnected state information.
4. The communication link monitoring method according to claim 3, wherein the interrupting, by the first kernel, the communication between the first kernel and the second electronic device, if the state information is the unconnected state information, includes:
when the first kernel initiates communication, the state information is obtained based on a lock-free double-cache mechanism;
and the first kernel interrupts communication between the first kernel and the second electronic device when the acquired state information is the unconnected state information.
5. The communication link monitoring method according to claim 3, wherein the sending, by the first core, the link monitoring instruction to the second core when the first duration information satisfies the duration condition includes:
and the first kernel sends the link monitoring instruction to the second kernel based on an event processing mechanism under the condition that the first time length information meets a time length condition.
6. The communication link monitoring method of claim 1, wherein the second core determining the status information of the first communication link based on the response result of the second electronic device to the monitoring information comprises:
and the second kernel determines that the state information is connected state information under the condition that the second kernel receives response information in a target time period, wherein the response information is generated by the second electronic device in response to the monitoring information.
7. The communication link monitoring method of claim 1, wherein the method further comprises:
when the second kernel determines the state information and the state information is connected state information, the first kernel starts timing from zero and obtains second duration information;
the first kernel sends the link monitoring instruction to the second kernel under the condition that the second duration information meets the duration condition;
and returning to the step that the second kernel sends monitoring information to the second electronic equipment based on a second communication link under the condition that the second kernel receives the link monitoring instruction.
8. The communication link monitoring device is applied to first electronic equipment, wherein the first electronic equipment comprises a first kernel and a second kernel;
the first kernel is configured to send a link monitoring instruction to the second kernel when first duration information satisfies a duration condition, where a start time of the first duration information is a time for the first kernel to receive and send information based on a first communication link, an end time of the first duration information is a current time, and the first communication link is a user data packet protocol link between the first kernel and a second electronic device;
the second core is configured to send monitoring information to the second electronic device based on a second communication link when receiving the link monitoring instruction, where the second communication link is a transmission control protocol link;
the second core is further configured to determine status information of the first communication link based on a response result of the second electronic device to the monitoring information.
9. A communication link monitoring device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 7.
CN202111551080.6A 2021-12-17 2021-12-17 Communication link monitoring method, device, equipment and storage medium Active CN114338477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111551080.6A CN114338477B (en) 2021-12-17 2021-12-17 Communication link monitoring method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111551080.6A CN114338477B (en) 2021-12-17 2021-12-17 Communication link monitoring method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114338477A true CN114338477A (en) 2022-04-12
CN114338477B CN114338477B (en) 2024-04-19

Family

ID=81053192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111551080.6A Active CN114338477B (en) 2021-12-17 2021-12-17 Communication link monitoring method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114338477B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086385A (en) * 2022-05-12 2022-09-20 阿里巴巴达摩院(杭州)科技有限公司 Vehicle-cloud data interaction method and device and computer-readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007069046A1 (en) * 2005-12-15 2007-06-21 Nokia Corporation Power-efficient address mapping scheme
CN103457985A (en) * 2012-11-23 2013-12-18 航天数联信息技术(深圳)有限公司 Method and system of dual-channel communication
CN103546917A (en) * 2013-11-07 2014-01-29 华为技术有限公司 Data transmission method and device
CN109873719A (en) * 2019-02-03 2019-06-11 华为技术有限公司 A kind of fault detection method and device
CN112600908A (en) * 2020-12-07 2021-04-02 南京指掌易信息科技有限公司 Method, device, equipment and storage medium for acquiring communication link
CN112838966A (en) * 2021-04-22 2021-05-25 北京拓课网络科技有限公司 UDP link monitoring method and system and electronic equipment
CN112866178A (en) * 2019-11-27 2021-05-28 北京沃东天骏信息技术有限公司 Method and device for audio data transmission
US20210378043A1 (en) * 2020-06-02 2021-12-02 Apple Inc. Apparatus and methods for efficient link disconnection determination

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007069046A1 (en) * 2005-12-15 2007-06-21 Nokia Corporation Power-efficient address mapping scheme
CN103457985A (en) * 2012-11-23 2013-12-18 航天数联信息技术(深圳)有限公司 Method and system of dual-channel communication
CN103546917A (en) * 2013-11-07 2014-01-29 华为技术有限公司 Data transmission method and device
CN109873719A (en) * 2019-02-03 2019-06-11 华为技术有限公司 A kind of fault detection method and device
CN112866178A (en) * 2019-11-27 2021-05-28 北京沃东天骏信息技术有限公司 Method and device for audio data transmission
US20210378043A1 (en) * 2020-06-02 2021-12-02 Apple Inc. Apparatus and methods for efficient link disconnection determination
CN112600908A (en) * 2020-12-07 2021-04-02 南京指掌易信息科技有限公司 Method, device, equipment and storage medium for acquiring communication link
CN112838966A (en) * 2021-04-22 2021-05-25 北京拓课网络科技有限公司 UDP link monitoring method and system and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086385A (en) * 2022-05-12 2022-09-20 阿里巴巴达摩院(杭州)科技有限公司 Vehicle-cloud data interaction method and device and computer-readable storage medium

Also Published As

Publication number Publication date
CN114338477B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
WO2021121370A1 (en) Message loss detection method and apparatus for message queue
US10594606B2 (en) Wired data-connection aggregation
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
US20170163478A1 (en) Method,electronic device and system for updating client configuration in key-value pair database
CN105939201A (en) Method and device for checking state of server
CN110505220B (en) Method and device for supporting OPC protocol to realize dual-computer hot standby and communication terminal
CN111147403B (en) Message processing method and device, storage medium and electronic device
CN111490947B (en) Data packet sending method, data packet receiving method, system, equipment and medium
CN109962827B (en) Equipment link detection method, device, equipment and readable storage medium
US10601692B2 (en) Integrating a communication bridge into a data processing system
US8948020B2 (en) Detecting and isolating dropped or out-of-order packets in communication networks
CN114338477B (en) Communication link monitoring method, device, equipment and storage medium
CN111818582B (en) Data transmission method and device and electronic equipment
CN110870286A (en) Fault tolerance processing method and device and server
US8423827B2 (en) Topology based correlation of threshold crossing alarms
CN111684428B (en) Super-scale clouding N-route protection
CN111092952A (en) Data interaction method and related product
CN112436982B (en) Network flow automatic mixed running test method, system, terminal and storage medium
CN116260747A (en) Monitoring method and device of terminal test equipment and electronic equipment
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
US9743037B2 (en) Method for transmitting device indicator data in network-based AV system
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
CN111416802B (en) TCP-based data processing method and device, electronic equipment and readable medium
WO2019015049A1 (en) Method and device for exception handling in wireless sensor network
CN112118273B (en) Data interaction method, system and first client

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