Terminal communication method, device, equipment, medium and product

By adopting a dual physical connection of main shaft lines and auxiliary shaft lines in the underground communication system of coal mines, the line with better communication quality is evaluated in real time and dynamically selected, thus solving the problem of underground communication interruption and achieving highly reliable voice calls and safety assurance.

CN121864673APending Publication Date: 2026-04-14NANJING BESTWAY AUTOMATION SYST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING BESTWAY AUTOMATION SYST
Filing Date
2026-01-21
Publication Date
2026-04-14

Smart Images

  • Figure CN121864673A_ABST
    Figure CN121864673A_ABST
Patent Text Reader

Abstract

The invention discloses a terminal communication method and device, equipment, a medium and a product. The method comprises the steps of determining a first communication quality attribute of a main shaft line and a second communication quality attribute of an auxiliary shaft line based on heartbeat data packets mutually sent by a voice access device and an underground coal mine terminal on the main shaft line and the auxiliary shaft line respectively; in response to a voice call link establishment event for the underground coal mine terminal, selecting a to-be-used line from the main shaft line and the auxiliary shaft line according to the first communication quality attribute and the second communication quality attribute; and establishing a voice call link between the underground coal mine terminal and the corresponding ground terminal based on the to-be-used line. According to the technical scheme provided by the invention, the call completing rate, the definition and the stability of the voice call are improved, and the fault-tolerant capability and the service continuity of an underground communication system in a complex and high-risk environment are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer processing technology, and in particular to a terminal communication method, apparatus, device, medium, and product. Background Technology

[0002] To ensure the safety and work efficiency of underground coal mine workers, communication systems are typically extended to various underground work areas via analog telephone lines to provide basic voice communication capabilities.

[0003] However, the harsh environment in coal mines can easily lead to physical damage or signal attenuation of the analog cables connecting various telephone terminals, resulting in communication interruptions, affecting the reliability of communication, and threatening the safety of personnel underground. Summary of the Invention

[0004] This invention provides a terminal communication method, apparatus, device, medium, and product to improve the connection rate, clarity, and stability of voice calls, and enhance the fault tolerance and service continuity of underground communication systems in complex and high-risk environments.

[0005] According to one aspect of the present invention, a terminal communication method is provided, applied to a terminal communication system, the terminal communication system including a voice access device and an underground coal mine terminal physically connected to the voice access device via a main shaft line and an auxiliary shaft line, the method comprising:

[0006] Based on the voice access device and the underground coal mine terminal sending heartbeat data packets to each other on the main shaft line and the auxiliary shaft line respectively, the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line are determined.

[0007] In response to a voice call link establishment event for the underground coal mine terminal, a line to be used is selected from the main shaft line and the auxiliary shaft line according to the first communication quality attribute and the second communication quality attribute;

[0008] Based on the line to be used, establish a voice communication link between the underground coal mine terminal and the corresponding ground terminal;

[0009] The ground terminal includes a first ground terminal that initiates an inbound call request to the underground coal mine terminal, or a second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal.

[0010] According to another aspect of the present invention, a terminal communication device is provided, deployed in a terminal communication system, the terminal communication system including a voice access device and an underground coal mine terminal that establishes a physical dual connection with the voice access device via a main shaft line and an auxiliary shaft line, the device comprising:

[0011] The communication quality attribute determination module is used to determine the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line based on the heartbeat data packets sent between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line, respectively.

[0012] The line to be used determination module is used to select a line to be used from the main shaft line and the auxiliary shaft line in response to a voice call link establishment event for the underground coal mine terminal, based on the first communication quality attribute and the second communication quality attribute.

[0013] The voice call link establishment module is used to establish a voice call link between the underground coal mine terminal and the corresponding ground terminal based on the line to be used.

[0014] The ground terminal includes a first ground terminal that initiates an inbound call request to the underground coal mine terminal, or a second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and a memory communicatively connected to said at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the terminal communication method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the terminal communication method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the terminal communication method as described in any embodiment of the present invention.

[0020] The technical solution of this invention determines the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line by sending heartbeat data packets between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line respectively. In response to the establishment event of the voice call link for the underground coal mine terminal, a line to be used is selected from the main shaft line and the auxiliary shaft line according to the first and second communication quality attributes. Based on the line to be used, a voice call link is established between the underground coal mine terminal and the corresponding ground terminal. This solves the problem in the prior art that relies on analog telephone lines to extend communication to various underground working areas. Due to the harsh underground environment, the cables are easily damaged by physical damage or signal attenuation, resulting in communication interruption, reduced communication reliability, and threats to the safety of underground personnel. The invention achieves accurate and differentiated perception of the status of the two physical links by establishing a heartbeat data packet interaction mechanism on the main shaft line and the auxiliary shaft line respectively, and evaluating the communication quality attributes of the two links in real time and independently. Furthermore, when a voice call link establishment event is triggered, the optimal line to be used is dynamically selected based on the communication quality attributes of the two lines, thereby establishing a high-quality end-to-end voice channel. This not only improves the connection rate, clarity, and stability of voice calls but also enhances the fault tolerance and service continuity of the entire underground communication system in complex and high-risk environments. Ultimately, it provides highly reliable, secure, and available voice communication support for safe production, emergency command and dispatch, and efficient collaboration between personnel above and below ground in coal mines.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a terminal communication method provided according to an embodiment of the present invention;

[0024] Figure 2 This is a schematic diagram of the structure of a terminal communication system provided according to an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of the structure of a terminal communication device provided according to an embodiment of the present invention;

[0026] Figure 4This is a schematic diagram of the structure of an electronic device that implements the terminal communication method of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security. It should also be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein are all conducted with the user's knowledge and consent, and comply with relevant privacy protection regulations.

[0030] Figure 1 This is a flowchart of a terminal communication method provided by an embodiment of the present invention. This embodiment is applicable to any situation requiring communication between an underground coal mine terminal and a surface terminal. The method can be applied to a terminal communication system, which includes a voice access device and an underground coal mine terminal physically connected to the voice access device via main shaft lines and auxiliary shaft lines. The method can be executed by a terminal communication device, which can be implemented in hardware and / or software and can be configured in a computing device. Figure 1 As shown, the method includes:

