Point-to-point communication method and system based on domain name resolution

By establishing a point-to-point communication method based on domain name resolution in industrial control equipment, the problem of devices needing to know the other party's IP address is solved, and point-to-point communication without querying the IP address is realized, improving the user experience.

CN120378404APending Publication Date: 2025-07-25深圳市宇泰科技有限公司 +1

Patent Information

Application Number
CN202510695598.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The prior art cannot provide an effective point-to-point communication method based on domain name resolution, resulting in the need to know the other party's IP address first for communication between devices, which has a poor user experience.

Method used

The passive communication unit or the active communication unit establishes a connection with the identity verification unit, and sends heartbeat messages regularly. The heartbeat verification unit generates a domain name based on the message and adds DNS resolution records. The active communication unit accesses the passive communication unit through the domain name to realize point-to-point communication.

Benefits of technology

There is no need to query the IP address of the passive communication device, which improves intelligence and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378404A_ABST
    Figure CN120378404A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of industrial control equipment communication, and provides a point-to-point communication method and system based on domain name resolution. The passive communication unit or the active communication unit establishes communication connection with the identity verification unit and sends heartbeat messages to the heartbeat verification unit at regular time; the heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds a DNS analysis record of an A type or an AAAA type of the passive communication unit to a DNS service unit; if the heartbeat verification unit does not receive the heartbeat message within the set time, deleting the DNS analysis record of the A type or the AAAA type of the passive communication unit corresponding to the heartbeat message from the DNS service unit; therefore, the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit to establish point-to-point communication, and the IP address of the passive communication equipment does not need to be inquired before communication, so that the intelligent degree is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial control equipment communication, and particularly relates to a point-to-point communication method and system based on domain name resolution. Background Art

[0002] In industrial applications, most devices are located behind NAT, such as production equipment in the same factory, etc. The existence of NAT makes it impossible for devices to directly communicate point-to-point. Existing NAT traversal technologies, whether NAT mapping or server forwarding, are based on IP addresses for access, and the IP address may be different each time NAT traversal is established, which is very inconvenient to use, and the security and reliability are not high, and it can no longer meet people's usage requirements. Summary of the Invention

[0003] In view of the above deficiencies of the prior art, the purpose of the present invention is to provide a point-to-point communication method and system based on domain name resolution, aiming to solve the problem that when devices communicate point-to-point, they need to know the other party's IP address first due to the lack of an effective point-to-point communication method based on domain name resolution in the prior art, resulting in poor user experience.

[0004] On the one hand, the present invention provides a point-to-point communication method based on domain name resolution, and the method includes the following steps:

[0005] The passive communication unit or the active communication unit establishes a communication connection with the identity verification unit, and periodically sends a heartbeat message to the heartbeat verification unit; the heartbeat message includes: device type, device location, device information, device ID, and IP address;

[0006] The heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds an A type or AAAA type DNS resolution record of the passive communication unit to the DNS service unit;

[0007] If the heartbeat verification unit does not receive the heartbeat message within the set time, it deletes the A type or AAAA type DNS resolution record of the passive communication unit corresponding to the heartbeat message from the DNS service unit;

[0008] The active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit to establish point-to-point communication.

[0009] Further, the establishment of a communication connection between the passive communication unit or the active communication unit and the identity verification unit includes: the identity verification unit verifies the identity of the passive communication unit or the active communication unit;

[0010] The authentication unit authenticating the passive communication unit or the active communication unit includes: The passive communication unit establishes a communication connection with the authentication unit through a dial-up connection or a VPN connection and obtains an IP address.

[0011] Further, the passive communication unit and the active communication unit are under the same local area network; the passive communication unit and the active communication unit are the same device.

[0012] Further, before the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit, it includes:

[0013] Obtaining the domain name corresponding to the passive communication unit from the heartbeat verification unit;

[0014] The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit includes: The active communication unit obtains the domain name corresponding to the passive communication unit through the domain name generation rule;

[0015] The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit further includes: The active communication unit obtains the IPv4 / IPv6 address corresponding to the domain name from the DNS service unit.

[0016] Further preferably, the method further includes:

