CN110557272B - Data stream transmission method and device, computer readable storage medium and server - Google Patents

Data stream transmission method and device, computer readable storage medium and server Download PDF

Info

Publication number
CN110557272B
CN110557272B CN201810564269.0A CN201810564269A CN110557272B CN 110557272 B CN110557272 B CN 110557272B CN 201810564269 A CN201810564269 A CN 201810564269A CN 110557272 B CN110557272 B CN 110557272B
Authority
CN
China
Prior art keywords
stream
server
data
connection
forwarding server
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
CN201810564269.0A
Other languages
Chinese (zh)
Other versions
CN110557272A (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 CN201810564269.0A priority Critical patent/CN110557272B/en
Publication of CN110557272A publication Critical patent/CN110557272A/en
Application granted granted Critical
Publication of CN110557272B publication Critical patent/CN110557272B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • 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/60Network streaming of media packets
    • H04L65/75Media network packet handling

Abstract

The application provides a data stream transmission method, a data stream transmission device, a computer readable storage medium and a server. The method comprises the following steps: when the data stream is sent to the stream forwarding server through the connection between the local server and the stream forwarding server, if the connection is detected to be abnormal, the local server is controlled to stop sending the data stream to the stream forwarding server through the connection; wherein the connection is established with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server. Therefore, the streaming possibility of the streaming forwarding server after restarting can be reduced.

Description

Data stream transmission method and device, computer readable storage medium and server
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data stream transmission method, an apparatus, a computer-readable storage medium, and a server.
Background
With the popularization of the internet and the rapid development of electronic devices, the streaming media technology becomes an indispensable part in the life of people, and for example, various internet music websites, online movie theaters, monitoring systems and the like are all an application of the streaming media technology.
The streaming media technology mainly transmits video and audio data to a client in a streaming mode so as to be played by the client. When the client plays video, audio and the like, the client firstly sends an acquisition request to the stream forwarding server, and the stream forwarding server sends the data stream acquired from the data source to the client. When the stream forwarding server acquires data from the data source, the IP address and the random port number of the stream forwarder are sent to the data source, and the stream forwarding server ensures that the IP address and the random port number which are sent to different data sources are unique according to the distributed records. However, when the stream forwarding server is restarted due to an inefficacy (e.g., crash, power outage, forced shutdown, etc.), the locally stored information of the already allocated IP address and port number pair is lost, which may cause the stream forwarding server to send the same IP address and random port number pair to the data source as before the restart, thereby causing multiple data sources to send data to the same IP address and random port number, and causing streaming.
Disclosure of Invention
In view of this, the present application provides a data stream transmission method, apparatus, computer readable storage medium and server, which can reduce the possibility of streaming occurring after the stream forwarding server is restarted.
Specifically, the method is realized through the following technical scheme:
in a first aspect, an embodiment of the present invention provides a data stream transmission method. The method is applied to a data source server and comprises the following steps:
when the data stream is sent to the stream forwarding server through the connection between the local server and the stream forwarding server, if the connection is detected to be abnormal, the local server is controlled to stop sending the data stream to the stream forwarding server through the connection;
wherein the connection is established with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
In an optional implementation, after the detecting that the connection is abnormal and before the controlling local server stops sending the data stream to the stream forwarding server through the connection, the method further includes:
establishing connection with the flow forwarding server again according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to execute control to control the server to stop sending the data stream to the stream forwarding server through the connection.
In another optional implementation, the controlling the local server to stop sending the data stream to the stream forwarding server through the connection includes:
sending a connection abnormal message to a scheduling server for scheduling the data source server;
receiving a data flow stop sending instruction returned by the scheduling server according to the connection abnormal message;
and stopping sending the data stream to the stream forwarding server through the connection according to the data stream stop sending instruction.
In another optional implementation, the connection exception is:
and when the failure times of sending the data stream to the stream forwarding server through the connection reach a set value.
In another optional implementation, the method further comprises:
receiving a data stream request from the stream forwarding server, wherein the data stream request carries an IP address of the stream forwarding server and a data stream port number of a data stream received by the stream forwarding server;
and establishing connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server carried by the data flow request, and sending the data flow to the flow forwarding server through the connection.
In a second aspect, an embodiment of the present invention provides a data stream transmission apparatus. The device comprises:
the control unit is used for controlling the server to stop sending the data stream to the stream forwarding server through the connection if the connection is detected to be abnormal when the data stream is sent to the stream forwarding server through the connection between the control unit and the stream forwarding server;
wherein the connection is established with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
In one optional implementation, further comprising:
a reconnection unit, configured to establish connection with the stream forwarding server again according to the IP address of the stream forwarding server and the data stream port number of the stream forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to execute control of the server to stop sending the data stream to the stream forwarding server through the connection.
In another optional implementation, the control unit is specifically configured to:
sending a connection abnormal message to a scheduling server for scheduling the data source server;
receiving a data flow stop sending instruction returned by the scheduling server according to the abnormal connection message;
and stopping sending the data stream to the stream forwarding server through the connection according to the data stream stop sending instruction.
In another optional implementation, the connection exception is:
and the failure frequency of sending the data stream to the stream forwarding server through the connection reaches a set value.
In another optional implementation, the apparatus further comprises:
a receiving unit, configured to receive a data stream request from the stream forwarding server, where the data stream request carries an IP address of the stream forwarding server and a data stream port number of a data stream received by the stream forwarding server;
and the establishing unit is used for establishing connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server carried by the data flow request, and sending the data flow to the flow forwarding server through the connection.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement the method in the foregoing first aspect and optional implementations thereof.
In a fourth aspect, an embodiment of the present invention provides a data source server, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
when the data stream is sent to the stream forwarding server through the connection between the local server and the stream forwarding server, if the connection is detected to be abnormal, the local server is controlled to stop sending the data stream to the stream forwarding server through the connection;
wherein the connection is established with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
According to the embodiment of the invention, when the data source server determines that the stream forwarding server fails, the data source server reports the error information and stops sending the data stream to the stream forwarding server, so that all data stream transmission is stopped when the stream forwarding server fails, and after the stream forwarding server is restarted, the data stream transmission is restarted, thereby reducing the possibility of streaming.
Drawings
Fig. 1 is a schematic structural diagram of a data stream transmission system according to an embodiment of the present invention;
fig. 2 is a schematic signaling interaction diagram of a data stream transmission method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data stream transmission apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data source server according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
Embodiments of the present invention are further described below with reference to the accompanying drawings.
The data stream transmission method provided by the embodiment of the invention is suitable for a data stream transmission system. As shown in fig. 1, fig. 1 is a data stream transmission system according to an embodiment of the present invention, and the system includes a terminal 10, a stream forwarding server 20, and a data source server 30. Among them, the terminal 10 and the data source server 30 are connected to the stream forwarding server 20. The terminal 10 is primarily for interacting with a user, for example, the terminal 10 may be a cellular phone, the terminal 10 may receive user input or triggered instructions, respond to the instructions, and display information to the user, etc., wherein displaying information to the user may include playing video or audio for the user to view. The terminal 10 may also communicate with the stream forwarding server 20, for example, the terminal 10 may transmit a data request to the stream forwarding server to request a data stream, and receive and display the data stream transmitted by the stream forwarding server. The stream forwarding server 20 is mainly configured to request a data stream from the data source server 30 and send the data stream to the corresponding terminal 10, where the stream forwarding server 20 may also send a data stream received from the same data source server 30 to different terminals 10 at the same time. The data source server 30 is mainly used for providing data sources of data streams, the same data source server may provide only one data source, the stream forwarding server may request data streams from different data source servers according to the requirements of the terminal, and after receiving a data request sent by the stream forwarding server 20, the data source server 30 may establish a connection with the stream forwarding server and send a data stream to the stream forwarding server 20 through the connection. In the embodiment of the present invention, when the data source server 30 transmits a data stream to the stream forwarding server 20 through a connection with the stream forwarding server, if a connection abnormality is detected, the data source server controls the local server to stop transmitting the data stream to the stream forwarding server 20 through the connection. The connection between the stream forwarding server 20 and the data source server 30 is established by the data source server 30 according to the IP address of the stream forwarding server and the data stream port number of the stream forwarding server.
In another embodiment, as shown in fig. 1, the system may further include a scheduling server 40, where the scheduling server 40 is configured to manage the data source server 30, the stream forwarding server 20 may send a data stream request to the scheduling server 40 when acquiring a data source from the data source server 30, where the data stream request may include an IP address of the stream forwarding server 20 and a data stream port number of the stream forwarding server 20, and the scheduling server 40 may send the IP address and the data stream port number of the stream forwarding server to the data source server 30, so that the data source server 30 establishes a connection with the stream forwarding server 20 according to the IP address and the data stream port number of the stream forwarding server, and sends a data stream through the connection. The scheduling server 40 may also send a data stream stop transmission instruction to the data source server 30, and the data source server 30 stops transmitting the data stream through its connection with the stream forwarding server after receiving the data stream stop transmission instruction sent by the scheduling server 40.
Fig. 2 is a schematic signaling interaction diagram of a data stream transmission method according to an embodiment of the present invention. The method is applicable to a data streaming system, such as the data streaming system shown in fig. 1. As shown in fig. 2, the method specifically includes:
s210, connection is established between the data source server and the stream forwarding server.
The connection is established between the data source server and the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server. The obtaining manner of the IP address of the stream forwarding server and the data stream port number of the stream forwarding server may include multiple manners.
In one example, when the data streaming system is operating normally, the terminal starts a data streaming service, and sends a data streaming request to the streaming forwarding server, where the data streaming request is used to request the streaming forwarding server to send the data streaming to the terminal. After receiving the data flow request, the flow forwarding server generates a random data flow port number according to the terminal, and sends the data flow request to the data source server, wherein the data flow request comprises an IP address of the flow forwarding server and the data flow port number of the flow forwarding server. And the data source server establishes connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
In another example, when the data streaming system is operating normally, the terminal starts a data streaming service, and sends a data streaming request to the streaming forwarding server, where the data streaming request is used to request the streaming forwarding server to send the data streaming to the terminal. After receiving the data flow request, the flow forwarding server generates a random data flow port number according to the terminal, and sends the data flow request to the scheduling server, wherein the data flow request comprises an IP address of the flow forwarding server and the data flow port number of the flow forwarding server. After receiving a data stream request sent by a stream forwarding server, a scheduling server sends an IP address of the stream forwarding server and a data stream port number of the stream forwarding server to a data source server corresponding to the data stream. And the data source server establishes connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
S220, when the data source server sends the data stream to the stream forwarding server through the connection between the data source server and the stream forwarding server, if the connection abnormity is detected, the data source server is controlled to stop sending the data stream to the stream forwarding server through the connection.
In another specific implementation, the data source server detects that the connection between the data source server and the flow forwarding server is abnormal in a plurality of ways.
In one example, the data source server fails to transmit the data stream to the stream forwarding server over the connection.
In another example, the data source server reaches a set value by the number of data stream transmission failures to the stream forwarding server through the connection. The set value can be determined according to actual needs.
In another example, the data source server may periodically send heartbeat detection messages to the stream forwarding server without receiving a response to the heartbeat detection messages.
In addition, after the connection abnormality is detected, a reconnection mechanism may be started, and when reconnection fails, the local server is controlled to stop sending the data stream to the stream forwarding server through the connection.
Specifically, the reconnecting mechanism may include the steps of:
the data source server establishes connection with the flow forwarding server again according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to control the server to stop sending the data stream to the stream forwarding server through the connection. The set value can be determined according to actual needs.
In a specific implementation, the manner for controlling the local server to stop sending the data stream to the stream forwarding server through the connection may include multiple manners.
In one example, the data source server may directly stop sending data streams to the stream forwarding server over the connection.
In another example, the data source server may send a connection exception message to a scheduling server that schedules the present data source server. And after receiving the connection abnormal message sent by the data source server, the scheduling server sends a data stream stop sending instruction to the data source server. The data source server receives a data flow stop sending instruction returned by the scheduling server according to the connection abnormal message; and stopping transmitting the data stream to the stream transmitting server through the connection according to the indication.
In another example, the data source server may directly stop sending data streams to the stream forwarding server over the connection and send a connection exception message to the scheduling server.
After the data source server stops sending the data stream to the stream forwarding server through the connection, the context corresponding to the connection can be further deleted at the server.
Due to the abnormal connection between the flow forwarding server and the data source server, which may be due to the restart of the flow forwarding server due to the inflexibility, at this time, the flow forwarding server stops sending the data flow to the terminal. After the stream forwarding server is restarted successfully, the stream forwarding server starts a new round of service, and the data source server stops sending the data stream to the stream forwarding server, so that the data stream before the stream forwarding server is restarted is completely stopped from being sent, and the data stream after the restart cannot be interfered. If the terminal wants to continue to acquire the data stream service, the terminal needs to send a data stream request to the stream forwarding server again.
And S230, establishing connection between the data source server and the stream forwarding server, and sending the data stream to the stream forwarding server through the connection. The stream forwarding server is generally random when allocating the data stream port number, so that the data stream port number allocated to the data source server after the stream forwarding server is restarted can be the same as that allocated before the restart, and at this time, the IP address and the data stream port number pair according to which the connection established in S230 and S210 is based are the same; the number of the data stream port allocated to the data source server after the stream forwarding server is restarted may be different from that allocated before the restart, and at this time, the IP address and the number of the data stream port, which are used for the connection established in S230 and S210, are different.
In one example, after the stream forwarding server is restarted successfully, and a data stream acquisition request sent by a terminal is received, a random data stream port number is determined according to the terminal. And the stream forwarding server sends the IP address of the stream forwarding server and the data stream port number of the stream forwarding server to the data source server. The data source server receives a data stream request from the stream forwarding server, wherein the data stream request carries an IP address of the stream forwarding server and a data stream port number of the stream forwarding server; and establishing connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server, and sending the data flow to the flow forwarding server through the connection.
In another example, after the stream forwarding server is restarted successfully, and a data stream acquisition request sent by a terminal is received, a random data stream port number is determined according to the terminal. The flow forwarding server sends a data flow obtaining request to the scheduling server, wherein the data flow obtaining request carries the IP address of the flow forwarding server and the data flow port number of the flow forwarding server. And the scheduling server sends the IP address of the flow forwarding server and the data flow port number of the flow forwarding server carried by the data flow acquisition request from the flow forwarding server to the data source server. The data source server receives an IP address of a stream forwarding server from a scheduling server and a data stream port number of the stream forwarding server; and establishing connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server, and sending the data flow to the flow forwarding server through the connection.
According to the embodiment of the invention, when the data source server determines that the stream forwarding server fails, the data source server reports the error information and stops sending the data stream to the stream forwarding server, so that all data stream transmission is stopped when the stream forwarding server fails, and after the stream forwarding server is restarted, the data stream transmission is restarted, thereby reducing the possibility of streaming.
Corresponding to the foregoing embodiments of the data stream transmission method, the present application also provides embodiments of a data stream transmission apparatus.
Fig. 3 is a schematic structural diagram of a data stream transmission apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes:
a control unit 301, configured to, when sending the data stream to a stream forwarding server through a connection with the stream forwarding server, if the connection is detected to be abnormal, control the server to stop sending the data stream to the stream forwarding server through the connection;
wherein the connection is established with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server.
In another embodiment, the apparatus further comprises:
a reconnection unit 302, configured to reestablish a connection with the stream forwarding server according to the IP address of the stream forwarding server and the data stream port number of the stream forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to execute control of the server to stop sending the data stream to the stream forwarding server through the connection.
In a specific implementation, the control unit 301 is specifically configured to:
sending a connection abnormal message to a scheduling server for scheduling the data source server;
receiving a data flow stop sending instruction returned by the scheduling server according to the connection abnormal message;
and stopping sending the data stream to the stream forwarding server through the connection according to the data stream stop sending instruction.
Wherein the connection anomaly is: and the failure frequency of sending the data stream to the stream forwarding server through the connection reaches a set value.
In another embodiment, the apparatus further comprises:
a receiving unit 303, configured to receive a data stream request from the stream forwarding server, where the data stream request carries an IP address of the stream forwarding server and a data stream port number of a data stream received by the stream forwarding server;
an establishing unit 304, configured to establish a connection with the flow forwarding server according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server that are carried in the data flow request.
A sending unit 305, configured to send the data stream to the stream forwarding server through the connection.
The embodiment of the data stream transmission device can be applied to a data source server. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a device in a logical sense, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the data source server where the device is located. From a hardware aspect, as shown in fig. 4, the present application is a hardware structure diagram of a data source server where a data stream transmission device is located, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the data source server where the device is located in the embodiment may also include other hardware according to the actual function of the data source server, which is not described again.
Fig. 4 is a schematic structural diagram of a data source server according to an embodiment of the present invention, and as shown in fig. 4, the data source server specifically includes a memory 401, a processor 402, a transceiver 403, and a computer program stored in the memory and capable of running on the processor. The processor 402, when executing the program, implements the steps performed by the data origin server in the embodiment illustrated in fig. 2 described above.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement without inventive effort.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on a tangible, non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to suitable receiver apparatus for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Computers suitable for executing computer programs include, for example, general and/or special purpose microprocessors, or any other type of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and/or a random access memory. The essential components of a computer include a central processing unit for implementing or executing instructions, and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer does not necessarily have such a device. Moreover, a computer may be embedded in another device, e.g., a mobile telephone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., an internal hard disk or a removable disk), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. In another aspect, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Further, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A data stream transmission method is applied to a data source server and comprises the following steps:
when the data stream is sent to the stream forwarding server through the connection between the data source server and the stream forwarding server, if the connection is detected to be abnormal, the data source server is controlled to stop sending the data stream to the stream forwarding server through the connection; the connection is established by the data source server according to a first data stream request sent by the stream forwarding server to the data source server, wherein the first data stream request carries an IP address and a data stream port number allocated by the stream forwarding server to the data source server; the connection exception is caused by a restart of the flow forwarding server;
receiving a second data stream request sent by the stream forwarding server after restarting, wherein the second data stream request carries an IP address and a data stream port number which are reallocated for the data source server by the stream forwarding server;
and reestablishing connection with the stream forwarding server according to the second data stream request, and continuously sending the data stream to the stream forwarding server through the reestablished connection.
2. The method according to claim 1, wherein after the detecting of the connection anomaly and before controlling the current data source server to stop sending the data stream to the stream forwarding server through the connection, further comprising:
establishing connection with the flow forwarding server again according to the IP address of the flow forwarding server and the data flow port number of the flow forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to execute control to the data source server to stop sending the data stream to the stream forwarding server through the connection.
3. The method according to claim 1 or 2, wherein the controlling the local data source server to stop sending the data stream to the stream forwarding server through the connection comprises:
sending a connection abnormal message to a scheduling server for scheduling the data source server;
receiving a data flow stop sending instruction returned by the scheduling server according to the connection abnormal message;
and stopping sending the data stream to the stream forwarding server through the connection according to the data stream stop sending instruction.
4. The method of claim 1, wherein the connectivity anomaly is:
and when the number of times of failure of sending the data stream to the stream forwarding server through the connection reaches a set value.
5. A data stream transmission apparatus, wherein the apparatus is applied to a data source server, the apparatus comprises:
the control unit is used for controlling the data source server to stop sending the data stream to the stream forwarding server through the connection if the connection is detected to be abnormal when the data stream is sent to the stream forwarding server through the connection between the control unit and the stream forwarding server; the connection is established by the data source server according to a first data stream request sent by the stream forwarding server to the data source server, wherein the first data stream request carries an IP address and a data stream port number which are allocated to the data source server by the stream forwarding server; the connection exception is caused by a restart of the flow forwarding server;
a receiving unit, configured to receive a second data stream request sent by the stream forwarding server after being restarted, where the second data stream request carries an IP address and a data stream port number that are reallocated by the stream forwarding server for the data source server;
and the establishing unit is used for reestablishing the connection with the stream forwarding server according to the second data stream request and continuously sending the data stream to the stream forwarding server through the reestablished connection.
6. The apparatus of claim 5, further comprising:
a reconnection unit, configured to establish connection with the stream forwarding server again according to the IP address of the stream forwarding server and the data stream port number of the stream forwarding server;
and if the connection is failed to be reestablished and the failure times reach a set value, continuing to control the data source server to stop sending the data stream to the stream forwarding server through the connection.
7. The device according to claim 5 or 6, wherein the control unit is specifically configured to:
sending a connection abnormal message to a scheduling server for scheduling the data source server;
receiving a data flow stop sending instruction returned by the scheduling server according to the connection abnormal message;
and stopping sending the data stream to the stream forwarding server through the connection according to the data stream stop sending instruction.
8. The apparatus of claim 5, wherein the connection anomaly is:
and the failure frequency of sending the data stream to the stream forwarding server through the connection reaches a set value.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
10. A data source server comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of:
when a data stream is sent to a stream forwarding server through connection between the data source server and the stream forwarding server, if the connection is detected to be abnormal, controlling the data source server to stop sending the data stream to the stream forwarding server through the connection; the connection is established by the data source server according to a first data stream request sent by the stream forwarding server to the data source server, wherein the first data stream request carries an IP address and a data stream port number which are allocated to the data source server by the stream forwarding server; the connection exception is caused by a restart of the flow forwarding server;
receiving a second data stream request sent by the stream forwarding server after restarting, wherein the second data stream request carries an IP address and a data stream port number which are reallocated for the data source server by the stream forwarding server;
and reestablishing connection with the stream forwarding server according to the second data stream request, and continuously sending the data stream to the stream forwarding server through the reestablished connection.
CN201810564269.0A 2018-06-04 2018-06-04 Data stream transmission method and device, computer readable storage medium and server Active CN110557272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810564269.0A CN110557272B (en) 2018-06-04 2018-06-04 Data stream transmission method and device, computer readable storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810564269.0A CN110557272B (en) 2018-06-04 2018-06-04 Data stream transmission method and device, computer readable storage medium and server

