Method for public network to access intranet electric power internet of things equipment service

By establishing a WebSocket connection and socket transmission channel between the IoT platform and the intranet power IoT devices, the problem of inconvenient remote access to intranet power IoT devices services is solved, and secure and efficient data transmission is achieved.

CN122053094APending Publication Date: 2026-05-15XJ ELECTRIC CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XJ ELECTRIC CO LTD
Filing Date
2024-11-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, remote access to the services of intranet power IoT devices is inconvenient and inefficient, especially when some services of power IoT devices are abnormal, making it difficult to handle them in a timely manner.

Method used

A WebSocket connection is established between the IoT platform and the internal power IoT devices. A secure transmission channel is built using proxy ports and socket connections to enable public network access to the internal power IoT device services. Session frames and encryption are used during data transmission.

Benefits of technology

It improves the security, reliability, and efficiency of public network access to internal power IoT devices, making the transmission process more convenient and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053094A_ABST
    Figure CN122053094A_ABST
Patent Text Reader

Abstract

The invention relates to a method for a public network to access intranet electric power Internet of Things equipment service, and belongs to the technical field of secure access of the public network to intranet data. Under the condition that the Internet of Things platform is in communication connection with the intranet electric power Internet of Things equipment, according to the intranet electric power Internet of Things equipment to be accessed and the service thereof, websocket connection between the Internet of Things platform and the equipment and between the Internet of Things platform and an agent end is established, and an agent port corresponding to the service is determined at the agent end; when a new access end of the public network accesses the service, creating a new session for accessing the service through a proxy port corresponding to the service, socket connections respectively established between the access end and the proxy port, between the equipment and the service, and websocket connections between the Internet of Things platform and the equipment, and between the Internet of Things platform and the proxy end; and the access end uses the session to access the service through socket connection between the access end and the proxy port, socket connection between the device and the service, websocket connection between the Internet of Things platform and the device, and websocket connection between the Internet of Things platform and the proxy end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for accessing internal network power IoT devices from a public network, belonging to the field of secure public network access to internal network data technology. Background Technology

[0002] The Internet of Things (IoT) in the power sector refers to the application of IoT in smart grids. Smart cities and smart grids integrate IoT, AI, and big data technologies to effectively combine infrastructure resources with power system infrastructure resources. This improves the informatization level of the power system, the intelligent efficiency of the distribution system, and the power supply capacity, while also enhancing the utilization efficiency of existing power system infrastructure. The data acquisition terminals in the power IoT are sensing layer devices that use sensing, capture, and measurement technologies such as RFID, sensors, and QR codes to collect real-time information from objects, such as electricity meters, water meters, gas meters, and various sensors.

[0003] In the Internet of Things (IoT) for power systems, to ensure data security, IoT devices are typically only accessible via an internal network, not the external network. However, in some cases, remote access to the services of IoT devices within the internal network is necessary. For example, when some services of an IoT device malfunction, staff need to troubleshoot the services within the internal network. Currently, the common approach is for professional operators to remotely guide staff at the device's location to troubleshoot the problem. This method is inconvenient and usually inefficient. Alternatively, professional operators can travel to the device's location and use the internal network to troubleshoot the services, but this requires significant time spent traveling back and forth. This method is time-consuming, labor-intensive, inconvenient, and inefficient, making it difficult to address urgent service issues promptly. Summary of the Invention

[0004] The purpose of this invention is to provide a method for accessing the services of internal network power IoT devices from the public network, so as to solve the problem that the current method of remotely accessing the services of power IoT devices in the internal network environment is inconvenient and inefficient when some services of power IoT devices in the internal network environment are abnormal.