[0031] S110. Based on the voice access device and the underground coal mine terminal sending heartbeat data packets to each other on the main shaft line and the auxiliary shaft line respectively, determine the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line.

[0032] The voice access equipment can be deployed on the ground or in a safe area, serving as the communication interface unit on the surface, responsible for the access, processing, and routing of voice signals. The underground coal mine terminal is a user terminal device installed in various working areas underground, allowing miners to conduct voice calls. The main shaft line and auxiliary shaft line refer to two independent physical communication links from the voice access equipment to the underground coal mine terminal. For example, the main shaft line and auxiliary shaft line are laid along the main shaft and auxiliary shaft respectively, forming a physical dual-connection redundant structure. The heartbeat data packet is a lightweight probe message sent by both the underground coal mine terminal and the voice access equipment to monitor link connectivity and latency. The first and second communication quality attributes characterize the current communication performance indicators of the main shaft line and auxiliary shaft line, including but not limited to packet loss rate, transmission latency, jitter, signal-to-noise ratio, or link availability.

[0033] In this embodiment, the voice access device and the underground coal mine terminal independently and synchronously periodically send heartbeat data packets to each other on the main shaft line and the auxiliary shaft line, respectively, and record the heartbeat response time, success rate, and bit error rate of each line. Based on the recorded data, the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line are calculated, so that when the quality of one line deteriorates or is interrupted, it can be switched to another high-quality link to ensure uninterrupted voice communication. Considering the limited power supply of the underground coal mine terminal, the voice access device can also send heartbeat requests to the underground coal mine terminal at a higher frequency, and the underground coal mine terminal passively responds after receiving the heartbeat request. The main shaft line and the auxiliary shaft line carry independent heartbeat interaction streams. By analyzing the response timestamps and heartbeat data integrity of the requests on the two paths, the first communication quality attribute and the second communication quality attribute are determined. This method can reduce the power consumption and processing burden of the underground coal mine terminal while ensuring the link status awareness capability. Alternatively, a predictive model can be constructed by combining the changing trends of historical line communication quality attributes (such as slow increase in latency and periodic fluctuations in packet loss rate). Using a predictive model, combining current and historical heartbeat data packet transmission and reception data on the lines, the communication reliability of the main shaft and auxiliary shaft lines is predicted, outputting a first and a second communication quality attribute. For example, if the auxiliary shaft line has recently experienced intermittent packet loss but its current heartbeat is normal, its second communication quality attribute can be marked as a potential risk, prioritizing the use of the main shaft line and triggering an early warning. This approach improves the foresight and robustness of communication quality assessment, helping to complete link switching or maintenance preparations before physical failures occur.

[0034] In this embodiment, the heartbeat data packet includes at least the data packet type, data packet transmission sequence number, data packet length, data packet access time, and data verification identifier.

[0035] The data packet type identifies the message as a heartbeat probe, distinguishing it from voice or control signaling. The data packet sequence number is a unique sequence number assigned by the sender according to an incrementing rule, used to detect packet loss, out-of-order delivery, or duplicate reception. The data packet length indicates the total number of bytes in the heartbeat data packet, helping to verify integrity and adapt to the MTU limitations of different links. The data packet access time refers to a precise, globally unified timestamp recorded when the data packet enters the physical layer or data link layer of the communication network (such as Ethernet, industrial bus, wireless network, etc.). The data checksum identifier can be a CRC or checksum field, used to verify whether bit errors have occurred during data transmission, ensuring the reliability of the heartbeat information itself.

[0036] In this embodiment, the voice access device and the underground coal mine terminal can use a unified communication protocol on the main shaft line and the auxiliary shaft line. That is, the heartbeat data packets transmitted between the voice access device and the underground coal mine terminal adopt a unified data encapsulation format, and the defined data packet encapsulation format is shown in Table 1.

[0037] Table 1

[0038]

[0039] In Table 1, Type represents the data packet type; Seq_num represents the sequence number of the data packet (i.e., the data packet sending sequence number); Length represents the data packet length; Time represents the absolute timestamp of the data entering the network (i.e., the time the data packet was received); CRC is the data verification identifier. Type occupies 2 bytes and is of type heartbeat data. Seq_num occupies 4 bytes; Length occupies 4 bytes; Time occupies 8 bytes and can be timed in microseconds; CRC occupies 2 bytes.

[0040] The voice access device and the underground coal mine terminal communicate in real time, ensuring a normal call link by sending each other heartbeat data. For example, the voice access device sends heartbeat data to the underground coal mine terminal once per second; after receiving the heartbeat data from the voice access device, the underground coal mine terminal returns its own heartbeat data.

[0041] After receiving heartbeat data, the voice access device can parse the data packet type to confirm its validity, use the transmission sequence number to determine if there is packet loss, calculate the transmission delay by comparing the reception time with the local clock, verify frame integrity based on the data packet length, and confirm the absence of errors through data checksums. Based on this information, the voice access device calculates the first communication quality attribute (e.g., packet loss rate = number of lost sequence numbers / total number of transmissions) and the second communication quality attribute (e.g., average delay = average of the differences between each reception time and transmission time) for both the main shaft and auxiliary shaft lines, thereby achieving high-precision link evaluation.

[0042] Meanwhile, the packet transmission sequence number and data verification identifier can be used together to distinguish between link packet loss and data corruption, thereby refining the classification dimensions of communication quality attributes (such as "physical interruption", "signal attenuation", and "electromagnetic interference"). This refined modeling enables the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line to represent the line communication quality.

[0043] The technical solution provided in this embodiment achieves accurate, reliable, and differentiated perception of the communication status between the main shaft and auxiliary shaft lines by standardizing the inclusion of fields such as data packet type, transmission sequence number, data packet length, reception time, and data verification identifier in the heartbeat data packet. This not only improves the robustness and information density of the heartbeat mechanism itself but also enhances the availability, security, and communication assurance of the underground voice communication system in coal mines.