Publications (2)

Publication Number Publication Date
CN110557272A CN110557272A (en) 2019-12-10
CN110557272B true CN110557272B (en) 2022-11-25

Family

ID=68735919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810564269.0A Active CN110557272B (en) 2018-06-04 2018-06-04 Data stream transmission method and device, computer readable storage medium and server

Country Status (1)

Country Link
CN (1) CN110557272B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917078A (en) * 2011-08-01 2013-02-06 华为软件技术有限公司 Streaming media resource providing method, streaming media resource acquiring method, signal server and terminal device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7644172B2 (en) * 2002-06-24 2010-01-05 Microsoft Corporation Communicating via a connection between a streaming server and a client without breaking the connection
CN100420184C (en) * 2004-11-26 2008-09-17 腾讯科技(深圳)有限公司 Method and system for realizing network station encoder re-linking streaming media server
CN104581219B (en) * 2014-12-22 2018-01-23 浙江工业大学 A kind of control method of Streaming Media forwarding server
CN107332726B (en) * 2016-04-29 2021-03-30 华为技术有限公司 Communication link detection method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917078A (en) * 2011-08-01 2013-02-06 华为软件技术有限公司 Streaming media resource providing method, streaming media resource acquiring method, signal server and terminal device

Also Published As

Publication number Publication date
CN110557272A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
US10789044B2 (en) End-to-end user experiences with a digital assistant
US11016748B2 (en) Revision locking
US9544396B2 (en) Remote application installation and control for a mobile device
US9706371B2 (en) Push notification middleware
US9706002B2 (en) Push notification via file sharing service synchronization
US20160164810A1 (en) Multi-endpoint actionable notifications
US9853929B2 (en) Service compatibility check for messages
JP2017505486A (en) Application error detection method for cloud streaming service, apparatus and system therefor
CN110750393A (en) Method, device, medium and equipment for avoiding network service dual-computer hot standby split brain
CN105260655B (en) Method, device and system for starting protection of application program
CN108509298B (en) Data processing method, device and storage medium
CN110022260B (en) Cross-environment receipt message processing method and system
JPWO2008105031A1 (en) Cluster system and node switching method
US20170094225A1 (en) Communication apparatus, communication system, and communication management system
US11223522B1 (en) Context-based intelligent re-initiation of microservices
US11005900B2 (en) Notifications to all devices to update state
CN112749009A (en) Server scheduling method and device
CN112860322A (en) Operating system switching method, device, equipment and storage medium
CN114780465A (en) Method and device for creating sharable remote direct data access link
CN110557272B (en) Data stream transmission method and device, computer readable storage medium and server
CN106230878B (en) Equipment service calling method and device based on AllJoyn framework
CN109714403A (en) A kind of method and device of determining user's online time
CN114697339A (en) Load balancing method and device under centralized architecture
CN113157481A (en) Cluster-based server jump time fault processing method, device and system
CN109710545B (en) Data transmission method and device, computer readable storage medium and computer 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