CN112653627B - Data transmission method, device and system, computer equipment and computer readable storage medium - Google Patents

Data transmission method, device and system, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN112653627B
CN112653627B CN202011390613.2A CN202011390613A CN112653627B CN 112653627 B CN112653627 B CN 112653627B CN 202011390613 A CN202011390613 A CN 202011390613A CN 112653627 B CN112653627 B CN 112653627B
Authority
CN
China
Prior art keywords
long connection
server
address
connection
session
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011390613.2A
Other languages
Chinese (zh)
Other versions
CN112653627A (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.)
Shenzhen Yishi Huolala Technology Co Ltd
Original Assignee
Shenzhen Yishi Huolala 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 Shenzhen Yishi Huolala Technology Co Ltd filed Critical Shenzhen Yishi Huolala Technology Co Ltd
Priority to CN202011390613.2A priority Critical patent/CN112653627B/en
Publication of CN112653627A publication Critical patent/CN112653627A/en
Application granted granted Critical
Publication of CN112653627B publication Critical patent/CN112653627B/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/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Computer And Data Communications (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a data transmission method, a device, a system, computer equipment and a computer readable storage medium, wherein a long connection server sends service information to a registration center for management and provides functions of service access, terminal connection, message uplink and downlink, session management and the like; the routing service discovers long connection services from a registry; and provides long connection address service; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.

Description

Data transmission method, device and system, computer equipment and computer readable storage medium
Technical Field
Embodiments of the present application relate to the field of videos, and in particular, to a method, an apparatus, a system, a computer device, and a computer-readable storage medium for data transmission.
Background
In the prior art, it is often used that: push services, business services, etc. The general approach taken is: using JAVA as a technology development language; an open-source NETTY is used as a network programming framework; adopting MQTT as a transmission protocol of a terminal and a connection server; adopting ZK as a registration center for service registration and service discovery; a special routing service is adopted as a manager to coordinate the connection of the terminal setting and the long connection server; services such as pushing, chatting, business and equipment monitoring are split by adopting the field; adopting Kafka as a transmission channel of a service and long connection system; REDIS is used as the storage session information.
The inventors have found that in the prior art, the following problems are encountered: 1. the transmission overhead is reduced; the MQTT protocol belongs to small-sized transmission, and the header with a fixed length is 2 bytes, so that the network flow is greatly reduced. 2. Tolerance to unstable networks; the automatic recovery from disconnection failure can be realized, three transmission levels are provided, and an automatic retry mechanism is added to enable the message to be touched according to requirements. 3. A service offloading mechanism; the load and the service of the connection server are sensed by the routing server, so that the mobile terminal can be connected to the server with lower load or belonging to the field of the mobile terminal when requesting connection. 4. A device management mechanism; the equipment is connected with the long connection server, firstly, the equipment is authenticated and information is collected by the route through the route server, and meanwhile, what time point is connected, and what work needs to be preprocessed after connection. 5. The system provides services such as message pushing, chatting, business and equipment running state monitoring, and solves the common meeting requirements of enterprises.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, a system, a computer device and a computer-readable storage medium for data transmission, which aim to solve the problem of session message transmission on a network.
One aspect of the embodiments of the present application provides a method for data transmission, where the method includes:
registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management;
the method comprises the steps that a long connection address service is obtained from a routing server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server;
establishing a long connection session with the mobile terminal;
and establishing connection with the mobile terminal and transmitting content through the long connection session.
One aspect of the embodiments of the present application further provides a data transmission method, including:
acquiring a long connection server address on a routing server, and establishing a long connection session;
and establishing connection with the routing server through the long connection session and transmitting the content.
One aspect of the embodiments of the present application further provides a data transmission method, including:
after a long connection server is registered in a registration center, finding a long connection service and providing a long connection address service for the long connection server;
and sending the address of the long connection server to the mobile terminal so that the mobile terminal establishes a long connection session with the long connection server.
An aspect of the embodiments of the present application further provides an apparatus for data transmission, including:
a registration module for registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management;
the system comprises an acquisition module, a routing server and a connection module, wherein the acquisition module is used for acquiring a long connection address service from the routing server, and the long connection address service is used for acquiring a long connection server address on the routing server by a mobile terminal;
the establishing module is used for establishing a long connection session with the mobile terminal;
and the transfer module is used for establishing connection with the mobile terminal through the long connection session and transferring the content.
An aspect of the embodiments of the present application further provides an apparatus for data transmission, including:
the first establishing module is used for acquiring the address of the long connection server on the route server and establishing a long connection session;
and the second establishing module is used for establishing connection with the routing server through the long connection session and transmitting the content.
An aspect of the embodiments of the present application further provides an apparatus for data transmission, including:
the registration module is used for discovering the long connection service and providing the long connection address service for the long connection server after the long connection server is registered in a registration center;
and the sending module is used for sending the address of the long connection server to the mobile terminal so as to enable the mobile terminal to establish the long connection session with the long connection server.
An aspect of the embodiments of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
An aspect of an embodiment of the present application further provides a system for data transmission, where the system includes:
a long connection server for registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management; the method comprises the steps that a long connection address service is obtained from a routing server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server; establishing a long connection session with the mobile terminal; establishing connection with the mobile terminal and transmitting contents through the long connection session;
the mobile terminal is used for acquiring the address of the long connection server on the routing server and establishing a long connection session; establishing connection with the routing server and performing content transmission through the long connection session;
the routing server is used for discovering long connection service after the long connection server is registered in the registration center and providing long connection address service for the long connection server; and sending the address of the long connection server to the mobile terminal so that the mobile terminal establishes a long connection session with the long connection server.
In the data transmission method, the apparatus, the system, the computer device, and the computer-readable storage medium provided in the embodiments of the present application, the long connection server sends the service information to the registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like; the routing service discovers long connection services from the registry; and provides long connection address service; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the service system is connected with the long connection through KAFKA.
Drawings
Fig. 1 schematically illustrates an application environment diagram of a method of data transmission according to an embodiment of the present application;
fig. 2 schematically shows a flow chart of a method of data transmission according to a first embodiment of the present application;
fig. 3 schematically shows a flow chart of a method of data transmission according to a second embodiment of the present application;
fig. 4 schematically shows a flow chart of a method of data transmission according to a third embodiment of the present application;
fig. 5 schematically shows a flow chart of an apparatus for data transmission according to a fourth embodiment of the present application;
fig. 6 schematically shows a flow chart of an apparatus for data transmission according to a fifth embodiment of the present application;
fig. 7 schematically shows a flow chart of an apparatus for data transmission according to a sixth embodiment of the present application;
fig. 8 schematically shows a hardware architecture diagram of a computer device adapted to implement the method of data transmission according to a seventh embodiment of the present application;
fig. 9 schematically shows a block diagram of a system for data transmission according to an eighth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. 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.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between the embodiments may be combined with each other, but must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory to each other or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope claimed in the present application.
Fig. 1 schematically shows an environment application diagram according to an embodiment of the present application.
One end of the route server is connected with the ZK registration center, and the other end of the route server is connected with the terminal equipment.
One end of the long connection server is connected with the ZK registration center, and the other end of the long connection server is connected with the terminal equipment.
The long connection server is connected with KAFKA, and the KAFKA is connected with the service system.
The long connection server sends the service information to the ZK registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The business system is connected with the long connection through KAFKA.
Example one
Fig. 2 schematically shows a flowchart of a method for data transmission according to a first embodiment of the present application. It is to be understood that the method embodiments may be implemented in a long connection server, and the flowchart of the method embodiments is not intended to limit the order in which the steps are performed.
As shown in fig. 2, the data transmission method may include steps S200 to S206, wherein:
step S200, registering a data function with a registry, the data function comprising: service access, terminal connection, message uplink and downlink and/or session management;
step S202, a long connection address service is obtained from a route server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the route server;
step S204, establishing a long connection session with the mobile terminal;
and step S206, establishing connection with the mobile terminal through the long connection session and transmitting the content.
Specifically, the long connection server sends the service information to the ZK registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The service system is connected with the long connection through KAFKA.
There are various ways to establish a connection with the mobile terminal and perform content delivery through the long connection session, and one way is provided below.
And establishing connection with the mobile terminal through a TCP protocol, and transmitting content through an MQTT protocol.
The method further comprises the following steps:
and the business system is carried out through KAFKA.
In the data transmission method provided by the embodiment of the application, the long connection server transmits service information to the registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management and the like; the routing service discovers long connection services from the registry; and provide long connection address services; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
Example two
Fig. 3 schematically shows a flow chart of a method for data transmission according to the second embodiment of the present application. It is understood that the method embodiments may be performed in a long connection server and the flow chart of the method embodiments is not used to limit the order in which the steps are performed.
As shown in fig. 3, the data transmission method may include steps S300 to S302, wherein:
step S300, obtaining the address of the long connection server on the route server, and establishing a long connection session;
step S302, through the long connection session, establishing connection with the routing server and performing content transmission.
Specifically, the long connection server sends the service information to the ZK registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The business system is connected with the long connection through KAFKA.
In the data transmission method provided by the embodiment of the application, the long connection server transmits service information to the registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management and the like; the routing service discovers long connection services from the registry; and provides long connection address service; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
EXAMPLE III
Fig. 4 schematically shows a flowchart of a method of data transmission according to a third embodiment of the present application. It is to be understood that the method embodiments may be implemented in a routing server, and the flowchart of the method embodiments is not intended to limit the order of executing the steps.
As shown in fig. 4, the method for data transmission may include steps S400 to S402, where:
step S400, obtaining the address of the long connection server on the route server, and establishing a long connection session;
step S402, establishing connection with the routing server through the long connection session and transmitting content.
Specifically, the long connection server sends the service information to the ZK registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The business system is connected with the long connection through KAFKA.
In the data transmission method provided by the embodiment of the application, the long connection server transmits service information to the registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management and the like; the routing service discovers long connection services from the registry; and provide long connection address services; the terminal equipment acquires a long connection server address on a routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
Example four
Fig. 5 schematically shows a flow chart of an apparatus for data transmission according to the fourth embodiment of the present application. The data transmission apparatus system may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 5, the apparatus 500 for data transmission may include a registration module 510, an acquisition module 520, a setup module 530, and a delivery module 540, wherein:
a registration module 510 for registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management;
an obtaining module 520, configured to obtain a long connection address service from a routing server, where the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server;
an establishing module 530, configured to establish a long connection session with a mobile terminal;
a transferring module 540, configured to establish a connection with the mobile terminal through the long connection session and perform content transfer.
Specifically, the long connection server delivers the service information to the ZK registry for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
And the terminal equipment acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The service system is connected with the long connection through KAFKA.
According to the data transmission device provided by the embodiment of the application, the long connection server sends service information to the registration center for management, and functions of service access, terminal connection, message uplink and downlink, session management and the like are provided; the routing service discovers long connection services from the registry; and provide long connection address services; the terminal equipment acquires a long connection server address on a routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
EXAMPLE five
Fig. 6 schematically shows a flowchart of an apparatus for data transmission according to a fifth embodiment of the present application. The data transmission apparatus system may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of each program module in the embodiments.
As shown in fig. 6, the apparatus 600 for data transmission may include a first establishing module 610 and a second establishing module 620, where:
a first establishing module 610, configured to obtain an address of a long connection server on a routing server, and establish a long connection session;
a second establishing module 620, configured to establish a connection with the routing server through the long connection session and perform content delivery.
Specifically, the long connection server sends the service information to the ZK registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol.
The business system is connected with the long connection through KAFKA.
According to the data transmission device provided by the embodiment of the application, the long connection server sends service information to the registration center for management, and functions of service access, terminal connection, message uplink and downlink, session management and the like are provided; the routing service discovers long connection services from the registry; and provide long connection address services; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
Example six
Fig. 7 schematically shows a flowchart of an apparatus for data transmission according to a sixth embodiment of the present application. The data transmission apparatus system may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of each program module in the embodiments.
As shown in fig. 7, the apparatus 700 for data transmission may include a registration module 710 and a sending module 720, wherein:
a registration module 710, configured to discover a long connection service and provide a long connection address service to a long connection server after the long connection server registers in a registry;
a sending module 720, configured to send a long connection server address to a mobile terminal, so that the mobile terminal establishes a long connection session with the long connection server.
Specifically, the long connection server delivers the service information to the ZK registry for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content transmission is carried out through an MQTT protocol.
The service system is connected with the long connection through KAFKA.
According to the data transmission device provided by the embodiment of the application, the long connection server sends service information to the registration center for management, and functions of service access, terminal connection, message uplink and downlink, session management and the like are provided; the routing service discovers long connection services from the registry; and provides long connection address service; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the business system is connected with the long connection through KAFKA.
EXAMPLE seven
Fig. 8 schematically shows a hardware architecture diagram of a computer device suitable for implementing the method for data transmission according to a seventh embodiment of the present application.
In this embodiment, the computer device 800 may be used as a provider network or a component part of a provider network, and the computer device 800 may be, for example, a virtual machine host process and one or more virtual machine instances, or a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of multiple servers), and the like
In this embodiment, the computer device 800 may also be used as a mobile terminal or as a component part of a mobile terminal. When the computer device 800 is a mobile terminal or forms part of a mobile terminal, the computer device 800 may be, for example, a smart phone, a computer, a projector, a set-top box, etc.
In this embodiment, the computer device 800 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. As shown in fig. 8, computer device 800 includes at least, but is not limited to: the memory 810, processor 820, and network interface 830 may be communicatively coupled to each other by a system bus.
Wherein:
the memory 810 includes at least one type of computer-readable storage medium including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 810 may be an internal storage module of the computer device 800, such as a hard disk or a memory of the computer device 800. In other embodiments, the memory 810 may also be an external storage device of the computer device 800, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 800. Of course, memory 810 may also include both internal and external memory modules of computer device 800. In this embodiment, the memory 810 is generally used for storing an operating system installed in the computer apparatus 800 and various types of application software, such as program codes of a method for data transmission, and the like. In addition, the memory 810 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 820 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 820 generally operates to control overall operation of the computer device 800, such as performing control and processing related to data or communication with the computer device 800. In this embodiment, processor 820 is used to execute program codes stored in memory 810 or process data.
The network interface 830 may include a wireless network interface or a wired network interface, and the network interface 830 is typically used to establish communication links between the computer device 800 and other computer devices. For example, the network interface 830 is used to connect the computer apparatus 800 with an external terminal through a network, establish a data transmission channel and a communication connection between the computer apparatus 800 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), or Wi-Fi.
It is noted that fig. 8 only shows a computer device having components 810-830, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the method for data transmission stored in the memory 810 can be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 820) to complete the present application.
Example eight
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of data transmission in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer-readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk provided on the computer device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the computer-readable storage medium may also include both internal and external storage units of the computer device. In the present embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program codes of the data transmission method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
Example nine
Fig. 9 schematically shows a block diagram of a system for data transmission according to an eighth embodiment of the present application. The system comprises:
a long connection server 910 configured to register data functions with a registry, the data functions including: service access, terminal connection, message uplink and downlink and/or session management; the method comprises the steps that a long connection address service is obtained from a routing server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server; establishing a long connection session with the mobile terminal; establishing connection with the mobile terminal and transmitting contents through the long connection session;
the mobile terminal 920 is configured to obtain a long connection server address on the routing server, and establish a long connection session; establishing connection with the routing server and performing content transmission through the long connection session;
a routing server 930 configured to discover a long connection service and provide a long connection address service to a long connection server after the long connection server is registered in a registry; and sending the address of the long connection server to the mobile terminal so that the mobile terminal establishes a long connection session with the long connection server.
Specifically, the long connection server delivers the service information to the ZK registry for management, and provides functions of service access, terminal connection, message uplink and downlink, session management, and the like.
The routing service discovers long connection services from the ZK registry and provides long connection address services.
The terminal device acquires the address of the long connection server on the routing server through the SDK and establishes a session with the long connection.
The long connection and the terminal equipment establish connection through a TCP protocol, and content transmission is carried out through an MQTT protocol.
The service system is connected with the long connection through KAFKA.
In the data transmission system provided by the embodiment of the application, the long connection server sends service information to the registration center for management, and provides functions of service access, terminal connection, message uplink and downlink, session management and the like; the routing service discovers long connection services from the registry; and provide long connection address services; the terminal equipment acquires the address of the long connection server on the routing server through the SDK; and establish a session with the long connection; the long connection and the terminal equipment establish connection through a TCP protocol, and content is transmitted through an MQTT protocol; the service system is connected with the long connection through KAFKA.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all the equivalent structures or equivalent processes that can be directly or indirectly applied to other related technical fields by using the contents of the specification and the drawings of the present application are also included in the scope of the present application.