[0044] To achieve real-time, accurate, and reliable assessment of the communication status of the main shaft and auxiliary shaft lines, and to promptly identify abnormal situations such as link interruptions or performance degradation, thereby enabling intelligent selection, redundancy switching, and maintenance alarms for voice call links, and ensuring high availability of underground communication and the safety of workers in coal mines, at least one of the following methods can be used to determine the primary communication quality attribute of the main shaft line.

[0045] If the voice access device does not receive a heartbeat data packet sent by the underground coal mine terminal through the main shaft line within a continuously preset first time period, the first communication quality attribute of the main shaft line is determined to be an abnormal communication attribute.

[0046] Determine the packet loss attribute of the heartbeat data packets sent by the underground coal mine terminal through the main shaft line within a preset sliding window; if the packet loss attribute exceeds the preset packet loss threshold, then determine the first communication quality attribute of the main shaft line as an abnormal communication attribute.

[0047] If the packet loss attribute exceeds the preset packet loss threshold within a consecutive preset second time period, then the first communication quality attribute of the main well line is determined to be an abnormal communication attribute.

[0048] The preset first duration refers to the maximum allowed heartbeat interval (e.g., 5 seconds). If no heartbeat is received within this duration, the link is considered to be potentially interrupted. The preset second duration refers to the maximum allowed interval between packet loss attributes exceeding the preset packet loss threshold (e.g., 30 seconds). If the packet loss attribute still exceeds the preset packet loss threshold after this duration, the link is considered to be potentially interrupted. The preset sliding window is a dynamically moving time interval (e.g., within the last 10, 15, or 30 seconds), continuously sliding forward over time to statistically analyze the reception of heartbeat data packets. Packet loss attributes indicate the proportion or number of heartbeat data packets not received within this sliding window. The preset packet loss threshold is the critical value for determining link quality degradation (e.g., packet loss rate greater than 10%). Abnormal communication attributes characterize that the line is currently unreliable or has failed.

[0049] It should be noted that the voice access equipment maintains independent heartbeat reception timers and sliding window buffers for the main shaft line and the auxiliary shaft line respectively. The method for determining the communication quality attributes of each line is the same; the determination of the first communication quality attribute of the main shaft line can be used as an example for explanation.

[0050] Specifically, if the voice access device does not receive any heartbeat data packets from the underground coal mine terminal via the main shaft line within a continuously preset first time period, the first communication quality attribute of the main shaft line is determined to be an abnormal communication attribute. Simultaneously, the expected and actual heartbeat sequence numbers within a sliding window are continuously recorded, and packet loss attributes are calculated. Once the packet loss attribute exceeds a preset packet loss threshold (e.g., more than 3 out of 10 heartbeats are lost), the first communication quality attribute of the main shaft line can be determined to be an abnormal communication attribute. Alternatively, it can be determined whether the packet loss attribute consistently exceeds the preset packet loss threshold within a continuously preset second time period. If so, the first communication quality attribute of the main shaft line is determined to be an abnormal communication attribute. These three criteria can be applied independently or in combination, ensuring both rapid response to complete interruptions and sensitive detection of intermittent degradation.

[0051] For example, if a voice access device fails to receive heartbeat data from an underground coal mine terminal for 5 consecutive seconds (i.e., a preset first duration), it will consider the first communication quality attribute to be an abnormal communication attribute. When packet loss occurs in the heartbeat data between the voice access device and the underground coal mine terminal, and the heartbeat data packet loss rate (i.e., packet loss attribute) is greater than 10% (i.e., a preset packet loss threshold) for 30 seconds (i.e., a preset second duration), the first communication quality attribute is considered to be an abnormal communication attribute, the line is judged to be faulty, the faulty line is disabled, and an alarm is pushed.

[0052] The system can also automatically adjust the preset first duration, preset second duration, and preset packet loss threshold based on the historical communication stability of the main shaft line. For example, a higher standard is used to set the preset first duration and preset packet loss threshold when the main shaft line is running stably for a long period of time, in order to improve sensitivity. When environmental disturbances (such as lightning or the start-up and shutdown of large equipment) cause temporary fluctuations, the preset first duration and preset packet loss threshold are temporarily relaxed to avoid false alarms. On this basis, the voice access device still determines whether the line exhibits abnormal communication attributes based on whether a heartbeat has not been received within the time limit and whether the packet loss attribute within the sliding window exceeds the standard. This setting can enhance robustness in complex downhole electromagnetic and physical environments and avoid frequent false disconnections or missed alarms caused by fixed thresholds.

[0053] It should be noted that if the underground coal mine terminal fails to receive a heartbeat confirmation signal from the voice access device multiple times, it can also actively switch the transmission line or increase the transmission frequency.

[0054] The technical solution provided in this embodiment, through setting a triple criterion of preset first-duration timeout detection, preset packet loss attributes within a sliding window, and packet loss attribute analysis within a continuously preset second-duration period, can timely, accurately, and multi-granularly identify anomalies in the communication status of the main shaft and auxiliary shaft lines. This setting can not only quickly capture complete link interruption events, but also effectively detect progressive faults such as signal attenuation, interference, or poor contact, thereby providing a highly reliable switching basis for dual-link redundancy systems. This improves the continuity and reliability of underground voice communication in coal mines, ensuring miners' safety and guaranteeing the timeliness and reliability of emergency command and dispatch.

[0055] To accurately quantify the communication reliability of the main shaft line, avoid misjudgments due to momentary interference or occasional packet loss, and improve the accuracy of link quality assessment, redundancy switching decisions, and fault early warning, the following process is employed to determine the packet loss attributes of heartbeat data packets sent by underground coal mine terminals through the main shaft line within a preset sliding window: the theoretical number of heartbeat packets that the voice access device should receive from the main shaft line within the preset sliding window, and the actual number of valid heartbeat packets received. Based on the theoretical and valid heartbeat packet counts, the corresponding packet loss attributes of the main shaft line are determined.

[0056] The theoretical heartbeat packet count refers to the total number of heartbeat data packets that should be sent within the preset sliding window according to the heartbeat sending cycle set by the underground coal mine terminal, or the total number of heartbeat data packets that should be responded to according to the heartbeat request issued by the voice access device. The valid heartbeat packet count refers to the number of heartbeat data packets that the voice access device successfully receives and passes verification (such as correct data verification identifier, consecutive sequence number, and matching type) within the same sliding window.