[0017] During the point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allows the device IDs recorded in the whitelist to join and conduct multi-party communication.

[0018] Further preferably, during the point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allowing the device IDs recorded in the whitelist to join and conduct multi-party communication includes:

[0019] The authentication unit receives a join request sent by another active communication unit to join the point-to-point communication. The authentication unit sends the device ID of another active communication unit to the passive communication unit in the point-to-point communication, and the passive communication unit in the point-to-point communication adds the device ID of another active communication unit to the whitelist;

[0020] The authentication unit receives a join request for joining the peer-to-peer communication sent by another passive communication unit, and the authentication unit sends the device ID of another passive communication unit to the active communication unit in the peer-to-peer communication, and the active communication unit in the peer-to-peer communication adds the device ID of another passive communication unit to the whitelist.

[0021] Further preferably, it is characterized in that the method further includes:

[0022] When performing the multi-party communication, when one or more passive communication units and one or more active communication units in the multi-party communication exceed a preset communication volume, any one of the passive communication units periodically requests the authentication unit to perform secondary authentication on one or more passive communication units and one or more active communication units in the multi-party communication;

[0023] The secondary authentication requests the one or more passive communication units and one or more active communication units in the multi-party communication to retain the device IDs of the corresponding devices in the whitelist through the authentication unit, and vice versa, deletes the device IDs of the corresponding devices from the whitelist.

[0024] On the other hand, the present invention provides a peer-to-peer communication system based on domain name resolution, and the system includes:

[0025] Communication devices, including active communication units and passive communication units;

[0026] A switch, accessing multiple communication devices;

[0027] An authentication unit, establishing a communication connection with a passive communication unit or an active communication unit;

[0028] A heartbeat verification unit, generating a domain name corresponding to the passive communication unit according to the heartbeat packet and a preset domain name generation rule, and adding an A type or AAAA type DNS resolution record of the passive communication unit to the DNS service unit;

[0029] A DNS service unit, providing domain name resolution services;

[0030] An active communication unit, accessing the passive communication unit through the domain name corresponding to the passive communication unit to establish a peer-to-peer communication, and periodically sending a heartbeat packet to the heartbeat verification unit;

[0031] A passive communication unit, passively performing peer-to-peer communication with the main communication unit, and periodically sending a heartbeat packet to the heartbeat verification unit.

[0032] On the other hand, the present invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the above-mentioned peer-to-peer communication method based on domain name resolution.

[0033] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions that, when executed by a processor, cause the processor to execute the above-mentioned peer-to-peer communication method based on domain name resolution.

[0034] The beneficial effects of the present invention are as follows: The passive communication unit or the active communication unit establishes a communication connection with the identity authentication unit and periodically sends a heartbeat message to the heartbeat verification unit; the heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds an A-type or AAAA-type DNS resolution record of the passive communication unit to the DNS service unit; if the heartbeat verification unit does not receive a heartbeat message within a set time, it deletes the A-type or AAAA-type DNS resolution record of the passive communication unit corresponding to the heartbeat message from the DNS service unit; thereby realizing that the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit to establish peer-to-peer communication, without the need to query the IP address of the passive communication device before communication, thus improving the degree of intelligence and further improving the user experience. Description of the Drawings

[0035] Figure 1 is a flowchart of the implementation of the peer-to-peer communication method based on domain name resolution provided by Embodiment 1 of the present invention;

[0036] Figure 2 is a schematic structural diagram of the peer-to-peer communication system based on domain name resolution provided by Embodiment 2 of the present invention. Detailed Embodiments

[0037] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0038] The following describes the specific implementation of the present invention in detail with reference to specific embodiments:

[0039] Example 1:

[0040] Figure 1The implementation process of the point-to-point communication method based on domain name resolution provided in Embodiment 1 of the present invention is shown. For the convenience of description, only the parts related to the embodiments of the present invention are shown and are described in detail as follows:

[0041] In step S101, the passive communication unit or the active communication unit establishes a communication connection with the authentication unit and periodically sends a heartbeat message to the heartbeat verification unit;