[0005] To solve the above-mentioned technical problems, the present invention provides a method for accessing the services of internal network power IoT devices via the public network. The method includes: when the IoT platform and the internal network power IoT devices are connected, establishing WebSocket connections between the IoT platform and the device, and between the IoT platform and the proxy terminal, according to the internal network power IoT devices and their services to be accessed, and determining the proxy port corresponding to the service at the proxy terminal. When a new client accesses the service from the public network, it creates a new session for accessing the service through the proxy port corresponding to the service, the socket connections established between the client and the proxy port, between the device and the service, and the websocket connections between the IoT platform and the device, and between the IoT platform and the proxy. The client then uses this session to access the service through the socket connections between the client and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy.

[0006] Furthermore, the methods for creating a new session to access the service include: establishing socket connections between the access terminal and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy terminal, through the proxy port corresponding to the service; The access client sends a session creation frame to the proxy client through a socket connection established between the access client and the proxy port corresponding to the service. The frame is then forwarded to the IoT platform and the device via WebSocket connections between the IoT platform and the proxy client, and between the IoT platform and the device, respectively. The device establishes and listens for a socket connection between itself and the service, and sends a session creation response to the proxy client through WebSocket connections between the IoT platform and the device, and between the IoT platform and the proxy client. Upon receiving the session creation response, the proxy client saves the information corresponding to the session to complete the creation of the new session.

[0007] Furthermore, the communication connection between the IoT platform and the power IoT devices is conducted via the MQTT protocol.

[0008] Furthermore, based on the intranet power IoT devices and their services to be accessed, WebSocket connections are established between the IoT platform and the devices, and between the IoT platform and the agent, respectively. The methods for determining the proxy port corresponding to the service at the agent end include: The request sender sends a request to create a secure tunnel to the IoT platform. The IoT platform notifies the device to send the corresponding information for establishing a secure tunnel by issuing an MQTT message, and sends the first connection parameters corresponding to the WebSocket connection between the IoT platform and the proxy to the request sender. The device obtains the second connection parameters corresponding to the WebSocket connection between the IoT platform and the device based on the received information for establishing a secure tunnel, and establishes a WebSocket connection with the IoT platform based on the second connection parameters. The request sender inputs the first connection parameters to the proxy, and the proxy establishes a WebSocket connection with the IoT platform based on the first connection parameters.

[0009] Furthermore, during the data transmission process of accessing the service through the session, via the socket connection between the access client and the proxy port, the socket connection between the device and the service, and the websocket connection between the IoT platform and the device, and the websocket connection between the IoT platform and the proxy client, the data is transmitted in the form of session frames. Each session frame contains a session header and a transmitted data payload. The content of the session header includes the session identifier of the session. Different session identifiers correspond to different socket connections between the device and the service.

[0010] Furthermore, based on the intranet power IoT devices and their services to be accessed, establishing WebSocket connections between the IoT platform and the devices, and between the IoT platform and the agent, and determining the agent port corresponding to the service on the agent side, further includes: when the number of services of the intranet power IoT devices to be accessed is greater than one, establishing at least the same number of WebSocket connections between the IoT platform and the devices as the number of services, and determining at least the same number of agent ports corresponding to each service on the agent side; The method of creating a new session for accessing the service further includes: when the number of services of the intranet power IoT device to be accessed is greater than 1, the device establishes a new socket connection with the service of each intranet power IoT device to be accessed to create a new session for accessing each of the services, and saves the correspondence between the session identifier of each new session and the socket connection. The accessing client utilizes the session to access the service through socket connections between the accessing client and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy client, in the following ways: During the data transmission process of accessing the service through the session, the access terminal utilizes the session to access the service via the socket connection between the access terminal and the proxy port, the socket connection between the device and the service, the websocket connection between the IoT platform and the device, and the websocket connection between the IoT platform and the proxy terminal. After receiving the session frame sent by the IoT platform, the device finds the corresponding socket connection between the device and the service based on the session identifier in the session header, and then transmits the data in the session data payload to the corresponding socket connection to send the data to the service corresponding to the session.

