CN113794772A - Method and system for remotely accessing built-in page of terminal equipment - Google Patents

Method and system for remotely accessing built-in page of terminal equipment Download PDF

Info

Publication number
CN113794772A
CN113794772A CN202111080845.2A CN202111080845A CN113794772A CN 113794772 A CN113794772 A CN 113794772A CN 202111080845 A CN202111080845 A CN 202111080845A CN 113794772 A CN113794772 A CN 113794772A
Authority
CN
China
Prior art keywords
terminal equipment
request
page
built
browser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111080845.2A
Other languages
Chinese (zh)
Other versions
CN113794772B (en
Inventor
古欣
邵慧
李雷红
王敏
温振新
马雅东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Youren Networking Co ltd
Original Assignee
Shandong Youren Networking Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Youren Networking Co ltd filed Critical Shandong Youren Networking Co ltd
Priority to CN202111080845.2A priority Critical patent/CN113794772B/en
Publication of CN113794772A publication Critical patent/CN113794772A/en
Application granted granted Critical
Publication of CN113794772B publication Critical patent/CN113794772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method and a system for remotely accessing a built-in page of terminal equipment.A TCP (Transmission control protocol) server receives an HTTP (hyper text transport protocol) request sent by a browser; the TCP server judges the terminal equipment according to the acquired domain name, adds the message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment; the TCP server receives built-in page data transmitted from the terminal equipment through the long connecting channel, finds corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and sends the page data to the browser; the method and the device realize remote and rapid access to the built-in page of the terminal device, and solve the problem of inconvenient parameter configuration of the terminal device of the Internet of things in a remote and severe environment.

Description

Method and system for remotely accessing built-in page of terminal equipment
Technical Field
The present disclosure relates to the field of communication control technologies, and in particular, to a method and a system for remotely accessing a built-in page of a terminal device.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
In order to facilitate parameter configuration of Terminal devices of the internet of things such as a serial server, a PLCNET cloud gateway, an RTU (Remote Terminal Unit), a DTU (Data Transfer Unit) and the like, most of the Terminal devices can be integrated with a built-in page, and the existence of the built-in page greatly facilitates parameter configuration of the Terminal devices by users. However, currently, the built-in pages of these terminal devices can only be accessed in the lan, i.e. the IP of the configuration device (e.g. computer, etc.) of the user and the IP of the terminal device must be in the same network segment. Since the default IP of the terminal device when leaving the factory is not necessarily in the same network segment as the IP of the user, the client cannot directly access the built-in page of the terminal device to perform parameter configuration, and thus it is very inconvenient for the client to configure the terminal device. In addition, the local area network has a distance limitation, and if the user is far away from the terminal device or the use environment of the terminal device is severe, it is very inconvenient to configure the parameters of the terminal device in this case.
Two methods are currently used to solve the problem of cross-network segment configuration: the first method is that a configuration instruction is broadcasted in a UDP (user datagram protocol) broadcasting mode, and the configuration of equipment in a local area network is completed after the equipment receives the broadcast instruction, and the method is realized by adopting the above patent application of a state information cross-network section transmission method (publication number CN107682165A) and a cross-network section equipment searching and communication method (publication number CN107888711A) in the power automation system. The second is that IP configuration instructions are broadcasted through UDP, different network segment equipment IPs in the same local area network are modified into the same network segment, and then the equipment is configured through TCP or HTTP, the patent applications of a fast search connection method (publication number CN104796484A) and a network IP address automatic allocation method (publication number CN106506720A) based on a display screen control system both adopt the configuration method, but the method has the defects that the IP of a target equipment needs to be temporarily modified, and the normal network function of the target equipment is influenced in the configuration process.
Disclosure of Invention
In order to solve the defects of the prior art, the disclosure provides a method and a system for remotely accessing a built-in page of a terminal device, which break through the limitation of a local area network, realize remote and rapid access of the built-in page of the terminal device, and solve the problem of inconvenient parameter configuration of the terminal device of the internet of things in a remote and severe environment.
In order to achieve the purpose, the following technical scheme is adopted in the disclosure:
the first aspect of the disclosure provides a method for remotely accessing a built-in page of a terminal device.
A method for remotely accessing a built-in page of terminal equipment is applied to a TCP server and comprises the following processes:
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
Further, the TCP server is further configured to: monitoring a built-in page opening request sent by a browser, analyzing the content of the browser request after receiving the request, and sending a service address and a port to corresponding terminal equipment so that the terminal equipment and the service establish a TCP channel and carry out data communication through a specified protocol.
Further, the TCP server is further configured to:
monitoring a request for opening a built-in page of a specified device through an MQTT (Message queue Telemetry Transport), and forwarding the request to a terminal device through the MQTT, wherein the request comprises an IP (Internet protocol) and a port of a TCP (transmission control protocol) server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
A second aspect of the present disclosure provides a TCP server.
A TCP server comprising a processing module;
the processing module configured to:
receiving an HTTP request sent by a browser;
analyzing the HTTP request, acquiring a domain name of the terminal equipment, judging the terminal equipment according to the domain name, adding a message ID to the received request data, and sending the request data to a long connecting channel of the corresponding terminal equipment;
and receiving built-in page data transmitted from the terminal equipment through the long connecting channel, finding out corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and sending the page data to the browser.
Further, the processing module is further configured to: monitoring a built-in page opening request sent by a browser, analyzing the content of the browser request after receiving the request, and sending a service address and a port to corresponding terminal equipment so that the terminal equipment and the service establish a TCP channel and carry out data communication through a specified protocol.
Further, the processing module is further configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
The third aspect of the disclosure provides a remote opening method for a built-in page of a terminal device.
A method for remotely accessing a built-in page of a terminal device comprises the following processes:
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
after receiving the data content of the long connecting channel, a TCP client in the terminal equipment removes the message ID and sends the data to a built-in page WEB server of the terminal equipment;
the built-in page WEB server replies built-in page data, adds the message ID and forwards the message ID to the TCP server through the TCP client;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
Furthermore, the TCP client monitors the MQTT message, after receiving the request, the TCP client sends a long connection registration packet request to the TCP server according to the IP address and the port in the request, and after the registration is successful, the long connection channel data is acquired.
Further, a TCP server configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
Further, the TCP client is configured to:
and monitoring whether the connection of the message sent to the built-in page WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so as to enable the TCP server to disconnect the browser request.
A fourth aspect of the present disclosure provides a system for remotely accessing a built-in page of a terminal device.
A system for remotely accessing a built-in page of terminal equipment comprises a TCP server and a TCP client arranged in the terminal equipment, wherein the TCP server is in communication connection with a browser, the TCP server is in communication connection with the TCP client, and the TCP client is in communication connection with a built-in page WEB server;
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
after receiving the data content of the long connecting channel, a TCP client in the terminal equipment removes the message ID and sends the data to a built-in page WEB server of the terminal equipment;
the built-in page WEB server replies built-in page data, adds the message ID and forwards the message ID to the TCP server through the TCP client;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
Furthermore, the TCP client monitors the MQTT message, after receiving the request, the TCP client sends a long connection registration packet request to the TCP server according to the IP address and the port in the request, and after the registration is successful, the long connection channel data is acquired.
Further, a TCP server configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
Further, the TCP client is configured to:
and monitoring whether the connection of the message sent to the built-in page WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so as to enable the TCP server to disconnect the browser request.
Compared with the prior art, the beneficial effect of this disclosure is:
1. according to the method and the system for remotely accessing the built-in page of the terminal equipment, the local area network limitation of accessing the built-in page of the terminal equipment is broken through, remote quick access of the built-in page of the terminal equipment is realized, and the problem of inconvenience in parameter configuration of the terminal equipment of the Internet of things in remote and severe environments is solved.
2. According to the method and the system for remotely accessing the built-in page of the terminal equipment, the terminal equipment corresponds to the browser, a TCP long connection channel page data transfer working mode is established, and the access efficiency of the built-in page of the terminal equipment is greatly improved.
Advantages of additional aspects of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure and are not to limit the disclosure.
Fig. 1 is a schematic flowchart of an interaction method for establishing a channel according to embodiment 1 of the present disclosure.
Fig. 2 is a schematic flow chart of a channel data relay work mode provided in embodiment 1 of the present disclosure.
Detailed Description
The present disclosure is further described with reference to the following drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
Example 1:
as shown in fig. 1 and fig. 2, an embodiment 1 of the present disclosure provides a method for remotely accessing a built-in page of a terminal device, including the following two parts:
s1: a TCP server:
monitoring a request that a user wants to open a built-in page, analyzing the content of the browser request after receiving the request, sending the service address and the port to corresponding terminal equipment, establishing a TCP channel between the terminal equipment and the service, and carrying out data communication through a specified protocol.
S1.1: monitoring a request that a user wants to open a built-in page of a specified device through MQTT, and forwarding the request to terminal equipment including an IP (Internet protocol) and a port of a TCP (transmission control protocol) server through the MQTT;
s1.2: after receiving the request, the terminal equipment sends a long connection request to the TCP server according to the IP address and the port in the request;
s1.3: after a long connection is established between a TCP server and terminal equipment, a three-level domain name is generated according to a terminal equipment identification code (SN), the three-level domain name is in a corresponding relation with the long connection, and the domain name is sent to a browser through MQTT;
s1.4: the browser receives the domain name address, directly opens a page by using the new address (the new address corresponds to a service in the TCP server), the TCP server receives an HTTP request sent by the browser, judges which equipment belongs to according to the domain name, adds a message ID to the data, and sends the data to a long connecting channel of the appointed terminal equipment;
s1.5: and the TCP server receives the data reply from the long connection of the terminal equipment, judges the terminal equipment, finds the corresponding browser connection according to the equipment identification code and the message ID, and sends the data to the browser.
S2: TCP client
The module needs to be embedded into the terminal equipment, monitors MQTT messages from the server, and sends a channel registration command to the server after receiving a request for opening the built-in page. After the channel is successfully established, the received data from the server is directly transferred to the internal built-in page WEB server, and any data replied by the built-in page WEB server is sent to the server side through the channel
S2.1: monitoring MQTT information, after receiving the request, sending a long connection registration packet request to a TCP server according to an IP address and a port in the request
S2.2: after the registration is successful, the data content of the long connection channel is received, the message ID is removed, and the data is directly sent to a WEB server in the terminal equipment.
S2.3: and the terminal equipment WEB server replies the message, adds the ID of the message and sends the message to the TCP server.
S2.4: and monitoring whether the connection of the message sent to the WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so that the TCP server can disconnect the browser request.
The method of the embodiment can be used for terminal communication equipment with a built-in page and supporting the protocol, and the terminal communication equipment comprises a serial server, an RTU, a DTU, a cloud gateway and the like.
Example 2:
the embodiment 2 of the present disclosure provides a system for remotely accessing a built-in page of a terminal device, including a TCP server and a TCP client disposed in the terminal device, the TCP server is in communication connection with a browser, the TCP server is in communication connection with the TCP client, and the TCP client is in communication connection with a built-in page WEB server;
the method comprises the steps that a TCP server receives an HTTP request sent by a browser, and the request content at least comprises a domain name generated according to an identification code of terminal equipment;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
after receiving the data content of the long connecting channel, a TCP client in the terminal equipment removes the message ID and sends the data to a built-in page WEB server of the terminal equipment;
the built-in page WEB server replies built-in page data, adds the message ID and forwards the message ID to the TCP server through the TCP client;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
A TCP server configured to:
monitoring a request that a user wants to open a built-in page, analyzing the content of the browser request after receiving the request, sending the service address and the port to corresponding terminal equipment, establishing a TCP channel between the terminal equipment and the service, and carrying out data communication through a specified protocol.
S1.1: monitoring a request that a user wants to open a built-in page of a specified device through MQTT, and forwarding the request to terminal equipment including an IP (Internet protocol) and a port of a TCP (transmission control protocol) server through the MQTT;
s1.2: after receiving the request, the terminal equipment sends a long connection request to the TCP server according to the IP address and the port in the request;
s1.3: after the TCP server establishes long connection with the terminal equipment, a three-level domain name is generated according to the identification code of the terminal equipment, the three-level domain name is in a corresponding relation with the long connection, and the domain name is sent to a browser through MQTT;
s1.4: the browser receives the domain name address, directly opens a page by using the new address (the new address corresponds to a service in the TCP server), the TCP server receives an HTTP request sent by the browser, judges which equipment belongs to according to the domain name, adds a message ID to the data, and sends the data to a long connecting channel of the appointed terminal equipment;
s1.5: and the TCP server receives the data reply from the long connection of the terminal equipment, judges the terminal equipment, finds the corresponding browser connection according to the equipment identification code and the message ID, and sends the data to the browser.
A TCP client configured to:
the module needs to be embedded into the terminal equipment, monitors MQTT messages from the server, and sends a channel registration command to the server after receiving a request for opening the built-in page. After the channel is successfully established, the received data from the server is directly transferred to the internal built-in page WEB server, and similarly, any data replied by the built-in page WEB server is also sent to the server side through the channel.
S2.1: monitoring MQTT messages, and after receiving a request, sending a long connection registration packet request to a TCP server according to an IP address and a port in the request;
s2.2: after the registration is successful, the data content of the long connection channel is received, the message ID is removed, and the data is directly sent to a WEB server in the terminal equipment;
s2.3: the terminal equipment WEB server replies the message, adds the ID of the message and sends the message to the TCP server;
s2.4: and monitoring whether the connection of the message sent to the WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so that the TCP server can disconnect the browser request.
Example 3:
the embodiment 3 of the present disclosure provides a method for remotely accessing a built-in page of a terminal device, which is applied to a TCP server, and includes the following processes:
the method comprises the steps that a TCP server receives an HTTP request sent by a browser, and the request content at least comprises a domain name generated according to an identification code of terminal equipment;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
More specifically, a TCP server configured to:
monitoring a request that a user wants to open a built-in page, analyzing the content of the browser request after receiving the request, sending the service address and the port to corresponding terminal equipment, establishing a TCP channel between the terminal equipment and the service, and carrying out data communication through a specified protocol.
S1.1: monitoring a request that a user wants to open a built-in page of a specified device through MQTT, and forwarding the request to terminal equipment including an IP (Internet protocol) and a port of a TCP (transmission control protocol) server through the MQTT;
s1.2: after receiving the request, the terminal equipment sends a long connection request to the TCP server according to the IP address and the port in the request;
s1.3: after the TCP server establishes long connection with the terminal equipment, a three-level domain name is generated according to the identification code of the terminal equipment, the three-level domain name is in a corresponding relation with the long connection, and the domain name is sent to a browser through MQTT;
s1.4: the browser receives the domain name address, directly opens a page by using the new address (the new address corresponds to a service in the TCP server), the TCP server receives an HTTP request sent by the browser, judges which equipment belongs to according to the domain name, adds a message ID to the data, and sends the data to a long connecting channel of the appointed terminal equipment;
s1.5: and the TCP server receives the data reply from the long connection of the terminal equipment, judges the terminal equipment, finds the corresponding browser connection according to the equipment identification code and the message ID, and sends the data to the browser.
Example 4:
the embodiment 4 of the present disclosure provides a TCP server, including a processing module;
the processing module configured to:
receiving an HTTP request sent by a browser, wherein the request content at least comprises a domain name generated according to an identification code of terminal equipment;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
and receiving built-in page data transmitted from the terminal equipment through the long connecting channel, finding out corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and sending the page data to the browser.
More specifically, a processing module configured to:
monitoring a request that a user wants to open a built-in page, analyzing the content of the browser request after receiving the request, sending the service address and the port to corresponding terminal equipment, establishing a TCP channel between the terminal equipment and the service, and carrying out data communication through a specified protocol.
S1.1: monitoring a request that a user wants to open a built-in page of a specified device through MQTT, and forwarding the request to terminal equipment including an IP (Internet protocol) and a port of a TCP (transmission control protocol) server through the MQTT;
s1.2: after receiving the request, the terminal equipment sends a long connection request to the TCP server according to the IP address and the port in the request;
s1.3: after the TCP server establishes long connection with the terminal equipment, a three-level domain name is generated according to the identification code of the terminal equipment, the three-level domain name is in a corresponding relation with the long connection, and the domain name is sent to a browser through MQTT;
s1.4: the browser receives the domain name address, directly opens a page by using the new address (the new address corresponds to a service in the TCP server), the TCP server receives an HTTP request sent by the browser, judges which equipment belongs to according to the domain name, adds a message ID to the data, and sends the data to a long connecting channel of the appointed terminal equipment;
s1.5: and the TCP server receives the data reply from the long connection of the terminal equipment, judges the terminal equipment, finds the corresponding browser connection according to the equipment identification code and the message ID, and sends the data to the browser.
The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (10)

1. A method for remotely accessing a built-in page of terminal equipment is characterized in that: the method is applied to the TCP server and comprises the following processes:
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
2. The method for remotely accessing built-in pages of a terminal device according to claim 1, characterized in that:
a TCP server, further configured to: monitoring a built-in page opening request sent by a browser, analyzing the content of the browser request after receiving the request, and sending a service address and a port to corresponding terminal equipment so that the terminal equipment and the service establish a TCP channel and carry out data communication through a specified protocol.
3. The method for remotely accessing built-in pages of a terminal device according to claim 2, characterized in that:
a TCP server, further configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
4. A TCP server comprising a processing module;
the processing module configured to:
receiving an HTTP request sent by a browser;
analyzing the HTTP request, acquiring a domain name of the terminal equipment, judging the terminal equipment according to the domain name, adding a message ID to the received request data, and sending the request data to a long connecting channel of the corresponding terminal equipment;
and receiving built-in page data transmitted from the terminal equipment through the long connecting channel, finding out corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and sending the page data to the browser.
5. The TCP server of claim 4,
a processing module further configured to: monitoring a built-in page opening request sent by a browser, analyzing the content of the browser request after receiving the request, and sending a service address and a port to corresponding terminal equipment so that the terminal equipment and the service establish a TCP channel and carry out data communication through a specified protocol.
6. The remote opening method of the built-in page of the terminal device according to claim 5, characterized in that:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
and generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through the MQTT so that the browser opens a page by using a new domain name address.
7. A method for remotely accessing a built-in page of terminal equipment is characterized in that: the method comprises the following steps:
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
after receiving the data content of the long connecting channel, a TCP client in the terminal equipment removes the message ID and sends the data to a built-in page WEB server of the terminal equipment;
the built-in page WEB server replies built-in page data, adds the message ID and forwards the message ID to the TCP server through the TCP client;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
8. The method for remotely accessing built-in pages of a terminal device according to claim 7, characterized in that:
the TCP client monitors MQTT messages, after receiving the requests, long connection registration packet requests are sent to a TCP server according to IP addresses and ports in the requests, and after the registration is successful, long connection channel data are obtained;
alternatively, the first and second electrodes may be,
a TCP server configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through MQTT so that the browser opens a page by using a new domain name address;
alternatively, the first and second electrodes may be,
a TCP client configured to:
and monitoring whether the connection of the message sent to the built-in page WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so as to enable the TCP server to disconnect the browser request.
9. A system for remotely accessing a built-in page of a terminal device is characterized in that: the browser comprises a TCP server and a built-in page WEB server, wherein the TCP server is arranged on a TCP client side in terminal equipment, the TCP server is in communication connection with the browser, the TCP server is in communication connection with the TCP client side, and the TCP client side is in communication connection with the built-in page WEB server;
the method comprises the steps that a TCP server receives an HTTP request sent by a browser;
the TCP server analyzes the HTTP request, acquires a domain name of the terminal equipment, judges the terminal equipment according to the domain name, adds a message ID to the received request data and then sends the request data to the long connecting channel of the corresponding terminal equipment;
after receiving the data content of the long connecting channel, a TCP client in the terminal equipment removes the message ID and sends the data to a built-in page WEB server of the terminal equipment;
the built-in page WEB server replies built-in page data, adds the message ID and forwards the message ID to the TCP server through the TCP client;
and the TCP server receives the built-in page data transmitted from the terminal equipment through the long connecting channel, finds the corresponding browser connection according to the equipment identification code and the message ID after judging that the terminal equipment is correct, and transmits the page data to the browser.
10. The method for remotely accessing built-in pages of a terminal device according to claim 9, characterized in that:
the TCP client monitors MQTT messages, after receiving the requests, long connection registration packet requests are sent to a TCP server according to IP addresses and ports in the requests, and after the registration is successful, long connection channel data are obtained;
alternatively, the first and second electrodes may be,
a TCP server configured to:
monitoring and opening a built-in page request of the specified equipment through MQTT, and forwarding the request to the terminal equipment through MQTT to package an IP and a port of a TCP server;
receiving a long connection request generated by the terminal equipment according to the IP address and the port so as to enable the TCP server to establish long connection with the terminal equipment;
generating a domain name according to the identification code of the terminal equipment, establishing a corresponding relation between the domain name and the long connecting channel, and sending the domain name to the browser through MQTT so that the browser opens a page by using a new domain name address;
alternatively, the first and second electrodes may be,
a TCP client configured to:
and monitoring whether the connection of the message sent to the built-in page WEB server is disconnected or not, and sending a disconnection request to the TCP server if the connection is disconnected so as to enable the TCP server to disconnect the browser request.
CN202111080845.2A 2021-09-15 2021-09-15 Method and system for remotely accessing built-in page of terminal equipment Active CN113794772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111080845.2A CN113794772B (en) 2021-09-15 2021-09-15 Method and system for remotely accessing built-in page of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111080845.2A CN113794772B (en) 2021-09-15 2021-09-15 Method and system for remotely accessing built-in page of terminal equipment

Publications (2)

Publication Number Publication Date
CN113794772A true CN113794772A (en) 2021-12-14
CN113794772B CN113794772B (en) 2024-05-07

Family

ID=78878379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111080845.2A Active CN113794772B (en) 2021-09-15 2021-09-15 Method and system for remotely accessing built-in page of terminal equipment

Country Status (1)

Country Link
CN (1) CN113794772B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100052435A (en) * 2010-04-01 2010-05-19 세창인스트루먼트(주) Internet service system in associated with an accessed website and the method for the same
CN102833323A (en) * 2012-08-14 2012-12-19 新浪网技术(中国)有限公司 Method and system for remote control of controlled terminal by server
CN104135501A (en) * 2013-06-28 2014-11-05 腾讯科技(深圳)有限公司 Page sharing method, device and system
CN108717285A (en) * 2018-04-14 2018-10-30 张著岳 The programmable logic controller (PLC) programmed by built-in web
CN109639749A (en) * 2018-10-16 2019-04-16 平安科技(深圳)有限公司 Access method, device, equipment and the storage medium of cloud desktop

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100052435A (en) * 2010-04-01 2010-05-19 세창인스트루먼트(주) Internet service system in associated with an accessed website and the method for the same
CN102833323A (en) * 2012-08-14 2012-12-19 新浪网技术(中国)有限公司 Method and system for remote control of controlled terminal by server
CN104135501A (en) * 2013-06-28 2014-11-05 腾讯科技(深圳)有限公司 Page sharing method, device and system
CN108717285A (en) * 2018-04-14 2018-10-30 张著岳 The programmable logic controller (PLC) programmed by built-in web
CN109639749A (en) * 2018-10-16 2019-04-16 平安科技(深圳)有限公司 Access method, device, equipment and the storage medium of cloud desktop

Also Published As

Publication number Publication date
CN113794772B (en) 2024-05-07

Similar Documents

Publication Publication Date Title
US8499083B2 (en) Relay device and communication system
EP1886455B1 (en) System and method for accessing a web server on a device with a dynamic ip-address residing a firewall
US8849961B2 (en) Mobile network optimized method for keeping an application IP connection always on
JP4819953B2 (en) Control tunnel and direct tunnel setting method in IPv4 network-based IPv6 service providing system
EP2415224B1 (en) Methods and apparatus for routing data to nodes
US20080133774A1 (en) Method for implementing transparent gateway or proxy in a network
KR100978336B1 (en) Remote access
US20060136987A1 (en) Communication apparatus
EP2306689B1 (en) Devices and method for accessing a web server in a local space
WO2005099165A2 (en) Method and system for providing web browsing through a firewall in a peer to peer network
JPWO2007039942A1 (en) Terminal device, server device, and command device
US20070288606A1 (en) Communication Terminal Apparatus, Electric Device And Communication Method
US20050135269A1 (en) Automatic configuration of a virtual private network
US8861503B2 (en) Method and system for synchronizing data between mobile terminal and internet phone
EP1338971B1 (en) Method and terminal for the secure acquisition of applications
US20040117473A1 (en) Proxy network control apparatus
CN104735073A (en) IPv4-IPv6 transitional protocol dispatching method and device
US20110235641A1 (en) Communication apparatus, method of controlling the communication apparatus,and program
CN113794772A (en) Method and system for remotely accessing built-in page of terminal equipment
CN112202780B (en) Data transmission method, device, equipment and medium based on double sockets
Suryady et al. A gateway solution for IPv6 wireless sensor networks
JP2014049807A (en) Communication packet processing device
US20060171379A1 (en) Movement management system, movement management server, and movement management method used for them, and program thereof
JP3864824B2 (en) Notification method of access destination to home server system
WO2008069504A1 (en) Method for configuring control tunnel and direct tunnel in ipv4 network-based ipv6 service providing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant