CN111355768B - Video data transmission method and device and electronic equipment - Google Patents

Video data transmission method and device and electronic equipment Download PDF

Info

Publication number
CN111355768B
CN111355768B CN201910335831.7A CN201910335831A CN111355768B CN 111355768 B CN111355768 B CN 111355768B CN 201910335831 A CN201910335831 A CN 201910335831A CN 111355768 B CN111355768 B CN 111355768B
Authority
CN
China
Prior art keywords
video
uploading
recording
information
identification field
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
CN201910335831.7A
Other languages
Chinese (zh)
Other versions
CN111355768A (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 Honghe Innovation Information Technology Co Ltd
Original Assignee
Shenzhen Honghe Innovation Information 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 Honghe Innovation Information Technology Co Ltd filed Critical Shenzhen Honghe Innovation Information Technology Co Ltd
Priority to CN201910335831.7A priority Critical patent/CN111355768B/en
Publication of CN111355768A publication Critical patent/CN111355768A/en
Application granted granted Critical
Publication of CN111355768B publication Critical patent/CN111355768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video data transmission method, a video data transmission device and electronic equipment. The video data transmission method comprises the following steps: acquiring equipment information and establishing communication connection with a recording and broadcasting host; setting a video uploading mechanism; receiving video enqueue request information from the recording and broadcasting host; adjusting a video uploading queue of the recording and broadcasting host according to the video uploading mechanism; sending a video uploading notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video uploading queue; and receiving the video file. The video data transmission apparatus includes: a communication connection module; an uploading mechanism module; a data receiving module; a queue adjustment module; and an information sending module. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the video data transmission method when executing the program.

Description

Video data transmission method and device and electronic equipment
Technical Field
The present invention relates to the field of communications, and in particular, to a video data transmission method, apparatus and electronic device.
Background
In internet applications, data transmission and information sharing are the most common and major demands. Among the many ways of implementing data transfer and information sharing, the file transfer protocol (File Transfer Protocol, FTP) is one of the most widely used ways. The FTP protocol is a protocol of an application layer in a computer network, which is the highest layer in the internet protocol (TCP/IP Protocol Suite) architecture, making the transfer function more reliable.
At the same time, FTP is also an application program with cross-platform characteristics, and file transfer can be performed as long as both platforms support the FTP protocol. Like most Internet services, FTP is also a client/server system. The user connects to the FTP server program on the remote host through a client program supporting the FTP protocol. The user issues a command to the server program through the client program, the server program executes the command issued by the user, and returns the result of the execution to the client.
The recording and broadcasting host also adopts the FTP protocol to transmit video files, when video data is transmitted, a plurality of video files can be simultaneously uploaded, the network bandwidth occupied by uploading the video files in a certain time period can be large, when the network is busy, other network services in the same network environment can be abnormal, so that the whole network condition is influenced, and when the network is idle, the condition of low utilization rate of the network bandwidth also exists. Meanwhile, during video data transmission, the uploaded video file part is lost and cannot be found due to special conditions such as unstable network state, power failure, network disconnection and the like.
Disclosure of Invention
Accordingly, the present invention is directed to a video data transmission method, apparatus and electronic device, which can ensure the stability of the network communication environment, improve the network bandwidth utilization, and make the video file not easy to be lost.
Based on the above object, the present invention provides a video data transmission method, comprising:
acquiring equipment information and establishing communication connection with a recording and broadcasting host;
setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of a transmission video file;
receiving video enqueue request information from the recording and broadcasting host;
adjusting a video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
sending a video uploading notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video uploading queue;
and receiving the video file.
Optionally, the acquiring the device information and establishing communication connection with the recording and playing host includes:
adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of the server and the recording and broadcasting host;
And calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
Optionally, the setting a video upload mechanism includes:
dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
Optionally, the receiving the video enqueue request information from the recording host includes:
after the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
and storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state.
Optionally, the adjusting the video upload queue of the recording and playing host according to the video upload mechanism includes:
Comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
Optionally, the sending a video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue includes:
selecting callback address information of a corresponding video file with the identification field of allowances;
and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
Optionally, the sending a video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue further includes:
after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification character identification OK represents a notification success state;
And if the video uploading notification is not sent successfully, modifying the identification character into an identification file, wherein the identification character identification file represents a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
Optionally, the receiving the video file includes:
when the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
and after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
Based on the above object, the present invention also provides a video data transmission device, comprising:
the communication connection module is used for acquiring equipment information and establishing communication connection with the recording and broadcasting host;
the uploading mechanism module is used for setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of the transmission video file;
the data receiving module is used for receiving video enqueue request information from the recording and broadcasting host;
the queue adjusting module is used for adjusting the video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
The information sending module is used for sending a video uploading notification to the recording and broadcasting host according to the video enqueuing request information and the adjusted video uploading queue;
the data receiving module is also used for receiving the video file.
Optionally, the communication connection module obtains device information, establishes communication connection with the recording and broadcasting host, and includes:
adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of the server and the recording and broadcasting host;
and calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
Optionally, the upload mechanism module sets a video upload mechanism, including:
dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
Optionally, the data receiving module receives video enqueue request information from the recording and playing host, including:
After the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
and storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state.
Optionally, the queue adjusting module adjusts a video upload queue of the recording and playing host according to the video upload mechanism, including:
comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
Optionally, the information sending module sends a video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue, including:
Selecting callback address information of a corresponding video file with the identification field of allowances;
and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
Optionally, the information sending module sends a video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue, and further includes:
after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification character identification OK represents a notification success state;
and if the video uploading notification is not sent successfully, modifying the identification character into an identification file, wherein the identification character identification file represents a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
Optionally, the data receiving module further receives the video file, including:
when the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
And after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
Based on the above object, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the video data transmission method when executing the program.
From the above, it can be seen that the video data transmission method, device and electronic equipment provided by the invention limit the maximum value and maximum occupation opening of video files transmitted at the same time in the video file transmission process by designing the video uploading mechanism, reduce the uploading number of the video files when the network is busy, properly increase the uploading number of the video files when the network is idle, improve the utilization rate of network bandwidth, and simultaneously adjust the network bandwidth occupation ratio of video file transmission in real time, and avoid network congestion; by adding the video files to be uploaded into the queue, the identification field is added for each video file, the ordering of the video files is ensured, the video files are easy to find, the state of the video files is convenient to track, and the video files are not easy to be lost under the special conditions of unstable network state, power failure, network disconnection and the like.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a video data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a method for establishing communication connection in a video data transmission method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a method for sending a video upload notification in a video data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a video data transmission device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing a video data transmission method according to an embodiment of the present invention.
Detailed Description
The present invention will be further described in detail below with reference to specific embodiments and with reference to the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
In one aspect, the present invention provides a video data transmission method.
As shown in fig. 1, some alternative embodiments of the present invention provide a video data transmission method, including:
s1: acquiring equipment information and establishing communication connection with a recording and broadcasting host;
s2: setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of a transmission video file;
s3: receiving video enqueue request information from the recording and broadcasting host;
s4: adjusting a video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
s5: sending a video uploading notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video uploading queue;
s6: and receiving the video file.
The video data transmission method sets a video uploading mechanism, sets the maximum uploading number and the maximum occupied bandwidth of the transmitted video files, and adds a plurality of video files into a video uploading queue determined according to the video uploading mechanism for transmission. The maximum uploading numbers of the transmission video files in different network state time periods are different, and the maximum occupied bandwidth of the transmission video files can be adjusted in real time, so that network congestion can be avoided, and the network bandwidth utilization rate during video data transmission can be improved; the video files are added into the uploading queue and then uploaded, so that the ordering of the video files is ensured, and the subsequent searching is convenient.
As shown in fig. 2, in a video data transmission method according to some alternative embodiments of the present invention, the obtaining device information and establishing a communication connection S1 with a recording and playing host, includes:
s11: adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of the server and the recording and broadcasting host;
s12: and calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
And the server acquires IP information and FTP protocol information of the server and the recording and broadcasting host through the adding equipment interface. The recording and broadcasting host establishes connection with the control information port of the server, the port is used for transmitting control instructions, and then the data port of the server establishes connection with the appointed port of the recording and broadcasting host to transmit data.
In some optional embodiments of the present invention, the setting the video upload mechanism S2 includes:
Dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
The recording and broadcasting equipment is applied to the teaching field, and can collect and upload the real-time state of students in the teaching scene, so that the network state of the network where the recording and broadcasting host computer is located has obvious time interval difference, and the network states of different working time intervals are different, for example, the recording and broadcasting host computer needs to upload a large number of video files in daytime class time intervals, and meanwhile, a large number of other network applications exist in the network where the recording and broadcasting host computer is located, and the network state is busy in the time intervals; in the daytime rest period, like rest in the class, trimming in the midnight and the afternoon or the activity period of the class operation, other network applications in the network where the recording and broadcasting host computer is positioned can be correspondingly reduced, and the network state in the period is more leisure; in the night period, the network where the recording and broadcasting host is located has no other network application except the network application which maintains the basic function, and the network state is idle in the period. Setting the maximum uploading number of different transmission video files according to different working time periods of network states, setting the maximum uploading number as K1 according to the daytime class time period, setting the maximum uploading number as K2 according to the daytime rest time period, setting the maximum uploading number as K3 according to the night time period, wherein the maximum uploading number K3 is more than or equal to K2, and K2 is more than or equal to K1. For example, the maximum uploading number in the daytime class period may be set to 20, the maximum uploading number in the daytime rest period may be set to 50, and the maximum uploading number in the nighttime period may be set to 100.
Different maximum uploading numbers are respectively set for different network time periods in the video data transmission method, the maximum uploading number is smaller in the network busy time period, normal operation of other network applications in a network communication environment can be ensured without network congestion, stable network conditions are ensured, and in the network idle time period, the maximum uploading number is larger, more video files can be simultaneously uploaded, the network utilization rate is greatly improved, and the waste of network bandwidth resources is avoided.
The maximum occupied bandwidth when the video file is transmitted is set in the video data transmission method, so that the occupied bandwidth of the video file transmitted by the recording and broadcasting host can be controlled and regulated in real time, and the problem of network congestion is further avoided.
In some optional embodiments of the present invention, the receiving the video enqueue request information S3 from the recording host includes:
after the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
And storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state. For the video file which fails to successfully receive the video enqueue request information, the recording and playing host machine can resend the video enqueue request information, and the server receives the video enqueue request information again. And the request enqueuing operation of the recording and broadcasting host is executed for three times at most, and if the server for three times does not receive the request successfully, abnormal warning information is sent out.
In the video data transmission method, the server receives video enqueue request information from the recording and broadcasting host, and the callback address information in the enqueue request information is used for informing the recording and broadcasting host to upload the corresponding video file later. After the video enqueue request information is received and stored in the database, the representation field information is added to the corresponding video file, the identification field information is used for representing the state of the corresponding video file, the state is initially set to be low, and the corresponding identification field information is modified when the state of the subsequent video file changes each time. The identification field is added for the video file to be convenient for tracking the state of the video file, when the network communication is recovered to be normal in the face of special conditions such as unstable network state, power failure, network disconnection and the like, the state of the video file can be clearly determined according to the information of different identification fields of the video file, the video transmission is convenient to recover, and the video file is ensured to be difficult to be lost.
In some optional embodiments of the present invention, in a video data transmission method, the adjusting S4 the video upload queue of the recording and playing host according to the video upload mechanism includes:
comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
According to the video data transmission method, the video uploading queue of the recording and broadcasting host is adjusted according to the video uploading mechanism, so that the number of video files in the video uploading queue of the recording and broadcasting host meets the requirement of the video uploading mechanism, the stability of the network condition can be guaranteed when the video files are uploaded by the recording and broadcasting host, and the network utilization rate can be improved.
As shown in fig. 3, in a video data transmission method according to some alternative embodiments of the present invention, the sending, according to the video enqueue request information and the adjusted video upload queue, a video upload notification S5 to the recording and playing host includes:
S51: selecting callback address information of a corresponding video file with the identification field of allowances;
s52: and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
In the video data transmission method, the server sends a video uploading notification to a recording and broadcasting host according to callback address information of the video file with an identification field of allowances, and the recording and broadcasting host finds a corresponding video file in a video uploading queue according to the callback address information and prepares to upload the video file.
As shown in fig. 3, in a video data transmission method according to some alternative embodiments of the present invention, the sending, according to the video enqueue request information and the adjusted video upload queue, a video upload notification S5 to the recording and playing host further includes:
s53: after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification character identification OK represents a notification success state;
s54: and if the video uploading notification is not sent successfully, modifying the identification character into an identification file, wherein the identification character identification file represents a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
In the video data transmission method, the identification characters of the video file are modified correspondingly according to the sending result of the video uploading notification, so as to represent different states of the video file. The identification field of the video file is modified correspondingly in real time so as to be convenient for tracking the state of the video file, and after the network communication is recovered to be normal in the face of special conditions such as unstable network state, power failure and network disconnection, the state of the video file can be clearly determined according to the information of different identification fields of the video file so as to be convenient for recovering video transmission, thereby ensuring that the video file is not easy to be lost. If the representation field of the video file is formed ok after the network is abnormal and replied, the video file is represented to be in a state of successful notification, and next, the recording and playing host prepares to upload the video file; and for the video file with the representation field of infromail, the server sends the video uploading notification of the corresponding video file to the recording and playing host again.
In some optional embodiments of the present invention, a method for transmitting video data, the receiving the video file includes:
When the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
and after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
In the video data transmission method, the identification characters of the video file are correspondingly modified in the process that the server receives the video file. When the network state is unstable, the network is disconnected due to power failure and other special conditions, the state of the video file can be clearly determined according to different identification field information of the video file after the network communication is recovered to be normal, and the video transmission is convenient to recover, so that the video file is not easy to lose. If the video file with the identification field being the uploading, the recording and playing host can re-upload the video file after the network communication is recovered to be normal.
In another aspect, the present invention provides a video data transmission apparatus.
As shown in fig. 4, some alternative embodiments of the present invention provide a video data transmission apparatus including:
The communication connection module 1 is used for acquiring equipment information and establishing communication connection with the recording and broadcasting host;
the uploading mechanism module 2 is used for setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of the transmission video file;
the data receiving module 3 is used for receiving video enqueue request information from the recording and broadcasting host;
the queue adjusting module 4 is used for adjusting the video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
the information sending module 5 is used for sending a video uploading notification to the recording and broadcasting host according to the video enqueuing request information and the adjusted video uploading queue;
the data receiving module 3 is further configured to receive the video file.
The video data transmission device sets a video uploading mechanism, sets the maximum uploading number and the maximum occupied bandwidth of the transmitted video files, and adds a plurality of video files into a video uploading queue determined according to the video uploading mechanism for transmission. The maximum uploading numbers of the transmission video files in different network state time periods are different, and the maximum occupied bandwidth of the transmission video files can be adjusted in real time, so that network congestion can be avoided, and the network bandwidth utilization rate during video data transmission can be improved; the video files are added into the uploading queue and then uploaded, so that the ordering of the video files is ensured, and the subsequent searching is convenient.
In some optional embodiments of the present invention, in a video data transmission apparatus provided in the present invention, the communication connection module 1 obtains the device information, establishes a communication connection with a recording and playing host, and includes:
adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of the server and the recording and broadcasting host;
and calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
And the server acquires IP information and FTP protocol information of the server and the recording and broadcasting host through the adding equipment interface. The recording and broadcasting host establishes connection with the control information port of the server, the port is used for transmitting control instructions, and then the data port of the server establishes connection with the appointed port of the recording and broadcasting host to transmit data.
In some optional embodiments of the present invention, the upload mechanism module 2 sets the video upload mechanism, including:
Dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
The recording and broadcasting equipment is applied to the teaching field, and can collect and upload the real-time state of students in the teaching scene, so that the network state of the network where the recording and broadcasting host computer is located has obvious time interval difference, and the network states of different working time intervals are different, for example, the recording and broadcasting host computer needs to upload a large number of video files in daytime class time intervals, and meanwhile, a large number of other network applications exist in the network where the recording and broadcasting host computer is located, and the network state is busy in the time intervals; in the daytime rest period, like rest in the class, trimming in the midnight and the afternoon or the activity period of the class operation, other network applications in the network where the recording and broadcasting host computer is positioned can be correspondingly reduced, and the network state in the period is more leisure; in the night period, the network where the recording and broadcasting host is located has no other network application except the network application which maintains the basic function, and the network state is idle in the period. Setting the maximum uploading number of different transmission video files according to different working time periods of network states, setting the maximum uploading number as K1 according to the daytime class time period, setting the maximum uploading number as K2 according to the daytime rest time period, setting the maximum uploading number as K3 according to the night time period, wherein the maximum uploading number K3 is more than or equal to K2, and K2 is more than or equal to K1. For example, the maximum uploading number in the daytime class period may be set to 20, the maximum uploading number in the daytime rest period may be set to 50, and the maximum uploading number in the nighttime period may be set to 100.
Different maximum uploading numbers are respectively set for different network time periods in the video data transmission device, the maximum uploading number is smaller in the network busy time period, normal operation of other network applications in a network communication environment can be ensured without network congestion, stable network conditions are ensured, the maximum uploading number is larger in the network idle time period, more video files can be uploaded at the same time, the network utilization rate is greatly improved, and network bandwidth resource waste is avoided.
The video data transmission device sets the maximum occupied bandwidth when transmitting the video file, can control and adjust the occupied bandwidth of the video file transmitted by the recording and broadcasting host in real time, and further avoids the problem of network congestion.
In some optional embodiments of the present invention, the data receiving module 3 receives the video enqueue request information from the recording host, including:
after the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
And storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state. For the video file which fails to successfully receive the video enqueue request information, the recording and playing host machine can resend the video enqueue request information, and the server receives the video enqueue request information again. And the request enqueuing operation of the recording and broadcasting host is executed for three times at most, and if the server for three times does not receive the request successfully, abnormal warning information is sent out.
In the video data transmission device, the server receives video enqueue request information from the recording and broadcasting host, and the callback address information in the enqueue request information is used for informing the recording and broadcasting host to upload the corresponding video file later. After the video enqueue request information is received and stored in the database, the representation field information is added to the corresponding video file, the identification field information is used for representing the state of the corresponding video file, the state is initially set to be low, and the corresponding identification field information is modified when the state of the subsequent video file changes each time. The identification field is added for the video file to be convenient for tracking the state of the video file, when the network communication is recovered to be normal in the face of special conditions such as unstable network state, power failure, network disconnection and the like, the state of the video file can be clearly determined according to the information of different identification fields of the video file, the video transmission is convenient to recover, and the video file is ensured to be difficult to be lost.
In some optional embodiments of the present invention, the queue adjustment module 4 adjusts a video upload queue of the recording and playing host according to the video upload mechanism, including:
comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
The video data transmission device adjusts the video uploading queue of the recording and broadcasting host according to a video uploading mechanism, and ensures that the number of video files in the video uploading queue of the recording and broadcasting host meets the requirement of the video uploading mechanism, so that the stability of network conditions can be ensured when the video files are uploaded by the recording and broadcasting host, and the network utilization rate can be improved.
In some optional embodiments of the present invention, the information sending module sends a video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue, where the video upload notification includes:
Selecting callback address information of a corresponding video file with the identification field of allowances;
and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
In the video data transmission device, the server sends a video uploading notification to a recording and broadcasting host according to callback address information of the video file with an identification field of allowances, and the recording and broadcasting host finds a corresponding video file in a video uploading queue according to the callback address information and prepares to upload the video file.
In some optional embodiments of the present invention, the information sending module sends the video upload notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video upload queue, and the video upload notification further includes:
after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification character identification OK represents a notification success state;
and if the video uploading notification is not sent successfully, modifying the identification character into an identification file, wherein the identification character identification file represents a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
In the video data transmission device, the identification characters of the video file are modified correspondingly according to the sending result of the video uploading notification, so as to represent different states of the video file. The identification field of the video file is modified correspondingly in real time so as to be convenient for tracking the state of the video file, and after the network communication is recovered to be normal in the face of special conditions such as unstable network state, power failure and network disconnection, the state of the video file can be clearly determined according to the information of different identification fields of the video file so as to be convenient for recovering video transmission, thereby ensuring that the video file is not easy to be lost. If the representation field of the video file is formed ok after the network is abnormal and replied, the video file is represented to be in a state of successful notification, and next, the recording and playing host prepares to upload the video file; and for the video file with the representation field of infromail, the server sends the video uploading notification of the corresponding video file to the recording and playing host again.
In some optional embodiments of the present invention, the video data transmission apparatus provided in the present invention, the data receiving module further receives the video file, including:
When the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
and after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
In the video data transmission device, the identification characters of the video file are correspondingly modified in the process that the server receives the video file. When the network state is unstable, the network is disconnected due to power failure and other special conditions, the state of the video file can be clearly determined according to different identification field information of the video file after the network communication is recovered to be normal, and the video transmission is convenient to recover, so that the video file is not easy to lose. If the video file with the identification field being the uploading, the recording and playing host can re-upload the video file after the network communication is recovered to be normal.
On the other hand, the invention also provides an electronic device for executing the video data transmission method.
As shown in fig. 5, the electronic device includes:
one or more processors 501 and a memory 502, one processor 501 being illustrated in fig. 5.
The electronic device performing the video data transmission method may further include: an input device 503 and an output device 504.
The processor 501, memory 502, input devices 503 and output devices 504 may be connected by a bus or otherwise, for example in fig. 5.
The memory 502 is used as a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and modules, such as program instructions/modules corresponding to the video data transmission method in the embodiments of the present application. The processor 501 executes various functional applications of the server and data processing, that is, implements the video data transmission method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 502.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of a device performing the video data transmission method, and the like. In addition, memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 502 may optionally include memory remotely located with respect to processor 501, which may be connected to the membership user action monitoring device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the device performing the video data transmission method. The output 504 may include a display device such as a display screen.
The one or more modules are stored in the memory 502 that, when executed by the one or more processors 501, perform the video data transmission method of any of the method embodiments described above. The technical effects of the embodiment of the device for executing the video data transmission method are the same as or similar to any of the method embodiments.
The device of the foregoing embodiment is configured to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the invention. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the present invention should be included in the scope of the present invention.

Claims (17)

1. A video data transmission method, applied to a server, comprising:
acquiring equipment information and establishing communication connection with a recording and broadcasting host;
setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of a transmission video file;
receiving video enqueue request information from the recording and broadcasting host, and adding identification field information for corresponding video files; wherein the identification field information includes: an identification field, configured to indicate a transmission state corresponding to a current video file;
adjusting a video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
according to the video enqueue request information and the adjusted video upload queue, sending a video upload notification to the recording and broadcasting host and adjusting the identification field information;
Receiving the video file and adjusting the identification field information;
and responding to the network fault being repaired, executing corresponding operation on the video file according to the identification field information corresponding to the video file before the network fault so as to restore the transmission state of the video file.
2. The method of claim 1, wherein the obtaining the device information establishes a communication connection with the recording host, comprising:
adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of the server and the recording and broadcasting host;
and calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
3. The method of claim 1, wherein the setting a video upload mechanism comprises:
dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
4. The method of claim 1, wherein receiving video enqueue request information from the recording host comprises:
After the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
and storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state.
5. The method of claim 1, wherein adjusting the video upload queue of the recording host according to the video upload mechanism comprises:
comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
6. The method of claim 4, wherein the sending a video upload notification to the recording host according to the video enqueue request information and the adjusted video upload queue comprises:
Selecting callback address information of a corresponding video file with the identification field of allowances;
and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
7. The method of claim 6, wherein the sending a video upload notification to the recording host according to the video enqueue request information and the adjusted video upload queue further comprises:
after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification field identification OK represents a notification success state;
and if the video uploading notification is not sent successfully, modifying the identification field into an identification field, wherein the identification field indicates a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
8. The method of claim 7, wherein the receiving the video file comprises:
when the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
And after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
9. A video data transmission apparatus, comprising:
the communication connection module is used for acquiring equipment information and establishing communication connection with the recording and broadcasting host;
the uploading mechanism module is used for setting a video uploading mechanism, wherein the video uploading mechanism comprises the maximum uploading number and the maximum occupied bandwidth of the transmission video file;
the data receiving module is used for receiving video enqueue request information from the recording and broadcasting host and adding identification field information for corresponding video files; wherein the identification field information includes: an identification field, configured to indicate a transmission state corresponding to a current video file;
the queue adjusting module is used for adjusting the video uploading queue of the recording and broadcasting host according to the video uploading mechanism;
the information sending module is used for sending a video uploading notification to the recording and broadcasting host according to the video enqueue request information and the adjusted video uploading queue and adjusting the identification field information;
the data receiving module is also used for receiving the video file and adjusting the identification field information;
And responding to the network fault being repaired, executing corresponding operation on the video file according to the identification field information corresponding to the video file before the network fault so as to restore the transmission state of the video file.
10. The apparatus of claim 9, wherein the communication connection module obtains the device information and establishes a communication connection with the recording host, comprising:
adding the equipment information to a database through an equipment adding interface, wherein the equipment information comprises communication address information and communication protocol information of a server and the recording and broadcasting host;
and calling a recording and broadcasting host interface to send the communication protocol information of the server to the recording and broadcasting host, and establishing communication connection with the recording and broadcasting host.
11. The apparatus of claim 9, wherein the upload mechanism module sets the video upload mechanism, comprising:
dividing different working time periods according to network states, and setting corresponding maximum uploading numbers for the different working time periods;
and setting the maximum occupied bandwidth, wherein the maximum occupied bandwidth can be modified and adjusted in real time according to the network state.
12. The apparatus of claim 9, wherein the data receiving module receiving the video enqueue request information from the recording host comprises:
After the video file is generated by the recording and playing host, receiving video enqueue request information corresponding to the video file, wherein the video enqueue request information comprises file name and callback address information of the video file;
and storing the video enqueue request information into a database, adding identification field information for the corresponding video file, and setting the identification field as an allowed, wherein the allowed identification field represents an allowed enqueue state.
13. The apparatus of claim 9, wherein the queue adjustment module adjusts a video upload queue of the recording host according to the video upload mechanism, comprising:
comparing the number of video files in the video uploading queue with the maximum uploading number, and allowing the recording and broadcasting host to add new video files to the video uploading queue when the number of video files is smaller than the maximum uploading number;
and when the number of the video files is greater than or equal to the maximum uploading number, prohibiting the recording and broadcasting host from adding new video files to the video uploading queue.
14. The apparatus of claim 12, wherein the information sending module sends a video upload notification to the recording host according to the video enqueue request information and the adjusted video upload queue, comprising:
Selecting callback address information of a corresponding video file with the identification field of allowances;
and sending the video uploading notification to the recording and broadcasting host according to the callback address information, wherein the video uploading notification is used for enabling the recording and broadcasting host to upload the corresponding video file by using an FTP protocol.
15. The apparatus of claim 14, wherein the information sending module sends the video upload notification to the recording host according to the video enqueue request information and the adjusted video upload queue, further comprising:
after the video uploading notification is sent to the recording and broadcasting host, modifying the identification field into an identification OK, wherein the identification field identification OK represents a notification success state;
and if the video uploading notification is not sent successfully, modifying the identification field into an identification field, wherein the identification field indicates a notification failure state, and the video uploading notification which is not sent successfully is sent again and is sent at most three times.
16. The apparatus of claim 15, wherein the data receiving module further receives the video file, comprising:
when the video file is received, modifying the identification field into an uploading state, wherein the uploading state of the file is represented by the identification field;
And after the video file is received, modifying the identification field into success, wherein the success represents the successful file uploading state.
17. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 8 when the program is executed by the processor.
CN201910335831.7A 2019-04-24 2019-04-24 Video data transmission method and device and electronic equipment Active CN111355768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910335831.7A CN111355768B (en) 2019-04-24 2019-04-24 Video data transmission method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910335831.7A CN111355768B (en) 2019-04-24 2019-04-24 Video data transmission method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111355768A CN111355768A (en) 2020-06-30
CN111355768B true CN111355768B (en) 2023-05-30

Family

ID=71193927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910335831.7A Active CN111355768B (en) 2019-04-24 2019-04-24 Video data transmission method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111355768B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1256847C (en) * 2003-09-17 2006-05-17 联想(北京)有限公司 Method for dynamic regulating video transmission
CN101795264A (en) * 2009-12-30 2010-08-04 北京新岸线网络技术有限公司 Video data transmission method and system
CN102377588B (en) * 2010-08-13 2014-04-16 腾讯科技(深圳)有限公司 Network transmission control method and system
CN109168076B (en) * 2018-11-02 2021-03-19 北京字节跳动网络技术有限公司 Online course recording method, device, server and medium
CN109168031B (en) * 2018-11-06 2021-12-24 杭州云毅网络科技有限公司 Streaming media pushing method and device and streaming media platform

Also Published As

Publication number Publication date
CN111355768A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN107566786B (en) Method and device for acquiring monitoring video and terminal equipment
CN105871977A (en) Long connection establishment method and system, and devices
EP3382563B1 (en) Communication device, communication system, communication method, and communication program
CN111490947B (en) Data packet sending method, data packet receiving method, system, equipment and medium
US20200380478A1 (en) Api charging system, api charging management method, and api charging program
DE102017117912A1 (en) Send messages to an unavailable device
US10044833B2 (en) Data processing method and apparatus used for terminal application
CN113360783B (en) User online list updating method and device and computer equipment
CN112887416B (en) Frequency adjustment method and device for sending keep-alive packets
CN102025782A (en) Point-to-point communication method, device and system
CN111355768B (en) Video data transmission method and device and electronic equipment
CN106850153B (en) Data retransmission method and system
WO2023202295A1 (en) Memory management and control method and apparatus, storage medium and electronic device
CN108156086B (en) Policy rule issuing method and device
CN108737460B (en) Connection processing method and client
CN113553152A (en) Job scheduling method and device
CN112256454B (en) Message delay processing method and system
CN104168274A (en) Data obtaining request processing method, client sides and server
CN113660465A (en) Image processing method, image processing device, readable medium and electronic equipment
CN111027300A (en) Method and device for generating report form in user-defined mode
CN115002513B (en) Audio and video scheduling method and device, electronic equipment and computer readable storage medium
CN110795596B (en) Information feedback method and device for client
CN108965454B (en) Sensing system and method for providing intelligent service in Internet of things
CN116346206A (en) AI/ML model distributed transmission method, device and system based on low orbit satellite and 5GS
CN117729246A (en) Message processing 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