Industrial field data transmission method based on streaming media

文档序号:1784923 发布日期:2019-12-06 浏览:29次 中文

阅读说明:本技术 一种基于流媒体的工业现场数据传输的方法 (Industrial field data transmission method based on streaming media ) 是由 王晓宇 高朝阳 陈雨 于 2019-08-30 设计创作,主要内容包括:本发明属于工业现场数据传输领域,并具体公开了一种基于流媒体的工业现场数据传输的方法。该方法包括将所采集的原始工业现场数据进行编码,然后将编码后的原始工业现场数据转换成多帧按时序排列的图片帧,接着将多帧图片按时序转化为视频流,本地服务器根据远程端的请求将视频流进行打包并发送给远程端,远程端按照时序播放所述打包的视频流进行解压,然后利用视频处理工具播放解压后的视频流,同时按照时序截取视频流的多帧图片,接着对多帧图片分别进行解码,并将解码后的数据按时序排列,以还原原始工业现场数据。本发明可以有效利用比较成熟的流媒体实时传输方案,实现工业现场数据的实时性传输,可传输的数据容量大大提高。(The invention belongs to the field of industrial field data transmission, and particularly discloses a method for transmitting industrial field data based on streaming media. The method comprises the steps of coding collected original industrial field data, converting the coded original industrial field data into a plurality of frames of pictures arranged according to time sequence, converting the plurality of frames of pictures into video streams according to the time sequence, packing the video streams by a local server according to a request of a remote end and sending the video streams to the remote end, playing the packed video streams according to the time sequence by the remote end for decompression, playing the decompressed video streams by a video processing tool, intercepting the plurality of frames of pictures of the video streams according to the time sequence, respectively decoding the plurality of frames of pictures, and arranging the decoded data according to the time sequence to restore the original industrial field data. The invention can effectively utilize a relatively mature streaming media real-time transmission scheme to realize the real-time transmission of industrial field data, and the transmittable data capacity is greatly improved.)

1. A method for industrial field data transmission based on streaming media is characterized by comprising the following steps:

S1, acquiring original industrial field data according to requirements, transmitting the original industrial field data to a local server through a bus, coding the acquired original industrial field data by the local server in a time sequence, converting the coded original industrial field data into multiple frames of pictures arranged according to the time sequence, and converting the multiple frames of pictures into video streams according to the time sequence;

S2, the remote end sends a request for accessing the video stream to the local server, the local server responds to the request, sequentially sends information of a local server implementation method, the decoding type of the video stream and the resolution of the video stream to the remote end, responds to the requirement for starting the video stream connection and the playing requirement, and packs and transmits the video stream to the remote end according to a real-time stream transmission protocol;

S3, the remote end plays the packed video stream according to the time sequence for decompression, then plays the decompressed video stream by using a video processing tool, simultaneously intercepts the multi-frame pictures of the video stream according to the time sequence, then decodes the multi-frame pictures respectively, and arranges the decoded data according to the time sequence to restore the original industrial field data collected in S1.

2. The method of claim 1, wherein in step S1, the local server transcodes the original industrial field data into the time-sequenced multi-frame pictures by using a QRcode encoding method or a custom algorithm, wherein if the original industrial field data is transcoded into the time-sequenced multi-frame pictures by using the custom algorithm, a corresponding decoding algorithm is deployed at the remote end.

3. The method according to claim 1, wherein in step S1, the picture is a two-dimensional code picture, and the local server encodes the collected original industrial field data in time sequence according to a two-dimensional code decoding tool, and further, the two-dimensional code picture has an automatic error correction mechanism, that is, one frame of the two-dimensional code picture contains a plurality of or a plurality of pieces of information representing the original industrial field data, and further, the two-dimensional code picture can adopt a single-layer two-color two-dimensional code or a multi-color multi-layer two-dimensional code, and further, 100 floating point numbers of 64 bits can be accommodated in a single two-dimensional code picture.