[0011] Furthermore, the method of accessing the service through the socket connection between the access terminal and the proxy port, the socket connection between the device and the service, the websocket connection between the IoT platform and the device, and the websocket connection between the IoT platform and the proxy terminal includes: encrypting the transmitted data in the socket connection between the access terminal and the proxy port; transmitting the data in ciphertext in the websocket connection between the IoT platform and the device, and between the IoT platform and the proxy side; and decrypting the transmitted data in the socket connection between the device and the service.

[0012] Furthermore, the request sending end is the IoT platform front-end or an HTTP interface called.

[0013] Furthermore, the IoT platform frontend can send the secure tunnel creation request to the IoT platform in the following ways: the IoT platform frontend sends the secure tunnel creation request to the IoT platform via the HTTP protocol.

[0014] Beneficial Effects: This application provides a novel method for accessing intranet power IoT device services from the public network. When the IoT platform and the intranet power IoT device are connected, the method, based on the intranet power IoT device and its services to be accessed, utilizes the proxy port corresponding to the intranet power IoT device service on the proxy end, and the established WebSocket connections between the IoT platform and the intranet power IoT device, and between the IoT platform and the proxy end. Furthermore, when a new public access end accesses the intranet power IoT device service, it utilizes the proxy port corresponding to the intranet power IoT device service and the connection between the access end and the proxy port. The socket connections established between the device and the service, as well as the WebSocket connections between the IoT platform and the device, and between the IoT platform and the agent, create new sessions for accessing the service. This establishes a complete secure transmission channel between the public network access end, the agent's proxy port, the IoT platform, the device hosting the service, and the internal power IoT device service to be accessed. This allows the public network access end to access the internal power IoT device service using the agent and the established secure transmission channel. The transmission process is secure and reliable, and is more efficient and convenient than existing transmission methods. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the method for accessing internal network power IoT devices via public network in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the communication principle of accessing multiple services over a public network in an embodiment of the method for accessing internal network power IoT devices under the present invention. Detailed Implementation

[0016] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0017] Example of a method for accessing internal network power IoT device services from the public network This embodiment provides a technical solution for accessing intranet power IoT device services from a public network. The method establishes a secure transmission channel between the public network access endpoint, the proxy port of the proxy endpoint, the IoT platform, the device where the service is located, and the intranet power IoT device service to be accessed. This allows the public network access endpoint to utilize the proxy endpoint and the established secure transmission channel to access the intranet power IoT device service.

[0018] The method specifically includes: when the IoT platform communicates with the intranet power IoT device, according to the intranet power IoT device to be accessed and its services, establishing WebSocket connections between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the agent end, and determining the agent port corresponding to the intranet power IoT device service to be accessed at the agent end; When a new public network client accesses a private network power IoT device service, it creates a new session for accessing the service through the proxy port corresponding to the private network power IoT device service, the socket connections established between the client and the proxy port, between the private network power IoT device and the service, and the WebSocket connections between the IoT platform and the private network power IoT device, and between the IoT platform and the proxy. The client then uses this session to access the service through the socket connections between the client and the proxy port, between the private network power IoT device and the service, and between the IoT platform and the proxy.

[0019] Therefore, this method establishes a secure transmission channel between the public network access terminal, the proxy port of the proxy terminal, the IoT platform, the device where the service is located, and the internal network power IoT device service to be accessed. This allows a new public network access terminal to directly access the internal network power IoT device service through the established secure transmission channel via the proxy terminal, ensuring a secure and reliable transmission process. Compared to existing transmission methods, this method is more efficient and convenient.

[0020] The flowchart for public network access to internal network power IoT device services is as follows: Figure 1As shown below, in conjunction with Figure 1 This document provides a detailed explanation of how to access the internal network power IoT device service from the public network: When the IoT platform communicates with the intranet power IoT devices, IoT platforms are established separately according to the intranet power IoT devices to be accessed and their services (the IoT platform is...). Figure 1 WebSocket connections (corresponding to the platform side) between the IoT device and the intranet power IoT device to be accessed, and between the IoT platform and the agent (corresponding to the following respectively) Figure 1 (Steps 2.1.2 and 2.2.2 in the original text), and on the proxy side, determine the proxy port corresponding to the service of the intranet power IoT device to be accessed (corresponding to...). Figure 1 (Step 2.2.3) In this embodiment, the communication connection between the IoT platform and the power IoT device is made through the MQTT protocol. The IoT typically uses the MQTT protocol for instant communication. IoT devices generally access the platform through the MQTT protocol and usually send messages using the MQTT protocol. In other embodiments, other communication connection methods can also be used, such as the HTTP protocol, the COAP protocol, etc.

