CN113472827A - Data transmission method, data transmission device and data transmission system - Google Patents

Data transmission method, data transmission device and data transmission system Download PDF

Info

Publication number
CN113472827A
CN113472827A CN202010238226.0A CN202010238226A CN113472827A CN 113472827 A CN113472827 A CN 113472827A CN 202010238226 A CN202010238226 A CN 202010238226A CN 113472827 A CN113472827 A CN 113472827A
Authority
CN
China
Prior art keywords
client
server
accessed
target
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010238226.0A
Other languages
Chinese (zh)
Other versions
CN113472827B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010238226.0A priority Critical patent/CN113472827B/en
Publication of CN113472827A publication Critical patent/CN113472827A/en
Application granted granted Critical
Publication of CN113472827B publication Critical patent/CN113472827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The data transmission method, the data transmission device and the data transmission system provided by the embodiment of the application relate to the technical field of electronic communication, network information of each client which has accessed into a server is recorded by using equipment management information, when the server receives an access request of a target client, the equipment management information is inquired, the accessed client is confirmed to exist, and when the target client does not meet a preset access condition, a switching client is determined according to the equipment management information, so that the target client and the switching client are in communication connection, the target client is enabled to acquire the data of the server forwarded by the switching client, a router capable of managing multicast groups is not needed in the network transmission process, and the problems in scenes such as information sharing, remote lecture and the like of an internet of things detection system are solved, in the prior art, the problems of packet loss, data packet disorder and the like are easy to occur, and the stability of data transmission is improved.

Description