4. the method according to claim 3, wherein the picture frame is formed by splicing a plurality of two-dimensional code pictures according to time sequence, and the two-dimensional code pictures for splicing are of a uniform specification.

5. The method according to any of claims 1-4, wherein in step S1, the video stream is an H264 video stream.

6. the method according to any one of claims 1-4, wherein the remote end issues the request for accessing the video stream to the local server in step S2 includes RTSP OPTION request, DESCRIBE request, SETUP request and LAY request.

7. the method as claimed in any one of claims 1 to 4, wherein the method of decoding the multiple frames of pictures respectively in step S3 is identical to the method of encoding the collected raw industrial field data in step S1.

8. The method of any one of claims 1-4, further comprising presenting the raw industrial field data restored at the remote end in a time sequence using a visualization tool or other format.

Technical Field

The invention belongs to the field of industrial field data transmission, and particularly relates to a method for transmitting industrial field data based on streaming media.

Background

Streaming media refers to a technology and a process for instantly transmitting video and audio on the internet by compressing a series of media data and transmitting the data in segments on the internet, and the technology enables data packets to be transmitted like streaming, but the streaming media is generally only used for transmitting video streams and audio streams, and information carried by the forms is difficult to extract, and the information storage ratio is extremely small.

The industrial 4.0 era is also the era of smart factories and the era of big data, data inside an industrial field is generally transmitted by buses, and the data volume generated per second can reach dozens of millions and hundreds of millions under the scale of a factory level, but at the same time, one hand of information generated by the industrial field is needed to analyze and diagnose the field working condition of an increasingly intelligent and unmanned factory based on big data, so that the storage, the transmission and the real-time transmission of a large amount of data and the real-time simulation of the action condition of the industrial field become more and more urgent needs.

Therefore, there is a need in the art to provide a method for transmitting industrial field data based on streaming media, which utilizes a relatively mature real-time streaming media transmission scheme to achieve real-time transmission of industrial field data and increase the transmittable data capacity, so as to satisfy the requirement of large data transmission amount in the field working conditions of unmanned plants and the like.

Disclosure of Invention

in view of the above-mentioned drawbacks and needs of the prior art, the present invention provides a method for streaming-based industrial field data transmission, wherein, the industrial field data with huge data volume is correspondingly coded according to time sequence by combining the characteristics of the industrial field data and the transmission characteristics of streaming media, and is converted into a video streaming format with smaller storage volume in the form of readable pictures, meanwhile, the video stream is transmitted to the remote client in the form of data packets by the local server through the real-time streaming protocol, meanwhile, the video stream is decoded by adopting a motion inverse solution mode to obtain industrial field data with huge data quantity and realize real-time transmission of the industrial field data.

In order to achieve the above object, the present invention provides a method for transmitting industrial field data based on streaming media, which comprises the following steps:

S1, acquiring original industrial field data according to requirements, transmitting the original industrial field data to a local server through a bus, coding the acquired original industrial field data by the local server in a time sequence, converting the coded original industrial field data into a plurality of frames of pictures arranged according to the time sequence, and converting the plurality of frames of pictures into a video stream according to the time sequence;

S2, the remote end sends a request for accessing the video stream to the local server, the local server responds to the request, sequentially sends information of a local server implementation method, the decoding type of the video stream and the resolution of the video stream to the remote end, responds to the requirement for starting the video stream connection and the playing requirement, and packs and transmits the video stream to the remote end according to a real-time stream transmission protocol;

s3, the remote end plays the packed video stream according to the time sequence for decompression, then plays the decompressed video stream by using a video processing tool, simultaneously intercepts the multi-frame pictures of the video stream according to the time sequence, then decodes the multi-frame pictures respectively, and arranges the decoded data according to the time sequence to restore the original industrial field data collected in S1.

