Methods, systems, and readable storage media for point-to-point real-time transmission of audio and video data
By combining an authentication server and a shared encryption key, the problems of slow response speed and low confidentiality in point-to-point data transmission are solved, enabling fast and secure audio and video data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from slow response times, low communication security, inability to quickly establish communication connections, and difficulty in preventing third-party intrusion.
By storing authentication information through an authentication server, communication connections between terminal devices can be quickly established, and any third-party intrusions during communication can be monitored in real time. Data transmission is carried out using a shared encryption key, and NAT-PMP/UPnP IGD, UDP Hole Punching, and DDNS mechanisms are combined to adapt to the network environment and optimize the communication link.
It enables the rapid establishment of communication connections between terminal devices, improves communication confidentiality and response speed, prevents third-party intrusion, and ensures communication quality.
Smart Images

Figure CN121585365B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data communication technology and relates to a method, system and readable storage medium for point-to-point real-time transmission of audio and video data. Background Technology
[0002] When transmitting audio and video data over the public network, it is necessary to fully consider issues such as communication bandwidth utilization, communication latency, and data confidentiality. At the same time, it is also necessary to be able to respond promptly and quickly establish a communication connection between two communication endpoints.
[0003] In order to achieve the above data transmission goals, it is necessary to further optimize and improve the existing data transmission systems and methods. Summary of the Invention
[0004] To address the problems of slow response speed and low communication confidentiality in existing point-to-point data transmission technologies, the first objective of this application is to provide a method for real-time point-to-point audio and video data transmission. This method quickly establishes a communication connection between two paired terminal devices using authentication information stored in an authentication server. Furthermore, it can monitor in real time for third-party intrusion or data theft during communication, thus improving the response speed and confidentiality of point-to-point data communication. To implement the above-mentioned real-time point-to-point audio and video data transmission method, the second objective of this application is to propose a real-time point-to-point audio and video data transmission system. The third objective is to protect a computer storage medium to facilitate the widespread use of the method. The specific solution is as follows:
[0005] A method for real-time point-to-point transmission of audio and video data includes:
[0006] Each terminal device is paired and grouped, and the authentication code corresponding to the paired terminal device is associated and stored.
[0007] Based on the authentication server detecting communication request information sent by any terminal device, the system identifies and responds to the aforementioned communication request information by continuously monitoring whether another terminal device paired with the aforementioned terminal device sends communication request information.
[0008] If a communication request message sent by a terminal device paired with any of the above terminal devices is detected within a set time interval and the authentication code contained therein matches, then a communication connection is established between the two terminal devices. After the connection is successful, the authentication server exits the connection between the two terminal devices; otherwise, monitoring continues until the monitoring time reaches the set value or either of the terminal devices stops sending communication request messages.
[0009] Establishing a communication connection between two terminal devices also includes intrusion prevention steps, including:
[0010] The authentication codes sent by the two terminal devices are confirmed to match. If they match, a shared encryption key is randomly generated by the authentication server, sent to the two terminal devices respectively, and stored.
[0011] During the communication process, a verification random number is sent from the first terminal device to the second terminal device at a set verification frequency. The second terminal device encrypts the verification random number using a shared key and then sends the data back to the first terminal device. The first terminal device decrypts the feedback data using the stored shared key and determines whether the decrypted data is the aforementioned verification random number.
[0012] If the data returned by the second terminal device does not match the aforementioned verification random number, or if the second terminal device does not return any data after a set time, it is determined that a third party has intruded into the current communication link. The current communication link is then terminated, the pairing information is cleared, and a new secure pairing is performed.
[0013] The above technical solution enables the rapid establishment of a communication connection between two paired terminal devices over the public network. Simultaneously, it allows for real-time monitoring of the communication link to detect any third-party intrusions before and during communication, ensuring communication quality while enhancing communication confidentiality.
[0014] Furthermore, sending communication request information to the authentication server through any terminal device includes:
[0015] After the terminal device confirms that it is enabled, it automatically detects the current network environment and performs public network mapping according to the network environment it is in, and sends communication request information to the corresponding authentication server.
[0016] The automatic public network mapping based on the network environment includes three working mechanisms:
[0017] A. NAT-PMP / UPnP IGD: After the terminal device starts up, it broadcasts a specific request within the local area network to find a router that supports the above communication protocol. After finding the router, the terminal device sends a command to it to request a public network port and establish a mapping relationship between the port and the device's internal network IP and port.
[0018] B, UDP Hole Punching: When both terminal devices are under their respective NATs, they will first connect to the authentication server. The authentication server will assist both parties in obtaining and exchanging each other's public IP address information. Then, the two parties will attempt to communicate directly. Data packets will be transmitted through the above communication link to establish a direct connection.
[0019] C, DDNS: If the device detects that the public IP address in the current network environment is changing dynamically, it will use the DDNS service to check the public IP address periodically. When the IP address changes, it will automatically update the DNS server with the new IP address to ensure that the domain name always points to the correct IP address.
[0020] The above technical solution ensures that the authentication server and any terminal device can adapt to the current network environment and quickly establish a communication connection with the paired terminal device.
[0021] Furthermore, the number of authentication servers is multiple, and they are numbered and connected to each terminal device through different communication links;
[0022] The point-to-point real-time transmission method further includes:
[0023] Establish and store a table of authentication server numbers corresponding to each group of terminal devices, as well as the optimal authentication server number corresponding to each group of terminal devices under various network environment parameters.
[0024] After the terminal device confirms that the authentication server is enabled, it selects an authentication server with a higher number from the authentication server number table and sends a communication request to it, or detects and selects an authentication server with the corresponding number based on the current network environment parameters and sends a communication request.
[0025] The order of the authentication server numbers in the authentication server number table is based on the communication delay length of the communication link corresponding to each authentication server.
[0026] Through the above technical solution, each group of terminal devices can select the optimal communication link for point-to-point data communication based on network environment parameters, thereby improving communication quality.
[0027] Furthermore, the point-to-point real-time transmission method also includes:
[0028] Establish and store reference frequency data for each of the two paired terminal devices in the same group to send communication request information to the authentication server;
[0029] The authentication server collects and records the average response time required for each paired terminal device to establish a communication connection.
[0030] The authentication server identifies and responds to communication request information sent by any terminal device, and calculates and obtains the actual frequency data of the communication request information sent by any terminal device, as well as the actual response time of the paired terminal device;
[0031] If the difference between the actual frequency data and the reference frequency data, and / or the difference between the actual response time and the average response time exceeds a set value, then when sending the shared key, an instruction message is attached to increase the verification frequency of the shared key between the two terminal devices during communication, or an instruction message is sent to the two terminal devices to specify a new authentication server and automatically exit the current communication connection.
[0032] The above technical solution fully considers the communication characteristics between the terminal device and the authentication server, as well as between the terminal devices themselves, when establishing a communication connection between two terminal devices. When the above communication characteristics do not match the stored reference characteristics, the communication link is automatically switched, thereby preventing a third party from impersonating one of the communication devices to intrude into the communication link and improving the confidentiality and security of the communication.
[0033] Furthermore, the point-to-point real-time transmission method also includes:
[0034] Log information of each paired terminal device connection is collected and stored via the authentication server, and a login query port for the log information is established.
[0035] The log information includes the connection time and communication duration between paired terminal devices.
[0036] The above technical solution makes it easy for users to access the authentication server through their terminal devices and query historical communication records.
[0037] Furthermore, the communication request information is configured as the authentication code;
[0038] The authentication code consists of 10 Arabic numerals and uppercase and lowercase English characters;
[0039] The definition of matching authentication codes between two paired terminal devices in the same group is: the two authentication codes are identical.
[0040] The above technical solution can greatly shorten the authentication time between two terminal devices, making it easier to quickly establish a communication connection between the two terminal devices. At the same time, since the communication request information does not contain other authentication data, the amount of data used for authentication is reduced, and the authentication pairing speed is improved while hardly occupying network bandwidth.
[0041] Furthermore, the point-to-point real-time transmission method also includes:
[0042] The authentication server collects and records the average response time required for each paired terminal device to establish a communication connection.
[0043] Identify the terminal device currently sending the communication request information and retrieve its corresponding average response time;
[0044] Based on the time point at which the communication request information is received and the average response time, an estimated response time point is generated.
[0045] Adjust the detection and refresh frequency of pairing communication request information based on the estimated response time.
[0046] The average response time is defined as: the average time required from the time the authentication server receives a communication request from any terminal device to the time the authentication server establishes a communication connection between the two paired terminal devices;
[0047] The closer the current time point is to the estimated response time point, the higher the detection and refresh frequency of the pairing communication request information.
[0048] The above technical solutions can further shorten the establishment time of communication connections between two terminal devices and improve the system's response speed.
[0049] Furthermore, the point-to-point real-time transmission method also includes:
[0050] Each of the two paired terminal devices stores a frequency feature data used to verify the identity information of another terminal device in the same group. The frequency feature data is unique and associated with the ID of the paired terminal device in the same group.
[0051] Key verification during communication also includes:
[0052] The first terminal device counts the frequency at which the second terminal device sends verification random numbers, and compares this frequency with the stored frequency characteristic data.
[0053] If the above transmission frequency matches the frequency characteristic data, then the current communication state is maintained;
[0054] If the transmission frequency does not match the frequency characteristic data, the current communication will be terminated.
[0055] With the above technical solution, even if a third party intercepts the shared encryption key issued by the authentication server, it can still be identified by the terminal device during the communication process, which can significantly improve the confidentiality of the communication.
[0056] A point-to-point real-time audio and video data transmission system includes:
[0057] The authentication server includes:
[0058] The data storage unit is configured to store the paired terminal devices and their corresponding authentication codes for each group;
[0059] The request signal monitoring unit is configured to receive communication request information sent by any terminal device;
[0060] The pairing authentication unit is configured to receive and respond to the communication request information by continuously monitoring whether another terminal device paired with any of the terminal devices sends a communication request information. If a communication request information sent by a terminal device paired with any of the terminal devices is detected within a set time interval and the authentication code contained therein matches, a communication connection is established between the two terminal devices. After the connection is successful, the authentication server exits the connection between the two terminal devices; otherwise, monitoring continues until the monitoring time reaches a set value or the terminal device stops sending communication request information.
[0061] The shared key generation and distribution unit is configured to send the shared key to the two terminal devices after they establish a communication connection.
[0062] The terminal device includes:
[0063] The communication request information sending unit is configured to automatically perform public network mapping based on a working mechanism according to different network environments and send communication request information to the corresponding authentication server.
[0064] An intrusion detection unit is configured to generate verification feedback data by combining a verification random number with the shared key, in order to verify whether the shared key contained in the terminal device currently communicating is accurate, and output judgment information.
[0065] The data transmission unit is configured to output audio and video data to the paired terminal device and receive audio and video data output by the paired terminal device after the communication link is established, and control the on / off state of the current communication link in response to the determination information.
[0066] The network communication end includes gateway devices, encoders, and decoders.
[0067] A computer-readable storage medium having a program module loaded thereon, which, when executed by a processor, is used to implement the aforementioned method for point-to-point real-time transmission of audio and video data.
[0068] The above technical solution facilitates the promotion and application of the method described in this application.
[0069] This application solution includes at least one of the following beneficial effects:
[0070] (1) Establishing a point-to-point communication connection between two paired terminal devices through an authentication server has low bandwidth consumption and low transmission latency, which can significantly improve communication quality;
[0071] (2) By recording the response time of each terminal device when establishing a communication connection through the authentication server, the search frequency of communication request information can be flexibly adjusted so that when two terminal devices in the same group start logging in, they can establish communication in the shortest possible time.
[0072] (3) By distributing shared encryption keys through an authentication server and simultaneously statistically analyzing and identifying the average response time required to establish a communication connection, the possibility of third-party intrusion into the communication link can be effectively eliminated, thereby improving the security of communication. Attached Figure Description
[0073] Figure 1 This is a schematic diagram of the structure of this application;
[0074] Figure 2 This is a schematic diagram of the structure of this application;
[0075] Figure 3 This is a schematic diagram showing the connection of the functional modules of the system in this application;
[0076] Figure 4 This is a schematic diagram of a one-way audio and video transmission system with remote camera control.
[0077] Reference numerals: 100, Authentication server; 101, Data storage unit; 102, Request signal monitoring unit; 103, Pairing authentication unit; 104, Shared key generation and distribution unit; 200, Terminal device; 201, Communication request information sending unit; 202, Intrusion detection unit; 203, Data transmission unit; 300, Network communication terminal; 301, Gateway device; 302, Encoder; 303, Decoder. Detailed Implementation
[0078] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.
[0079] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0080] A method for point-to-point real-time transmission of audio and video data, such as Figure 1 As shown, it includes:
[0081] S100: Pair and group each terminal device, and associate and store the authentication code corresponding to the paired terminal device;
[0082] S200: Based on the authentication server detecting communication request information sent by any terminal device, identify and respond to the above communication request information to continuously monitor whether another terminal device paired with the terminal device sends communication request information;
[0083] S210, if a communication request message sent by a terminal device paired with any of the above terminal devices is detected within a set time interval and the authentication code contained therein matches, then a communication connection between the two terminal devices is established. After the connection is successful, the authentication server exits the connection between the two terminal devices.
[0084] S220: If no communication request information sent by a terminal device paired with any of the above terminal devices is detected within a set time interval, or if the authentication code contained therein does not match, then monitoring continues until the monitoring duration reaches the set value or any of the terminal devices stops sending communication request information.
[0085] It should be noted that in step S200, the authentication server will only monitor the communication request information paired with it after receiving the communication request information of any terminal device in a certain group, and the above monitoring is one-to-one, which can significantly improve the monitoring efficiency.
[0086] In this embodiment of the application, the communication request information is directly configured as an authentication code. In a specific embodiment, the communication request information may also include other character fields for verification.
[0087] The authentication code consists of 10 Arabic numerals and uppercase and lowercase English characters, with a total of 62 possibilities (26 uppercase letters, 26 lowercase groups, and 10 Arabic numerals). The total number of combinations for the 10 digits is approximately 62^10 ≈ 839 trillion, significantly increasing the difficulty of cracking and greatly enhancing resistance to brute-force attacks. In practical applications, the authentication code is sent approximately every 10-20 seconds, with a data size of only a few tens of bytes, consuming virtually no network bandwidth.
[0088] In this embodiment, matching authentication codes between two paired terminal devices in the same group is defined as: the two authentication codes are identical. The specific monitoring process of the authentication server is as follows: upon receiving a communication request from a terminal device, the server extracts the corresponding authentication code and stores it temporarily. Within a set time period thereafter, the server compares the authentication code extracted from newly received communication request information with the previously temporarily stored authentication code. If they match perfectly, authentication is successful.
[0089] In step S200, sending communication request information to the authentication server through any terminal device includes:
[0090] After the terminal device confirms that it is enabled, it automatically detects the current network environment and performs public network mapping according to the network environment it is in, and sends communication request information to the corresponding authentication server.
[0091] The automatic public network mapping based on the network environment includes three working mechanisms:
[0092] A. NAT-PMP / UPnP IGD: After the terminal device starts up, it broadcasts a specific request within the local area network to find a router that supports the above communication protocol. After finding the router, the terminal device sends a command to it to request a public network port and establish a mapping relationship between the port and the device's internal network IP and port.
[0093] B. UDP Hole Punching (P2P Hole Punching): When both terminal devices are behind their respective NATs, they first connect to the authentication server. The authentication server helps both parties obtain and exchange each other's public IP address information. Then, the two parties attempt to communicate directly. Data packets are transmitted through the above communication link to establish a direct connection.
[0094] C. DDNS (Dynamic DNS Update): If the device detects that the public IP address in the current network environment is changing dynamically, it will use the DDNS service to periodically check the public IP address. When it finds that the IP address has changed, it will automatically update the new IP address to the DNS server to ensure that the domain name always points to the correct IP address.
[0095] The above technical solution can ensure that the authentication server and any terminal device can adapt to the current network environment and quickly establish a communication connection with the paired terminal device.
[0096] To enhance communication security and prevent third-party intrusion into the communication link, intrusion prevention steps are also included in establishing a communication connection between two terminal devices, including:
[0097] S2101, confirm whether the authentication codes sent by the two terminal devices match. If they match, the authentication server randomly generates a shared encryption key, sends it to the two terminal devices respectively, and stores it.
[0098] S2102, Key verification is performed during communication. Specifically, the first terminal device sends a verification random number to the second terminal device at a set verification frequency. The second terminal device encrypts the verification random number using a shared key and then sends the data back to the first terminal device. The first terminal device decrypts the feedback data using the stored shared key and then determines whether the decrypted data is the aforementioned verification random number.
[0099] If the data returned by the second terminal device does not match the aforementioned verification random number, or if the second terminal device does not return any data after a set time, it is determined that a third party has intruded into the current communication link. The current communication link is then terminated, the pairing information is cleared, and a new secure pairing is performed.
[0100] The above technical solution can quickly establish a communication connection between two paired terminal devices through the public network. At the same time, it can monitor the communication link in real time before and during the communication process to ensure communication quality and improve communication confidentiality.
[0101] In this application, the number of authentication servers is one or more, which are numbered and connected to each terminal device through different communication links, such as being configured in Beijing, Shanghai, Guangzhou and other places respectively.
[0102] The point-to-point real-time transmission method further includes:
[0103] Establish and store a table of authentication server numbers corresponding to each group of terminal devices, as well as the optimal authentication server number corresponding to each group of terminal devices under various network environment parameter conditions, that is, different network environment parameter conditions correspond to different authentication servers.
[0104] The order of the authentication server numbers in the above authentication server number table is based on the communication delay length of the communication link corresponding to each authentication server.
[0105] After the terminal device confirms that the authentication server is enabled, it selects an authentication server with a higher number from the authentication server number table and sends a communication request to it, or it detects and selects an authentication server with the corresponding number based on the current network environment parameters and sends a communication request. In this way, each group of terminal devices can select the optimal communication link for point-to-point data communication based on the network environment parameters, thereby improving the communication quality.
[0106] In practical applications, to reduce the bandwidth consumption of communication request information, terminal devices typically send messages at relatively long intervals, such as every 10-20 seconds as mentioned above. To avoid the monitoring process consuming too much computing power of the authentication server, step S200 of the point-to-point real-time transmission method in this application further includes:
[0107] S201: The authentication server collects and records the average response time required for each paired terminal device to establish a communication connection. For example, one terminal device sends a communication request message, and the other terminal device will respond 15 seconds later. The above application scenario involves the two communicating parties agreeing on an audio / video communication time. When the agreed time arrives, one terminal device sends a communication request message to the authentication server, and then monitors the response waiting time of the other terminal device.
[0108] S202, identify the terminal device currently sending the communication request information and retrieve its corresponding average response time.
[0109] S203, Based on the time point of receiving the communication request information and the average response time, generate the estimated response time point.
[0110] S204, adjust the detection refresh frequency of the pairing communication request information according to the estimated response time point, for example, change the detection from once every 2 seconds to once every 1 second, that is, the closer the current time point is to the estimated response time point, the higher the detection refresh frequency of the pairing communication request information.
[0111] The average response time is defined as the average time required from the time the authentication server receives a communication request from any terminal device to the time the authentication server establishes a communication connection between the two paired terminal devices.
[0112] The above technical solution can further shorten the establishment time of communication connection between two terminal devices and improve the system response speed.
[0113] To further enhance communication security, such as Figure 2 As shown, the point-to-point real-time transmission method described in this application further includes:
[0114] A100 establishes and stores reference frequency data for the communication request information sent by each of the two paired terminal devices in the same group to the authentication server. For example, the frequency of communication request information sent by a certain terminal device is 10 seconds / time.
[0115] A200 collects and records the average response time required for each paired terminal device to establish a communication connection based on the authentication server.
[0116] A300, the authentication server identifies and responds to communication request information sent by any terminal device, and calculates and obtains the actual frequency data of the communication request information sent by the terminal device, as well as the actual response time of the paired terminal device:
[0117] A310, if the difference between the acquired actual frequency data and the reference frequency data exceeds a set value, and / or the difference between the actual response time and the average response time exceeds a set value, then:
[0118] A311, when sending the shared key, includes instruction information to increase the frequency of shared key verification between the two terminal devices during communication; or
[0119] A312 sends instruction information to both terminal devices to specify a new authentication server and automatically exits the current communication connection.
[0120] Furthermore, the point-to-point real-time transmission method described in this application also includes:
[0121] B100 stores frequency feature data in each of the two paired terminal devices for verifying the identity information of the other terminal device in the same group. The frequency feature data is unique and associated with the ID of the paired terminal device in the same group. In a specific embodiment, the frequency feature data is a set of data with a specific pattern, for example, the time interval between two consecutive transmissions of random numbers for verification shows a regular distribution.
[0122] Key verification during communication also includes:
[0123] B200: The first terminal device counts the frequency at which the second terminal device sends verification random numbers and compares this frequency with the stored frequency characteristic data.
[0124] B210, if the above transmission frequency matches the frequency characteristic data, then maintain the current communication state;
[0125] B220, if the above transmission frequency does not match the frequency characteristic data, then exit the current communication.
[0126] Based on the above technical solution, even if a third party intercepts the shared encryption key issued by the authentication server, it can still be identified by the terminal device during communication, which can significantly improve the confidentiality of communication.
[0127] To facilitate users' access to the authentication server and query historical communication records via terminal devices, the point-to-point real-time transmission method described in this application further includes: collecting and storing log information of the connection between each paired terminal device via the authentication server, and establishing a login query port for the log information.
[0128] The log information only includes the connection time and communication duration between paired terminal devices.
[0129] To implement the above-mentioned point-to-point real-time audio and video data transmission method, this application also discloses a point-to-point real-time audio and video data transmission system. The core of this system is installed within a highly stable embedded Ubuntu Linux system on a Mini industrial control all-in-one machine, and is developed based on the newly developed PIP protocol, combined with… Figure 3 and Figure 4 ( Figure 4 As shown in the application illustration, it mainly includes: authentication server 100, terminal device 200 and network communication terminal 300.
[0130] The authentication server 100 includes: a data storage unit 101, a request signal monitoring unit 102, a pairing authentication unit 103, and a shared key generation and distribution unit 104.
[0131] The data storage unit 101 is configured to store each pair of terminal devices and their corresponding authentication codes. In a specific embodiment, it also stores reference frequency data of each terminal device sending communication request information to the authentication server, as well as response time data of each terminal device when establishing a communication connection.
[0132] The request signal monitoring unit 102 is configured to receive communication request information sent by any terminal device and identify data therein that indicates the identity information of the terminal device, such as authentication codes.
[0133] The pairing authentication unit 103 is configured to receive and respond to communication request information to continuously monitor whether another terminal device paired with any of the terminal devices sends communication request information: if a communication request information sent by a terminal device paired with any of the terminal devices is detected within a set time interval and the authentication code contained therein matches, then a communication connection is established between the two terminal devices. After the connection is successful, the authentication server exits the connection between the two terminal devices; otherwise, it continues to monitor until the monitoring time reaches a set value or the terminal device stops sending communication request information.
[0134] The shared key generation and distribution unit 104 is configured to send the shared key to the two terminal devices after they establish a communication connection.
[0135] The terminal device 200 includes: a communication request information sending unit 201, an intrusion detection unit 202, and a data transmission unit 203.
[0136] The communication request information sending unit 201 is configured to automatically perform public network mapping based on different network environments and send communication request information to the corresponding authentication server. The intrusion detection unit 202 is configured to generate verification feedback data by combining a verification random number with the shared key, used to verify the accuracy of the shared key contained in the current communication terminal device, and output judgment information. The data transmission unit 203 is configured to output audio and video data to the paired terminal device and receive audio and video data output by the paired terminal device after the communication link is established, and control the on / off state of the current communication link in response to the judgment information.
[0137] In a specific embodiment, the terminal device further includes a frequency statistics unit, a frequency data storage unit 101, and a frequency comparison unit. The frequency data storage unit 101 stores frequency characteristic data of another terminal device paired with the terminal device. The frequency statistics unit counts the transmission frequency of the verification random number sent by the other terminal device, and then compares it with the stored frequency characteristic data through the frequency comparison unit to determine whether to terminate the current communication based on the comparison result.
[0138] The network communication terminal 300 includes a gateway device 301, an encoder 302, and a decoder 303.
[0139] In this embodiment of the application, the selected embedded industrial control all-in-one computer is required to have at least 4 network interfaces:
[0140] ETH1: Public network access, connect to any internet service provider's network cable, recommended network bandwidth ≥30MB / s.
[0141] ETH2: Backup public network interface, it is recommended to use a different carrier network than ETH0.
[0142] ETH3: Main data channel, main audio and video stream transmission, connected to the network cable of codec 303, encodes and decodes audio and video streams, supports 4K and above resolutions.
[0143] ETH4: Auxiliary data channel, assisting in audio and video stream transmission. It can be connected to the network cable of the codec 303 and supports high-definition and higher resolutions; it can also be connected to the device control to RJ45 interface, supporting RS232, RS422 and FreeD protocols.
[0144] Finally, to facilitate the widespread application of the method described in this application, this application also discloses a computer-readable storage medium on which a program module is loaded. When the program module is executed by a processor, it is used to implement the point-to-point real-time audio and video data transmission method described above.
[0145] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for real-time point-to-point transmission of audio and video data, characterized in that, include: Each terminal device is paired and grouped, and the authentication code corresponding to the paired terminal device is associated and stored. Based on the authentication server detecting communication request information sent by any terminal device, the system identifies and responds to the aforementioned communication request information by continuously monitoring whether another terminal device paired with the aforementioned terminal device sends communication request information. If a communication request message sent by a terminal device paired with any of the above terminal devices is detected within a set time interval and the authentication code contained therein matches, then a communication connection is established between the two terminal devices. After the connection is successful, the authentication server exits the connection between the two terminal devices; otherwise, monitoring continues until the monitoring time reaches the set value or either of the terminal devices stops sending communication request messages. Establishing a communication connection between two terminal devices also includes intrusion prevention steps, including: The authentication codes sent by the two terminal devices are confirmed to match. If they match, a shared encryption key is randomly generated by the authentication server, sent to the two terminal devices respectively, and stored. Key verification is performed during communication: a verification random number is sent from the first terminal device to the second terminal device at a set verification frequency. The second terminal device encrypts the verification random number using a shared key and then sends the data back to the first terminal device. The first terminal device decrypts the data using the stored shared key and determines whether the decrypted data is the aforementioned verification random number. If the data returned by the second terminal device does not match the aforementioned random number used for verification, or if the second terminal device does not return any data after a set time, it is determined that a third party has intruded into the current communication link. The current communication link is terminated, the pairing information is cleared, and a new secure pairing is performed. The point-to-point real-time transmission method further includes: Establish and store reference frequency data for each of the two paired terminal devices in the same group to send communication request information to the authentication server; The authentication server collects and records the average response time required for each paired terminal device to establish a communication connection. The authentication server identifies and responds to communication request information sent by any terminal device, and calculates and obtains the actual frequency data of the communication request information sent by any terminal device, as well as the actual response time of the paired terminal device; If the difference between the actual frequency data and the reference frequency data, and / or the difference between the actual response time and the average response time exceeds a set value, then when sending the shared key, an instruction message is attached to increase the verification frequency of the shared key between the two terminal devices during the communication process, or an instruction message is sent to the two terminal devices to specify a new authentication server and automatically exit the current communication connection. The point-to-point real-time transmission method further includes: The authentication server collects and records the average response time required for each paired terminal device to establish a communication connection. Identify the terminal device currently sending the communication request information and retrieve its corresponding average response time; Based on the time point at which the communication request information is received and the average response time, an estimated response time point is generated. Adjust the detection and refresh frequency of pairing communication request information based on the estimated response time. The average response time is defined as: the average time required from the time the authentication server receives a communication request from any terminal device to the time the authentication server establishes a communication connection between the two paired terminal devices; The closer the current time point is to the estimated response time point, the higher the detection and refresh frequency of the pairing communication request information.
2. The method for point-to-point real-time transmission of audio and video data according to claim 1, characterized in that, Sending communication request information to the authentication server via any terminal device includes: After the terminal device confirms that it is enabled, it automatically detects the current network environment and performs public network mapping according to the network environment it is in, and sends communication request information to the corresponding authentication server. The automatic public network mapping based on the network environment includes three working mechanisms: A. NAT-PMP / UPnP IGD: After the terminal device starts up, it broadcasts a specific request within the local area network to find a router that supports the NAT-PMP / UPnP IGD communication protocol. After finding the router, the terminal device sends a command to it to request a public network port and establish a mapping relationship between the port and the device's internal network IP and port. B, UDP Hole Punching: When both terminal devices are under their respective NATs, they will first connect to the authentication server. The authentication server will assist both parties in obtaining and exchanging each other's public IP address information. Then, the two parties will attempt to communicate directly. Data packets will be transmitted through the above communication link to establish a direct connection. C, DDNS: If the device detects that the public IP address in the current network environment is changing dynamically, it will use the DDNS service to check the public IP address periodically. When the IP address changes, it will automatically update the new IP address to the DNS server to ensure that the domain name always points to the correct IP address.
3. The method for point-to-point real-time transmission of audio and video data according to claim 1, characterized in that, The communication request information is configured as the authentication code; The authentication code consists of 10 Arabic numerals and uppercase and lowercase English characters; The definition of matching authentication codes between two paired terminal devices in the same group is: the two authentication codes are identical.
4. The method for point-to-point real-time transmission of audio and video data according to claim 1, characterized in that, The number of authentication servers is multiple, and they are numbered and connected to each terminal device through different communication links; The point-to-point real-time transmission method further includes: Establish and store a table of authentication server numbers corresponding to each group of terminal devices, as well as the optimal authentication server number corresponding to each group of terminal devices under various network environment parameters. After the terminal device confirms that the authentication server is enabled, it selects an authentication server with a higher number from the authentication server number table and sends a communication request to it, or detects and selects an authentication server with the corresponding number based on the current network environment parameters and sends a communication request. The order of the authentication server numbers in the authentication server number table is based on the communication delay length of the communication link corresponding to each authentication server.
5. The method for point-to-point real-time transmission of audio and video data according to claim 1, characterized in that, The point-to-point real-time transmission method further includes: Each of the two paired terminal devices stores a frequency feature data used to verify the identity information of another terminal device in the same group. The frequency feature data is unique and associated with the ID of the paired terminal device in the same group. Key verification during communication also includes: The first terminal device counts the frequency at which the second terminal device sends verification random numbers, and compares this frequency with the stored frequency characteristic data. If the above transmission frequency matches the frequency characteristic data, then the current communication state is maintained; If the transmission frequency does not match the frequency characteristic data, the current communication will be terminated.
6. The method for point-to-point real-time transmission of audio and video data according to claim 1, characterized in that, The point-to-point real-time transmission method further includes: Log information of each paired terminal device connection is collected and stored via the authentication server, and a login query port for the log information is established. The log information includes the connection time and communication duration between paired terminal devices.
7. A point-to-point real-time audio and video data transmission system, characterized in that, include: The authentication server (100) includes: The data storage unit (101) is configured to store the paired terminal devices and their corresponding authentication codes for each group; The request signal monitoring unit (102) is configured to receive communication request information sent by any terminal device; The pairing authentication unit (103) is configured to receive and respond to the communication request information to continuously monitor whether another terminal device paired with any of the terminal devices sends a communication request information. If a communication request information sent by a terminal device paired with any of the terminal devices is detected within a set time interval and the authentication code contained therein matches, a communication connection is established between the two terminal devices. After the connection is successful, the authentication server exits the connection between the two terminal devices; otherwise, the monitoring continues until the monitoring time reaches a set value or the terminal device stops sending communication request information. The shared key generation and distribution unit (104) is configured to send the shared key to the two terminal devices after they establish a communication connection. The terminal device (200) includes: The communication request information sending unit (201) is configured to automatically perform public network mapping by selecting a working mechanism according to different network environments and sending communication request information to the corresponding authentication server; The intrusion detection unit (202) is configured to generate verification feedback data by combining the verification random number with the shared key, in order to verify whether the shared key contained in the terminal device of the current communication is accurate, and output judgment information; The data transmission unit (203) is configured to output audio and video data to the paired terminal device and receive audio and video data output by the paired terminal device after the communication link is established, and control the on / off state of the current communication link in response to the determination information. The network communication terminal (300) includes a gateway device (301), an encoder (302), and a decoder (303); The data storage unit 101 of the authentication server (100) also stores reference frequency data of each terminal device sending communication request information to the authentication server, as well as the average response time of each terminal device when establishing a communication connection. The authentication server (100) identifies and responds to communication request information sent by any terminal device, calculates and obtains the actual frequency data of the communication request information sent by any terminal device, and the actual response time of the paired terminal device; if the difference between the obtained actual frequency data and the reference frequency data, and / or the difference between the actual response time and the average response time exceeds a set value, then when sending the shared key, it attaches instruction information to increase the verification frequency of the shared key between the two terminal devices during communication, or sends instruction information to the two terminal devices to specify a new authentication server and automatically exits the current communication connection; The authentication server (100) collects and records the average response time required for each paired terminal device to establish a communication connection, identifies the terminal device currently sending communication request information and retrieves its corresponding average response time, generates an estimated response time point based on the time point of receiving the communication request information and the average response time, and adjusts the detection refresh frequency of the paired communication request information based on the estimated response time point. The average response time is defined as the average time required from the time the authentication server receives a communication request from any terminal device to the time the authentication server establishes a communication connection between the two paired terminal devices; the closer the current time point is to the estimated response time point, the higher the detection and refresh frequency of the paired communication request information.
8. A computer-readable storage medium, characterized in that, It has a program module loaded on it, which, when executed by the processor, is used to implement the point-to-point real-time audio and video data transmission method as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and system for setting parameters of positioner terminal through Bluetooth
CN121037825A
A method of media stream transmission in point-to-point communication
CN1633068A