Data transmission method, data transmission device and data transmission system
Technical Field
The present application relates to the field of electronic communications technologies, and in particular, to a data transmission method, a data transmission apparatus, and a data transmission system.
Background
In recent years, with the rapid development of internet technology, the video monitoring industry has also entered the full-network era. The video monitoring industry in the full-network era gradually shows the characteristics of the information technology industry, and equipment such as a network camera needs to transmit video information through a network. In the prior art, when video monitoring data are transmitted in a network, data transmission is currently performed in a multicast mode, multicast is to realize single-point-to-multipoint network connection between a sender and each receiver, a router capable of managing a multicast group is required in the network transmission process, the network state is not considered, and the problems of packet loss, packet disorder and the like are easy to occur.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data transmission method, a data transmission apparatus, and a data transmission system, so as to solve the problems in the prior art that packet loss, packet misordering, and the like are likely to occur, and improve stability of data transmission.
The specific technical scheme is as follows:
in a first aspect of the present application, an embodiment of the present application provides a data transmission method, which is applied to a server, and the method includes:
when receiving an access request of a target client, inquiring equipment management information, and judging whether an accessed client exists, wherein the equipment management information records network information of each client accessed to the server, and the target client is a client which is not accessed to the server;
and when the accessed client exists and the target client does not meet the preset access condition, determining a switching client according to the equipment management information so as to establish communication connection between the target client and the switching client, so that the target client acquires the data of the server forwarded by the switching client.
Optionally, when there is an accessed client and the target client does not satisfy a preset access condition, determining a forwarding client according to the device management information, so that the target client establishes a communication connection with the forwarding client, so that the target client obtains data of the server forwarded by the forwarding client, where the method includes:
and when an accessed client exists and the target client does not meet preset access conditions, sending the equipment management information to the target client, so that the target client selects one accessed client as a switching client according to the network information of each client accessed to the server and establishes communication connection with the switching client, and the target client acquires the data of the server forwarded by the switching client.
Optionally, when there is an accessed client and the target client does not satisfy a preset access condition, determining a forwarding client according to the device management information, so that the target client establishes a communication connection with the forwarding client, so that the target client obtains data of the server forwarded by the forwarding client, where the method includes:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server, so that each client accessed to the server respectively tests the packet loss rate between the client and the target client according to the packet loss rate test instruction, wherein the packet loss rate test instruction comprises an identifier of the target client;
obtaining packet loss rates between the client sides accessed to the server and the target client sides fed back by the client sides accessed to the server, and obtaining test packet loss rates of the client sides accessed to the server;
selecting the client with the lowest test packet loss rate as a switching client;
and sending the network information of the switching client to the target client so that the target client establishes communication connection with the switching client according to the network information of the switching client, thereby enabling the target client to acquire the data of the server forwarded by the switching client.
Optionally, the method for determining that the target client does not satisfy the preset access condition includes:
judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, the target client is judged to meet a preset access condition, and otherwise, the target client is judged not to meet the preset access condition.
Optionally, after the step of determining, when there is an accessed client and the target client does not satisfy the preset access condition, a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, so that the target client obtains data of the server forwarded by the transit client, the method further includes:
and after receiving feedback information which is sent by the transfer client and represents that the transfer client is successfully connected with the target client, adding the target client into the equipment management information.
In a second aspect of the present application, an embodiment of the present application provides a data transmission method, which is applied to a client, and the method includes:
under the condition that the current client does not access the server, sending an access request to the server;
when receiving device management information sent by the server according to the access request, wherein the device management information records network information of each client accessed to the server, and one accessed client is selected from the clients accessed to the server to serve as a switching client;
sending a forwarding application to the forwarding client, wherein the forwarding application is used for applying the forwarding client to forward the data of the server to the current client;
and receiving the data of the server side forwarded by the forwarding client side under the condition that the forwarding client side passes the authentication of the forwarding application.
Optionally, when receiving the device management information sent by the server according to the access request, selecting one accessed client from the clients that have accessed the server as a forwarding client, where the selecting is performed by the server, and includes:
when receiving the device management information sent by the server according to the access request, testing packet loss rates between the server and the clients accessed to the server to obtain test packet loss rates of the clients accessed to the server;
and selecting the client with the lowest test packet loss rate as the switching client.
Optionally, the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and when receiving the device management information sent by the server according to the access request, selecting one accessed client from the clients that have accessed the server as a transit client includes:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients accessed to the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients accessed to the server belong.
Optionally, in a case that the current client has access to the server, the method further includes:
when receiving a forwarding application of other clients for the server, judging whether key information carried in the forwarding application passes verification;
and when the key information carried in the forwarding application passes the verification, forwarding the data received from the server to the client sending the forwarding application.
Optionally, after the step of forwarding the data received from the server to the client sending the forwarding application when the key information carried in the forwarding application passes verification, the method further includes:
and sending feedback information indicating successful connection with the client sending the forwarding application to the server, so that the server adds the network information of the client sending the forwarding application to the equipment management information after receiving the feedback information.
Optionally, when the key information carried in the forwarding application passes verification, the forwarding module forwards the data received from the server to the client that sent the forwarding application, and the forwarding module includes:
and when the key information carried in the forwarding application passes verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode comprises at least two of a UDP mode, a TCP mode and a multicast mode.
Optionally, when the key information carried in the forwarding application passes the verification, selecting a corresponding sending method according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending method, including:
when the key information carried in the forwarding application passes verification, acquiring the data type of the data to be forwarded, which is received from the server, to obtain a target data type;
determining a priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and forwarding the data to be forwarded to the client sending the forwarding application by using the data sending mode corresponding to the target priority, wherein the data sending mode corresponding to the high priority is a TCP mode, the data sending mode corresponding to the medium priority is a UDP mode, and the data sending mode corresponding to the low priority is a multicast mode.
In a third aspect of the present application, an embodiment of the present application provides a data transmission apparatus, which is applied to a server, and the apparatus includes:
the system comprises an inquiry module, a server and a service end, wherein the inquiry module is used for inquiring equipment management information when receiving an access request of a target client and judging whether the accessed client exists, the equipment management information comprises network information of each client accessed to the server, and the target client is a client which is not accessed to the server;
and the processing module is used for determining a switching client according to the equipment management information when the accessed client exists and the target client does not meet the preset access condition so as to establish communication connection between the target client and the switching client, so that the target client acquires the data of the server forwarded by the switching client.
Optionally, the processing module is specifically configured to:
and when an accessed client exists and the target client does not meet preset access conditions, sending the equipment management information to the target client, so that the target client selects one accessed client as a switching client according to the network information of each client accessed to the server and establishes communication connection with the switching client, and the target client acquires the data of the server forwarded by the switching client.
Optionally, the processing module is specifically configured to:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server, so that each client accessed to the server respectively tests the packet loss rate between the client and the target client according to the packet loss rate test instruction, wherein the packet loss rate test instruction comprises an identifier of the target client;
obtaining packet loss rates between the client sides accessed to the server and the target client sides fed back by the client sides accessed to the server, and obtaining test packet loss rates of the client sides accessed to the server;
selecting the client with the lowest test packet loss rate as a switching client;
and sending the network information of the switching client to the target client so that the target client establishes communication connection with the switching client according to the network information of the switching client, thereby enabling the target client to acquire the data of the server forwarded by the switching client.
Optionally, the processing module includes a judgment sub-module, and the judgment sub-module is specifically configured to:
when the accessed client exists, judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, judging that the target client meets a preset access condition, otherwise, judging that the target client does not meet the preset access condition.
Optionally, the apparatus further comprises:
and the adding module is used for adding the target client into the equipment management information after receiving the feedback information which is sent by the transfer client and represents that the transfer client is successfully connected with the target client.
In a fourth aspect of the present application, an embodiment of the present application provides a data transmission apparatus, which is applied to a client, where the apparatus includes:
the first sending module is used for sending an access request to the server under the condition that the current client does not access the server;
a selecting module, configured to select an accessed client from the clients that have accessed the server as a switching client when receiving device management information sent by the server according to the access request, where the network information of the clients that have accessed the server is recorded in the device management information;
the second sending module is used for sending a forwarding application to the forwarding client, wherein the forwarding application is used for applying the forwarding client to forward the data of the server to the current client;
and the receiving module is used for receiving the data of the server side forwarded by the forwarding client side under the condition that the forwarding client side passes the authentication of the forwarding application.
Optionally, the selecting module is specifically configured to:
when receiving the device management information sent by the server according to the access request, testing packet loss rates between the server and the clients accessed to the server to obtain test packet loss rates of the clients accessed to the server;
and selecting the client with the lowest test packet loss rate as the switching client.
Optionally, the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and the selection module is specifically configured to:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients accessed to the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients accessed to the server belong.
Optionally, in a case that the current client has access to the server, the apparatus further includes:
the judging module is used for judging whether the key information carried in the forwarding application passes verification or not when the forwarding application of other clients for the server is received;
and the third sending module is used for forwarding the data received from the server to the client side sending the forwarding application when the key information carried in the forwarding application passes verification.
Optionally, the apparatus further comprises:
and the feedback information sending module is used for sending feedback information which indicates that the connection with the client side sending the forwarding application is successful to the server side so that the server side adds the network information of the client side sending the forwarding application to the equipment management information after receiving the feedback information.
Optionally, the third sending module is specifically configured to:
and when the key information carried in the forwarding application passes verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode comprises at least two of a UDP mode, a TCP mode and a multicast mode.
Optionally, the third sending module includes:
the processing sub-module is used for acquiring the data type of the data which is received from the server and needs to be forwarded when the key information carried in the forwarding application passes verification, so as to obtain a target data type;
the priority determining submodule is used for determining the priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and the forwarding sub-module is used for forwarding the data to be forwarded to the client sending the forwarding application by using the data sending mode corresponding to the target priority, wherein the data sending mode corresponding to the high priority is a TCP mode, the data sending mode corresponding to the medium priority is a UDP mode, and the data sending mode corresponding to the low priority is a multicast mode.
In a fifth aspect of this application, this application provides a data transmission system, where the system includes:
a server side and a client side;
the server is used for inquiring equipment management information when receiving an access request of a target client, and judging whether the client accessed to the server exists, wherein the network information of each client accessed to the server is recorded in the equipment management information, and the target client is a client which is not accessed to the server; when an accessed client exists and the target client does not meet preset access conditions, determining a switching client according to the equipment management information so as to enable the target client to establish communication connection with the switching client, and enable the target client to acquire the data of the server forwarded by the switching client;
and the client is used for sending an access request to the server under the condition that the server is not accessed, and after the server determines a switching client according to the equipment management information, the client establishes communication connection with the switching client so as to acquire the data of the server forwarded by the switching client.
Optionally, the server is specifically configured to:
when an accessed client exists and the target client does not meet preset access conditions, the equipment management information is sent to the target client;
the target client is specifically used for selecting an accessed client from the clients accessed to the server as a switching client after receiving the equipment management information sent by the server according to the access request; sending a forwarding application to the forwarding client, wherein the forwarding application is used for applying the forwarding client to forward the data of the server to the current client; and receiving the data of the server side forwarded by the forwarding client side under the condition that the forwarding client side passes the authentication of the forwarding application.
Optionally, the server is specifically configured to:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server;
each client which has access to the server is specifically configured to test packet loss rates between the client and the target client according to the packet loss rate test instruction, where the packet loss rate test instruction includes an identifier of the target client, and feeds back the packet loss rates between the client and the target client to the server;
the server side obtains the packet loss rate between each client side fed back by each client side accessed to the server side and the target client side, and obtains the test packet loss rate of each client side accessed to the server side; selecting the client with the lowest test packet loss rate as a switching client; sending the network information of the switching client to the target client;
and the target client establishes communication connection with the switching client according to the network information of the switching client, so as to acquire the data of the server forwarded by the switching client.
Optionally, the server is specifically configured to:
judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, the target client is judged to meet a preset access condition, and otherwise, the target client is judged not to meet the preset access condition.
Optionally, the server is further configured to:
and after receiving feedback information which is sent by the transfer client and represents that the transfer client is successfully connected with the target client, adding the target client into the equipment management information.
Optionally, the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and the client is specifically configured to:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients which have accessed the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients which have accessed the server belong.
Optionally, in a case that the client has accessed the server, the client is further configured to:
when receiving a forwarding application of other clients for the server, judging whether key information carried in the forwarding application passes verification;
and when the key information carried in the forwarding application passes the verification, forwarding the data received from the server to the client sending the forwarding application.
Optionally, the client is specifically configured to:
and sending feedback information indicating successful connection with the client sending the forwarding application to the server, so that the server adds the network information of the client sending the forwarding application to the equipment management information after receiving the feedback information.
Optionally, the client is specifically configured to:
and when the key information carried in the forwarding application passes verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode comprises at least two of a UDP mode, a TCP mode and a multicast mode.
Optionally, the client is specifically configured to:
when the key information carried in the forwarding application passes verification, acquiring the data type of the data to be forwarded, which is received from the server, to obtain a target data type;
determining a priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and forwarding the data to be forwarded to the client sending the forwarding application by using the data sending mode corresponding to the target priority, wherein the data sending mode corresponding to the high priority is a TCP mode, the data sending mode corresponding to the medium priority is a UDP mode, and the data sending mode corresponding to the low priority is a multicast mode.
According to the data transmission method, the data transmission device and the data transmission system provided by the embodiment of the application, the network information of each client accessed to the server is recorded by using the equipment management information, when the server receives an access request of a target client, the equipment management information is inquired, the existence of the accessed client is confirmed, and when the target client does not meet the preset access condition, the switching client is determined according to the equipment management information, so that the target client and the switching client are in communication connection, the target client is enabled to obtain the data of the server forwarded by the switching client, a router capable of managing multicast groups is not needed in the network transmission process, and the problems that in the scenes of information sharing, remote teaching and the like of an Internet of things detection system, packet loss and the like easily occur in the prior art are solved, The data packets are out of order, and the stability of data transmission is improved. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a data transmission method applied to a server according to an embodiment of the present application;
fig. 2 is a first schematic diagram of interaction of a data transmission method according to an embodiment of the present application;
fig. 3 is a second schematic diagram of interaction of a data transmission method according to an embodiment of the present application;
fig. 4 is a third schematic diagram of interaction of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data transmission method applied to a client according to an embodiment of the present application;
fig. 6 is a schematic diagram of a data transmission system according to an embodiment of the present application;
fig. 7 is a schematic diagram of a data transmission apparatus applied to a server according to an embodiment of the present application;
fig. 8 is a schematic diagram of a data transmission apparatus applied to a client according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiments of the present application disclose a data transmission method, a data transmission apparatus, and a data transmission system, which are described below.
An embodiment of the present application provides a data transmission method, which is applied to a server, and referring to fig. 1, fig. 1 is a schematic diagram of the data transmission method applied to the server in the embodiment of the present application, where the method includes:
step 110, when receiving an access request of a target client, querying device management information, and determining whether an accessed client exists, wherein the device management information records network information of each client accessed to the server, and the target client is a client that has not been accessed to the server.
The image data transmission method is applied to the server, and specifically, the server is electronic equipment.
In the scenes of information sharing, remote teaching and the like of the detection system of the internet of things, data needs to be sent, the server can be encoder-type equipment such as a network camera, and the client can be hard disk video recorder equipment, data center products, computers, mobile phone clients and the like. For example, in a remote lecture scene, the server is a webcam of a main classroom for performing on-site lecture, the client is a hard disk recorder device of other slave classrooms for listening to and speaking, for example, the server is a webcam for performing lecture in a classroom, the server has a lecture video code stream of the a classroom, and a person in the B classroom sends an access request to the server through the hard disk recorder, so that the server sends the lecture video code stream of the a classroom to the client.
When the server acquires an access request of a target client, the server queries device management information to determine whether other clients have accessed the server, that is, whether accessed clients exist, wherein the device management information records network information of each client accessed to the server, and the accessed clients can directly send data to the clients of the clients for the server or forward the data of the server to the clients of the clients for the other accessed clients. The network information of each client that has accessed the server includes a unique identification of a device that has accessed the client, specifically, the unique identification may be a device code, a device name, and the like of the accessed client, and the network information of the accessed client may be a network IP (Internet Protocol, Protocol for interconnection between networks) segment, a network packet loss rate, and the like.
Step 120, when there is an accessed client and the target client does not meet a preset access condition, determining a forwarding client according to the device management information, so that the target client establishes a communication connection with the forwarding client, and the target client obtains the data of the server forwarded by the forwarding client.
When the accessed client exists and the target client does not meet the preset access condition, the switching client can be determined according to the equipment management information, and after the switching client confirms the switching client, the switching client forwards the data of the server to the target client. Certainly, when the target client meets the preset access condition, the server directly establishes communication connection with the target client, so that data is sent to the target client, the flexibility of data interaction is improved, and the situations of packet loss and data packet disorder in the data interaction process are greatly reduced.
The preset access condition may be a condition set according to a network state of the server, where the network state may be a used bandwidth or a current network packet loss rate. The method of determining the transfer client according to the device management information may be determined by the server itself or by the target client. The connection establishment mode for each communication may be a wired or wireless mode, or a mode implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies. For example, the client may access a Wireless network based on a communication standard, such as WiFi (Wireless Fidelity), a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof.
The network information of each client accessed to the server is recorded by using the equipment management information, when the server receives an access request of a target client, when the target client does not meet preset access conditions, the equipment management information is inquired, the existence of the accessed client is confirmed, and a switching client is determined according to the equipment management information so that the target client establishes communication connection with the switching client, so that the target client obtains the data of the server forwarded by the switching client, a router capable of managing a multicast group is not needed in the network transmission process, the problems of packet loss, packet disorder and the like easily occurring in the prior art in scenes such as information sharing, remote lecture and the like of an Internet of things detection system are solved, and the stability of data transmission is improved.
In one possible embodiment, when there is an accessed client and the target client does not satisfy a preset access condition, determining a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, and the target client obtains data of the server forwarded by the transit client, including:
and when an accessed client exists and the target client does not meet preset access conditions, sending the equipment management information to the target client, so that the target client selects one accessed client as a switching client according to the network information of each client accessed to the server and establishes communication connection with the switching client, and the target client acquires the data of the server forwarded by the switching client.
And determining the switching client according to the equipment management information in a mode of being determined by a target client, namely, the server sends the equipment management information to the target client, and the target client selects an accessed client as the switching client according to the network information of each client accessed to the server.
Referring to fig. 2, fig. 2 is a first schematic diagram illustrating interaction of a data transmission method according to an embodiment of the present invention, in a network teaching scene, the server is a network camera 210 in a classroom, the network camera 210 establishes a communication connection with a client 231 in a classroom 1 through a first router 221, the network camera 210 establishes a communication connection with a client 232 in the classroom 2 through the first router 221, device management information records network information of the client in the classroom 1 and network information of the client in the classroom 2, an access request is sent from the client in the classroom 3 to the network camera, the network camera 210 queries the device management information to determine that the accessed clients include the client 231 in the classroom 1 and the client 232 in the classroom 2, a packet loss rate between the network camera 210 and the client 233 in the classroom 3 is greater than a preset packet loss rate preset threshold, that is, when the client 233 in the slave room 3 does not satisfy the preset access condition, the network camera 210 transmits the device management information to the client 233 in the slave room 3, the client 233 in the slave room 3 acquires the network Packet loss rate from the client 231 in the room 1 and the network Packet loss rate from the client 232 in the room 2 by a PING (Packet Internet Groper) method based on the network information of the client 231 in the room 1 and the network Packet loss rate from the client 232 in the room 2 recorded in the device management information, confirms that the network Packet loss rate from the client 231 in the room 1 and the network Packet loss rate from the client 232 in the room 2 is smaller than the network Packet loss rate from the client 232 in the room 2 to a transit client, for example, the client 231 in the room 1 is determined to be the transit client, and after selecting the transit client, the client 233 in the room 3 establishes a communication connection with the client 231 in the room 1, after the communication connection is established, the client 231 in the slave classroom 1 forwards the data of the network camera 210 to the client 233 in the slave classroom 3.
After the forwarding client confirms, the target client sends a forwarding application for the data of the server to the forwarding client, wherein the forwarding application includes verification information of the server, specifically, the verification information of the server includes a user name of the server and a verification password of the server, and when the forwarding client passes verification according to the verification information of the server, the forwarding client establishes communication connection with the target client and forwards the data of the server to the target client.
Referring to fig. 3, fig. 3 is a second schematic diagram illustrating interaction of the data transmission method according to the embodiment of the present application, specifically, a forwarding application for data from the client 233 in the classroom 3 to the client 231 in the classroom 1 is sent, the forwarding application includes authentication information of the webcam 210, specifically, the authentication information includes an authentication user name and an authentication password of the webcam 210, and when the authentication is passed, a connection is established between the client 231 in the classroom 1 and the client 233 in the classroom 3 through the second router 222, and the data is forwarded from the client 231 in the classroom 1 to the client 233 in the classroom 3. The second router 222 and the first router 221 may be the same device or different devices.
In one possible embodiment, when there is an accessed client and the target client does not satisfy a preset access condition, determining a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, and the target client obtains data of the server forwarded by the transit client, including:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server, so that each client accessed to the server respectively tests the packet loss rate between the client and the target client according to the packet loss rate test instruction, wherein the packet loss rate test instruction comprises an identifier of the target client;
obtaining packet loss rates between the client sides accessed to the server and the target client side fed back by the client sides accessed to the server, and obtaining test packet loss rates of the client sides accessed to the server;
selecting the client with the lowest test packet loss rate as a switching client;
and sending the network information of the switching client to the target client so that the target client establishes communication connection with the switching client according to the network information of the switching client, and the target client acquires the data of the server forwarded by the switching client.
The determination mode of determining the switching client according to the device management information is determined by the server, that is, the server sends the packet loss test command to each client accessing the server, so that each client accessing the server tests the packet loss between the client and the target client according to the packet loss test command, so that the server can obtain the tested packet loss rate of each client accessed to the server, the server selects the client with the lowest tested packet loss rate as the switching client, and after the switching client is determined, the server sends the network information of the switching client to the target client, so that the target client end can establish communication connection with the switching client end according to the network information of the switching client end, therefore, the target client side can obtain the data of the server side forwarded by the transfer client side.
In a possible implementation manner, the method for determining that the target client does not satisfy the preset access condition includes:
judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, the target client is judged to meet a preset access condition, and otherwise, the target client is judged not to meet the preset access condition.
The preset access condition may be a condition set according to a network state of the server, where the network state may be a used bandwidth or a current network packet loss rate. For example, if the current network packet loss rate of the server, which is obtained by the server in a PING manner, is greater than a preset threshold, the target client does not satisfy the preset access condition, or if the used bandwidth of the server exceeds the preset bandwidth threshold, the target client does not satisfy the preset access condition, and the preset access condition may be set according to actual needs, which is not described herein again.
In a possible implementation manner, after the step of determining, when there is an accessed client and the target client does not satisfy the preset access condition, a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, so that the target client obtains data of the server forwarded by the transit client, the method further includes:
and after receiving feedback information which is sent by the switching client and indicates that the switching client is successfully connected with the target client, adding the target client into the equipment management information.
For example, when the client 233 in the slave classroom 3 is connected to the client 231 in the slave classroom 1, and the client 231 in the classroom 1 feeds back information that the client 233 in the slave classroom 3 has successfully connected to the network camera 210, the network camera 210 records the network information of the client 233 in the classroom 3 in the device management information. Furthermore, after the network information of the client 233 in the slave classroom 3 is recorded in the device management information, the client 233 in the slave classroom 3 can be used as a relay client to establish connection with other devices, so as to forward and process data, thereby improving the flexibility of data interaction and greatly reducing the situations of packet loss and data packet disorder during the data interaction process.
Referring to fig. 4, fig. 4 is a third schematic diagram illustrating interaction of a data transmission method according to an embodiment of the present application. The method comprises the steps that an access request is sent to a network camera from a client side of a classroom 1, the client side of the classroom 1 meets a preset access condition, the network camera agrees to the access request from the client side of the classroom 1, connection is established between the client side of the classroom 1 and the network camera, and the network camera adds network information of the client side of the classroom 1 to equipment management information. Transmitting an access request from a client in a classroom 3 to a network camera, the network camera searching for device management information, determining whether an accessed client exists, when the accessed client exists and the client in the classroom 3 does not satisfy a preset access condition, the network camera transmitting the device management information to the client in the classroom 1, searching for the device management information from the client in the classroom 3, determining that the client in the classroom 1 is a transit client, transmitting a transfer application for data of the server from the client in the classroom 3 to the client in the classroom 1, after the authentication is passed, establishing a connection between the client in the classroom 1 and the client in the classroom 3, transmitting the data of the network camera from the client in the classroom 1 to the client in the classroom 3, and feeding back information that the connection with the client in the classroom 3 from the client in the classroom 1 to the network camera, the network camera adds information from the client of the classroom 3 to the device management information.
An embodiment of the present application provides a data transmission method, which is applied to a client, and referring to fig. 5, fig. 5 is a schematic diagram of the data transmission method applied to the client in the embodiment of the present application, where the method includes:
and 310, sending an access request to the server side under the condition that the current client side does not access the server side.
The image data transmission method is applied to the client, and specifically, the client is an electronic device.
In the scenes of information sharing, remote teaching and the like of the detection system of the internet of things, data needs to be sent, the server can be encoder-type equipment such as a network camera, and the client can be hard disk video recorder equipment, data center products, computers, mobile phone clients and the like. When the current client does not access the server, the current client sends an access request to the server, after receiving the access request of the current client, the server can first determine whether the target client meets a preset access condition, and when the target client does not meet the preset access condition, the server queries device management information and determines whether an accessed client exists, wherein the device management information records network information of each client accessed to the server. And when the accessed client exists, sending the equipment management information to the current client so that the current client selects one accessed client as a switching client according to the network information of each client accessed to the server, and establishing communication connection with the switching client so as to enable the current client to acquire the data of the server forwarded by the switching client.
Step 320, when receiving the device management information sent by the server according to the access request, where the device management information records network information of each client that has accessed the server, and one accessed client is selected from the clients that have accessed the server to serve as a transit client.
When the client receives the equipment management information sent by the server according to the access request, one accessed client is selected from the clients accessed to the server to serve as a switching client, and the data of the server is obtained through the switching client.
Step 330, sending a forwarding application to the forwarding client, where the forwarding application is used to apply the forwarding client to forward the data of the server to the current client.
After the transfer client confirms, the current client sends a transfer application to the transfer client so as to apply the transfer client to transfer the data of the server to the current client. The forwarding application includes the authentication information of the server, and specifically, the authentication information of the server includes a user name of the server and an authentication password of the server.
Step 340, receiving the data of the server side forwarded by the forwarding client side when the forwarding client side passes the authentication of the forwarding application.
And when the transfer client passes the authentication according to the verification information of the server, the transfer client establishes communication connection with the target client and forwards the data of the server to the current client.
The method comprises the steps of recording network information of each client which is accessed to a server by using equipment management information, sending an access request to the server when the current client does not access the server, selecting one accessed client from the clients which are accessed to the server as a transfer client when the equipment management information sent by the server according to the access request is received, sending a transfer application to the transfer client, and receiving data of the server transferred by the transfer client when the transfer client passes the authentication of the transfer application. The method and the device have the advantages that a router capable of managing the multicast group is not needed in the network transmission process, the problems of packet loss, disorder of data packets and the like in the prior art in scenes such as information sharing, remote teaching and the like of the detection system of the Internet of things are solved, and the stability of data transmission is improved.
In one possible embodiment, the selecting, when receiving the device management information sent by the server according to the access request, one accessed client from among the clients that have accessed the server as a transit client includes:
when receiving the device management information sent by the server according to the access request, testing packet loss rates between the server and the clients accessed to the server to obtain test packet loss rates of the clients accessed to the server;
and selecting the client with the lowest test packet loss rate as the switching client.
And selecting the client with the lowest test packet loss rate as the switching client, so that the data of the server forwarded by the switching client can be received. Therefore, the problems of packet loss, data packet disorder and the like in the prior art can be solved, and the stability of data transmission is improved.
In one possible embodiment, the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and the selecting one accessed client from the clients that have accessed the server as the transit client when receiving the device management information transmitted by the server according to the access request includes:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients which have accessed the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients which have accessed the server belong.
And selecting a client end which is in the same network segment with the current client end as a switching client end, so that the data of the server end forwarded by the switching client end can be received. Therefore, the problems of packet loss, data packet disorder and the like in the prior art can be solved, and the stability of data transmission is improved.
In a possible implementation manner, in a case that the current client has access to the server, the method further includes:
when receiving a forwarding application of other clients for the server, judging whether the key information carried in the forwarding application passes verification;
and when the key information carried in the forwarding application passes the verification, forwarding the data received from the server to the client sending the forwarding application.
The key information carried in the forwarding application can be the user name of the server and the verification password of the server, and authentication is performed by verifying the key information, so that the data security can be improved.
In a possible implementation manner, after the step of forwarding the data received from the server to the client that sent the forwarding application when the key information carried in the forwarding application is verified, the method further includes:
and sending feedback information indicating successful connection with the client sending the forwarding application to the server, so that the server adds the network information of the client sending the forwarding application to the device management information after receiving the feedback information.
And sending feedback information indicating that the connection with the client sending the forwarding application is successful to the server, and after receiving the feedback information, the server adds the network information of the client sending the forwarding application to the equipment management information, so that the client sending the forwarding application can be subsequently used as a switching client, thereby solving the problems of packet loss, packet disorder and the like easily occurring in the prior art and improving the stability of data transmission.
In a possible implementation manner, the forwarding, when the key information carried in the forwarding application passes the verification, data received from the server to the client that sent the forwarding application includes:
when the key information carried in the forwarding application passes verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode includes at least two of a User Datagram Protocol (UDP) mode, a Transmission Control Protocol (TCP) mode, and a multicast mode.
Because the data forwarding is carried out by the switching client, the forwarding mode can be flexibly realized by using a UDP mode, a TCP mode or a multicast mode, so that the flexibility of data interaction is improved, and the situations of packet loss and data packet disorder in the data interaction process are greatly reduced. In addition, the data of the server side is forwarded through the switching client side, the network load of a transmission medium is pertinently reduced and the total bandwidth consumption is reduced according to the network condition, and therefore load balance under the network environment is achieved.
In a possible implementation manner, when the key information carried in the forwarding application passes the verification, selecting a corresponding sending method according to a data type of the data received from the server, and forwarding the data received from the server to a client sending the forwarding application by using the selected sending method, the method includes:
when the key information carried in the forwarding application passes verification, acquiring the data type of the data to be forwarded, which is received from the server, to obtain a target data type;
determining a priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and forwarding the data to be forwarded to the client sending the forwarding application by using a data transmission mode corresponding to the target priority, wherein the data transmission mode corresponding to the high priority is a TCP mode, the data transmission mode corresponding to the medium priority is a UDP mode, and the data transmission mode corresponding to the low priority is a multicast mode.
For example, if the priority corresponding to the alarm data is a high priority, and the parameter data corresponds to a non-low priority, then the forwarded data is forwarded in a TCP manner when the forwarded data is the alarm data, so as to ensure the reliability of the data, and the forwarded data is the parameter data and is processed in a multicast manner, so as to improve the flexibility of data interaction, and greatly reduce the situations of packet loss and data packet disorder during the data interaction process.
An embodiment of the present application provides a data transmission system, referring to fig. 6, where fig. 6 is a schematic diagram of the data transmission system according to the embodiment of the present application, and includes:
a server 610, a client 620;
the server 610 is configured to query device management information when receiving an access request of a target client 620, and determine whether the client 620 that has accessed the server 610 exists, where the device management information records network information of each client 620 that has accessed the server 610, and the target client 620 is a client that has not accessed the server 610; when there is an accessed client 620 and the target client 620 does not meet a preset access condition, determining a forwarding client 620 according to the device management information, so that the target client 620 establishes a communication connection with the forwarding client 620, and the target client 620 obtains data of the server 610 forwarded by the forwarding client 620;
the client 620 is configured to send an access request to the server 610 when the server 610 is not accessed to the server 610, and establish a communication connection with the forwarding client 620 after the server 610 determines the forwarding client 620 according to the device management information, so as to obtain data of the server 610 forwarded by the forwarding client 620.
In a possible implementation manner, the server 610 is specifically configured to:
when an accessed client 620 exists and the target client 620 does not meet a preset access condition, sending the device management information to the target client 620;
the target client 620 is specifically configured to select one accessed client 620 from the clients 620 that have accessed the server 610 as a forwarding client 620 after receiving the device management information sent by the server 610 according to the access request; sending a forwarding application to the forwarding client 620, where the forwarding application is used to apply the forwarding client 620 to forward the data of the server 610 to the current client 620; when the transit client 620 passes the authentication of the transfer application, the data of the server 610 transferred by the transit client 620 is received.
In a possible implementation manner, the server 610 is specifically configured to:
when there is an accessed client 620 and the target client 620 does not satisfy a preset access condition, sending a packet loss rate test instruction to each client 620 accessed to the server 610;
each client 620 having access to the server 610 is specifically configured to respectively test a packet loss ratio between the client 620 and the target client 620 according to the packet loss ratio test instruction, where the packet loss ratio test instruction includes an identifier of the target client 620, and feeds back the packet loss ratio between each client 620 and the target client 610;
the server 610 obtains packet loss ratios between the respective clients 620 accessed to the server 610 and the target client 620, to obtain test packet loss ratios of the clients 620 accessed to the server 610; selecting the client 620 with the lowest test packet loss rate as a switching client 620; sending the network information of the transit client 620 to the target client 620;
the target client 620 establishes a communication connection with the forwarding client 620 according to the network information of the forwarding client 620, thereby acquiring the data of the server 610 forwarded by the forwarding client 620.
In a possible implementation manner, the server 610 is specifically configured to:
determining whether the bandwidth used by the server 610 is greater than a preset bandwidth threshold, and determining whether a packet loss ratio between the server 610 and the target client 620 is greater than a preset packet loss ratio threshold, wherein when the bandwidth used by the server 610 is not greater than the preset bandwidth threshold and the packet loss ratio between the server 610 and the target client 620 is not greater than the preset packet loss ratio threshold, it is determined that the target client 620 meets a preset access condition, otherwise, it is determined that the target client 620 does not meet the preset access condition.
In a possible implementation manner, the server 610 is further configured to:
and adding the target client 620 to the device management information after receiving feedback information indicating that the forwarding client 620 and the target client 620 are successfully connected, which is sent by the forwarding client 620.
In a possible implementation manner, the network information of each client 620 having accessed the server 610 includes a network segment to which each client 620 having accessed the server 610 belongs, and the client 620 is specifically configured to:
when receiving the device management information sent by the server 610 according to the access request, according to the network segment to which the current client 620 belongs and the network segment to which each client 620 that has accessed the server 610 belongs, one client 620 that is in the same network segment as the current client 620 is selected from the clients 620 that have accessed the server 610 as a transit client 620.
In a possible implementation manner, in a case where the client 620 has access to the server 610, the client 620 is further configured to:
when receiving a forwarding application of another client 620 to the server 610, determining whether key information carried in the forwarding application passes verification;
and when the key information carried in the forwarding application passes the verification, forwarding the data received from the server 610 to the client 620 sending the forwarding application.
In a possible implementation, the client 620 is specifically configured to:
and transmitting feedback information indicating that the connection with the client 620 which transmits the forwarding application is successful to the server 610, so that the server 610 adds the network information of the client 620 which transmits the forwarding application to the device management information after receiving the feedback information.
In a possible implementation, the client 620 is specifically configured to:
when the key information carried in the forwarding application passes the verification, selecting a corresponding sending mode according to the data type of the data received from the server 610, and forwarding the data received from the server 610 to the client 620 sending the forwarding application by using the selected sending mode, wherein the sending mode includes at least two of a UDP mode, a TCP mode, and a multicast mode.
In a possible implementation, the client 620 is specifically configured to:
when the key information carried in the forwarding application passes verification, acquiring the data type of the data to be forwarded, which is received from the server 610, to obtain a target data type;
determining a priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and forwarding the data to be forwarded to the client 620 which sends the forwarding application by using a data transmission mode corresponding to the target priority, wherein the data transmission mode corresponding to the high priority is a TCP mode, the data transmission mode corresponding to the medium priority is a UDP mode, and the data transmission mode corresponding to the low priority is a multicast mode.
With regard to the system in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present application provides a data transmission device, which is applied to a server, referring to fig. 7, where fig. 7 is a schematic diagram of the data transmission device applied to the server in the embodiment of the present application, where the data transmission device includes:
an inquiring module 710, configured to, when receiving an access request of a target client, inquire device management information, and determine whether an accessed client exists, where the device management information includes network information of each client that has accessed the server, and the target client is a client that has not accessed the server;
the processing module 720 is configured to determine, when there is an accessed client and the target client does not satisfy a preset access condition, a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, and the target client obtains data of the server forwarded by the transit client.
In a possible implementation manner, the processing module 720 is specifically configured to:
and when an accessed client exists and the target client does not meet preset access conditions, sending the equipment management information to the target client, so that the target client selects one accessed client as a switching client according to the network information of each client accessed to the server and establishes communication connection with the switching client, and the target client acquires the data of the server forwarded by the switching client.
In a possible implementation manner, the processing module 720 is specifically configured to:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server, so that each client accessed to the server respectively tests the packet loss rate between the client and the target client according to the packet loss rate test instruction, wherein the packet loss rate test instruction comprises an identifier of the target client;
obtaining packet loss rates between the client sides accessed to the server and the target client side fed back by the client sides accessed to the server, and obtaining test packet loss rates of the client sides accessed to the server;
selecting the client with the lowest test packet loss rate as a switching client;
and sending the network information of the switching client to the target client so that the target client establishes communication connection with the switching client according to the network information of the switching client, and the target client acquires the data of the server forwarded by the switching client.
In a possible implementation manner, the processing module 720 includes a determining sub-module, and the determining sub-module is specifically configured to:
when the accessed client exists, judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, the target client is judged to meet a preset access condition, and otherwise, the target client is judged not to meet the preset access condition.
In a possible embodiment, the above apparatus further comprises:
and the adding module is used for adding the target client into the equipment management information after receiving the feedback information which is sent by the switching client and indicates that the switching client is successfully connected with the target client.
An embodiment of the present application provides a data transmission device, which is applied to a client, and referring to fig. 8, fig. 8 is a schematic diagram of the data transmission device applied to the client according to the embodiment of the present application, where the data transmission device includes:
a first sending module 810, configured to send an access request to a server when a current client does not access the server;
a selecting module 820, configured to, when receiving device management information sent by the server according to the access request, where the device management information records network information of each client that has accessed the server, select an accessed client from the clients that have accessed the server as a transit client;
a second sending module 830, configured to send a forwarding application to the transit client, where the forwarding application is used to apply the transit client to forward data of the server to a current client;
a receiving module 840, configured to receive the data of the server forwarded by the transit client when the transit client passes the authentication of the forwarding application.
In a possible implementation manner, the selecting module 820 is specifically configured to:
when receiving the device management information sent by the server according to the access request, testing packet loss rates between the server and the clients accessed to the server to obtain test packet loss rates of the clients accessed to the server;
and selecting the client with the lowest test packet loss rate as the switching client.
In a possible implementation manner, the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and the selecting module 820 is specifically configured to:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients which have accessed the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients which have accessed the server belong.
In a possible implementation manner, in a case that the current client has access to the server, the apparatus further includes:
the judging module is used for judging whether the key information carried in the forwarding application passes verification or not when receiving the forwarding application of other clients aiming at the server;
and a third sending module, configured to forward, when the key information carried in the forwarding application passes verification, the data received from the server to the client that sent the forwarding application.
In a possible embodiment, the above apparatus further comprises:
and a feedback information sending module, configured to send, to the server, feedback information indicating that the connection with the client that sent the forwarding application is successful, so that after receiving the feedback information, the server adds, to the device management information, network information of the client that sent the forwarding application.
In a possible implementation manner, the third sending module is specifically configured to:
and when the key information carried in the forwarding application passes the verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode comprises at least two of a UDP mode, a TCP mode and a multicast mode.
In one possible implementation, the third sending module includes:
the processing submodule is used for acquiring the data type of the data which is received from the server and needs to be forwarded when the key information carried in the forwarding application passes verification, and acquiring a target data type;
a priority determining submodule, configured to determine a priority corresponding to the target data type, where the priority is a target priority, and the priority includes a high priority, a medium priority, and a low priority;
and a forwarding sub-module, configured to forward the data to be forwarded to a client that sends the forwarding application by using a data transmission method corresponding to the target priority, where the data transmission method corresponding to the high priority is a TCP method, the data transmission method corresponding to the medium priority is a UDP method, and the data transmission method corresponding to the low priority is a multicast method.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It should be noted that, in this document, the technical features in the various alternatives can be combined to form the scheme as long as the technical features are not contradictory, and the scheme is within the scope of the disclosure of the present application. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the same element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (15)

