CN111031260B - High-speed image unidirectional transmission system method and system based on annular lock-free queue - Google Patents
High-speed image unidirectional transmission system method and system based on annular lock-free queue Download PDFInfo
- Publication number
- CN111031260B CN111031260B CN201911352206.XA CN201911352206A CN111031260B CN 111031260 B CN111031260 B CN 111031260B CN 201911352206 A CN201911352206 A CN 201911352206A CN 111031260 B CN111031260 B CN 111031260B
- Authority
- CN
- China
- Prior art keywords
- prod
- annular lock
- head
- images
- free queue
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000007405 data analysis Methods 0.000 claims abstract description 6
- 238000004458 analytical method Methods 0.000 claims abstract description 3
- 238000004519 manufacturing process Methods 0.000 claims description 13
- 238000010191 image analysis Methods 0.000 claims description 3
- 108091026890 Coding region Proteins 0.000 claims description 2
- 238000002955 isolation Methods 0.000 abstract description 5
- 230000010354 integration Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/10527—Audio or video recording; Data buffering arrangements
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/10527—Audio or video recording; Data buffering arrangements
- G11B2020/10537—Audio or video recording
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a high-speed image unidirectional transmission system method and a system based on an annular lock-free queue.A transmitting end receives a real-time data stream and encodes data into images; the sending end pushing module adds the image into an annular lock-free queue; the display module acquires images from the annular lock-free queue and displays the images on the display terminal; the receiving end captures all images of the transmitting end by using a plurality of image acquisition modules and writes the images into an annular lock-free queue; the data analysis module acquires images from the annular lock-free queue for analysis integration; forwarding the data stream to target equipment to realize unidirectional high-speed transmission under the condition of physical isolation; the problem that the speed cannot be improved due to the operation of the multi-line Cheng Pinfan lock in the image transmission process is solved.
Description
Technical Field
The invention belongs to the field of information security isolation transmission, and particularly relates to a high-speed image unidirectional transmission system method and system based on an annular lock-free queue, which are suitable for carrying out high-speed image unidirectional data transmission without a feedback link between two mutually isolated networks.
Background
Industries where privacy is required, such as enterprises and institutions, protect trade secrets or customer privacy, a common security means is to physically isolate the confidential network from a public network (e.g., the internet). The definition of physical isolation refers to the inability of any physical device to connect between two networks.
Recently, technologies such as big data, cloud computing, artificial intelligence and the like are vigorously developed, and isolation of a bottom network infrastructure enables multi-network data aggregation to become a bottleneck of application of the technologies, and how to achieve data transmission among isolated networks in a compliance and automatic mode becomes a key of grounding of the technical application such as big data.
At present, the existing two-dimensional code ferry machine in the market is limited by the limitation that a single two-dimensional code can carry effective data, and the improvement of the transmission bandwidth can only be realized by accelerating the quantity of the two-dimensional codes changing in each second. The common processing method is to unlock a plurality of threads, but the shared resources of the multithreading operation need to be locked, and the frequent locking operation after locking consumes system resources, so that the transmission speed is not obviously improved, and the purpose of improving the transmission speed cannot be achieved.
Disclosure of Invention
Aiming at the data unidirectional transmission requirement between physical isolation networks, the invention provides a high-speed image transmission method based on an annular lock-free queue, which can improve the transmission rate on the premise of maintaining the reliability and solves the problem of too low image transmission speed.
The method comprises the steps that a sending end creates an annular lock-free queue; receiving a real-time data stream from the outside, and encoding the data content into an image;
The pushing module writes the image into an annular lock-free queue; the display module acquires images from the annular lock-free queue and displays the images on the display terminal.
The receiving end creates a ring-shaped lock-free queue; the acquisition module adds the image into an annular lock-free queue; the analysis module acquires images from the annular lock-free queue and analyzes the images; and the sending module forwards the analyzed image data to the target equipment according to the configuration.
The technical scheme has the following beneficial effects: the problem of inefficiency caused by competition of the multithreading for the read-write permission of the shared resource is solved, and the transmission speed of the image equipment is effectively improved. By utilizing the binary loop-back property, even if overflow occurs in the use process, access will not be wrong, normal data can be obtained, and the system can normally operate under the condition of no special requirement on reliability transmission. The memory address of the two-dimension code data is stored in the annular lock-free queue, so that the annular lock-free queue occupies little memory resource.
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 flow chart of the method of the present invention.
FIG. 2 is a block diagram of an embodiment of the system of the present invention.
FIG. 3 is a diagram of a ring lock-free queue enqueuing process according to the present invention.
FIG. 4 is a diagram of the ring-shaped lock-free queue dequeuing process of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a flow chart of a method for unidirectional transmission of high-speed images of an annular lock-free queue according to an embodiment of the invention is shown, and the method includes:
100, a transmitting end applies for a memory and creates an annular lock-free queue;
101, a transmitting end receives a data stream in real time and encodes the data stream into an image;
103, the image pushing module writes the image into the annular unreported queue;
104, the image display module acquires data from the annular lock-free queue and displays the data at the terminal;
105, the receiving end applies for the memory and creates an annular lock-free queue;
106, the image acquisition module writes the acquired images into an annular lock-free queue;
the 107 image analysis module acquires image data analysis from the annular lock-free queue;
108, integrating the parsed image data and forwarding the integrated image data to target equipment according to the configuration;
As shown in fig. 2, a block diagram of a high-speed image unidirectional transmission method and a system for a ring-shaped lock-free queue according to another embodiment of the invention, the system includes:
21 a data receiving module, in the transmitting end, to be used for receiving the data stream in real time;
A 22-ring lock-free queue, in the transmitting end, for supporting the writing operation of the image pushing module and the obtaining operation of the image display module;
23, in the transmitting end, the image display module is used for acquiring image data from the annular lock-free queue, rearranging the image data according to the configured display model and transmitting the image data to the display module for display;
24 display module, in the sending end, display the image data that is laid out well;
the receiving end does not have any information channel to feed back information to the sending end;
25, in the receiving end, writing the image displayed by the display module of the transmitting end into an annular lock-free queue;
A 26-ring lock-free queue, in the receiving end, for supporting the writing operation of the image acquisition module and the acquisition operation of the data analysis module;
27, a data analysis module, in the receiving end, acquiring and analyzing the two-dimensional code from the annular lock-free queue, and merging the data;
and 28, a data stream forwarding module, in the receiving end, forwarding the data after the merging processing according to the coding sequence of the data stream coding module of the transmitting end and the protocol type.
As shown in fig. 3, a process diagram of ring-type lock-free queue enqueuing in a method and a system for unidirectional transmission of high-speed images of ring-type lock-free queues according to another embodiment of the present invention, the system includes:
After the producer presets the production quantity and prod1 presets success, updating prod_head to represent the preset production end position;
prod2 is predetermined starting from the predetermined end position of prod1, while pro_head is also updated to indicate its predetermined end position of production;
prod1 and prod2 are produced simultaneously;
updating prod_tail to a predetermined production end position of prod1 after prod1 production is completed;
After the production of prod2 is completed, prod_tail is updated to a predetermined production end position of prod 2.
As shown in fig. 4, a process diagram of ring-shaped lock-free queue dequeuing in a method and a system for unidirectional transmission of high-speed images of ring-shaped lock-free queues according to another embodiment of the present invention, the system comprises:
After the consumer presets the production quantity and the prespecified success of the prespecified, updating the prespecified consumption ending position of the prespecified product;
The ons2 is scheduled from the scheduled end position of the ons1, and the scheduled consumption end position is updated by the ons_head;
The production of the ons1 and the ons2 is carried out simultaneously;
Updating the content_tail to a preset consumption ending position of the content 1 after the content 1 is consumed;
after the consumption of the content 2 is completed, the content_tail is updated to a predetermined consumption end position of the content 2.
Claims (4)
1. The method is characterized by being applied to multi-channel high-speed unidirectional transmission between physically isolated networks, and comprises the following steps:
The method comprises the steps that a sending end creates an annular lock-free queue; receiving a data stream from the outside, and encoding the data content into an image; the pushing module writes the image into an annular lock-free queue; the display module acquires images from the annular lock-free queue and displays the images on the display terminal; the receiving end creates a ring-shaped lock-free queue; the acquisition module adds the image into an annular lock-free queue; the analysis module acquires images from the annular lock-free queue and analyzes the images; the sending module forwards the analyzed image data to the target equipment according to the configuration;
The method supports a plurality of sending end pushing modules or a plurality of image acquisition modules to write images into an annular lock-free queue, and comprises the following steps:
step 1: the head index prod_head and the tail index prod_tail of the initial state annular cache region point to the same position; the temporary variable area creates a head index prod_core_head to prod_head and a tail index prod_core_next to the next object in the table, if there is not enough space in the ring buffer, an error will be returned;
Step 2: the prod_head tries to point to the position pointed by prod_core_next, the operation is CAS operation, if a plurality of push modules write image data into a queue, one of the push modules executes the CAS operation successfully, and updates the position pointed by prod_head;
step 3: after the step 2 is successfully executed, adding an element into the annular buffer area, and continuing to execute the subsequent steps, and if a plurality of pushing modules write image data into the queue, repeating the step 2 until the step is successful;
Step 4: if the position pointed by the prod_tail is consistent with the position pointed by the prod_core_head, updating the prod_tail to point to prod_core_next, and if a plurality of pushing modules exist, the same applies;
the method supports a plurality of sending end display modules to acquire images from the annular lock-free queue and display the images on a display terminal, and supports a plurality of image analysis modules to acquire the images from the annular lock-free queue, and comprises the following steps:
Step 1: the head index ons_head and the tail index ons_tail of the initial state annular cache region point to the same position; after the consumer presets the production quantity and the prespecified success of the prespecified, updating the prespecified consumption ending position of the prespecified product;
Step 2: the ons2 is scheduled from the scheduled end position of the ons1, and the scheduled consumption end position is updated by the ons_head;
Step 3: the production of the ons1 and the ons2 is carried out simultaneously;
Step 4: updating the content_tail to a preset consumption ending position of the content 1 after the content 1 is consumed;
Step 5: after the consumption of the content 2 is completed, the content_tail is updated to a predetermined consumption end position of the content 2.
2. The method for unidirectional transmission of high-speed images based on annular lock-free queues according to claim 1, wherein the transmitting end creates the annular lock-free queues by the following steps:
Step1: creating rte _ring_list linked lists;
Step 2: creating a rte _ tailq _entry node in the rte _ring_list linked list;
Step 3: applying for a memory according to the size count of the queue in memzone, creating rte _ring, wherein the structure comprises a producer structure prod and a consumer structure con;
step 4: the data node of rte _ tailq _entry is pointed to the rte _ring structure address.
3. The method for unidirectional transmission of high-speed images based on annular lock-free queues according to claim 1, wherein the receiving end creates the annular lock-free queues by the following steps:
Step1: creating rte _ring_list linked lists;
Step 2: creating a rte _ tailq _entry node in the rte _ring_list linked list;
Step 3: applying for a memory according to the size count of the queue in memzone, creating rte _ring, wherein the structure comprises a producer structure prod and a consumer structure con;
step 4: the data node of rte _ tailq _entry is pointed to the rte _ring structure address.
4. A high-speed unidirectional transmission system for images based on annular lock-free queues, which is applied to multichannel high-speed unidirectional transmission between physically isolated networks, the system comprising:
the data receiving module is used for receiving the data stream in real time in the transmitting end;
The annular lock-free queue is used for supporting writing operation of the image pushing module and obtaining operation of the image display module in the transmitting end;
the image display module is used for acquiring image data from the annular lock-free queue in the transmitting end, rearranging the image data according to the configured display model and transmitting the image data to the display module for display;
The display module displays the arranged image data in the transmitting end;
the receiving end does not have any information channel to feed back information to the sending end;
The image acquisition module is used for writing the images displayed by the display module of the transmitting end into the annular lock-free queue in the receiving end;
the annular lock-free queue is used for supporting the writing operation of the image acquisition module and the acquisition operation of the data analysis module in the receiving end;
the data analysis module is used for acquiring and analyzing the two-dimensional code from the annular lock-free queue in the receiving end and merging the data;
the data stream forwarding module forwards the data after the merging processing according to the coding sequence of the data stream coding module of the transmitting end and the protocol type in the receiving end;
The system supports a plurality of sending end pushing modules or a plurality of image acquisition modules to write images into an annular lock-free queue, and comprises:
step 1: the head index prod_head and the tail index prod_tail of the initial state annular cache region point to the same position; the temporary variable area creates a head index prod_core_head to prod_head and a tail index prod_core_next to the next object in the table, if there is not enough space in the ring buffer, an error will be returned;
Step 2: the prod_head tries to point to the position pointed by prod_core_next, the operation is CAS operation, if a plurality of push modules write image data into a queue, one of the push modules executes the CAS operation successfully, and updates the position pointed by prod_head;
step 3: after the step 2 is successfully executed, adding an element into the annular buffer area, and continuing to execute the subsequent steps, and if a plurality of pushing modules write image data into the queue, repeating the step 2 until the step is successful;
Step 4: if the position pointed by the prod_tail is consistent with the position pointed by the prod_core_head, updating the prod_tail to point to prod_core_next, and if a plurality of pushing modules exist, the same applies;
the system supports a plurality of sending end display modules to acquire images from the annular lock-free queue and display the images on a display terminal, and supports a plurality of image analysis modules to acquire images from the annular lock-free queue, and comprises:
Step 1: the head index ons_head and the tail index ons_tail of the initial state annular cache region point to the same position; after the consumer presets the production quantity and the prespecified success of the prespecified, updating the prespecified consumption ending position of the prespecified product;
Step 2: the ons2 is scheduled from the scheduled end position of the ons1, and the scheduled consumption end position is updated by the ons_head;
Step 3: the production of the ons1 and the ons2 is carried out simultaneously;
Step 4: updating the content_tail to a preset consumption ending position of the content 1 after the content 1 is consumed;
Step 5: after the consumption of the content 2 is completed, the content_tail is updated to a predetermined consumption end position of the content 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911352206.XA CN111031260B (en) | 2019-12-25 | 2019-12-25 | High-speed image unidirectional transmission system method and system based on annular lock-free queue |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911352206.XA CN111031260B (en) | 2019-12-25 | 2019-12-25 | High-speed image unidirectional transmission system method and system based on annular lock-free queue |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111031260A CN111031260A (en) | 2020-04-17 |
CN111031260B true CN111031260B (en) | 2024-05-28 |
Family
ID=70214406
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911352206.XA Active CN111031260B (en) | 2019-12-25 | 2019-12-25 | High-speed image unidirectional transmission system method and system based on annular lock-free queue |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111031260B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114095247A (en) * | 2021-11-18 | 2022-02-25 | 上海云钠信息科技有限公司 | Two-way ferrying method and system based on two-dimensional code and storage medium |
CN114296659B (en) * | 2021-12-31 | 2023-12-29 | 深圳市利谱信息技术有限公司 | Data unidirectional transmission method, intranet terminal unit and unidirectional isolation optical gate system |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686067A (en) * | 2012-09-25 | 2014-03-26 | 中国航天科工集团第二研究院二〇七所 | A compression-free high-definition image real-time transmission method based on a TCP |
CN105975433A (en) * | 2016-06-30 | 2016-09-28 | 瑞斯康达科技发展股份有限公司 | Message processing method and device |
KR101692670B1 (en) * | 2016-04-15 | 2017-01-03 | 김광태 | System and method for transmitting one-way data |
CN108737683A (en) * | 2018-05-24 | 2018-11-02 | 方学林 | A kind of multiple-input and multiple-output one-way data transmission method and system based on Quick Response Code |
CN108768760A (en) * | 2018-04-04 | 2018-11-06 | 吉林省星途科技有限公司 | A kind of multi-machine collaborative working equipment high speed data stream reception method and system |
CN109729024A (en) * | 2018-12-29 | 2019-05-07 | 中盈优创资讯科技有限公司 | Data packet handling system and method |
CN109815029A (en) * | 2019-01-10 | 2019-05-28 | 西北工业大学 | A kind of implementation method communicated between embedded partitions operating system partition |
CN110417792A (en) * | 2019-08-02 | 2019-11-05 | 视联动力信息技术股份有限公司 | Communication means, system, gateway and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7219198B2 (en) * | 2004-06-22 | 2007-05-15 | International Business Machines Corporation | Facilitating communication within shared memory environments using lock-free queues |
KR20130118593A (en) * | 2012-04-20 | 2013-10-30 | 한국전자통신연구원 | Apparatus and method for processing data in middleware for data distribution service |
US10514997B2 (en) * | 2016-09-27 | 2019-12-24 | Eaton Intelligent Power Limited | Multi-producer single consumer lock-free queues with producer reference counting |
-
2019
- 2019-12-25 CN CN201911352206.XA patent/CN111031260B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686067A (en) * | 2012-09-25 | 2014-03-26 | 中国航天科工集团第二研究院二〇七所 | A compression-free high-definition image real-time transmission method based on a TCP |
KR101692670B1 (en) * | 2016-04-15 | 2017-01-03 | 김광태 | System and method for transmitting one-way data |
CN105975433A (en) * | 2016-06-30 | 2016-09-28 | 瑞斯康达科技发展股份有限公司 | Message processing method and device |
CN108768760A (en) * | 2018-04-04 | 2018-11-06 | 吉林省星途科技有限公司 | A kind of multi-machine collaborative working equipment high speed data stream reception method and system |
CN108737683A (en) * | 2018-05-24 | 2018-11-02 | 方学林 | A kind of multiple-input and multiple-output one-way data transmission method and system based on Quick Response Code |
CN109729024A (en) * | 2018-12-29 | 2019-05-07 | 中盈优创资讯科技有限公司 | Data packet handling system and method |
CN109815029A (en) * | 2019-01-10 | 2019-05-28 | 西北工业大学 | A kind of implementation method communicated between embedded partitions operating system partition |
CN110417792A (en) * | 2019-08-02 | 2019-11-05 | 视联动力信息技术股份有限公司 | Communication means, system, gateway and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111031260A (en) | 2020-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111031260B (en) | High-speed image unidirectional transmission system method and system based on annular lock-free queue | |
CA1280217C (en) | Method and apparatus for utilization of dual latency stations for performance improvement of token ring networks | |
CN105677283B (en) | A kind of video-signal transmission method and device shown applied to multi-screen splicing | |
CN107484011B (en) | Video resource decoding method and device | |
CN107749893B (en) | Method for realizing rapid data receiving and storing in shared file system | |
US8725873B1 (en) | Multi-server round robin arbiter | |
Xia et al. | WiserVR: Semantic communication enabled wireless virtual reality delivery | |
CN112689020B (en) | Message transmission method, message middleware, electronic equipment and storage medium | |
CN106231225A (en) | A kind of network hard disk video recorder data processing method and system | |
CN104811752A (en) | Multi-screen synchronization method and playing system for the same local area network | |
CN110083468A (en) | A kind of data transmission method, electronic device and storage medium | |
CN102611625A (en) | Parameter data server, parameter data transmission method and data transmission system | |
CN112087631A (en) | Synchronous parallel video coding and decoding and streaming media transmission system and method based on GPU | |
CN105208004A (en) | Data input method based on OBD equipment | |
US20140358996A1 (en) | Distributed encoding and decoding system, method, and device | |
CN113395564B (en) | Image display method, device and equipment | |
CN107027052B (en) | The method and system of frame per second adaptively drop in SVC video | |
CN110012272A (en) | A kind of method for transmission processing and device of ARINC818 data flow | |
KR101032744B1 (en) | Devices and processes for transmitting and receiving data, computer program product and carrier signal | |
DE112016005989T5 (en) | RELIABLE END TO END PROTOCOL WITH ROBUST WINDOW STATUS OVERFLOW MANAGEMENT OUTSIDE THE ORDER AND A MULTI-NODE SYSTEM THROUGH USE THEREOF | |
CN110912841B (en) | SRIO protocol control character and data packet separation system facing 128bit width | |
US10755746B2 (en) | Real-time editing system | |
CN102170401B (en) | Method and device of data processing | |
US6369848B1 (en) | Picture data transmission device and picture signal coding method thereof | |
EP4407433A1 (en) | Information processing method and apparatus thereof, cloud terminal, cloud server, and storage medium |
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 |