[0042] In the embodiment of the present invention, the heartbeat message includes: device type, device location, device information, device ID, and IP address;

[0043] The establishment of a communication connection between the passive communication unit or the active communication unit and the authentication unit includes: the authentication unit authenticates the passive communication unit or the active communication unit;

[0044] The authentication unit authenticating the passive communication unit or the active communication unit includes: the passive communication unit establishes a communication connection with the authentication unit through a dial-up connection or a VPN connection and obtains an IP address, and the passive communication unit can also be authenticated through the MAC address; wherein, the authentication unit enables the DHCP service.

[0045] Further, the passive communication unit and the active communication unit are located in the same local area network; the passive communication unit and the active communication unit are the same device, that is: the uplink / downlink communication unit.

[0046] In step S102, the heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds an A-type or AAAA-type DNS resolution record of the passive communication unit to the DNS service unit;

[0047] In the embodiment of the present invention, rapid update of DNS resolution records is achieved, and data packet loss is avoided;

[0048] In step S103, if the heartbeat verification unit does not receive a heartbeat message within a set time, it deletes the A-type or AAAA-type DNS resolution record of the passive communication unit corresponding to the heartbeat message from the DNS service unit;

[0049] In the embodiment of the present invention, rapid update of DNS resolution records is achieved, and data packet loss is avoided;

[0050] In step S104, the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit to establish a point-to-point communication.

[0051] In an embodiment of the present invention, before the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit, it includes: obtaining the domain name corresponding to the passive communication unit from the heartbeat verification unit to meet different usage requirements;

[0052] The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit includes: the active communication unit obtaining the domain name corresponding to the passive communication unit through the domain name generation rule, so that it is not necessary to query the IP address of the passive communication device before communication;

[0053] The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit further includes: the active communication unit obtaining the IPv4 / IPv6 address corresponding to the domain name from the DNS service unit to enable communication through the domain name.

[0054] Further, the method further includes:

[0055] When performing point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allows the device IDs recorded in the whitelist to join and perform multi-party communication.

[0056] Among them, when performing point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allowing the device IDs recorded in the whitelist to join and perform multi-party communication includes:

[0057] The authentication unit receives a join request for joining the point-to-point communication sent by another active communication unit. The authentication unit sends the device ID of the other active communication unit to the passive communication unit in the point-to-point communication, and the passive communication unit in the point-to-point communication adds the device ID of the other active communication unit to the whitelist;

[0058] The authentication unit receives a join request for joining the point-to-point communication sent by another passive communication unit. The authentication unit sends the device ID of the other passive communication unit to the active communication unit in the point-to-point communication, and the active communication unit in the point-to-point communication adds the device ID of the other passive communication unit to the whitelist.

[0059] Further, the method further includes:

[0060] When performing multi-party communication, when the one or more passive communication units and one or more active communication units in the multi-party communication exceed the preset communication volume, any one of the passive communication units regularly requests the authentication unit to perform secondary authentication on the one or more passive communication units and one or more active communication units in the multi-party communication;

[0061] Two-factor authentication requests, through an authentication unit, one or more passive communication units and one or more active communication units in a multi-party communication to retain the device IDs of the corresponding devices in a whitelist, and vice versa, to delete the device IDs of the corresponding devices from the whitelist; to prevent multiple active communication devices or multiple passive communication devices from using the same identity (VPN account / dial-up account) to perform multiple authentications with the authentication unit, and to avoid being invaded by unauthenticated devices.

[0062] In an embodiment of the present invention, a passive communication unit or an active communication unit establishes a communication connection with an authentication unit and periodically sends a heartbeat message to a heartbeat verification unit; the heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds an A-type or AAAA-type DNS resolution record of the passive communication unit to a DNS service unit; if the heartbeat verification unit does not receive a heartbeat message within a set time, it deletes the A-type or AAAA-type DNS resolution record of the passive communication unit corresponding to the heartbeat message from the DNS service unit; thus, the active communication unit can access the passive communication unit through the domain name corresponding to the passive communication unit to establish a point-to-point communication, without the need to query the IP address of the passive communication device before communication, thereby improving the degree of intelligence and further improving the user experience.