1. A data transmission method is applied to a server side, and the method comprises the following steps:
when receiving an access request of a target client, inquiring equipment management information, and judging whether an accessed client exists, wherein the equipment management information records network information of each client accessed to the server, and the target client is a client which is not accessed to the server;
and when the accessed client exists and the target client does not meet the preset access condition, determining a switching client according to the equipment management information so as to establish communication connection between the target client and the switching client, so that the target client acquires the data of the server forwarded by the switching client.
2. The method according to claim 1, wherein when there is an accessed client and the target client does not satisfy a preset access condition, determining a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, and the target client obtains data of the server forwarded by the transit client, including:
and when an accessed client exists and the target client does not meet preset access conditions, sending the equipment management information to the target client, so that the target client selects one accessed client as a switching client according to the network information of each client accessed to the server and establishes communication connection with the switching client, and the target client acquires the data of the server forwarded by the switching client.
3. The method according to claim 1, wherein when there is an accessed client and the target client does not satisfy a preset access condition, determining a transit client according to the device management information, so that the target client establishes a communication connection with the transit client, and the target client obtains data of the server forwarded by the transit client, including:
when an accessed client exists and the target client does not meet preset access conditions, sending a packet loss rate test instruction to each client accessed to the server, so that each client accessed to the server respectively tests the packet loss rate between the client and the target client according to the packet loss rate test instruction, wherein the packet loss rate test instruction comprises an identifier of the target client;
obtaining packet loss rates between the client sides accessed to the server and the target client sides fed back by the client sides accessed to the server, and obtaining test packet loss rates of the client sides accessed to the server;
selecting the client with the lowest test packet loss rate as a switching client;
and sending the network information of the switching client to the target client so that the target client establishes communication connection with the switching client according to the network information of the switching client, thereby enabling the target client to acquire the data of the server forwarded by the switching client.
4. The method of claim 1, wherein the method for determining that the target ue does not satisfy the preset access condition comprises:
judging whether the used bandwidth of the server is greater than a preset bandwidth threshold value or not, and judging whether the packet loss rate between the server and the target client is greater than a preset packet loss rate threshold value or not, wherein when the used bandwidth of the server is not greater than the preset bandwidth threshold value and the packet loss rate between the server and the target client is not greater than the preset packet loss rate threshold value, the target client is judged to meet a preset access condition, and otherwise, the target client is judged not to meet the preset access condition.
5. The method according to claim 1, wherein after the step of determining a transit client according to the device management information when there is an accessed client and the target client does not satisfy the preset access condition, so that the target client establishes a communication connection with the transit client, so that the target client obtains the data of the server forwarded by the transit client, the method further comprises:
and after receiving feedback information which is sent by the transfer client and represents that the transfer client is successfully connected with the target client, adding the target client into the equipment management information.
6. A data transmission method is applied to a client, and the method comprises the following steps:
under the condition that the current client does not access the server, sending an access request to the server;
when receiving device management information sent by the server according to the access request, wherein the device management information records network information of each client accessed to the server, and one accessed client is selected from the clients accessed to the server to serve as a switching client;
sending a forwarding application to the forwarding client, wherein the forwarding application is used for applying the forwarding client to forward the data of the server to the current client;
and receiving the data of the server side forwarded by the forwarding client side under the condition that the forwarding client side passes the authentication of the forwarding application.
7. The method according to claim 6, wherein the selecting, when receiving the device management information sent by the server according to the access request, one accessed client from the clients that have accessed the server as a transit client comprises:
when receiving the device management information sent by the server according to the access request, testing packet loss rates between the server and the clients accessed to the server to obtain test packet loss rates of the clients accessed to the server;
and selecting the client with the lowest test packet loss rate as the switching client.
8. The method according to claim 6, wherein the network information of each client that has accessed the server includes a network segment to which each client that has accessed the server belongs, and when receiving the device management information sent by the server according to the access request, selecting one accessed client from the clients that have accessed the server as a transit client includes:
and when equipment management information sent by the server according to the access request is received, selecting one client which is in the same network segment with the current client from the clients accessed to the server as a switching client according to the network segment to which the current client belongs and the network segment to which the clients accessed to the server belong.
9. The method of claim 6, wherein in a case that the current client has access to the server, the method further comprises:
when receiving a forwarding application of other clients for the server, judging whether key information carried in the forwarding application passes verification;
and when the key information carried in the forwarding application passes the verification, forwarding the data received from the server to the client sending the forwarding application.
10. The method according to claim 9, wherein after the step of forwarding the data received from the server to the client sending the forwarding application when the key information carried in the forwarding application is verified, the method further comprises:
and sending feedback information indicating successful connection with the client sending the forwarding application to the server, so that the server adds the network information of the client sending the forwarding application to the equipment management information after receiving the feedback information.
11. The method according to claim 9, wherein when the key information carried in the forwarding application is verified, forwarding the data received from the server to the client that sent the forwarding application, comprises:
and when the key information carried in the forwarding application passes verification, selecting a corresponding sending mode according to the data type of the data received from the server, and forwarding the data received from the server to the client sending the forwarding application by using the selected sending mode, wherein the sending mode comprises at least two of a UDP mode, a TCP mode and a multicast mode.
12. The method according to claim 11, wherein when the key information carried in the forwarding application passes verification, selecting a corresponding sending method according to a data type of the data received from the server, and forwarding the data received from the server to the client that sent the forwarding application by using the selected sending method, comprises:
when the key information carried in the forwarding application passes verification, acquiring the data type of the data to be forwarded, which is received from the server, to obtain a target data type;
determining a priority corresponding to the target data type as a target priority, wherein the priority comprises a high priority, a medium priority and a low priority;
and forwarding the data to be forwarded to the client sending the forwarding application by using the data sending mode corresponding to the target priority, wherein the data sending mode corresponding to the high priority is a TCP mode, the data sending mode corresponding to the medium priority is a UDP mode, and the data sending mode corresponding to the low priority is a multicast mode.
13. A data transmission apparatus, applied to a server, the apparatus comprising:
the system comprises an inquiry module, a server and a service end, wherein the inquiry module is used for inquiring equipment management information when receiving an access request of a target client and judging whether the accessed client exists, the equipment management information comprises network information of each client accessed to the server, and the target client is a client which is not accessed to the server;
and the processing module is used for determining a switching client according to the equipment management information when the accessed client exists and the target client does not meet the preset access condition so as to establish communication connection between the target client and the switching client, so that the target client acquires the data of the server forwarded by the switching client.
14. A data transmission apparatus, applied to a client, the apparatus comprising:
the first sending module is used for sending an access request to the server under the condition that the current client does not access the server;
a selecting module, configured to select an accessed client from the clients that have accessed the server as a switching client when receiving device management information sent by the server according to the access request, where the network information of the clients that have accessed the server is recorded in the device management information;
the second sending module is used for sending a forwarding application to the forwarding client, wherein the forwarding application is used for applying the forwarding client to forward the data of the server to the current client;
and the receiving module is used for receiving the data of the server side forwarded by the forwarding client side under the condition that the forwarding client side passes the authentication of the forwarding application.
15. A data transmission system, the system comprising:
a server side and a client side;
the server is used for inquiring equipment management information when receiving an access request of a target client, and judging whether the client accessed to the server exists, wherein the network information of each client accessed to the server is recorded in the equipment management information, and the target client is a client which is not accessed to the server; when an accessed client exists and the target client does not meet preset access conditions, determining a switching client according to the equipment management information so as to enable the target client to establish communication connection with the switching client, and enable the target client to acquire the data of the server forwarded by the switching client;
and the client is used for sending an access request to the server under the condition that the server is not accessed, and after the server determines a switching client according to the equipment management information, the client establishes communication connection with the switching client so as to acquire the data of the server forwarded by the switching client.
CN202010238226.0A 2020-03-30 2020-03-30 Data transmission method, data transmission device and data transmission system Active CN113472827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010238226.0A CN113472827B (en) 2020-03-30 2020-03-30 Data transmission method, data transmission device and data transmission system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010238226.0A CN113472827B (en) 2020-03-30 2020-03-30 Data transmission method, data transmission device and data transmission system