Preferably, in step S1, the local server transcodes the original industrial field data into the time-sequenced multi-frame pictures by using a QRcode encoding method or a custom algorithm, wherein if the original industrial field data is transcoded into the time-sequenced multi-frame pictures by using the custom algorithm, a corresponding decoding algorithm needs to be deployed at the remote end.

preferably, in step S1, the picture is a two-dimensional code picture, and the local server encodes the acquired original industrial field data in a time sequence according to a two-dimensional code decoding tool, and further, the two-dimensional code picture has an automatic error correction mechanism, that is, one frame of the two-dimensional code picture contains a plurality of or a plurality of pieces of information representing the original industrial field data, and further, the two-dimensional code picture may adopt a single-layer two-color two-dimensional code or a multi-color multi-layer two-dimensional code, and further, 100 64-bit floating point numbers may be accommodated in a single two-dimensional code picture.

preferably, the picture frame may be formed by splicing a plurality of frames of two-dimensional code pictures according to a time sequence, and the two-dimensional code pictures for splicing have a uniform specification.

Preferably, in step S1, the video stream is an H264 video stream.

Preferably, in step S2, the request for accessing the video stream sent by the remote end to the local server includes an RTSP OPTION request, a DESCRIBE request, a SETUP request, and a LAY request.

It is further preferable that the method of decoding the multiple frames of pictures respectively in step S3 is identical to the method of encoding the collected raw industrial field data in step S1.

Preferably, the method further includes displaying the original industrial field data restored by the remote end in a time sequence by using a visualization tool or other forms.

Generally, compared with the prior art, the above technical solution conceived by the present invention mainly has the following technical advantages:

1. The industrial field data with huge data volume is encoded according to time sequence, the encoded industrial field data with huge data volume is converted into a video stream format with smaller storage volume in a form of readable pictures, meanwhile, a video stream is transmitted to a remote client in a form of data packets from a local server through a real-time streaming protocol, and meanwhile, the video stream is decoded in a motion inverse solution mode to obtain the industrial field data with huge data volume, so that the real-time transmission of the industrial field data is realized. Meanwhile, the invention can effectively utilize a relatively mature streaming media real-time transmission scheme to realize the real-time transmission of industrial field data, greatly improve the transmittable data capacity, greatly enrich the storage capacity of an industrial control network and reduce the system construction cost.

2. The invention adopts the mode of picture coding to store information, and the coding format is opaque and has natural and expandable safety.

3. The invention adopts the video stream and the real-time transmission protocol to transmit data, and can realize the real-time data monitoring of a plurality of remote users.

4. the picture frame is a two-dimensional code picture, the local server encodes the acquired original industrial field data in time sequence according to a two-dimensional code decoding tool, the local server stores the uncertainty of the content, and the original industrial field data can be encrypted and then transcoded, so that the security guarantee of the original industrial field data transmission is improved. Furthermore, the two-dimensional code picture has an automatic error correction mechanism, namely, one frame of the two-dimensional code picture contains a plurality of or a plurality of information representing original industrial field data, the redundant information mechanism can ensure that the data can still be restored under the condition that partial region data are damaged, and the upper limit of the two-dimensional code is higher. Furthermore, the two-dimensional code picture can adopt a single-layer double-color two-dimensional code or a multi-color multi-layer two-dimensional code, and further, 100 64-bit floating point numbers can be accommodated in a single two-dimensional code picture, so that the storage capacity of picture information can be greatly improved.

5. The invention can display the original industrial field data restored by the remote end according to time sequence by adopting a visual tool or other forms so as to monitor the data which cannot be detected by the industrial field manual work in real time, and carry out analysis, diagnosis, improvement and update based on the data, thereby having strong adaptability.

Drawings

FIG. 1 is a flow chart of a method for streaming media based industrial field data transmission in accordance with the present invention;

FIG. 2 is a system diagram of a method for streaming media-based industrial field data transmission in accordance with the present invention;

FIG. 3 is a data flow diagram of a method for streaming-based industrial field data transmission according to the present invention;