[0021] When a new public network client accesses this service, a new session is created to access the service through the proxy port corresponding to the service, the socket connections established between the client and the proxy port, between the internal network power IoT device to be accessed and the service of the internal network power IoT device to be accessed, and the WebSocket connections between the IoT platform and the internal network power IoT device to be accessed, and between the IoT platform and the proxy client. Specifically, the method for establishing WebSocket connections between the IoT platform and the internal network power IoT device to be accessed, and between the IoT platform and the proxy client, based on the internal network power IoT device and its service, and for determining the proxy port corresponding to the service of the internal network power IoT device to be accessed at the proxy client, is as follows: First, the request to create a secure tunnel is sent to the IoT platform (corresponding to the request sender). Figure 1 In step 1), the request sending end is the IoT platform front-end or the HTTP interface called (in other embodiments, it can also be other sending ends that can realize the request sending function and receive return values, parse and send the data corresponding to the return values, etc.). In this embodiment, the sending end is the IoT platform front-end. The specific way for the IoT platform front-end to send the request to create a secure tunnel to the IoT platform is as follows: the IoT platform front-end sends the request to create a secure tunnel to the IoT platform through the HTTP protocol. Secondly, the IoT platform sends an MQTT message (in this embodiment, the communication connection between the IoT platform and the power IoT device is through the MQTT protocol, so this is an MQTT message; in other embodiments, the IoT platform and the power IoT device can use other communication connection methods, such as HTTP protocol, COAP protocol, etc., then the message sent here is the message corresponding to other communication connection methods) to notify the internal network power IoT device to send the corresponding information for establishing a secure tunnel (corresponding to...) Figure 1 Step 2.1), and send the first connection parameters corresponding to the WebSocket connection between the IoT platform on the agent end and the agent end to the request sender (corresponding to Figure 1 Step 2.2); Steps 2.1 and 2.2 can be performed simultaneously; the intranet power IoT device to be accessed obtains the second connection parameters corresponding to the WebSocket connection between the IoT platform and the intranet power IoT device to be accessed based on the received information on establishing a secure tunnel (i.e., parsing the above MQTT message, corresponding to...). Figure 1 (2.1.1 in the text), and establish a WebSocket connection with the IoT platform according to the second connection parameters (corresponding to Figure 1 Step 2.1.2); the requesting end sends the first connection parameter to the proxy end (corresponding to...). Figure 1 In step 2.2.1), the agent establishes a WebSocket connection with the IoT platform based on the first connection parameters (corresponding to...). Figure 1 (Step 2.2.2 in the text).

[0022] To access the intranet power IoT device, the system parses the secure tunnel establishment information received via MQTT. This allows the acquisition of the second connection parameters for the WebSocket connection between the IoT platform and the accessed device, displayed as JSON data. The specific second connection parameters include: operation type, proxy model, service port, service name, tunnel identifier, WebSocket connection address, and WebSocket connection token, as shown in the JSON below. { "mode": "proxy", "operation": "connect", "servicePort": 22, "serviceType": "_SSH", "tunnelId": "tunnel_test_tunnel_test_tunnel_test_1709600944341", "url":"ws: / / 20.11.18.161:42032 / tunnel / tunnel_test_tunnel_test_tunnel_test_1709600944341 / device", "token": "6ca0a3d0-17af-47b1-84f3-01a5acb3a2af" } In this embodiment, the method for creating a new session to access the intranet power IoT device service is as follows: This is achieved through the proxy port corresponding to the intranet power IoT device service to be accessed, the socket connections established between the accessing end and the proxy port, between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed, and the WebSocket connections established between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the proxy end. The access end sends a session creation frame to the proxy end (corresponding to the socket connection established between the access end and the proxy port corresponding to the intranet power IoT device service to be accessed) through the socket connection established between the access end and the proxy port. Figure 1 Step 3 in the process involves forwarding the request sequentially between the IoT platform and the agent, and between the IoT platform and the intranet power IoT device to be accessed, via WebSocket connections. The intranet power IoT device to be accessed establishes and listens for a socket connection between itself and its service, and sends a session creation response to the agent via WebSocket connections between the IoT platform and the device, and between the IoT platform and the agent. Figure 1 (In steps 3.1 to 3.6) After receiving the session creation response, the agent saves the information corresponding to the session to complete the creation of the new session (after the new session is created, subsequent connection handshakes and communication information are transmitted through this session).