Claims (11)

1. A method for data transmission, applied to a long connection server, the method comprising:
registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management;
the method comprises the steps that a long connection address service is obtained from a routing server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server; after the long connection server is registered in a registration center, the routing server discovers a long connection service and provides a long connection address service for the long connection server;
establishing a long connection session with the mobile terminal;
and establishing connection with the mobile terminal through the long connection session and transmitting content through an MQTT protocol.
2. The method according to claim 1, wherein the establishing a connection with the mobile terminal and performing content delivery via the long connection session comprises:
and establishing connection with the mobile terminal through a TCP protocol, and transmitting content through an MQTT protocol.
3. The method of claim 1, further comprising:
and the business system is carried out through KAFKA.
4. A method for data transmission, which is applied to a mobile terminal, the method comprising:
acquiring a long connection server address on a routing server, and establishing a long connection session; wherein, the long connection server address is obtained by the data transmission method according to claim 1;
and establishing connection with the routing server through the long connection session and transmitting the content.
5. A method for data transmission, applied to a routing server, the method comprising:
after a long connection server is registered in a registration center, finding a long connection service and providing a long connection address service for the long connection server;
sending a long connection server address to a mobile terminal so that the mobile terminal establishes a long connection session with the long connection server; wherein the method of data transmission according to claim 1 is used to establish a long connection session.
6. An apparatus for data transmission, the apparatus comprising:
a registration module for registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management;
the system comprises an acquisition module, a routing server and a connection module, wherein the acquisition module is used for acquiring a long connection address service from the routing server, and the long connection address service is used for acquiring a long connection server address on the routing server by a mobile terminal; the routing server discovers a long connection service after the long connection server is registered in a registration center, and provides a long connection address service for the long connection server;
the establishing module is used for establishing a long connection session with the mobile terminal;
and the transmission module is used for establishing connection with the mobile terminal through the long connection session and transmitting content through an MQTT protocol.
7. An apparatus for data transmission, the apparatus comprising:
the first establishing module is used for acquiring the address of the long connection server on the route server and establishing a long connection session; wherein the long connection server address is obtained using the apparatus for data transmission of claim 6;
and the second establishing module is used for establishing connection with the routing server through the long connection session and transmitting the content.
8. An apparatus for data transmission, the apparatus comprising:
the registration module is used for discovering the long connection service and providing the long connection address service for the long connection server after the long connection server is registered in a registration center;
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a long connection server address to a mobile terminal so as to enable the mobile terminal to establish a long connection session with the long connection server; wherein the means for data transmission according to claim 6 is adapted to establish a long connection session.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program, the computer program being executable by at least one processor to cause the at least one processor to perform the steps of the method according to any one of claims 1 to 5.
11. A system for data transmission, the system comprising:
a long connection server for registering data functions with a registry, the data functions comprising: service access, terminal connection, message uplink and downlink and/or session management; the method comprises the steps that a long connection address service is obtained from a routing server, and the long connection address service is used for a mobile terminal to obtain a long connection server address on the routing server; establishing a long connection session with the mobile terminal; establishing connection with the mobile terminal through the long connection session and transmitting contents through an MQTT protocol;
the mobile terminal is used for acquiring the address of the long connection server on the routing server and establishing a long connection session; establishing connection with the routing server and performing content transmission through the long connection session;
the routing server is used for discovering long connection service after the long connection server is registered in the registration center and providing long connection address service for the long connection server; and sending the address of the long connection server to the mobile terminal so that the mobile terminal establishes a long connection session with the long connection server.
CN202011390613.2A 2020-12-02 2020-12-02 Data transmission method, device and system, computer equipment and computer readable storage medium Active CN112653627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011390613.2A CN112653627B (en) 2020-12-02 2020-12-02 Data transmission method, device and system, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011390613.2A CN112653627B (en) 2020-12-02 2020-12-02 Data transmission method, device and system, computer equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112653627A CN112653627A (en) 2021-04-13
CN112653627B true CN112653627B (en) 2022-11-04

