CN114143081B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN114143081B
CN114143081B CN202111439458.3A CN202111439458A CN114143081B CN 114143081 B CN114143081 B CN 114143081B CN 202111439458 A CN202111439458 A CN 202111439458A CN 114143081 B CN114143081 B CN 114143081B
Authority
CN
China
Prior art keywords
controlled
information
control
port
electronic equipment
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.)
Active
Application number
CN202111439458.3A
Other languages
Chinese (zh)
Other versions
CN114143081A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111439458.3A priority Critical patent/CN114143081B/en
Publication of CN114143081A publication Critical patent/CN114143081A/en
Application granted granted Critical
Publication of CN114143081B publication Critical patent/CN114143081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • 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
    • H04L67/141Setup of application sessions

Abstract

The embodiment of the application relates to the technical field of resource scheduling, and provides a data transmission method and device, wherein the method is applied to electronic equipment and comprises the following steps: responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent by the control end to the selected port; after the electronic equipment is connected with the controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent by the controlled end to the selected port; and if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the check is passed, transmitting the data uploaded by the controlled end to the control end through the port. The method realizes port multiplexing, reduces port resource waste and solves the safety problem caused by excessive ports.

Description

Data transmission method and device
Technical Field
The embodiment of the application relates to the technical field of resource scheduling, in particular to a data transmission method and device.
Background
With the development of the internet of things technology, terminals are becoming more popular, and in some institutions, after the terminal fails, operation and maintenance personnel are required to perform real-time operation and maintenance on other devices through remote services.
In the related art, a fixed controlled end is connected with a control end through each port of a remote server, and the control end carries out remote control on the controlled end through the corresponding fixed port.
However, the controlled end has no operation and maintenance requirement in most of the time, and the above manner may cause port resource waste.
Disclosure of Invention
The embodiment of the application provides a data transmission method and device, which are used for reducing port resource waste.
In a first aspect, an embodiment of the present application provides a data transmission method, applied to an electronic device, where the electronic device is provided with at least one port, the method includes:
Responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment;
After the electronic equipment is connected with a controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment;
And if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
According to the scheme, the control end and the corresponding controlled end can select the ports of the connected electronic equipment according to the actual application scene; and then after the control end is connected with the port of the electronic equipment, determining which controlled end is required to be remotely controlled by the control end, and after the controlled end is connected with the port, matching the control end with the controlled end so as to determine whether the controlled end is required to be controlled by the control end; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully paired, so that the pairing of a plurality of control ends and a plurality of controlled ends can be realized through one port, and the data uploaded by each controlled end is sent to the corresponding control end through the port, thereby realizing the port multiplexing, reducing the port resource waste and reducing the safety problem caused by excessive ports.
In some optional embodiments, verifying the first verification information and the second verification information includes:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
According to the scheme, whether the first check information of the control end is identical with the second check information of the controlled end is accurately and efficiently determined, whether the check is passed or not is determined, and data uploaded by the controlled end is sent to the control end after the check is passed, so that the safety of remote control is improved.
In some alternative embodiments, the controlled information includes a network interconnection protocol (Internet Protocol, IP) address of the controlled end; the control information comprises the IP address of the control end.
According to the scheme, as the controlled information comprises the IP address of the controlled terminal, the electronic equipment can determine whether the controlled terminal is the controlled terminal corresponding to the controlled information as long as the electronic equipment receives the information sent by the controlled terminal, so that the controlled terminal corresponding to the controlled information can be accurately and efficiently determined; because the control information contains the IP address of the control end, the electronic equipment can determine whether the control end is the control end corresponding to the control information as long as the electronic equipment receives the information sent by the control end, thereby accurately and efficiently determining the control end corresponding to the control information.
In a second aspect, an embodiment of the present application provides another data transmission method, applied to a control end, where the method includes:
Selecting a target port from part or all ports of electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by a controlled end after the electronic equipment is connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information is successfully matched with the control end;
receiving data uploaded by the controlled end sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass.
According to the scheme, the control end and the corresponding controlled end can select the ports of the connected electronic equipment according to the actual application scene; and then after the control end is connected with the port of the electronic equipment, determining which controlled end is required to be remotely controlled by the control end, and after the controlled end is connected with the port, matching the control end with the controlled end so as to determine whether the controlled end is required to be controlled by the control end; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully paired, so that the pairing of a plurality of control ends and a plurality of controlled ends can be realized through one port, and the data uploaded by each controlled end is sent to the corresponding control end through the port, thereby realizing the port multiplexing, reducing the port resource waste and reducing the safety problem caused by excessive ports.
In some alternative embodiments, selecting a destination port from some or all ports of an electronic device includes:
negotiating with a controlled end which needs to be controlled by the control end, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
According to the scheme, the control end and the corresponding controlled end can select the target port suitable for the current application scene from part or all ports of the electronic equipment through negotiation.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
According to the scheme, as the controlled information comprises the IP address of the controlled terminal, the electronic equipment can determine whether the controlled terminal is the controlled terminal corresponding to the controlled information as long as the electronic equipment receives the information sent by the controlled terminal, so that the controlled terminal corresponding to the controlled information can be accurately and efficiently determined; because the control information contains the IP address of the control end, the electronic equipment can determine whether the control end is the control end corresponding to the control information as long as the electronic equipment receives the information sent by the control end, thereby accurately and efficiently determining the control end corresponding to the control information.
In a third aspect, an embodiment of the present application provides a data transmission method, applied to a controlled end, where the method includes:
Selecting a target port from part or all ports of the electronic equipment, and after the electronic equipment is connected with the target port, sending a second request containing control information and second check information to the target port so that the electronic equipment is matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the second check information;
Uploading data to the electronic equipment, so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check.
According to the scheme, the control end and the corresponding controlled end can select the ports of the connected electronic equipment according to the actual application scene; and then after the control end is connected with the port of the electronic equipment, determining which controlled end is required to be remotely controlled by the control end, and after the controlled end is connected with the port, matching the control end with the controlled end so as to determine whether the controlled end is required to be controlled by the control end; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully paired, so that the pairing of a plurality of control ends and a plurality of controlled ends can be realized through one port, and the data uploaded by each controlled end is sent to the corresponding control end through the port, thereby realizing the port multiplexing, reducing the port resource waste and reducing the safety problem caused by excessive ports.
In some alternative embodiments, selecting a destination port from some or all ports of an electronic device includes:
and negotiating with a control terminal needing to control the controlled terminal, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
According to the scheme, the control end and the corresponding controlled end can select the target port suitable for the current application scene from part or all ports of the electronic equipment through negotiation.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
According to the scheme, as the controlled information comprises the IP address of the controlled terminal, the electronic equipment can determine whether the controlled terminal is the controlled terminal corresponding to the controlled information as long as the electronic equipment receives the information sent by the controlled terminal, so that the controlled terminal corresponding to the controlled information can be accurately and efficiently determined; because the control information contains the IP address of the control end, the electronic equipment can determine whether the control end is the control end corresponding to the control information as long as the electronic equipment receives the information sent by the control end, thereby accurately and efficiently determining the control end corresponding to the control information.
In a fourth aspect, an embodiment of the present application provides a data transmission apparatus, applied to an electronic device, where the electronic device is provided with at least one port, and the apparatus includes:
The information determining module is used for responding to a first request received through any port and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment;
The information determining module is further configured to determine, after the electronic device is connected to a controlled end corresponding to the controlled information, control information and second check information corresponding to the second request in response to the second request received through the port; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment;
and the verification module is used for verifying the first verification information and the second verification information if the control information is successfully matched with the control end, and transmitting the data uploaded by the controlled end to the control end through the port after the verification is passed.
In some optional embodiments, the verification module is specifically configured to:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
In a fifth aspect, an embodiment of the present application provides another data transmission apparatus, applied to a control end, where the apparatus includes:
The first port selection module is used for selecting a target port from part or all ports of the electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by the controlled end after being connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information and the control end are successfully matched;
The receiving module is used for receiving the data uploaded by the controlled end, which is sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass.
In some alternative embodiments, the first port selection module is specifically configured to:
negotiating with a controlled end which needs to be controlled by the control end, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
In a sixth aspect, an embodiment of the present application provides a data transmission apparatus, applied to a controlled terminal, including:
The second port selection module is used for selecting a target port from part or all ports of the electronic equipment, and sending a second request containing control information and second check information to the target port after the second port selection module is connected with the target port so that the electronic equipment can be matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the second check information;
And the sending module is used for uploading data to the electronic equipment so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check.
In some optional embodiments, the second port selection module is specifically configured to:
and negotiating with a control terminal needing to control the controlled terminal, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
In a seventh aspect, an embodiment of the present application provides an electronic device, including at least one processor and at least one memory, where the memory stores a computer program that, when executed by the processor, causes the processor to perform the method according to any one of the first aspects.
In an eighth aspect, an embodiment of the present application provides a control terminal, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, causes the processor to perform the method according to any one of the second aspects.
In a ninth aspect, an embodiment of the present application provides a controlled end, including at least one processor and at least one memory, where the memory stores a computer program, which when executed by the processor, causes the processor to perform a method as in any one of the third aspects above.
In a tenth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements a method as in any of the first, second or third aspects above.
In an eleventh aspect, embodiments of the present application provide a computer program product comprising computer executable instructions for causing a computer to perform the method according to any one of the first, second or third aspects.
In addition, the technical effects caused by any implementation manner of the fourth aspect to the eleventh aspect may be referred to as technical effects caused by different implementation manners of the first aspect, the second aspect, and the third aspect, which are not described herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of another application scenario provided in an embodiment of the present application;
Fig. 3 is an interaction flow chart of a first data transmission method according to an embodiment of the present application;
fig. 4 is an interaction flow chart of a second data transmission method according to an embodiment of the present application;
fig. 5 is an interaction flow chart of a third data transmission method according to an embodiment of the present application;
fig. 6 is a flowchart of a first data transmission method according to an embodiment of the present application;
Fig. 7 is a flowchart of a second data transmission method according to an embodiment of the present application;
Fig. 8 is a flow chart of a third data transmission method according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a first data transmission device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a second data transmission device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a third data transmission device according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a control end according to an embodiment of the present application;
Fig. 14 is a schematic structural diagram of a controlled terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the description of the present application, it should be noted that, unless explicitly stated and limited otherwise, the term "connected" should be interpreted broadly, and for example, it may be directly connected, or it may be indirectly connected through an intermediate medium, or it may be communication between two devices. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
After a terminal inside a structure (such as an enterprise and public institution, a financial industry and the like) fails, operation and maintenance personnel are required to perform real-time operation and maintenance on other equipment through remote services.
In some embodiments, the fixed controlled end is connected to the control end through each port of the remote server, and the control end performs remote control on the controlled end through the corresponding fixed port. Referring to fig. 1, each controlled end is fixed with a corresponding port, and the control end is also fixed with a corresponding port, and receives data uploaded by the controlled end through the port when the control end needs to remotely control the controlled end. If the control terminal 1 needs to control the controlled terminal 1, receiving data uploaded by the controlled terminal 1 through the port 1; the control end 2 needs to control the controlled end 2, and receives the data uploaded by the controlled end 2 through the port 2; … … the control terminal n needs to control the controlled terminal n, and receives the data uploaded by the controlled terminal n through the port n.
However, the controlled end has no operation and maintenance requirement in most of the time, and the above way can cause port resource waste; and the more ports in the device, the greater the risk of being attacked, and the security problem caused by the excessive ports exists in the mode.
In view of this, an embodiment of the present application provides a data transmission method and apparatus, where the method is applied to an electronic device, and the electronic device is provided with at least one port, and the method includes: responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment; after the electronic equipment is connected with a controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment; and if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
According to the scheme, the control end and the corresponding controlled end can select the ports of the connected electronic equipment according to the actual application scene; and then after the control end is connected with the port of the electronic equipment, determining which controlled end is required to be remotely controlled by the control end, and after the controlled end is connected with the port, matching the control end with the controlled end so as to determine whether the controlled end is required to be controlled by the control end; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully paired, so that the pairing of a plurality of control ends and a plurality of controlled ends can be realized through one port, and the data uploaded by each controlled end is sent to the corresponding control end through the port, thereby realizing the port multiplexing, reducing the port resource waste and reducing the safety problem caused by excessive ports.
Referring to fig. 2, another application scenario provided in an embodiment of the present application includes: the electronic device 100, a plurality of controlled terminals and a plurality of control terminals, wherein the electronic device 100 is provided with at least one port;
Fig. 2 illustrates the controlled end 201, the controlled end 202, the controlled end 203, and the controlled end 204, the control end 301, the control end 302, the control end 303, the control end 304, and the control end 305, and the ports 1 and 2 as examples, and in practical applications, more or fewer controlled ends, more or fewer control ends, and more or fewer ports may be provided.
Each control end can select a target port from part or all ports of the electronic equipment and send a first request containing controlled information and first check information to the target port;
Each controlled terminal can select a target port from part or all ports of the electronic equipment, and after being connected with the target port, the controlled terminal sends a second request containing control information and second check information to the target port;
The electronic equipment responds to a first request received through any port, and corresponding controlled information and first check information are determined; responding to a second request sent by a controlled end corresponding to the controlled information received through the port, and determining corresponding control information and second check information; and if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the check is passed, transmitting the data uploaded by the controlled end to the control end through the port.
The embodiment does not limit the specific implementation manners of the electronic device, the controlled end and the control end, and in some alternative implementation manners, the scheme is implemented by Guacamole (a remote desktop service), guacamole is a virtual network console (Virtual Network Console, VNC) viewer based on hypertext 5.0 (Hyper Text Markup Language, html 5) and JavaScript (a programming language); the whole is divided into two parts: a server (server) providing guacd (daemon running on the server for proxy services) proxies and association packages; a client (client) provides services to a terminal device on a tomcat (a kind of server container) through a servlet (server side program) container. The service end is developed based on a Java (computer programming language) VNC to XML (extensible markup language) agent, and can realize a remote control function based on a VNC protocol at a Web (global wide area network) end. guacd receives the controlled client request Guacamole web for a tunnel connection of the application and then connects to the remote desktop instead of the controlled client. Correspondingly, the electronic equipment is Guacamole server, and the controlled terminal is equipment provided with Guacamole controlled client terminal; the control terminal is a device provided with Guacamole control clients.
The application scenario described above is merely an example of an application scenario implementing an embodiment of the present application, and the embodiment of the present application is not limited to the application scenario described above.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems with reference to the drawings and specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 3 is an interaction flow chart of a first data transmission method according to an embodiment of the present application, as shown in fig. 3, including the following steps:
Step S301: the control terminal selects a target port from part or all ports of the electronic equipment, and sends a first request containing controlled information and first check information to the target port.
In this embodiment, the control end and the corresponding controlled end may select the port of the connected electronic device according to the actual application scenario, where the port may be a port already connected to other control ends and controlled ends, or may be a port not yet connected to other control ends and controlled ends. I.e. the connection between the control end and the port, and the connection between the controlled end and the port are not fixed.
After selecting a target port from part or all ports of the electronic equipment, the control end sends a first request containing controlled information and first check information to the target port, and establishes connection between the control end and the port.
Referring to fig. 2, the control terminal 301 sends a first request including controlled information and a first check request to the port 1, and establishes a connection between the control terminal 301 and the port 1.
Step S302: the electronic equipment responds to a first request received through any port, and determines controlled information and first check information corresponding to the first request.
As described above, the first request includes the controlled information and the first check information; the controlled information characterizes which controlled end needs to be remotely controlled by the control end, the first check information needs to be used in subsequent check, and based on the first check information, the electronic equipment needs to determine the corresponding controlled information and the first check information after receiving the first request.
The controlled information is information capable of uniquely characterizing the controlled terminal, and in some optional embodiments, the controlled information includes an IP address of the controlled terminal, so that the electronic device can determine whether the controlled terminal is the controlled terminal corresponding to the controlled information as long as the electronic device receives the information sent by the controlled terminal, thereby accurately and efficiently determining the controlled terminal corresponding to the controlled information.
Step S303: the controlled terminal corresponding to the controlled information selects a target port from part or all ports of the electronic equipment, and sends a second request containing control information and second check information to the target port after the controlled terminal is connected with the target port.
In this embodiment, the controlled end may be remotely controlled by one or more control ends, so before performing the verification, the controlled end may be already connected to the target port, and at this time, the controlled end may directly send a second request to the target port; if the controlled end is not connected with the target port, a second request needs to be sent to the target port after the controlled end is connected with the target port.
Referring to fig. 2, a controlled terminal corresponding to the controlled information of the control terminal 301 is a controlled terminal 201; the controlled terminal 201 transmits a second request containing control information and second check information to the port 1, and the electronic device determines the corresponding control information and second check information in response to the second request.
The control information is information capable of uniquely characterizing the control end, and in some optional embodiments, the control information includes an IP address of the control end, so that the electronic device can determine whether the control end is the control end corresponding to the control information as long as receiving the information sent by the control end, thereby accurately and efficiently determining the control end corresponding to the control information.
Step S304: and if the electronic equipment determines that the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
Because the port of the electronic device may be connected with a plurality of control terminals and a controlled terminal, the electronic device needs to match the control terminal with the controlled terminal based on the control information to determine whether the controlled terminal needs to be controlled by the control terminal; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully matched.
The following is a specific example:
The control terminal 301 sends a first request including the controlled information and a first check request to the port 1, and establishes a connection between the control terminal 301 and the port 1;
the controlled terminal corresponding to the controlled information of the control terminal 301 is the controlled terminal 201; after the controlled end 201 is connected with the port 1, a second request containing control information and second check information is sent to the port 1;
If the control end corresponding to the control information is the control end 301, the control end 301 and the controlled end 201 are successfully matched, the first verification information of the control end 301 and the second verification information of the controlled end 201 are continuously verified, and if the verification is successful, the remote control of the control end 301 on the controlled end 201 is established, namely, the electronic equipment sends the data uploaded by the controlled end 201 to the control end 301 through the port 1;
If the control end corresponding to the control information is the control end 302, the matching between the control end 301 and the controlled end 201 fails, and no subsequent verification is performed.
The above-mentioned data transmission process is only exemplary, and the present embodiment is not limited thereto.
According to the scheme, the control end and the corresponding controlled end can select the ports of the connected electronic equipment according to the actual application scene; and then after the control end is connected with the port of the electronic equipment, determining which controlled end is required to be remotely controlled by the control end, and after the controlled end is connected with the port, matching the control end with the controlled end so as to determine whether the controlled end is required to be controlled by the control end; and after the matching is successful, the first check information of the control end and the second check information of the controlled end are checked, and after the check is passed, the control end and the controlled end are successfully paired, so that the pairing of a plurality of control ends and a plurality of controlled ends can be realized through one port, and the data uploaded by each controlled end is sent to the corresponding control end through the port, thereby realizing the port multiplexing, reducing the port resource waste and reducing the safety problem caused by excessive ports.
As described above, the controlled end may be remotely controlled by one or more control ends, and referring to fig. 2, the control end 304 and the control end 305 both remotely control the controlled end 204 through the port 2; at this time, the electronic device sends the data uploaded by the controlled terminal 204 to the control terminal 304 and the control terminal 305 through the above-mentioned port 2, respectively.
In addition, the specific implementation manner of the first verification information and the second verification information is not limited in this embodiment, and is exemplary:
1) The first check information of the control end is the same as the second check information of the corresponding controlled end, such as the check information negotiated between the control end and the corresponding controlled end;
2) The first check information of the control end is obtained based on the second check information of the corresponding controlled end through a preset algorithm.
The implementation manner of the first verification information and the second verification information is only illustrative, and as long as the information that can realize verification between the control end and the corresponding controlled end can be used as the first verification information and the second verification information.
An embodiment of the present application provides an interactive flowchart of a second data transmission method, as shown in fig. 4, including the following steps:
Step S401: the control terminal selects a target port from part or all ports of the electronic equipment, and sends a first request containing controlled information and first check information to the target port.
Step S402: the electronic equipment responds to a first request received through any port, and determines controlled information and first check information corresponding to the first request.
Step S403: the controlled terminal corresponding to the controlled information selects a target port from part or all ports of the electronic equipment, and sends a second request containing control information and second check information to the target port after the controlled terminal is connected with the target port.
The specific implementation manner of the steps S401 to S403 may refer to the steps S301 to S303, and will not be described herein.
Step S404: if the electronic equipment determines that the control information is successfully matched with the control end, determining whether the first check information is identical with the second check information; and if yes, the data uploaded by the controlled end are sent to the control end through the port.
As described above, in some embodiments, the first check information of the control end is the same as the second check information of the corresponding controlled end, based on which the electronic device needs to determine whether the first check information of the control end is the same as the second check information of the controlled end; if the first check information is the same as the second check information, the verification is passed, and remote control of the control end to the controlled end can be established; otherwise, if the first check information is different from the second check information, the check is not passed, and the remote control of the control end to the controlled end cannot be established.
According to the scheme, whether the first check information of the control end is identical with the second check information of the controlled end is accurately and efficiently determined, whether the check is passed or not is determined, and data uploaded by the controlled end is sent to the control end after the check is passed, so that the safety of remote control is improved.
Fig. 5 is an interaction flow chart of a third data transmission method according to an embodiment of the present application, as shown in fig. 5, including the following steps:
Step S501: the control terminal negotiates with the controlled terminal to be controlled, selects a target port from partial or all ports of the electronic equipment based on the negotiation result, and sends a first request containing controlled information and first check information to the target port.
In implementation, the control end and the corresponding controlled end can select a proper target port from part or all ports of the electronic device through negotiation.
The embodiment is not limited to a specific selection manner, and is exemplified:
1) The control end and the controlled end needing to be controlled select any one port from all ports of the electronic equipment as a target port;
2) The control end and the controlled end needing to be controlled select ports which are not connected with other control ends and the controlled end from all ports of the electronic equipment as target ports;
3) The control end and the controlled end needing to be controlled select any one port from idle ports of the electronic equipment as a target port.
The above manner of selecting a destination port is merely illustrative, and other manners of selecting a destination port may be employed in practice.
Step S502: the electronic equipment responds to a first request received through any port, and determines controlled information and first check information corresponding to the first request.
The specific implementation of step S502 may refer to step S302, which is not described herein.
Step S503: the controlled terminal corresponding to the controlled information negotiates with the control terminal, selects a target port from partial or all ports of the electronic equipment based on the negotiation result, and sends a second request containing control information and second check information to the target port after being connected with the target port.
For a specific implementation of this step S503, reference may be made to the above step S501, which is not described herein.
Step S504: and if the electronic equipment determines that the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
The specific implementation of step S504 may refer to step S304, which is not described herein.
According to the scheme, the control end and the corresponding controlled end can select the target port suitable for the current application scene from part or all ports of the electronic equipment through negotiation.
In the embodiment of the present application, as shown in fig. 6, a data transmission method executed by an electronic device includes the following steps:
Step S601: responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment;
Step S602: after the electronic equipment is connected with a controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment;
Step S603: and if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
In some optional embodiments, verifying the first verification information and the second verification information includes:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
In the embodiment of the present application, the data transmission method executed by the control end is shown in fig. 7, and includes the following steps:
Step S701: selecting a target port from part or all ports of electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by a controlled end after the electronic equipment is connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information is successfully matched with the control end;
Step S702: receiving data uploaded by the controlled end sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass.
In some alternative embodiments, selecting a destination port from some or all ports of an electronic device includes:
negotiating with a controlled end which needs to be controlled by the control end, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
In the embodiment of the present application, the data transmission method executed by the controlled end is shown in fig. 8, and includes the following steps:
Step S801: selecting a target port from part or all ports of the electronic equipment, and after the electronic equipment is connected with the target port, sending a second request containing control information and second check information to the target port so that the electronic equipment is matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the second check information;
step S802: uploading data to the electronic equipment, so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check.
In some alternative embodiments, selecting a destination port from some or all ports of an electronic device includes:
and negotiating with a control terminal needing to control the controlled terminal, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
The specific implementation of the embodiments of fig. 6 to 8 may refer to the implementation of the above interaction method, and the repetition is not repeated.
As shown in fig. 9, based on the same inventive concept as the data transmission method shown in fig. 6, an embodiment of the present application provides a first data transmission apparatus 900 applied to an electronic device provided with at least one port, the apparatus including:
An information determining module 901, configured to determine, in response to a first request received through any port, controlled information and first verification information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment;
The information determining module 901 is further configured to determine, after the electronic device is connected to a controlled end corresponding to the controlled information, control information and second check information corresponding to the second request in response to the second request received through the port; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment;
and the verification module 902 is configured to verify the first verification information and the second verification information if the control information is successfully matched with the control end, and send, after the verification is passed, the data uploaded by the controlled end to the control end through the port.
In some alternative embodiments, the verification module 902 is specifically configured to:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
As shown in fig. 10, based on the same inventive concept as the data transmission method shown in fig. 7, an embodiment of the present application provides a second data transmission apparatus 1000, applied to a control terminal, including:
A first port selection module 1001, configured to select a target port from some or all ports of an electronic device, and send a first request including controlled information and first check information to the target port, so that the electronic device determines control information and second check information corresponding to a second request sent by the controlled terminal after being connected to the controlled terminal corresponding to the controlled information through the target port, and checks the first check information and the second check information after the control information is successfully matched with the control terminal;
A receiving module 1002, configured to receive data uploaded by the controlled end sent by the electronic device through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass.
In some alternative embodiments, the first port selection module 1001 is specifically configured to:
negotiating with a controlled end which needs to be controlled by the control end, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
As shown in fig. 11, based on the same inventive concept as the data transmission method shown in fig. 8, an embodiment of the present application provides a third data transmission apparatus 1100, applied to a controlled terminal, including:
A second port selection module 1101, configured to select a target port from some or all ports of an electronic device, and send a second request including control information and second verification information to the target port after connecting with the target port, so that the electronic device matches with a control end that sends the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the second check information;
And the sending module 1102 is configured to upload data to the electronic device, so that the electronic device sends the data to the control end through the target port after the first verification information and the second verification information pass verification.
In some alternative embodiments, the second port selection module 1101 is specifically configured to:
and negotiating with a control terminal needing to control the controlled terminal, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
The specific implementation of the embodiments of fig. 9 to 11 may refer to the implementation of the above interaction method, and the repetition is not repeated.
Based on the same technical concept, the embodiment of the present application further provides an electronic device 1200, as shown in fig. 12, including at least one processor 1201 and a memory 1202 connected to the at least one processor, where a specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present application, and in fig. 12, the connection between the processor 1201 and the memory 1202 is exemplified by a bus 1203. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 12, but not only one bus or one type of bus.
The processor 1201 is a control center of the electronic device, and various interfaces and lines may be used to connect various parts of the electronic device, and perform data processing by executing or executing instructions stored in the memory 1202 and invoking data stored in the memory 1202. Alternatively, the processor 1201 may include one or more processing units, and the processor 1201 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, etc., and the modem processor primarily processes issuing instructions. It will be appreciated that the modem processor described above may not be integrated into the processor 1201. In some embodiments, processor 1201 and memory 1202 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 1201 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application SPECIFIC INTEGRATED Circuit (ASIC), field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the data transmission method embodiments may be embodied directly in hardware processor execution or in a combination of hardware and software modules in a processor.
Memory 1202 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 1202 may include at least one type of storage medium, which may include, for example, flash memory, hard disk, multimedia card, card memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (ROM), charged erasable programmable read-only memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-only memory, EEPROM), magnetic memory, magnetic disk, optical disk, and the like. Memory 1202 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1202 in embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
In an embodiment of the present application, the memory 1202 stores a computer program that, when executed by the processor 1201, causes the processor 1201 to perform:
Responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end selects the port from part or all ports of the electronic equipment;
After the electronic equipment is connected with a controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent to the selected port after the controlled terminal selects the port from part or all ports of the electronic equipment;
And if the control information is successfully matched with the control end, checking the first check information and the second check information, and after the first check information and the second check information pass the check, transmitting the data uploaded by the controlled end to the control end through the port.
In some alternative embodiments, processor 1201 performs:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
Because the electronic device is the electronic device in the method according to the embodiment of the present application, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device may refer to the implementation of the method, and the repetition is omitted.
Based on the same technical concept, the embodiment of the present application further provides a control terminal 1300, as shown in fig. 13, including at least one processor 1301 and a memory 1302 connected to the at least one processor, where in the embodiment of the present application, a specific connection medium between the processor 1301 and the memory 1302 is not limited, and in fig. 13, the connection between the processor 1301 and the memory 1302 is exemplified by a bus 1303. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 13, but not only one bus or one type of bus.
The processor 1301 is a control center of the control end, and may implement data processing by executing or executing instructions stored in the memory 1302 and invoking data stored in the memory 1302 using various interfaces and lines to connect various parts of the control end. Alternatively, processor 1301 may include one or more processing units, and processor 1301 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, etc., and the modem processor primarily processes issuing instructions. It will be appreciated that the modem processor described above may not be integrated into the processor 1301. In some embodiments, processor 1301 and memory 1302 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
Processor 1301 may be a general purpose processor such as a central processing unit, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, which may implement or perform the methods, steps and logic block diagrams disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the data transmission method embodiments may be embodied directly in hardware processor execution or in a combination of hardware and software modules in a processor.
The memory 1302, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1302 may include at least one type of storage medium, which may include, for example, flash memory, hard disk, multimedia card, card memory, random access memory, static random access memory, programmable read-only memory, charged erasable programmable read-only memory, magnetic disk, optical disk, and the like. Memory 1302 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1302 in embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
In an embodiment of the present application, the memory 1302 stores a computer program that, when executed by the processor 1301, causes the processor 1301 to perform:
Selecting a target port from part or all ports of electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by a controlled end after the electronic equipment is connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information is successfully matched with the control end;
receiving data uploaded by the controlled end sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass.
In some alternative embodiments, processor 1301 specifically performs:
negotiating with a controlled end which needs to be controlled by the control end, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
Since the control end is the control end in the method according to the embodiment of the present application, and the principle of the control end for solving the problem is similar to that of the method, the implementation of the control end can refer to the implementation of the method, and the repetition is omitted.
Based on the same technical concept, the embodiment of the present application further provides a controlled terminal 1400, as shown in fig. 14, including at least one processor 1401 and a memory 1402 connected to the at least one processor, where the embodiment of the present application does not limit a specific connection medium between the processor 1401 and the memory 1402, and in fig. 14, the connection between the processor 1401 and the memory 1402 is exemplified by a bus 1403. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 14, but not only one bus or one type of bus.
Wherein the processor 1401 is a control center of the controlled terminal, and may utilize various interfaces and lines to connect various parts of the controlled terminal, and implement data processing by executing or executing instructions stored in the memory 1402 and invoking data stored in the memory 1402. Alternatively, the processor 1401 may include one or more processing units, and the processor 1401 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, an application program, and the like, and the modem processor primarily processes issuing instructions. It will be appreciated that the modem processor described above may not be integrated into the processor 1401. In some embodiments, processor 1401 and memory 1402 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 1401 may be a general purpose processor such as a central processing unit, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the data transmission method embodiments may be embodied directly in hardware processor execution or in a combination of hardware and software modules in a processor.
Memory 1402 acts as a non-volatile computer readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. Memory 1402 may include at least one type of storage medium, which may include, for example, flash memory, hard disk, multimedia card, card memory, random access memory, static random access memory, programmable read-only memory, charged erasable programmable read-only memory, magnetic disk, optical disk, and the like. Memory 1402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. Memory 1402 in embodiments of the present application may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
In an embodiment of the present application, the memory 1402 stores a computer program that, when executed by the processor 1401, causes the processor 1401 to execute:
Selecting a target port from part or all ports of the electronic equipment, and after the electronic equipment is connected with the target port, sending a second request containing control information and second check information to the target port so that the electronic equipment is matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the second check information;
Uploading data to the electronic equipment, so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check.
In some alternative embodiments, processor 1401 specifically performs:
and negotiating with a control terminal needing to control the controlled terminal, and selecting a target port from part or all ports of the electronic equipment based on a negotiation result.
In some alternative embodiments, the controlled information includes an IP address of the controlled end; the control information comprises the IP address of the control end.
Since the controlled terminal is the controlled terminal in the method according to the embodiment of the present application, and the principle of the controlled terminal for solving the problem is similar to that of the method, the implementation of the controlled terminal can refer to the implementation of the method, and the repetition is omitted.
Based on the same technical idea, the embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by a processor, implements the steps of the above-described data transmission method.
In some alternative embodiments, aspects of the data transmission method provided by the present application may also be implemented in the form of a program product containing computer-executable instructions for causing a computer device to perform the steps of the data transmission method according to the various exemplary embodiments of the application as described herein when the program product is run on the computer device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (13)