[0023] The access terminal utilizes this session to access the internal network power IoT device service through the socket connection between the access terminal and the proxy port, the socket connection between the internal network power IoT device to be accessed and the internal network power IoT device service to be accessed, the websocket connection between the IoT platform and the internal network power IoT device to be accessed, and the websocket connection between the IoT platform and the proxy terminal.

[0024] Specifically, the accessing end utilizes this session to access the data transmission process of the proxy port of the intranet power IoT device service through the socket connections between the accessing end and the proxy port, between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed, and between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the proxy end. Figure 1 In steps 4-4.7 of the data transmission process, data is transmitted in the form of session frames. Each session frame contains a session header and a data payload. The session header includes the session identifier (session_id), and different session identifiers correspond to different socket connections between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed. Specifically, the types of session frames include: creation frames, release frames, response frames, and data transmission frames. Creation frames are used to create new sessions, release frames are used to close sessions, response frames are used to transmit response types, and data transmission frames are used to transmit data. In this embodiment, the session header also includes a frame identifier (frame_id) and a frame type (frame_type). The frame types for creation frames, release frames, response frames, and data transmission frames are 1, 2, 3, and 4, respectively (other content can be adaptively set or the above content can be deleted or modified in other embodiments). When the session frame is a data transmission frame, the data payload contains the data to be transmitted. An example of a data transmission frame is as follows: { "head": { "frame_id": 0, "frame_type": 4, "session_id": "1706861864188327" }, "payload": "data transport" } When the session frame is a response frame, the data payload contains the response type; when the session frame is a creation frame or a release frame, the data payload contains the data of the second connection parameter mentioned above, so as to create or close a specific session (i.e., create or close the corresponding WebSocket connection).

[0025] The accessing client sends a session release frame to the proxy client through a socket connection established between the accessing client and the proxy port corresponding to the intranet power IoT device service to be accessed. This frame is then forwarded sequentially to the IoT platform, the intranet power IoT device to be accessed, and the service via WebSocket connections between the IoT platform and the proxy client, between the IoT platform and the intranet power IoT device to be accessed, and between the device and the service. Upon receiving the release frame, the service disconnects the socket connection between the device and the service (corresponding to...). Figure 1 (Steps 5-5.3 in the text).