[0057] In this embodiment, the underground coal mine terminal can proactively send heartbeat data packets to the voice access device at pre-configured fixed intervals (e.g., every 2 seconds). Within each preset sliding window, the voice access device calculates the theoretical number of heartbeat packets based on this fixed period (e.g., 15 packets for a 30-second window), and simultaneously records the actual number of valid heartbeat packets received and verified. The difference between the two can be used as the number of lost packets, which is then used as the packet loss attribute of the main shaft line. Alternatively, the packet loss attribute of the main shaft line can be obtained by quotienting the number of lost packets and the theoretical number of heartbeat packets.

[0058] Alternatively, the voice access device, acting as the master control unit, periodically sends heartbeat requests to the underground coal mine terminal within a preset sliding window; upon receiving these requests, the underground coal mine terminal immediately sends back a responsive heartbeat data packet. The theoretical number of heartbeat packets is the total number of requests sent by the voice access device within this window, while the actual number of valid heartbeat packets received is the number of responses successfully received. The difference between the two can be used as the packet loss quantity, which is then used as the packet loss attribute of the main shaft line. Alternatively, the packet loss attribute of the main shaft line can be obtained by quotienting the lost quantity and the theoretical number of heartbeat packets.

[0059] Considering that underground coal mine terminals may dynamically adjust their heartbeat intervals due to power management or load changes, the voice access equipment no longer relies on a preset fixed period. Instead, it identifies sequence numbers in historical valid heartbeat packets to accurately determine loss events. For example, if heartbeat packets with sequence numbers 10, 11, and 14 are received, then packets 12 and 13 are considered lost. In this case, the theoretical number of heartbeat packets can be calculated from the first and last valid sequence numbers within the sliding window (e.g., from sequence number 5 to 20, the theoretical number of heartbeat packets should be 16), rather than relying solely on the time length. Combining this with the actual number of valid heartbeat packets provides a more accurate reflection of the packet loss characteristics of the main shaft line.

[0060] The advantage of this setup is that by comparing the theoretical number of heartbeat packets with the actual number of valid heartbeat packets received within a preset sliding window to determine the packet loss attribute of the main shaft line, dynamic, quantitative, and high-precision evaluation of the communication link quality can be achieved. This not only effectively distinguishes between occasional interference and continuous degradation but also improves the stability and safety of the underground coal mine communication system by ensuring the reliability and accuracy of subsequent link selection, fault warning, and redundancy switching.

[0061] S120. In response to a voice call link establishment event for an underground coal mine terminal, select one of the main shaft lines and the auxiliary shaft lines to be used based on a first communication quality attribute and a second communication quality attribute.

[0062] Among them, the voice call link establishment event refers to various triggering conditions that enable the voice access device to establish a real-time voice communication channel for the underground coal mine terminal. These events can be initiated by the underground coal mine terminal, the ground terminal, or the ground dispatch system, reflecting the demand for real-time voice communication connections, such as off-hook dialing and dispatch calls. The line to be used refers to the preferred communication path that actually carries voice data in this voice call.

[0063] In this embodiment, it is possible to detect in real time or periodically whether a voice call link establishment event for the underground coal mine terminal has been triggered.

[0064] Optionally, the voice call link establishment event includes at least one of the following:

[0065] The system receives an incoming call request from a ground terminal connected to the switch for a preset number; the switch communicates with the voice access device; and the preset number is associated with the underground coal mine terminal.

[0066] Received an outbound call request initiated by the underground coal mine terminal;

[0067] Trigger a scheduled task.

[0068] Ground terminals refer to voice communication equipment deployed on the mine surface for use by dispatchers or managers, such as dispatch telephones or IP phones. Switches are the core signaling and switching equipment located in the ground communication center, responsible for call routing, number analysis, and call connection control. Voice access equipment is the interface unit connecting the switch to the underground communication lines, responsible for the management of the main shaft and auxiliary shaft lines, heartbeat monitoring, and communication link selection. Preset numbers are pre-assigned and configured telephone numbers used to uniquely identify a specific underground coal mine terminal; that is, the number is associated with a specific underground coal mine terminal (e.g., binding "8001" to a specific underground coal mine terminal) to ensure that calls are accurately routed to the target terminal. Incoming call requests are incoming signals initiated from the ground side and directed to underground coal mine terminals. Outgoing call requests are outgoing signals initiated by underground coal mine terminals to the ground. Scheduled tasks are periodic operation instructions automatically triggered by the operation and maintenance platform according to a predetermined time plan, used for purposes such as link detection, terminal status inspection, and broadcast notifications.

[0069] Specifically, the switch can establish effective communication connections with voice access devices used for underground link management. Ground control consoles, telephones, and other terminal devices already connected to the switch can initiate calls to specific underground coal mine terminals by dialing a pre-configured phone number assigned to them; underground miners can also use their local underground coal mine terminals to dial and initiate voice call requests from underground to the surface. Furthermore, the system can automatically initiate communication link detection operations at preset times (e.g., once per hour) without manual intervention.

[0070] In one implementation, when the switch receives a call from a ground terminal to a preset number associated with an underground coal mine terminal, it forwards the incoming call request to the voice access device. After identifying the target terminal, the voice access device queries the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line, selects the line with better quality as the line to be used, and sends a ringing signal to the underground coal mine terminal to complete the establishment of the voice call link.

[0071] In another implementation, when the underground coal mine terminal detects that a user has picked up the phone and dialed a number, it sends an outgoing call request to the voice access device. After confirming the legitimacy of the request, the voice access device dynamically selects a highly reliable line to carry the call based on the communication quality attributes of the main shaft line and the auxiliary shaft line, and applies to the exchange for ground-side resources to finally establish an end-to-end voice communication channel.

[0072] In another implementation, the operations and maintenance platform sends instructions to the voice access device according to a pre-set scheduled task, requiring it to proactively establish a brief voice connection with a designated underground coal mine terminal. During this process, the voice access device still selects the optimal line to attempt a connection based on the first and second communication quality attributes; if the connection fails, the anomaly is recorded and an alarm is triggered. This method achieves proactive operations and maintenance and preventative verification of the communication link, effectively avoiding silent failures and improving overall communication availability.