FIG. 4 is a schematic diagram of splicing two-dimensional code pictures carrying original industrial field data with different time sequences according to the time sequence, wherein the two-dimensional code pictures are related to the invention;

Fig. 5 is a schematic diagram of a local server to transfer data to a plurality of remote terminals according to the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

as shown in fig. 1, fig. 2 and fig. 3, the present invention provides a method for streaming media-based industrial field data transmission, which includes the following steps.

The method comprises the steps that firstly, original industrial field data are collected according to requirements, then the original industrial field data are transmitted to a local server through a bus, the local server encodes the collected original industrial field data in a time sequence, then the encoded original industrial field data are converted into multiple frames of pictures which are arranged according to the time sequence, then the multiple frames of pictures are converted into video streams according to the time sequence, and then the video streams are transmitted to a remote end according to a real-time stream transmission protocol after a request of the remote end is sent out.

Specifically, the data collection device collects raw industrial field data such as sensor data, shaft rotation data, etc., which are acquired in real time, and then transmits the raw industrial field data collected by the data collection device to the local server through the bus. The local server transcodes the original industrial field data into a plurality of frames of pictures arranged according to time sequence through a transcoding tool. In the process, the transcoding of the original industrial field data into the multi-frame pictures arranged according to the time sequence includes various methods, for example, a QRcode coding method is adopted to transcode the original industrial field data into the multi-frame pictures arranged according to the time sequence, or a self-designed algorithm is adopted to transcode the original industrial field data into the multi-frame pictures arranged according to the time sequence.

Meanwhile, in the process of transcoding the original industrial field data, in order to increase the information capacity of the transcoded picture, the RGB colors of the transcoded picture can be increased. Meanwhile, in order to reduce the loss of information, in the transcoding process, original industrial field data can be transcoded into multi-frame pictures arranged according to time sequence in a redundant mode, namely the transcoded pictures contain a plurality of or a plurality of information representing the original industrial field data. Meanwhile, the picture formed after transcoding, such as the two-dimensional code, stores the uncertainty of the content, and the original industrial field data can be encrypted and then transcoded, so that the security guarantee of the original industrial field data transmission is improved. The mode of generating the picture by transcoding the original industrial field data comprises but is not limited to a coding mode of generating a two-dimensional code picture by transcoding, the two-dimensional code picture is adopted because the two-dimensional code is developed to the present, the safety and diversity of the two-dimensional code picture are greatly improved, a redundant information mechanism can ensure that the data can still be restored under the condition that partial region data are damaged, the upper limit of the two-dimensional code is higher, a single-layer double-color two-dimensional code is adopted in the example, if the larger storage capacity is obtained, a multi-color multi-layer two-dimensional code can be selected, and the storage capacity of the multi-color multi-layer two-dimensional.

As shown in fig. 2, in order to generate a two-dimensional code from original information, a single generated picture can accommodate 100 64-bit floating point numbers, the amount of stored data can reach 800B, and the occupied storage amount is 1.67 KB. As shown in fig. 4, in order to increase the data amount contained in a single frame, in the present invention, two-dimensional code pictures carrying original industrial field data with different time sequences may be spliced according to time sequences, and the spliced two-dimensional code pictures are adopted as a uniform specification to obtain a two-dimensional code picture of a whole frame carrying original industrial field data within a certain time sequence range.

Further, the local server converts the multi-frame pictures into a video stream according to a time sequence, and then transmits the video stream to the remote end by adopting a real-time streaming protocol, namely an RTSP (real time streaming protocol). After a certain number of pictures are generated, the pictures are converted into a video stream in time sequence by using a video stream conversion tool. The video processing tool can be used for generating videos with specified code rate and frame number, and the modes of multiple frame numbers, single frame and less data can be randomly and flexibly selected for transmission according to different network conditions.