1. A data transmission method, characterized by being applied to an electronic device, the electronic device being provided with at least one port, the method comprising:
responding to a first request received through any port, and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end negotiates with a controlled end which needs to be controlled by the control end and selects the port from part or all ports of the electronic equipment based on a negotiation result;
After the electronic equipment is connected with the controlled end corresponding to the controlled information, responding to a second request received through the port, and determining control information and second check information corresponding to the second request; the second request is a verification request sent to the selected port after the controlled end negotiates with the control end needing to control the controlled end and selects the port from part or all ports of the electronic equipment based on a negotiation result;
If the control information is successfully matched with the control end, the first check information and the second check information are checked, and after the first check information and the second check information pass the check, the data uploaded by the controlled end are sent to the control end through the port;
the controlled information comprises a network Interconnection Protocol (IP) address of a controlled end; the control information comprises the IP address of the control end.
2. The method of claim 1, wherein verifying the first verification information and the second verification information comprises:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
3. A data transmission method, applied to a control end, comprising:
Selecting a target port from part or all ports of electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by a controlled end after the electronic equipment is connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information is successfully matched with the control end; the second request is a verification request sent to the selected target port after the controlled end negotiates with the control end needing to control the controlled end and the target port is selected from part or all ports of the electronic equipment based on a negotiation result;
receiving data uploaded by the controlled end sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass;
the controlled information comprises the IP address of the controlled terminal; the control information comprises an IP address of a control end;
selecting a target port from some or all ports of the electronic device, including:
negotiating with the controlled end which needs to be controlled by the control end, and selecting the target port from part or all ports of the electronic equipment based on a negotiation result.
4. A data transmission method, applied to a controlled end, the method comprising:
Selecting a target port from part or all ports of the electronic equipment, and after the electronic equipment is connected with the target port, sending a second request containing control information and second check information to the target port so that the electronic equipment is matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the first check information; the first request is a connection request sent to the selected target port after the control end negotiates with the controlled end which needs to be controlled by the control end and the target port is selected from part or all ports of the electronic equipment based on a negotiation result;
uploading data to the electronic equipment, so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check;
the controlled information comprises the IP address of the controlled terminal; the control information comprises an IP address of a control end;
selecting a target port from some or all ports of the electronic device, including:
Negotiating with the control end needing to control the controlled end, and selecting the target port from part or all ports of the electronic equipment based on negotiation results.
5. A data transmission apparatus for use with an electronic device, the electronic device being provided with at least one port, the apparatus comprising:
The information determining module is used for responding to a first request received through any port and determining controlled information and first check information corresponding to the first request; the first request is a connection request sent to a selected port after the control end negotiates with a controlled end which needs to be controlled by the control end and selects the port from part or all ports of the electronic equipment based on a negotiation result;
The information determining module is further configured to determine, after the electronic device is connected to the controlled end corresponding to the controlled information, control information and second check information corresponding to the second request in response to the second request received through the port; the second request is a verification request sent to the selected port after the controlled end negotiates with the control end needing to control the controlled end and selects the port from part or all ports of the electronic equipment based on a negotiation result;
The verification module is used for verifying the first verification information and the second verification information if the control information is successfully matched with the control end, and sending the data uploaded by the controlled end to the control end through the port after the first verification information and the second verification information pass the verification;
the controlled information comprises the IP address of the controlled terminal; the control information comprises the IP address of the control end.
6. The apparatus of claim 5, wherein the verification module is specifically configured to:
determining whether the first check information is the same as the second check information, if so, checking to pass; otherwise, the verification is not passed.
7. A data transmission device, applied to a control terminal, comprising:
The first port selection module is used for selecting a target port from part or all ports of the electronic equipment, sending a first request containing controlled information and first check information to the target port, enabling the electronic equipment to determine control information and second check information corresponding to a second request sent by the controlled end after being connected with the controlled end corresponding to the controlled information through the target port, and checking the first check information and the second check information after the control information and the control end are successfully matched; the second request is a verification request sent to the selected target port after the controlled end negotiates with the control end needing to control the controlled end and the target port is selected from part or all ports of the electronic equipment based on a negotiation result;
The receiving module is used for receiving the data uploaded by the controlled end, which is sent by the electronic equipment through the target port; the data are sent by the electronic equipment after the first check information and the second check information are checked to pass;
the controlled information comprises the IP address of the controlled terminal; the control information comprises an IP address of a control end;
the first port selection module is specifically configured to:
negotiating with the controlled end which needs to be controlled by the control end, and selecting the target port from part or all ports of the electronic equipment based on a negotiation result.
8. A data transmission apparatus for use at a controlled end, the apparatus comprising:
The second port selection module is used for selecting a target port from part or all ports of the electronic equipment, and sending a second request containing control information and second check information to the target port after the second port selection module is connected with the target port so that the electronic equipment can be matched with a control end sending the first request based on the control information; after successful matching, checking the first check information and the second check information; the first request comprises controlled information corresponding to the controlled end and the first check information; the first request is a connection request sent to the selected target port after the control end negotiates with the controlled end which needs to be controlled by the control end and the target port is selected from part or all ports of the electronic equipment based on a negotiation result;
The sending module is used for uploading data to the electronic equipment so that the electronic equipment sends the data to the control end through the target port after the first check information and the second check information pass the check;
the controlled information comprises the IP address of the controlled terminal; the control information comprises an IP address of a control end;
The second port selection module is specifically configured to:
Negotiating with the control end needing to control the controlled end, and selecting the target port from part or all ports of the electronic equipment based on negotiation results.
9. An electronic device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of any of claims 1-2.
10. A control terminal comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of claim 3.
11. A controlled end comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of claim 4.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method according to any of claims 1-2, 3 and 4.
13. A computer program product comprising computer executable instructions for causing a computer to perform the method of any one of claims 1-2, 3 and 4.
CN202111439458.3A 2021-11-30 2021-11-30 Data transmission method and device Active CN114143081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111439458.3A CN114143081B (en) 2021-11-30 2021-11-30 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111439458.3A CN114143081B (en) 2021-11-30 2021-11-30 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN114143081A CN114143081A (en) 2022-03-04
CN114143081B true CN114143081B (en) 2024-04-19