[0073] For example, when a ground terminal calls a preset number (such as 8000), the voice access device will select a communication link based on the status of the two channel lines as the line to be used. If both lines are normal, the main shaft line will be used. The voice access device will prioritize using the main shaft line for voice calls. If the outgoing line of the main shaft line is broken, the voice access device will be unable to receive the heartbeat data from the underground coal mine terminal on the main shaft line. In this case, the auxiliary shaft line will be used to ensure normal communication with the underground coal mine terminal, and the underground coal mine terminal will generate corresponding warning information.

[0074] The technical solution provided in this embodiment covers various triggering modes such as inbound calls, outbound calls, and scheduled tasks in the establishment of voice call links. In each mode, it selects the line based on the real-time communication quality attributes of the main shaft line and the auxiliary shaft line. This can comprehensively cover various business scenarios of underground coal mine communication, ensuring not only a high connection rate and call quality for manual calls, but also realizing the autonomous detection and proactive early warning capabilities of the communication link, thereby enhancing the reliability and security of voice communication services.

[0075] Based on this, the line selection strategy can be further optimized: when a voice call link establishment event is triggered, the voice access device can read the currently evaluated first and second communication quality attributes and compare them according to preset quality ranking rules (such as "lower packet loss rate first" and "lower latency first"). If the first communication quality attribute of the main shaft line is better than the second communication quality attribute of the auxiliary shaft line, the main shaft line is selected as the line to be used; otherwise, the auxiliary shaft line is selected.

[0076] Furthermore, different weights can be assigned to multiple dimensions (such as packet loss rate, transmission latency, and historical stability) in both the first and second communication quality attributes. These weights are dynamically adjusted based on the current downhole operation level or call type (e.g., normal call vs. emergency dispatch) to calculate the comprehensive quality attributes of the main and auxiliary shaft lines. The voice access device selects the line with the higher comprehensive quality attribute value as the line to be used. For example, in an emergency dispatch scenario, latency weight is increased; even if the main shaft line has a slightly lower packet loss rate, the auxiliary shaft line may still be selected if its latency is significantly better. This method improves the flexibility and task adaptability of line selection.

[0077] Furthermore, while ensuring communication quality meets the minimum threshold, link usage history (such as recent call duration and failure frequency) can be introduced as an auxiliary criterion. If both lines have good communication quality attributes, the one with the lighter recent load is prioritized to balance resource consumption and extend the lifespan of equipment and lines. If one of them is in a potentially risky state (e.g., packet loss rate is close to but has not yet exceeded the threshold), it is actively avoided, even if its current communication quality attributes are slightly higher. This mechanism enhances the robustness and sustainability of the system's long-term operation while ensuring the quality of individual calls.

[0078] To ensure high reliability and business continuity in voice communication while enabling intelligent, orderly, and secure switching between the main shaft and auxiliary shaft lines, avoiding call interruptions or voice quality degradation due to poor link quality, and simultaneously considering system operation and maintenance stability and resource balance, a line is selected from the main shaft and auxiliary shaft lines to be used based on a first communication quality attribute and a second communication quality attribute. Specifically, if both the first and second communication quality attributes meet preset communication conditions, the main shaft line is selected as the line to be used; if the first communication quality attribute does not meet the preset communication conditions, but the second communication quality attribute does meet the preset communication conditions, the auxiliary shaft line is selected as the line to be used.

[0079] Among them, the preset communication conditions are pre-set conditions used to evaluate whether the communication quality of the line is qualified. For example, the preset communication conditions include but are not limited to: packet loss rate is lower than a preset threshold (such as 10%), end-to-end latency is less than a preset duration (such as 500 milliseconds), and heartbeat reception is continuous without interruption. These conditions are used to determine whether a line has the ability to carry voice calls and whether the communication quality attribute is not an abnormal communication attribute.

[0080] Specifically, when a voice call link establishment event is triggered, the voice access device can determine whether the first communication quality attribute of the main shaft line meets the preset communication conditions. If it does, the main shaft line will be selected as the line to be used regardless of the status of the auxiliary shaft line, so as to maintain the consistency and manageability of the communication path. If the first communication quality attribute does not meet the preset communication conditions, but the second communication quality attribute of the auxiliary shaft line does, the auxiliary shaft line will be switched to the line to be used to ensure that the call can still be established on a reliable link.

[0081] To avoid frequent line switching due to temporary degradation of communication quality caused by transient interference (such as electromagnetic pulses), a time-based verification can be added when determining whether preset communication conditions are met. For example, the main well line can only be considered a failure if the preset communication conditions are not met within three consecutive sliding windows. This setting can effectively suppress erroneous switching and link oscillations, improving the stability of communication connections and user experience.

[0082] The technical solution provided in this embodiment, by setting a selection rule of prioritizing the main shaft line and reserving the auxiliary shaft line, and judging whether the first communication quality attribute and the second communication quality attribute meet the preset communication conditions, can achieve efficient utilization of dual-link redundancy resources while ensuring communication reliability, avoid invalid switching or misuse of inferior links, improve the availability, robustness and emergency response capability of the underground voice communication system in coal mines, and ensure the safety of underground workers.

[0083] To achieve proactive perception and intelligent operation and maintenance of the main shaft and auxiliary shaft lines, promptly detect performance degradation or potential faults in communication links, improve the reliability, maintainability, and safety of underground voice communication systems in coal mines, and assist maintenance personnel in quickly locating problems and accurately carrying out repairs, thus avoiding disruptions to emergency command and operational safety due to communication interruptions, the system can also generate line fault prompts when either the first or second communication quality attribute does not meet preset communication conditions. These prompts are then sent to the target terminal, enabling users to perform maintenance on lines that do not meet preset communication conditions based on the fault prompts.

[0084] The line fault indication message is an automatically generated alarm message used to indicate which line (main shaft or auxiliary shaft) fails to meet the preset communication conditions and its possible causes (e.g., severe packet loss in the main shaft line, interruption of heartbeat in the auxiliary shaft line). The target terminal refers to the ground maintenance terminal, dispatch console, or mobile management device that receives the line fault indication message; its user is maintenance or management personnel. Lines that fail to meet the preset communication conditions can be any communication link that fails to meet either the first communication quality attribute (main shaft line) or the second communication quality attribute (auxiliary shaft line).

[0085] In its implementation, the voice access device continuously evaluates the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line. If either line's communication quality attribute fails to meet preset communication conditions (e.g., packet loss rate exceeding 10%, no heartbeat received for 5 consecutive seconds, or abnormal quality attribute), it automatically generates a structured line fault message. This message clearly identifies the faulty line name (e.g., "main shaft line"), the abnormal indicator (e.g., "no heartbeat received for 5 consecutive seconds"), the current status (e.g., "communication interrupted"), and suggested actions (e.g., "check the main shaft cable connector or photoelectric conversion module"), and pushes it to the preset target terminal via the internal communication network. Maintenance personnel can quickly locate the problematic link based on this, avoiding blind troubleshooting and improving response efficiency and accuracy.

[0086] Furthermore, historical data can be used to analyze the degradation trend of communication quality attributes (such as a continuous increase in packet loss rate and a slow increase in transmission latency). When a line, although not completely failed, has quality indicators approaching or briefly exceeding preset communication condition thresholds, a line fault warning message is also triggered and marked as "potential risk" or "warning status." This message is sent to the target terminal, reminding maintenance personnel to perform preventative maintenance on the relevant lines in advance, thereby transforming fault handling from traditional "post-event repair" to "pre-event intervention," effectively reducing the probability of sudden communication interruptions and improving system resilience.

[0087] Furthermore, line fault alerts can be categorized based on the specific type and severity of the failure to meet preset communication conditions. For example, complete outages (such as timeouts without heartbeats) are marked as "emergency," intermittent packet loss as "warning," and minor jitter or occasional bit errors as "attention." The alerts clearly distinguish whether the problem originates in the main shaft or auxiliary shaft and link it to equipment log information (e.g., "Main shaft line corresponds to F-section armored cable," "Auxiliary shaft line via repeater box 3"). Alarms of different levels can be precisely pushed to target terminals with different permissions; for example, emergency alarms go directly to the on-duty dispatcher and emergency response team, while general alerts are pushed to routine inspection teams. This refined and structured alarm mechanism can improve the efficiency of operation and maintenance resource allocation and the targeted nature of fault handling.

[0088] The technical solution provided in this embodiment automatically generates and pushes a line fault warning message containing a faulty line identifier, anomaly details, and maintenance instructions to the target terminal when either the first or second communication quality attribute fails to meet preset communication conditions. This achieves rapid detection, accurate location, tiered alarm, and efficient response to communication link anomalies. This setting shortens fault diagnosis and repair time, reduces safety risks caused by communication failures, enables proactive early warning for underground communication maintenance in coal mines, and improves the reliability and maintainability of the communication system.

[0089] S130. Based on the line to be used, establish a voice communication link between the underground coal mine terminal and the corresponding ground terminal.