as shown in fig. 2 and fig. 5, the RTSP (real-time streaming protocol) protocol stack is running on the local server side, and can provide a one-to-many application, i.e. the local server side can transmit the video stream to multiple remote sides simultaneously. Architecturally on top of RTP (real-time transport protocol) and RTCP (real-time transport control protocol), data transmission is accomplished using TCP or RTP. The protocol stack needs to be deployed at the server side and the client side at the same time, when the on-demand or live broadcast process is started, the remote side sequentially initiates an RTSP OPTION request, a DESCRIBE request, a SETUP request and a PLAY request, the local server side responds to the request, the connection is opened, and the video stream is sent to the remote side. Specifically, the local server side responds to the request, sequentially sends the local server implementation method, the decoding type, the resolution and the like of the streaming media to the remote side, responds to the connection starting requirement and the playing requirement, and then the server packs the serial number and the timestamp of the RTP and packages and transmits the H264 video stream.

And secondly, the remote end plays the video stream according to a time sequence and intercepts multi-frame picture frames of the video stream, then the multi-frame pictures are respectively decoded, and the decoded data are arranged according to the time sequence so as to restore the original industrial field data collected by the S1.

Specifically, after the remote end obtains the encapsulated and packaged video stream, the encapsulated and packaged video stream is decoded and unpacked into an H264 video stream according to the decoding type of the streaming media sent by the local server, and then the video of the current frame of the video stream is subjected to screenshot preprocessing by using a video processing tool. And decoding the data contained in the picture acquired by screen capture by using a decoding tool, and restoring the data into original industrial field data. If the two-dimensional code picture is used for storage, a two-dimensional code decoding tool can be used for analysis, and if a self-developed coding mode is adopted, a decoding algorithm needs to be deployed at a remote end. For the original industrial field data acquired by the remote end, a visualization tool or other forms can be adopted to display according to time sequence, and the video stream can be directly stored into a video format as a storage mode.

In the invention, the process of encoding the original industrial field data into the multi-frame pictures in time sequence is dependent on the process of restoring the pictures acquired according to the time sequence screen capture into the original industrial field data, namely, a two-dimensional code is used as an encoding mode, a general tool can be selected for decoding, and if the encoding mode is developed by self, a decoding algorithm needs to be deployed in advance at a client.

furthermore, the tool for converting the picture into the video stream is allocated by the main control program, and after a certain number of picture codes are generated, the main control program calls the tool to generate the video stream with a certain code rate and a certain number of frames.

Further, when the remote end needs to obtain the original industrial field data, a series of requests are sent to the local server, and the coding type, resolution information, code rate and the like of the video stream are obtained.

Further preferably, the invention adopts a memory sharing mode, directly uses a video tool to generate the video stream from the picture data in the memory, and reduces the operation time and the occupied space memory occupied by the system for generating the picture body file.

It is further preferred that the type of encoding is determined prior to transmission set-up to reduce algorithm selection for decoding.

Further preferably, the data acquisition device is connected with the local server side through a bus, the local server and an industrial personal computer serving as a data acquisition object are both deployed on an industrial field, the local server is also used as a slave station of the industrial personal computer, the behavior of the local server can be controlled by the industrial personal computer, and the data service permission of a data provider is guaranteed.

The local server is connected with the data acquisition device, the local server and the data acquisition device are communicated through a bus, the data acquisition device acquires industrial field data such as sensor data, shaft data and the like according to requirements, the data are transmitted to the local server through the bus, the local server transcodes the data into a frame of picture through a transcoding tool, then a plurality of pictures are compressed into streaming media through a video processing module, the streaming media are transmitted to a remote end through a real-time streaming protocol in a data packet mode through the local server, a subscriber can acquire a streaming media data packet in an on-demand or live broadcast mode, and then the streaming media data packet is decoded through a decoder (comprising a video processing module and a picture information extraction module) of the remote end to generate original industrial field data. The invention can effectively utilize a relatively mature streaming media real-time transmission scheme, realizes the real-time transmission of industrial field data, and greatly improves the transmittable data capacity.

It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种节点分配方法、系统及电子设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类