Family

ID=75350907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011390613.2A Active CN112653627B (en) 2020-12-02 2020-12-02 Data transmission method, device and system, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112653627B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796387A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Communication method and device of long connection of network
CN106357818A (en) * 2016-10-28 2017-01-25 努比亚技术有限公司 Message forwarding method and message forwarding device
CN107888551A (en) * 2016-09-30 2018-04-06 北京神州泰岳软件股份有限公司 A kind of remote service calling method, device and system
CN109327503A (en) * 2018-08-27 2019-02-12 珠海格力电器股份有限公司 Information management system and method, service router
CN111800466A (en) * 2020-06-03 2020-10-20 香港乐蜜有限公司 Method and device for establishing long connection service, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636483A (en) * 2019-09-16 2019-12-31 珠海格力电器股份有限公司 Network distribution method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796387A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Communication method and device of long connection of network
CN107888551A (en) * 2016-09-30 2018-04-06 北京神州泰岳软件股份有限公司 A kind of remote service calling method, device and system
CN106357818A (en) * 2016-10-28 2017-01-25 努比亚技术有限公司 Message forwarding method and message forwarding device
CN109327503A (en) * 2018-08-27 2019-02-12 珠海格力电器股份有限公司 Information management system and method, service router
CN111800466A (en) * 2020-06-03 2020-10-20 香港乐蜜有限公司 Method and device for establishing long connection service, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112653627A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN110808948B (en) Remote procedure calling method, device and system
CN111324363A (en) Equipment upgrading method, upgrading terminal, equipment and storage medium
CN111756674A (en) Network communication method, system, device and computer readable storage medium
US20180048715A1 (en) Information transmitting method and apparatus in robot operating system
CN110109766B (en) Data interaction method and device based on cross-department and cross-platform data sharing exchange
CN111490947A (en) Data packet transmitting method, data packet receiving method, system, device and medium
CN114124929A (en) Cross-network data processing method and device
CN102594886B (en) Method and device for direct communication between browsers, and communication system
CN111405059B (en) Cloud device data transmission method, electronic device and Internet of things system
CN114815782A (en) Remote diagnosis method, apparatus, device and medium
CN113726581B (en) Method and device for restoring factory configuration of network equipment and network equipment
CN113873057A (en) Data processing method and device
CN112653627B (en) Data transmission method, device and system, computer equipment and computer readable storage medium
CN111200519B (en) Data processing method and device, BBU, access network equipment and storage medium
CN113746851B (en) Proxy system and method supporting real-time analysis of GRPC request
CN115914319A (en) Remote management method and system for virtual reality equipment
CN112039801B (en) Method, system and proxy server for setting IP information
CN111124445B (en) Home gateway upgrading method and home gateway
CN112383617A (en) Method, device, terminal equipment and medium for long connection
CN113810900A (en) Network access method, electronic device and storage medium
WO2024038561A1 (en) Network information processing device, network information processing method, and program
US11606274B1 (en) Method for operations of virtual machines in monitoring cloud activities, system, and device applying the method
CN104270444A (en) Method capable of being used for configuring mobile phone application menu
CN116156497B (en) Gateway authentication method, device and storage medium
US12041688B2 (en) Screen projection method and system

Legal Events

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