[0026] Based on the intranet power IoT devices and their services to be accessed, the method of establishing WebSocket connections between the IoT platform and the intranet power IoT devices to be accessed, and between the IoT platform and the agent, and determining the proxy port corresponding to the intranet power IoT device service to be accessed on the agent side, also includes: when the number of services of the intranet power IoT devices to be accessed is greater than one, establishing at least the same number of WebSocket connections between the IoT platform and the intranet power IoT devices to be accessed as the number of services of the intranet power IoT devices to be accessed, and determining at least the same number of proxy ports corresponding to each service on the agent side as the number of services of the intranet power IoT devices to be accessed; A schematic diagram illustrating the communication principle of accessing multiple services over the public network is shown below. Figure 2 As shown, the device establishes multiple WebSocket connections with the platform to access multiple services through different tunnels, and the services corresponding to different tunnels can be the same or different. Figure 2 (Only the cases where different tunnels correspond to different services are listed). Therefore, for cases where the number of services is greater than one, at least one tunnel should be established to avoid the situation where some services can be allocated a channel while others cannot. Each tunnel specifically refers to the transmission channel composed of the WebSocket connection between the platform and the device and the socket connection between the device and the device service. The access end accesses each service by accessing multiple proxy ports corresponding to each service, which makes it more efficient to troubleshoot anomalies in various services in actual engineering and facilitates the troubleshooting of problems by operation and maintenance personnel. The method of creating a new session for accessing the intranet power IoT device service also includes: when the number of intranet power IoT device services to be accessed is greater than one, the intranet power IoT device to be accessed and the services of each intranet power IoT device to be accessed establish new socket connections to create new sessions for accessing each intranet power IoT device service, and save the correspondence between the session identifier and the socket connection of each new session. The accessing end utilizes this session to access the intranet power IoT device service through the following methods: socket connections between the accessing end and the proxy port, between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed, and websocket connections between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the proxy end. During data transmission on the proxy port, the accessing client utilizes this session to access the intranet power IoT service through socket connections between the accessing client and the proxy port, between the intranet power IoT device to be accessed and the intranet power IoT service to be accessed, and between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the proxy client. After receiving the session frame sent by the IoT platform, the intranet power IoT device to be accessed can find the corresponding socket connection between the intranet power IoT device to be accessed and the intranet power IoT service to be accessed based on the session identifier in the session header, and then transmit the data in the session data payload to the corresponding socket connection to send the data to the service corresponding to the session.

[0027] In this embodiment, the method of accessing the intranet power IoT device service through the socket connection between the access terminal and the proxy port, the socket connection between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed, the websocket connection between the IoT platform and the intranet power IoT device to be accessed, and the websocket connection between the IoT platform and the proxy terminal is as follows: the transmitted data is encrypted in the socket connection between the access terminal and the proxy port; the data is transmitted in ciphertext in the websocket connection between the IoT platform and the intranet power IoT device to be accessed, and between the IoT platform and the proxy side; and the transmitted data is decrypted in the socket connection between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed. The method of accessing the intranet power IoT device service through the socket connection between the access terminal and the proxy port, the socket connection between the intranet power IoT device to be accessed and the intranet power IoT device service to be accessed, the websocket connection between the IoT platform and the intranet power IoT device to be accessed, and the websocket connection between the IoT platform and the proxy terminal in this embodiment improves the security of data transmission.

[0028] It should be understood that the above-described specific embodiments of the present invention are merely illustrative or explanatory of the principles of the present invention, and do not constitute a limitation thereof.

Claims

1. A method for accessing internal network power IoT device services from a public network, characterized in that, When the IoT platform communicates with the intranet power IoT devices, according to the intranet power IoT devices and their services to be accessed, a WebSocket connection is established between the IoT platform and the device, and between the IoT platform and the agent, and the agent port corresponding to the service is determined at the agent. When a new client accesses the service from the public network, a new session for accessing the service is created through the proxy port corresponding to the service, the socket connections established between the client and the proxy port, between the device and the service, and the websocket connections between the IoT platform and the device, and between the IoT platform and the proxy. The access terminal utilizes the session to access the service through socket connections between the access terminal and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy terminal.

2. The method for accessing internal network power IoT equipment services via public network according to claim 1, characterized in that, The methods for creating a new session to access the service include: using the proxy port corresponding to the service, and the socket connections established between the access terminal and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy terminal. The access client sends a session creation frame to the proxy client through a socket connection established between the access client and the proxy port corresponding to the service. The frame is then forwarded to the IoT platform and the device via WebSocket connections between the IoT platform and the proxy client, and between the IoT platform and the device, respectively. The device establishes and listens for a socket connection between itself and the service, and sends a session creation response to the proxy client through WebSocket connections between the IoT platform and the device, and between the IoT platform and the proxy client. Upon receiving the session creation response, the proxy client saves the information corresponding to the session to complete the creation of the new session.