[0063] Example 2:

[0064] Figure 2 The structure of a point-to-point communication system based on domain name resolution provided by the second embodiment of the present invention is shown. For the sake of convenience of description, only the parts related to the embodiment of the present invention are shown, including:

[0065] A communication device 100, including an active communication unit 110 and a passive communication unit 120;

[0066] A switch 200, accessing multiple communication devices 100; to achieve point-to-point communication in a local area network; further, the switch can be the Internet to achieve point-to-point communication based on the Internet;

[0067] An authentication unit 300, establishing a communication connection with the passive communication unit 120 or the active communication unit 110;

[0068] A heartbeat verification unit 400, generating a domain name corresponding to the passive communication unit 120 according to the heartbeat message and a preset domain name generation rule, and adding an A-type or AAAA-type DNS resolution record of the passive communication unit 120 to a DNS service unit 500;

[0069] A DNS service unit 500, providing domain name resolution services;

[0070] The active communication unit 110 accesses the passive communication unit 120 through the domain name corresponding to the passive communication unit 120 to establish point-to-point communication, and periodically sends heartbeat messages to the heartbeat verification unit 400;

[0071] The passive communication unit 120 passively conducts point-to-point communication with the master communication unit and periodically sends heartbeat messages to the heartbeat verification unit.

[0072] In the embodiments of the present invention, each unit of the point-to-point communication system based on domain name resolution can be implemented by corresponding hardware or software units. Each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which is not used to limit the present invention herein.

[0073] Example 3:

[0074] Embodiment 3 of the present invention provides a non-volatile computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors. For example, execute the above-described Figure 1 method steps S101 to step S104.

[0075] As an example, the non-volatile storage medium can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. The volatile memory can include random access memory (RAM) as an external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus (Rambus) RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memories.

[0076] Example 4:

[0077] Embodiment 4 of the present invention provides a computer program product. The computer program product includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the point-to-point communication method based on domain name resolution in the above method embodiments. For example, execute the above-described Figure 1 method steps S101 to step S104.

[0078] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0079] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product can exist in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for causing a computer electronic device (which can be a personal computer, an authentication unit, or a network electronic device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0080] Among other things, conditional language such as "able to", "can", "may", or "could", unless specifically stated otherwise or otherwise understood within the context in which it is used, generally is intended to convey that a particular embodiment can include (while other embodiments do not include) a particular feature, element, and / or operation. Thus, such conditional language generally is not intended to imply that a feature, element, and / or operation is in any way required for one or more embodiments or that one or more embodiments must include logic for determining whether such feature, element, and / or operation is included or will be performed in any particular embodiment with or without student input or prompting.

[0081] What has been described herein in the specification and the drawings includes examples of methods and systems for providing peer-to-peer communication based on domain name resolution. Of course, it is not possible to describe every conceivable combination of elements and / or methods for the purpose of describing the various features of the present disclosure, but it will be recognized that many additional combinations and permutations of the disclosed features are possible. Therefore, it is evident that various modifications can be made to the present disclosure without departing from the scope or spirit of the present disclosure. In addition, or in the alternative, other embodiments of the present disclosure may be apparent from consideration of the specification and drawings and practice of the present disclosure as presented herein. The intention is that the examples presented in the specification and drawings be considered illustrative in all respects and not restrictive. Although specific terms are employed herein, they are used in a generic and descriptive sense and not for purposes of limitation.

Claims

1. A peer-to-peer communication method based on domain name resolution, characterized in that, The method includes the following steps: The passive communication unit or the active communication unit establishes a communication connection with the authentication unit and periodically sends a heartbeat message to the heartbeat verification unit; the heartbeat message includes: device type, device location, device information, device ID, and IP address; The heartbeat verification unit generates a domain name corresponding to the passive communication unit according to the heartbeat message and a preset domain name generation rule, and adds an A type or AAAA type DNS resolution record of the passive communication unit to the DNS service unit; If the heartbeat verification unit does not receive the heartbeat message within a set time, it deletes the A type or AAAA type DNS resolution record of the passive communication unit corresponding to the heartbeat message from the DNS service unit; The active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit to establish a point-to-point communication.

2. The method according to claim 1, characterized in that The establishment of a communication connection between the passive communication unit or the active communication unit and the authentication unit includes: the authentication unit authenticates the passive communication unit or the active communication unit; The authentication unit authenticating the passive communication unit or the active communication unit includes: the passive communication unit establishes a communication connection with the authentication unit through a dial-up connection or a VPN connection and obtains an IP address.

3. The method according to claim 1, characterized in that, The passive communication unit and the active communication unit are located in the same local area network; The passive communication unit and the active communication unit are the same device.

4. The method according to claim 1, wherein Before the active communication unit accesses the passive communication unit through the domain name corresponding to the passive communication unit, it includes: Obtaining the domain name corresponding to the passive communication unit from the heartbeat verification unit; The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit includes: the active communication unit obtains the domain name corresponding to the passive communication unit through the domain name generation rule; The active communication unit accessing the passive communication unit through the domain name corresponding to the passive communication unit further includes: the active communication unit obtains the IPv4 / IPv6 address corresponding to the domain name from the DNS service unit.

5. The method according to claim 1, characterized in that The method further includes: During the point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allows the device IDs recorded in the whitelist to join and conduct multi-party communication.

6. The method according to claim 5, characterized in that, During the point-to-point communication, the passive communication unit or the active communication unit in the point-to-point communication allowing the device IDs recorded in the whitelist to join and conduct multi-party communication includes: The authentication unit receives a join request sent by another active communication unit to join the point-to-point communication. The authentication unit sends the device ID of another active communication unit to the passive communication unit in the point-to-point communication. The passive communication unit in the point-to-point communication adds the device ID of another active communication unit to the whitelist; The authentication unit receives a join request sent by another passive communication unit to join the peer-to-peer communication. The authentication unit sends the device ID of another passive communication unit to the active communication unit in the peer-to-peer communication, and the active communication unit in the peer-to-peer communication adds the device ID of another passive communication unit to the whitelist.

7. The method according to claim 6, wherein The method further includes: During the multi-party communication, when the communication volume of one or more passive communication units and one or more active communication units in the multi-party communication exceeds a preset communication volume, any one of the passive communication units periodically requests the authentication unit to perform secondary authentication on one or more passive communication units and one or more active communication units in the multi-party communication; For the secondary authentication, the authentication unit requests one or more passive communication units and one or more active communication units in the multi-party communication to retain the device IDs of the corresponding devices in the whitelist, and vice versa, deletes the device IDs of the corresponding devices from the whitelist.

8. A peer-to-peer communication system based on domain name resolution, characterized in that, The system includes: A communication device, including an active communication unit and a passive communication unit; A switch, accessing multiple communication devices; An authentication unit, establishing a communication connection with a passive communication unit or an active communication unit; A heartbeat verification unit, generating a domain name corresponding to the passive communication unit according to the heartbeat packet and a preset domain name generation rule, and adding an A type or AAAA type DNS resolution record of the passive communication unit to the DNS service unit; A DNS service unit, providing domain name resolution services; An active communication unit, accessing the passive communication unit through the domain name corresponding to the passive communication unit to establish a peer-to-peer communication, and periodically sending a heartbeat packet to the heartbeat verification unit; A passive communication unit, passively performing peer-to-peer communication with the main communication unit, and periodically sending a heartbeat packet to the heartbeat verification unit.

9. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the peer-to-peer communication method based on domain name resolution according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions, which, when executed by a processor, cause the processor to execute the peer-to-peer communication method based on domain name resolution according to any one of claims 1-7.

Citation Information

Patent Citations

  • Automatic configuration method for network element equipment domain name of internet protocol (IP) multimedia subsystem

    CN102546632A

  • Convenient access method based on domain name, system, electronic equipment and storage medium

    CN107979659A

  • Distribution network terminal communication test system and method based on dynamic domain name resolution

    CN110830602A

  • Domain name management method and related device

    WO2024255247A1

Cited By

  • Equipment management method and device, equipment and computer storage medium

    CN121193793A