Publications (2)

Publication Number Publication Date
CN113472827A true CN113472827A (en) 2021-10-01
CN113472827B CN113472827B (en) 2023-09-05

Family

ID=77865004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010238226.0A Active CN113472827B (en) 2020-03-30 2020-03-30 Data transmission method, data transmission device and data transmission system

Country Status (1)

Country Link
CN (1) CN113472827B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745437A (en) * 2022-04-28 2022-07-12 南方电网深圳数字电网研究院有限公司 Method and device for unified data access

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001195A (en) * 2006-12-19 2007-07-18 科博技术有限公司 Data transmission system and method
CN101032427A (en) * 2007-04-27 2007-09-12 周钷 Digital-signal intelligent monitoring method and application system thereof
CN102143187A (en) * 2011-04-07 2011-08-03 北京星网锐捷网络技术有限公司 Method and system for terminal equipment to access network as well as network access proxy device
WO2016011624A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Data packet sending and data processing devices and methods
CN108881963A (en) * 2018-05-30 2018-11-23 歌尔科技有限公司 Data capture method, server-side and client

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001195A (en) * 2006-12-19 2007-07-18 科博技术有限公司 Data transmission system and method
CN101032427A (en) * 2007-04-27 2007-09-12 周钷 Digital-signal intelligent monitoring method and application system thereof
CN102143187A (en) * 2011-04-07 2011-08-03 北京星网锐捷网络技术有限公司 Method and system for terminal equipment to access network as well as network access proxy device
WO2016011624A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Data packet sending and data processing devices and methods
CN108881963A (en) * 2018-05-30 2018-11-23 歌尔科技有限公司 Data capture method, server-side and client

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745437A (en) * 2022-04-28 2022-07-12 南方电网深圳数字电网研究院有限公司 Method and device for unified data access