3. The method for accessing internal network power IoT equipment services via public network according to claim 2, characterized in that, The communication connection between the IoT platform and the power IoT devices is conducted via the MQTT protocol.

4. The method for accessing internal network power IoT equipment services via public network according to claim 3, characterized in that, Based on the intranet power IoT devices and their services to be accessed, WebSocket connections are established between the IoT platform and the devices, and between the IoT platform and the proxy terminal. The proxy terminal determines the corresponding proxy port for each service in the following ways: The request sender sends a request to create a secure tunnel to the IoT platform. The IoT platform notifies the device to send the corresponding information for establishing a secure tunnel by issuing an MQTT message, and sends the first connection parameters corresponding to the WebSocket connection between the IoT platform and the proxy to the request sender. The device obtains the second connection parameters corresponding to the WebSocket connection between the IoT platform and the device based on the received information for establishing a secure tunnel, and establishes a WebSocket connection with the IoT platform based on the second connection parameters. The request sender inputs the first connection parameters to the proxy, and the proxy establishes a WebSocket connection with the IoT platform based on the first connection parameters.

5. The method for accessing internal network power IoT equipment services via public network according to claim 2, characterized in that, During the data transmission process of accessing the service through the session, the data is transmitted in the form of session frames. Each session frame contains a session header and a transmitted data payload. The session header includes the session identifier of the session. The session identifiers of different sessions correspond to different socket connections between the device and the service.

6. The method for accessing internal network power IoT equipment services via public network according to claim 5, characterized in that, Based on the intranet power IoT devices and their services to be accessed, the method of establishing WebSocket connections between the IoT platform and the devices, and between the IoT platform and the agent, and determining the agent port corresponding to the service on the agent side, further includes: when the number of services of the intranet power IoT devices to be accessed is greater than one, establishing at least the same number of WebSocket connections between the IoT platform and the devices as the number of services, and determining at least the same number of agent ports corresponding to each service on the agent side; The method of creating a new session for accessing the service further includes: when the number of services of the intranet power IoT device to be accessed is greater than 1, the device establishes a new socket connection with the service of each intranet power IoT device to be accessed to create a new session for accessing each of the services, and saves the correspondence between the session identifier of each new session and the socket connection. The accessing client utilizes the session to access the service through socket connections between the accessing client and the proxy port, between the device and the service, and between the IoT platform and the device, and between the IoT platform and the proxy client, in the following ways: During the data transmission process of accessing the service through the session, the access terminal utilizes the session to access the service via the socket connection between the access terminal and the proxy port, the socket connection between the device and the service, the websocket connection between the IoT platform and the device, and the websocket connection between the IoT platform and the proxy terminal. After receiving the session frame sent by the IoT platform, the device finds the corresponding socket connection between the device and the service based on the session identifier in the session header, and then transmits the data in the session data payload to the corresponding socket connection to send the data to the service corresponding to the session.

7. The method for accessing internal network power IoT equipment services via public network according to any one of claims 1-6, characterized in that, Accessing the service via socket connections between the access endpoint and the proxy port, between the device and the service, between the IoT platform and the device, and between the IoT platform and the proxy endpoint via WebSocket connections includes: encrypting the transmitted data between the access endpoint and the proxy port; transmitting the data in ciphertext via WebSocket connections between the IoT platform and the device, and between the IoT platform and the proxy; and decrypting the transmitted data between the device and the service via socket connections.

8. The method for accessing internal network power IoT equipment services via public network according to claim 4, characterized in that, The request sending end is the IoT platform front-end or the HTTP interface called.

9. The method for accessing internal network power IoT equipment services via public network according to claim 8, characterized in that, The IoT platform front-end can send the request to create a secure tunnel to the IoT platform in the following ways: The IoT platform front-end sends the request to create a secure tunnel to the IoT platform via the HTTP protocol.