[0090] The ground terminals include either the first ground terminal that initiates an inbound call request to the underground coal mine terminal, or the second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal. The first ground terminal refers to equipment such as the dispatch console or duty phone that actively initiates an inbound call request to the underground coal mine terminal; the second ground terminal refers to the target ground terminal (such as a designated dispatcher's phone or emergency contact point) called by the underground coal mine terminal when initiating an outbound call request. It should be noted that the first and second ground terminals are relative, not absolute. For example, in one terminal communication, ground terminal a is the first ground terminal, and ground terminal b is the second ground terminal. In another terminal communication, ground terminal b is the first ground terminal, and ground terminal a is the second ground terminal. The voice call link refers to the end-to-end real-time voice communication channel established from the underground coal mine terminal through the line to be used, voice access equipment, and exchange to the corresponding ground terminal.

[0091] In this embodiment, when the first ground terminal dials a preset number associated with an underground coal mine terminal via a switch, the switch forwards the incoming call request to the voice access device. The voice access device selects a line to be used based on the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line, and sends a ringing signal to the underground coal mine terminal through that line. After the underground coal mine terminal responds, the voice access device completes the media channel binding between the line to be used and the switch, thereby establishing a voice communication link between the underground coal mine terminal and the first ground terminal.

[0092] When the underground mine terminal detects a user's dialing operation, it sends a call request to the voice access device, which includes the number information of the second ground terminal. The voice access device selects a line to use based on the communication quality attributes of the main shaft and auxiliary shaft lines, and initiates a call request to the exchange through that line, directing it to the second ground terminal. After the exchange connects, the voice channel is established between the underground mine terminal, the line to be used, the voice access device, and the second ground terminal, completing the voice call link.

[0093] In other words, regardless of whether the call is initiated by the first ground terminal (incoming call) or by the underground coal mine terminal (outgoing call), the voice access equipment uses the same link evaluation and selection logic: first, it determines the line to be used, and then completes signaling interaction and media stream establishment through that line. Through a unified routing table and number mapping mechanism, it ensures that calls from any direction can be accurately associated with the corresponding ground terminal, and provides consistent voice service quality based on the optimal link.

[0094] The technical solution provided in this embodiment determines the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line by sending heartbeat data packets between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line respectively. In response to the establishment event of the voice call link for the underground coal mine terminal, a line to be used is selected from the main shaft line and the auxiliary shaft line according to the first and second communication quality attributes. Based on the line to be used, a voice call link is established between the underground coal mine terminal and the corresponding ground terminal. This solves the problem in the prior art that relies on analog telephone lines to extend communication to various underground working areas. Due to the harsh underground environment, the cables are easily damaged by physical damage or signal attenuation, which leads to communication interruption, reduced communication reliability, and threats to the safety of underground personnel. The solution realizes the accurate and differentiated perception of the status of the two physical links by establishing a heartbeat data packet interaction mechanism on the main shaft line and the auxiliary shaft line respectively, and evaluating the communication quality attributes of the two links in real time and independently. Furthermore, when a voice call link establishment event is triggered, the optimal line to be used is dynamically selected based on the communication quality attributes of the two lines, thereby establishing a high-quality end-to-end voice channel. This not only improves the connection rate, clarity, and stability of voice calls but also enhances the fault tolerance and service continuity of the entire underground communication system in complex and high-risk environments. Ultimately, it provides highly reliable, secure, and available voice communication support for safe production, emergency command and dispatch, and efficient collaboration between personnel above and below ground in coal mines.

[0095] As an optional embodiment of the above embodiments, specific application scenario examples are provided to enable those skilled in the art to further understand the technical solutions of the embodiments of the present invention. Specifically, please refer to the following detailed content.

[0096] See Figure 2 The technical solution provided in this implementation can be executed by a terminal communication system. The terminal communication system includes a voice server, a voice access device (IAD, Integrated Access Device), and underground coal mine terminals (such as explosion-proof telephones).

[0097] The voice access device has two communication channels, one for the main shaft and one for the auxiliary shaft, connected to the same underground coal mine terminal. Both channels use the same preset number (e.g., 8000), forming redundant call lines. A unified communication protocol is used between the voice access device and the underground coal mine terminal; that is, the data transmitted between the devices uses a unified data encapsulation format.

[0098] When a ground terminal calls 8000, the switch sends the incoming call request to the voice server. The voice server processes the voice signal and sends the result back to the voice access device via the switch. The voice access device selects the communication link based on the status of the two line channels. For example, if the voice access device does not receive heartbeat data from the underground coal mine terminal for 5 consecutive seconds, it can maintain normal communication with the underground coal mine terminal through the auxiliary shaft line, while the voice access device generates a corresponding warning message. When packet loss occurs in the heartbeat data between the voice access device and the underground coal mine terminal, such as a packet loss rate greater than 10% within 30 seconds, the line is judged to be faulty, the faulty line is disabled, and an alarm is pushed.

[0099] It should be noted that the two communication channels of the main shaft line and the auxiliary shaft line can also use different preset numbers (such as 8001 and 8002). The main shaft line channel uses number 8001, and the auxiliary shaft line channel uses number 8002, forming a redundant communication line.

[0100] When a ground terminal calls 8001, the voice access equipment uses the main shaft line channel to communicate with the underground coal mine terminal; when a ground phone calls 8002, the voice access equipment uses the auxiliary shaft line channel to communicate with the underground coal mine terminal.

[0101] The technical solution provided in this embodiment connects the same underground coal mine terminal to a voice access device via two communication channels, one with a main shaft line and the other with a secondary shaft line, forming a redundant line. Even if any one line experiences an open circuit or short circuit, normal communication between the ground terminal and the underground coal mine terminal can be guaranteed. This improves the connection rate, clarity, and stability of voice calls, and enhances the fault tolerance and service continuity of the underground communication system in complex and high-risk environments.

[0102] Figure 3 This is a schematic diagram of a terminal communication device according to an embodiment of the present invention. The device is deployed in a terminal communication system, which includes a voice access device and an underground coal mine terminal that establishes a physical dual connection with the voice access device via a main shaft line and an auxiliary shaft line, such as... Figure 3 As shown, the device includes: a communication quality attribute determination module 210, a line to be used determination module 220, and a voice call link establishment module 230.

[0103] The communication quality attribute determination module 210 is used to determine the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line based on the heartbeat data packets sent between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line, respectively. The unused line determination module 220 is used to select an unused line from the main shaft line and the auxiliary shaft line according to the first communication quality attribute and the second communication quality attribute in response to a voice call link establishment event for the underground coal mine terminal. The voice call link establishment module 230 is used to establish a voice call link between the underground coal mine terminal and the corresponding ground terminal based on the unused line. The ground terminal includes a first ground terminal that initiates an inbound call request to the underground coal mine terminal, or a second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal.

[0104] The technical solution of this embodiment determines the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line by sending heartbeat data packets between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line respectively. In response to the establishment event of the voice call link for the underground coal mine terminal, a line to be used is selected from the main shaft line and the auxiliary shaft line according to the first and second communication quality attributes. Based on the line to be used, a voice call link is established between the underground coal mine terminal and the corresponding ground terminal. This solves the problem in the prior art that relies on analog telephone lines to extend communication to various underground working areas. Due to the harsh underground environment, the cables are easily damaged by physical damage or signal attenuation, which leads to communication interruption, reduced communication reliability, and threats to the safety of underground personnel. The solution achieves accurate and differentiated perception of the status of the two physical links by establishing a heartbeat data packet interaction mechanism on the main shaft line and the auxiliary shaft line respectively, and evaluating the communication quality attributes of the two links in real time and independently. Furthermore, when a voice call link establishment event is triggered, the optimal line to be used is dynamically selected based on the communication quality attributes of the two lines, thereby establishing a high-quality end-to-end voice channel. This not only improves the connection rate, clarity, and stability of voice calls but also enhances the fault tolerance and service continuity of the entire underground communication system in complex and high-risk environments. Ultimately, it provides highly reliable, secure, and available voice communication support for safe production, emergency command and dispatch, and efficient collaboration between personnel above and below ground in coal mines.

[0105] Optionally, based on the above-mentioned device, the communication quality attribute determination module 210 is configured to: determine the first communication quality attribute of the main shaft line as an abnormal communication attribute if the voice access device does not receive a heartbeat data packet sent by the underground coal mine terminal through the main shaft line within a consecutive preset first time period; determine the packet loss attribute of the underground coal mine terminal sending heartbeat data packets through the main shaft line within a preset sliding window; determine the first communication quality attribute of the main shaft line as an abnormal communication attribute if the packet loss attribute exceeds a preset packet loss threshold; and determine the first communication quality attribute of the main shaft line as an abnormal communication attribute if the packet loss attribute exceeds the preset packet loss threshold within a consecutive preset second time period.

[0106] Based on the above-mentioned device, optionally, the communication quality attribute determination module 210 is used to obtain the theoretical number of heartbeat packets that the voice access device should receive from the main shaft line within the preset sliding window, and the actual number of valid heartbeat packets received; and to determine the packet loss attribute corresponding to the main shaft line based on the theoretical number of heartbeat packets and the number of valid heartbeat packets.

[0107] Based on the above-described apparatus, optionally, the voice call link establishment event includes at least one of the following:

[0108] The system receives an incoming call request from a ground terminal connected to a switch for a preset number; the switch communicates with the voice access device; the preset number is associated with the underground coal mine terminal.

[0109] Received an outbound call request initiated by the underground coal mine terminal;

[0110] Trigger a scheduled task.

[0111] Based on the above device, optionally, the line to be used determination module 220 is used to select the main shaft line as the line to be used if both the first communication quality attribute and the second communication quality attribute meet the preset communication conditions; and to select the auxiliary shaft line as the line to be used if the first communication quality attribute does not meet the preset communication conditions and the second communication quality attribute meets the preset communication conditions.

[0112] Optionally, based on the above-described device, the device is further configured to generate line fault prompt information when the first communication quality attribute or the second communication quality attribute does not meet the preset communication conditions, and send the line fault prompt information to the target terminal so that the user of the target terminal can perform maintenance on the line that does not meet the preset communication conditions according to the line fault prompt information.

[0113] Based on the above-mentioned device, optionally, the heartbeat data packet includes at least the data packet type, data packet transmission sequence number, data packet length, data packet access time, and data verification identifier.

[0114] The terminal communication device provided in the embodiments of the present invention can execute the terminal communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0115] Figure 4 This is a schematic diagram of the structure of an electronic device implementing the terminal communication method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0116] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 or a random access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or a computer program loaded from storage unit 18 into the random access memory 13. The random access memory 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and random access memory 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0117] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0118] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as terminal communication methods.