Also Published As

Publication number Publication date
CN113472827B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
US11070970B2 (en) Apparatus and method for providing universal plug and play service based on Wi-Fi direct connection in portable terminal
KR101740549B1 (en) Methods and Apparatus for Selection of Content Delivery Network (CDN) Based on User Location
EP2487872A1 (en) Method, device and system for bandwidth control
US10506416B2 (en) Radio communication device, radio communication system, program, and radio communication method
US20120096130A1 (en) Method, apparatus and system for bandwidth control
US9294336B2 (en) Wireless communication device, router, wireless communication system, and wireless communication method
CN101227636B (en) Information sharing method
WO2006077935A1 (en) Av server
US20080261533A1 (en) Method and arrangement in a communications network
WO2016002436A1 (en) Wireless communications device, wireless communications method, and program
CN112637546B (en) Video conference system, gateway and conference control method for docking video monitoring platform
CN103634172A (en) Method, device and system for processing multi-terminal cooperation information
CN102413069A (en) Method and system for downloading in multicast way in ubiquitous network
CN105657040A (en) Inter-device intranet communication method and system
CN113472827B (en) Data transmission method, data transmission device and data transmission system
EP2916569B1 (en) User terminal apparatus and driving method
CN104519022A (en) Method and device for establishing connecting channel
US20090028110A1 (en) Seamless Establishment and Maintenance of Network Connections for Mobile Applications
EP3515121A1 (en) Device networking method, apparatus and system
CN104168302A (en) Device control realizing method, device control realizing system and proxy gateway
JP2009147428A (en) Method of switching connection to wide area/narrow area network, mobile terminal, and program
CN103152495A (en) Method, device and system for media transferring
JP3682439B2 (en) Data communication system and method, server device, client device, and program
CN113660198A (en) Self-adaptive method, management unit and system for gateway secure channel
EP1956818A1 (en) PoC SERVER AUTOMATIC-SEARCH METHOD, QUALITY ADJUSTING METHOD, AND COMMUNICATION SYSTEM USING THESE METHODS

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