Family

ID=80389426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111439458.3A Active CN114143081B (en) 2021-11-30 2021-11-30 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN114143081B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686462A (en) * 2013-12-02 2014-03-26 广东美的制冷设备有限公司 Controlling terminal and controlled terminal pairing method, controlling terminal and controlled terminal pairing system and terminals
CN108259378A (en) * 2017-03-30 2018-07-06 新华三技术有限公司 A kind of message processing method and device
CN110750402A (en) * 2019-10-16 2020-02-04 深圳安时达电子服务有限公司 Debugging device and remote debugging system
CN110855534A (en) * 2013-12-20 2020-02-28 三星电子株式会社 Method and apparatus for searching and controlling controllee in smart home system
CN112383881A (en) * 2020-10-30 2021-02-19 深圳市元征科技股份有限公司 Information reporting method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766291B (en) * 2018-12-06 2020-10-23 珠海格力电器股份有限公司 Automatic configuration method and system of I/O port
CN111343058B (en) * 2020-02-07 2022-02-08 北京小米移动软件有限公司 Device control method, device, control device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686462A (en) * 2013-12-02 2014-03-26 广东美的制冷设备有限公司 Controlling terminal and controlled terminal pairing method, controlling terminal and controlled terminal pairing system and terminals
CN110855534A (en) * 2013-12-20 2020-02-28 三星电子株式会社 Method and apparatus for searching and controlling controllee in smart home system
CN108259378A (en) * 2017-03-30 2018-07-06 新华三技术有限公司 A kind of message processing method and device
CN110750402A (en) * 2019-10-16 2020-02-04 深圳安时达电子服务有限公司 Debugging device and remote debugging system
CN112383881A (en) * 2020-10-30 2021-02-19 深圳市元征科技股份有限公司 Information reporting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114143081A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN112019493B (en) Identity authentication method, identity authentication device, computer equipment and medium
US6363479B1 (en) System and method for signing markup language data
CN102281311A (en) Method, system and device for implementing network service based on open application programming interface
WO2021083083A1 (en) Upgrading method and system, server, and terminal device
CN104980419A (en) Agent communication method and device
CN110875899B (en) Data processing method, system and network system
CN110569127B (en) Virtual resource transferring, sending and obtaining method and device
CN105991518B (en) Network access verifying method and device
CN112491776A (en) Security authentication method and related equipment
US20100293604A1 (en) Interactive authentication challenge
CN108449186B (en) Security verification method and device
CN114143081B (en) Data transmission method and device
US9762535B2 (en) Information processing apparatus, system, method and medium
CN111917859A (en) Data transmission method and device, computer equipment and storage medium
CN115001714A (en) Resource access method and device, electronic equipment and storage medium
CN114257632A (en) Disconnection reconnection method and device, electronic equipment and readable storage medium
US9929973B2 (en) Method of and a system for providing access to a file to a web resource
CN111130837B (en) Initialization method and device of equipment information, computer equipment and storage medium
CN112491777B (en) Cross-block chain identity authentication method, computer equipment and readable storage medium
CN110636114A (en) Customer service access method, access system, service system and cloud platform
CN113347234B (en) Network information acquisition method, device, system, computer equipment and storage medium
CN117319087B (en) Single sign-on method, device and storage medium based on centralized authentication service
CN106790150A (en) A kind of session keeping method and device
CN106375356A (en) Data processing method and server for data processing
US20140128111A1 (en) Converged dialog in hybrid mobile applications

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