[0119] In some embodiments, the terminal communication method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into random access memory 13 and executed by processor 11, one or more steps of the terminal communication method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the terminal communication method by any other suitable means (e.g., by means of firmware).

[0120] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0121] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0122] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0124] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0125] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0126] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from read-only memory 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0127] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the terminal communication method provided in any embodiment of this invention.

[0128] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0129] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0130] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A terminal communication method, characterized in that, The method is applied to a terminal communication system, which includes a voice access device and an underground coal mine terminal that is physically connected to the voice access device via a main shaft line and an auxiliary shaft line. Based on the voice access device and the underground coal mine terminal sending heartbeat data packets to each other on the main shaft line and the auxiliary shaft line respectively, the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line are determined. In response to a voice call link establishment event for the underground coal mine terminal, a line to be used is selected from the main shaft line and the auxiliary shaft line according to the first communication quality attribute and the second communication quality attribute; Based on the line to be used, establish a voice communication link between the underground coal mine terminal and the corresponding ground terminal; The ground terminal includes a first ground terminal that initiates an inbound call request to the underground coal mine terminal, or a second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal.

2. The method according to claim 1, characterized in that, Determining the first communication quality attribute of the main shaft line includes at least one of the following methods: If the voice access device does not receive a heartbeat data packet sent by the underground coal mine terminal through the main shaft line within a continuously preset first time period, then the first communication quality attribute of the main shaft line is determined to be an abnormal communication attribute. Determine the packet loss attribute of the heartbeat data packets sent by the underground coal mine terminal through the main shaft line within a preset sliding window; If the packet loss attribute exceeds the preset packet loss threshold, then the first communication quality attribute of the main shaft line is determined to be an abnormal communication attribute. If the packet loss attribute exceeds the preset packet loss threshold within a consecutive preset second time period, then the first communication quality attribute of the main well line is determined to be an abnormal communication attribute.

3. The method according to claim 2, characterized in that, Determining the packet loss attribute of the heartbeat data packets sent by the underground coal mine terminal through the main shaft line within a preset sliding window includes: The theoretical number of heartbeat packets that the voice access device should receive from the main shaft line within the preset sliding window, and the actual number of valid heartbeat packets received; Based on the theoretical number of heartbeat packets and the effective number of heartbeat packets, the packet loss attribute corresponding to the main shaft line is determined.

4. The method according to claim 1, characterized in that, The voice call link establishment event includes at least one of the following: The system receives an incoming call request from a ground terminal connected to a switch for a preset number; the switch communicates with the voice access device; the preset number is associated with the underground coal mine terminal. Received an outbound call request initiated by the underground coal mine terminal; Trigger a scheduled task.

5. The method according to claim 1, characterized in that, The step of selecting a line to be used from the main shaft line and the auxiliary shaft line based on the first communication quality attribute and the second communication quality attribute includes: If both the first communication quality attribute and the second communication quality attribute meet the preset communication conditions, then the main shaft line is selected as the line to be used. If the first communication quality attribute does not meet the preset communication conditions, and the second communication quality attribute meets the preset communication conditions, then the auxiliary shaft line is selected as the line to be used.

6. The method according to claim 1, characterized in that, The method further includes: When either the first communication quality attribute or the second communication quality attribute fails to meet the preset communication conditions, a line fault prompt message is generated and sent to the target terminal so that the user of the target terminal can perform maintenance on the line that fails to meet the preset communication conditions based on the line fault prompt message.

7. The method according to claim 1, characterized in that, The heartbeat data packet includes at least the data packet type, data packet transmission sequence number, data packet length, data packet access time, and data verification identifier.

8. A terminal communication device, characterized in that, Deployed in a terminal communication system, the terminal communication system includes a voice access device and an underground coal mine terminal that establishes a physical dual connection with the voice access device through a main shaft line and an auxiliary shaft line. The device includes: The communication quality attribute determination module is used to determine the first communication quality attribute of the main shaft line and the second communication quality attribute of the auxiliary shaft line based on the heartbeat data packets sent between the voice access device and the underground coal mine terminal on the main shaft line and the auxiliary shaft line, respectively. The line to be used determination module is used to select a line to be used from the main shaft line and the auxiliary shaft line in response to a voice call link establishment event for the underground coal mine terminal, based on the first communication quality attribute and the second communication quality attribute. The voice call link establishment module is used to establish a voice call link between the underground coal mine terminal and the corresponding ground terminal based on the line to be used. The ground terminal includes a first ground terminal that initiates an inbound call request to the underground coal mine terminal, or a second ground terminal corresponding to an outbound call request initiated by the underground coal mine terminal.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the terminal communication method according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the terminal communication method as described in any one of claims 1-7.