Industrial camera and data transmission method

By using a data distribution module in an industrial camera to divide image data packets and transmit in parallel using multiple data transmission interfaces, the problem of low data transmission efficiency in the prior art is solved, the data transmission efficiency is improved and the manufacturing cost is reduced.

CN119071607APending Publication Date: 2024-12-03TP-LINK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411048662.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The data transmission efficiency of existing industrial cameras is low, and a single Gigabit network port cannot meet the fast transmission requirements of large amounts of image data at high frame rates and high resolutions. There are connections for multiple high-speed interfaces such as 2.5 Gigabit network port and USB 3.0. and cost issues.

Method used

Design an industrial camera to divide the image to be transmitted into multiple image data packets through the data distribution module, and alternately transmit it through multiple data transmission interfaces (such as multiple gigabit network ports), and use multiple data transmission interfaces to transmit images in parallel. Data packets to improve data transmission efficiency.

Benefits of technology

It has achieved improvement in industrial camera data transmission efficiency, reduced manufacturing costs, and avoided the connection problems of high-cost high-speed interfaces such as 2.5 Gigabit network port and USB 3.0. It is suitable for industrial vision detection scenarios with high frame rate and high resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071607A_ABST
    Figure CN119071607A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is suitable for the technical field of industrial cameras, and provides an industrial camera and a data transmission method, and the industrial camera comprises a data distribution module, the data output end of the data distribution module is connected with N data transmission interfaces, and the data distribution module is used for dividing a to-be-transmitted image into M image data packets according to a mode signal, the M image data packets are alternately transmitted to the data transmission interfaces in sequence; n is a positive integer greater than or equal to 2; m is a positive integer greater than or equal to 2; the data output ends of the N data transmission interfaces are connected with the data input end of target equipment, and the N data transmission interfaces are used for transmitting the M image data packets to the target equipment in a transmission mode corresponding to the mode signal. According to the industrial camera provided by the embodiment of the invention, the data transmission rate can be improved in a low-cost manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the technical field of industrial cameras, and in particular, relate to an industrial camera and a data transmission method. Background Art

[0002] With the development of camera imaging technology, the imaging technology of industrial cameras is gradually developing towards high frame rate and high resolution. As the frame rate increases, the image data captured by industrial cameras per unit time is also increasing. Industrial cameras themselves do not have the functions of image storage and image analysis. Therefore, in order to be able to transmit the image data captured by industrial cameras to the corresponding server in a timely manner, the transmission rate of the data transmission interface on the industrial camera also needs to be increased accordingly. In the prior art, since industrial cameras are usually only equipped with a single Gigabit network port, all image data collected by industrial cameras can only be transmitted through one Gigabit network port, and the data transmission efficiency is low. Summary of the invention

[0003] In view of this, an embodiment of the present application provides an industrial camera and a data transmission method to improve the data transmission efficiency of the industrial camera.

[0004] A first aspect of an embodiment of the present application provides an industrial camera, including:

[0005] A data distribution module, wherein the data output end of the data distribution module is respectively connected to N data transmission interfaces, and is used to divide the image to be transmitted into M image data packets according to the mode signal, and sequentially and alternately transmit the M image data packets to each of the data transmission interfaces; N is a positive integer greater than or equal to 2; M is a positive integer greater than or equal to 2;

[0006] N data transmission interfaces, data output ends of the N data transmission interfaces are connected to data input ends of the target device, and are used to transmit the M image data packets to the target device through the transmission method corresponding to the mode signal.

[0007] In a possible implementation manner of the first aspect, the data distribution module includes:

[0008] A data splitting unit, used for splitting the image to be transmitted into M image sub-data according to a preset distribution algorithm, and transmitting the M image sub-data to the data packaging module;

[0009] A data packing module, wherein the data input end of the data packing module is connected to the data output end of the data splitting unit, and the data output end of the data packing module is respectively connected to the data input ends of the N data transmission interfaces, for packing the M image sub-data respectively according to the communication protocol corresponding to the mode signal, and transmitting the image data packets generated by the packing to each of the data transmission interfaces alternately in turn.

[0010] In a possible implementation manner of the first aspect, the data packaging module includes:

[0011] N data packing units, each of which is connected to the corresponding data transmission interface.

[0012] In a possible implementation manner of the first aspect, the mode signal includes a first mode signal and a second mode signal;

[0013] The data packaging module is used to package the M image sub-data according to the first communication protocol corresponding to the first mode signal after receiving the first mode signal; and to package the M image sub-data according to the second communication protocol corresponding to the second mode signal after receiving the second mode signal.

[0014] In a possible implementation manner of the first aspect, the data distribution module further includes:

[0015] A cache unit, wherein the cache unit is connected between the data splitting unit and the data packaging module, and is used for caching the image sub-data generated by the data splitting unit, and when the amount of the cached image sub-data is greater than or equal to a preset cache threshold, transmitting the cached image sub-data to the data packaging module.

[0016] In a possible implementation manner of the first aspect, the data transmission interface is a gigabit network port.

[0017] A second aspect of an embodiment of the present application provides a data transmission method, which is applied to an industrial camera including N data transmission interfaces, where N is a positive integer greater than or equal to 2, including:

[0018] Acquire an image to be transmitted, and divide the image to be transmitted into M image data packets according to a mode signal and a distribution algorithm; M is a positive integer greater than or equal to 2;

[0019] The M image data packets are transmitted alternately to the target device through the N data transmission interfaces.

[0020] In a possible implementation manner of the second aspect, acquiring the image to be transmitted and generating M image data packets corresponding to the image to be transmitted according to a mode signal input by a user and a distribution algorithm include:

[0021] Based on a distribution algorithm, the image to be transmitted is split into M image sub-data; the data volume of the image sub-data split by the distribution algorithm is less than or equal to the maximum transmission unit of the data transmission interface;

[0022] The data is packaged based on the communication protocol and the distribution algorithm to generate the M image data packets.

[0023] In a possible implementation manner of the second aspect, splitting the to-be-transmitted image into M image sub-data based on a distribution algorithm includes:

[0024] If the resolution of the image to be transmitted is within a preset resolution range, the image to be transmitted is split into the M image sub-data based on the number of rows of the image to be transmitted; the upper limit value in the resolution range is less than or equal to the maximum transmission unit of the data transmission interface.

[0025] In a possible implementation manner of the second aspect, transmitting the M image data packets to a target device through the N data transmission interfaces includes:

[0026] If the mode signal is the first mode signal, the M image data packets are transmitted to the target device through the N data transmission interfaces and the preset first protocol address;

[0027] If the mode signal is a second mode signal, the second protocol addresses corresponding to each of the data transmission interfaces are determined according to a preset address mapping table, and the M image data packets are transmitted to the target device through the N data transmission interfaces and the second protocol addresses corresponding to each of the data transmission interfaces.

[0028] A third aspect of an embodiment of the present application provides a data transmission device, including:

[0029] A distribution module, used for acquiring an image to be transmitted, and dividing the image to be transmitted into M image data packets according to a mode signal input by a user and a distribution algorithm; M is a positive integer greater than or equal to 2;

[0030] A transmission module is used to alternately transmit the M image data packets to a target device through the N data transmission interfaces.

[0031] A fourth aspect of an embodiment of the present application provides an industrial camera, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data transmission method as described in the second aspect above when executing the computer program.

[0032] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data transmission method as described in the second aspect above is implemented.

[0033] A sixth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the data transmission method described in the second aspect.

[0034] Compared with the prior art, the embodiments of the present application have the following advantages:

[0035] The industrial camera provided in the embodiment of the present application includes N data transmission interfaces. In addition, the data distribution module can divide the image to be transmitted into M image data packets, and transmit the divided image data packets alternately to each data transmission interface. Therefore, the industrial camera provided in the embodiment of the present application can use multiple data transmission interfaces to transmit image data packets at the same time, thereby improving the data transmission efficiency of the industrial camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 It is a schematic diagram of the development of an industrial camera interface technology provided by an embodiment of the present application;

[0038] Figure 2 is a structural schematic diagram of an industrial camera provided in an embodiment of the present application;

[0039] Figure 3 is a structural schematic diagram of another industrial camera provided in an embodiment of the present application;

[0040] Figure 4 It is a specific structural diagram of a data distribution module provided in an embodiment of the present application;

[0041] Figure 5 It is a specific structural diagram of a data packaging module provided in an embodiment of the present application;

[0042] Figure 6 It is a schematic diagram of a data transmission method provided by the present application;

[0043] Figure 7 is a schematic diagram of a data transmission device provided in an embodiment of the present application;

[0044] Figure 8 It is a schematic diagram of an industrial camera provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.

[0046] It should be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0047] It should also be understood that references to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in the specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0048] There are two main types of existing machine vision systems. One is an embedded machine vision system, also known as a smart camera; the other is a computer-based machine vision system. Among them, the embedded machine vision system is mainly composed of components such as a processor, memory, FLASH, I / O interface, Ethernet components, light source, optical lens, image processing software, etc., all of which are concentrated in one device. The computer-based machine vision system is composed of a light source, an optical lens, an industrial camera, an image acquisition card, a computer, and image processing software installed in the computer. Since the industrial camera in the computer-based machine vision system exists independently of the computer, and the image processing software is installed in the computer, after the industrial camera captures the image, it needs to transmit the captured image to the computer through a transmission device so that the captured image can be processed by the image processing software in the computer.

[0049] In recent years, with the continuous development of sensor technology, the image sensor in industrial cameras has also evolved from charge-coupled device (CCD) to CMOS image sensor (CMOS imager sensor). Therefore, the imaging frame rate and imaging resolution of industrial cameras are also constantly improving. Since high-resolution and high-frame-rate cameras need to transmit a large amount of image data to the computer in a short time, in order to meet the data transmission needs of industrial cameras, the data transmission interface on industrial cameras is also constantly developing. Figure 1 , shows a schematic diagram of the development of an industrial camera interface technology provided by an embodiment of the present application. Figure 1 As shown in the figure, analog signal cameras, IEEE1394 serial interface cameras, USB1.0 interface cameras and USB 2.0 industrial cameras have been eliminated in the past few years, and the data transmission interface of industrial cameras is also evolving towards high bandwidth. Currently, the high-speed transmission interfaces that can be used in industrial cameras mainly include Gigabit Ethernet, 2.5 Gigabit Ethernet, USB 3.0 and other interfaces.

[0050] Among them, the most common industrial cameras on the market are those with a single Gigabit Ethernet port. However, the data transmission rate of a single Gigabit Ethernet port is only 1Gbps. In common 5-megapixel industrial cameras, the maximum frame rate that a single Gigabit Ethernet port can transmit is only about 22fps, which cannot meet some application scenarios with higher frame rates. Therefore, some higher-speed interface technologies are applied to industrial camera products. For example, an industrial camera equipped with a 2.5 Gigabit Ethernet port can be used to transmit image data of 5 million pixels with a frame rate of about 58fps, and an industrial camera equipped with a USB 3.0 interface can be used to transmit image data of 5 million pixels with a frame rate of about 72fps.

[0051] Among them, the main advantage of the USB 3.0 interface is that the interface is more commonly used. With the development of computer motherboards, conventional computers are equipped with USB 3.0 interfaces. However, there are also the following disadvantages when using the USB 3.0 interface as the data transmission interface of industrial cameras: in industrial visual inspection projects, multiple industrial cameras are usually required to work together, and there are only two conventional USB 3.0 interfaces on a computer motherboard, which severely limits the number of industrial cameras that can be connected to a single computer. Furthermore, the maximum supported line length of the USB 3.0 interface is usually 3.5 meters, while the mechanical structure of industrial visual inspection equipment is usually more complex. The connection distance between the industrial camera and the computer may exceed 3.5 meters, resulting in the interface being unable to connect normally.

[0052] 2.5 Gigabit Ethernet ports are usually connected to the Internet, and the cable length can usually support 100 meters. They can be flexibly wired without the cable length limit of the USB 3.0 interface. However, 2.5 Gigabit Ethernet ports also have the following disadvantages: the data transmission interface installed on most computers is still a Gigabit Ethernet port, and 2.5 Gigabit Ethernet ports are not currently the mainstream data transmission interface for computers and switches. Therefore, industrial cameras with 2.5 Gigabit Ethernet ports may have connection problems with computers. Furthermore, since the mainstream data transmission interface of computers is not a 2.5 Gigabit Ethernet port, the computer may not be equipped with a 2.5 Gigabit network card corresponding to the 2.5 Gigabit Ethernet port, which results in the need to plug in a 2.5 Gigabit network card on the computer when connecting.

[0053] In addition, the chip power consumption of the 2.5 Gigabit Ethernet port is relatively high. When integrated into a miniaturized industrial camera product, it is easy to cause serious heating of the industrial camera. It is necessary to add additional heat dissipation measures on the industrial camera, which increases the production cost of the industrial camera. Furthermore, most of the chips used in industrial camera products are FPGA chips. The FPGA chip and the 2.5 Gigabit Ethernet port need to be connected through the HSGMII interface. Therefore, the FPGA chip on the industrial camera needs to support the Serdes interface, and the FPGA chip that usually supports the Serdes interface is expensive. In summary, if the 2.5 Gigabit Ethernet port is used as the data transmission interface of the industrial camera, not only may there be connection problems with the computer, but also it may be necessary to plug in a specific network card on the computer, and it is also necessary to use specific chips and increase heat dissipation measures on the industrial camera, which will cause a significant increase in the production cost of the industrial camera.

[0054] The shooting frame rate of a common 5-megapixel industrial camera is 22fps to 25fps, so the 10G Ethernet port is somewhat redundant in the application scenarios of general 5-megapixel industrial cameras. In addition, since the 10G Ethernet port has an ultra-high transmission bandwidth, the industrial camera generates more heat when using the 10G Ethernet port for data transmission. Moreover, the high cost of the 10G Ethernet port will also significantly increase the production cost of industrial cameras.

[0055] Based on this, an embodiment of the present application provides an industrial camera comprising at least two data transmission interfaces. In the industrial camera provided in this embodiment, since the data distribution module divides the image to be transmitted into multiple image data packets, and transmits the divided image data packets alternately to each data transmission interface of the industrial camera, the image data packets are transmitted to the target device through multiple data transmission interfaces at the same time. Therefore, the industrial camera provided by this embodiment can improve the data transmission efficiency of the image. Furthermore, in the industrial camera provided in this embodiment, since the number of data transmission interfaces has increased, the R&D personnel can increase the data transmission rate of the industrial camera at a lower cost by equipping the industrial camera with multiple low-cost data transmission interfaces, such as equipping multiple gigabit network ports, thereby saving the manufacturing cost of the industrial camera.

[0056] The technical solution of the present application is described below through specific embodiments.

[0057] Reference Figure 2 , shows a schematic diagram of the structure of an industrial camera provided by an embodiment of the present application. Figure 2 As shown, the industrial camera may include a data distribution module 11 and N data transmission interfaces, which are respectively represented as a first data transmission interface 21 and an Nth data transmission interface 2N. Wherein, N is a positive integer greater than or equal to 2.

[0058] The data output end of the data distribution module 11 can be connected to the data input end of each data transmission interface. The data distribution module 11 can divide the image to be transmitted in the industrial camera according to the mode signal, so as to divide the image to be transmitted into M image data packets. Wherein, M is a positive integer greater than or equal to 2. For the specific method of dividing the image to be transmitted into M image data packets by the data distribution module 11, please refer to the content of the method embodiment.

[0059] After dividing the image data packets, the data distribution module 11 can alternately transmit the divided image data packets to each data transmission interface. In a possible implementation, the data distribution module can transmit each image data packet through different data transmission interfaces respectively. When the number of image data packets is greater than the number of interfaces of the data transmission interface of the industrial camera, the data distribution module can divide all image data packets into multiple sending rounds according to the number of interfaces on the industrial camera. Each sending round can simultaneously transmit N different image data packets to each data transmission interface respectively, so as to send different image data packets through N data transmission interfaces, thereby realizing parallel transmission of image data packets by multiple data transmission interfaces. Exemplarily, when N is equal to 2, the data distribution module 11 can transmit the divided different image data packets to the first data transmission interface 21 and the second data transmission interface 22 respectively for transmission, so as to simultaneously transmit multiple image data packets in parallel to the target device through multiple data transmission interfaces.

[0060] For another example, when N is equal to 3, the data distribution module 11 can transmit the divided first image data packet to the first data transmission interface 21, transmit the divided second image data packet to the second data transmission interface 22, and then transmit the divided third image data packet to the third data transmission interface 23, and then transmit the divided fourth image data packet to the first data transmission interface 21. The data distribution module 11 can transmit all the divided image data packets to each data transmission interface in turn until the transmission is completed, so as to transmit multiple image data packets to the target device in parallel through multiple data transmission interfaces at the same time.

[0061] The data output ends of each data transmission interface on the industrial camera can be respectively connected to the data input ends of the target device 6. Specifically, the first data transmission interface 21 on the industrial camera can be connected to the first data transmission interface 61 on the target device 6. The Nth data transmission interface 2N on the industrial camera can be connected to the Nth data transmission interface 6N on the target device 6. After receiving the image data packet sent by the data distribution module 11, any data transmission interface on the industrial camera can transmit all received image data packets to the target device according to the transmission method corresponding to the mode signal.

[0062] See also Figure 3 , shows a schematic diagram of the structure of another industrial camera provided by an embodiment of the present application. Figure 3 As shown, the industrial camera may include a field programmable gate array 1, N data transmission interfaces ( Figure 2 ), memory 3, flash memory chip 4 and image sensor 5. The field programmable gate array 1 may be provided with a data distribution module 11, an image signal processing module 12, a processor interface 13 and a central processing unit 14.

[0063] Among them, a first transmission link is connected between the image sensor 5 and the central processing unit 14. Exemplarily, the first transmission link can be an integrated circuit bus (Inter-Integrated Circuit), and data can be transmitted between the image sensor 5 and the central processing unit 14 through the first transmission link. A second transmission link can be connected between the central processing unit 14 and the flash memory chip 4. When the industrial camera is powered on and running, the central processing unit 14 can read the bit stream and software system program required by the field programmable gate array 1 from the flash memory chip 4 through the second transmission link, and run the read software system program. After the software system program is running, the central processing unit 14 can transmit a parameter data packet to the image sensor through the first transmission link to configure the transmission parameters of the image sensor 5 through the parameter data packet. After receiving the parameter data packet transmitted by the central processing unit 14, the image sensor 5 can perform parameter configuration according to the received parameter data packet, and output image data according to the configured transmission parameters.

[0064] The image sensor 5 can also be connected to the image signal processing module 12 of the field programmable gate array 1 through the processor interface 13. A second transmission link can be connected between the image signal processing module 12 and the data distribution module 11. A third transmission link can be connected between the data distribution module 11 and the memory 3. When any data transmission interface on the industrial camera is connected to the data transmission interface on the target device, that is, when the industrial camera is in the data transmission mode, the image sensor 5 can transmit the collected image to be transmitted to the image signal processing module 12 through the processor interface 13 after collecting the image to be transmitted. After receiving the image to be transmitted sent by the image sensor, the image signal processing module 12 can perform preprocessing operations on the received image to be transmitted according to the preprocessing algorithm pre-set by the R&D personnel. Exemplarily, the image signal processing module 12 can perform preprocessing operations including but not limited to color correction, noise reduction, white balance adjustment, geometric correction, image enhancement, etc. on the received image to be transmitted. The embodiment of the present application is not used to specifically limit the preprocessing operations performed by the image signal processing module 12.

[0065] After performing the preprocessing operation on the image to be transmitted, the image signal processing module 12 can transmit the preprocessed image to be transmitted to the data distribution module 11 through the second transmission link. After receiving the image to be transmitted transmitted by the image signal processing module 12, the data distribution module 11 can transmit the received image to be transmitted to the memory 3 through the third transmission link for caching.

[0066] The data distribution module 11 can also obtain the image to be transmitted from the memory 3 through the third transmission link, and divide the obtained image to be transmitted into M image data packets, and the generated M image data packets are alternately transmitted to the first data transmission interface 21 and the second data transmission interface 22. After receiving the image data packet sent by the data distribution module 11, the first data transmission interface 21 and the second data transmission interface 22 can transmit the received image data packet to the target device. Exemplarily, the first data transmission interface 21 and the second data transmission interface 22 in the industrial camera can both be Gigabit network ports. The first data transmission interface 21 and the second data transmission interface 22 can be respectively connected to the Gigabit network port on the target device to transmit the image data packet to the target device.

[0067] Among them, the first data transmission interface 21 and the second data transmission interface 22 of the industrial camera may include a data transmission main interface. This embodiment takes the first data transmission interface 21 as an example of the data transmission main interface. The first data transmission interface 21 in the industrial camera can be used not only to transmit image data packets to the target device, but also to receive data packets sent by the target device. Specifically, when the user needs to turn on the data transmission mode of the industrial camera, the user can send a mode signal to the industrial camera through the target device. Among them, the target device can generate a mode signal according to the GVCP (GigE Vision Control Protocol) protocol. The data transmission main interface on the target device can transmit the mode signal initiated by the user to the first data transmission interface 21.

[0068] The industrial camera can receive a mode signal initiated by the user through the first data transmission interface 21. After receiving the mode signal initiated by the user, the first data transmission interface 21 can transmit the received mode signal to the data distribution module 11. Among them, a fourth link can be connected between the data distribution module 11 and the central processing unit 14. After receiving the mode signal transmitted by the first data transmission interface 21, the data distribution module 11 can transmit the received mode signal to the central processing unit 14 through the fourth link. After receiving the mode signal, the central processing unit 14 can configure the register in the data distribution module 11 according to the received mode signal to configure the data distribution module 11 to the data distribution mode corresponding to the mode signal.

[0069] Among them, the mode signal can be initiated by the user to the industrial camera through the target device, or the industrial camera can detect the data transmission mode supported by the target device by itself, and automatically generate the mode signal according to the data transmission mode supported by the target device. The mode signal initiated by the user can be used to select the data transmission mode of the industrial camera. Among them, the data transmission mode in the industrial camera can include a first data transmission mode and a second data transmission mode. Specifically, when the industrial camera is in the first data transmission mode, all data transmission interfaces in the industrial camera can transmit image data packets to the target device by link aggregation using the same first protocol address. When the industrial camera is in the second data transmission mode, each data transmission interface in the industrial camera can transmit image data packets to the target device through its corresponding second protocol address. The user can select the data transmission mode of the industrial camera according to the support of link aggregation of the target device. Exemplarily, when the target device supports link aggregation transmission, the user can send a first mode signal to the industrial camera through the target device so that the industrial camera transmits the image data packet to the target device through the first data transmission mode. When the target device does not support link aggregation transmission, the user can send a second mode signal to the industrial camera through the target device so that the industrial camera transmits the image data packet to the target device through the second data transmission mode.

[0070] See also Figure 4 , shows a specific structural diagram of a data distribution module provided in an embodiment of the present application. Figure 4 As shown, the data distribution module 11 may include a data splitting unit 111, a cache unit 112 and a data packaging module 113. A third transmission link may be connected between the data splitting unit 111 and the memory 3. The data input end of the data splitting unit 111 may be connected to the data input end of the cache unit 112. The data output end of the cache unit may be connected to the data input end of the data packaging module 113.

[0071] Exemplarily, the third transmission link between the data splitting unit 111 and the memory 3 may be an AXI on-chip bus. The data splitting unit 111 may obtain the image to be transmitted from the memory 3 via the AXI on-chip bus. After the data splitting unit 111 obtains the image to be transmitted from the memory 3, it may determine the distribution algorithm corresponding to the image to be transmitted according to the resolution of the image to be transmitted. The data splitting unit 111 may split the image to be transmitted into M image sub-data according to the determined distribution algorithm. After each image sub-data is split, the data splitting unit 111 may transmit the currently split image sub-data to the cache unit 112.

[0072] The cache unit 112 is connected between the data splitting unit 111 and the data packaging module 113. The cache unit 112 can be used to balance the difference in data transmission speed. The cache unit 112 can receive the image sub-data sent by the data splitting unit 111 and cache the received image sub-data. Exemplarily, when there are two data transmission interfaces on the industrial camera, the data throughput of the cache unit 112 when receiving the image sub-data from the data splitting unit 111 can be 125x16=2000Mbps. When the image sub-data cached in the cache unit 112 is greater than or equal to the cache threshold value preset by the R&D personnel, the cache unit 112 transmits the cached image sub-data to the data packaging module 113. Specifically, when the image sub-data cached in the cache unit 112 is greater than or equal to the cache threshold value, the data packaging module 113 can obtain the image sub-data cached in the cache unit 112 from the cache unit 112. Exemplarily, when there are two data transmission interfaces on the industrial camera, the throughput of the cache unit 112 transmitting the image sub-data to the data packaging module can be 2x125x8=2000Mbps.

[0073] The data input port of the data packaging module 113 can be connected to the data output port of the cache unit 112. When the image sub-data cached in the cache unit 112 is greater than or equal to the cache threshold, the data packaging module 113 can obtain the image sub-data from the cache unit 112. The data packaging module 113 can process the acquired image sub-data according to the communication protocol corresponding to the mode signal sent by the central processor 14, and transmit the packaged image data packets alternately to the data transmission interfaces on the industrial camera.

[0074] See also Figure 5 , shows a specific structural diagram of a data packaging module provided in an embodiment of the present application. Figure 5 As shown, the data packing module 113 may include multiple data packing units. Among them, the number of data packing units in the data packing module 113 may be the same as the number of data transmission interfaces in the industrial camera, which are respectively represented as the first data packing unit 1131 and the Nth data packing unit 113N in the figure. Each data packing unit in the data packing module 113 can be connected to a data transmission interface respectively. Exemplarily, the first data packing unit 1131 can be connected to the first data transmission interface 21. The Nth data packing unit 113N can be connected to the Nth data transmission interface 2N. The data input end of each data packing unit in the data packing module 113 can be respectively connected to the data output end of the central processor 14 in the industrial camera. The data input end of each data packing unit in the data packing module 113 can also be connected to the data output end of the cache unit 112.

[0075] Each data packaging unit in the data packaging module 113 can receive the mode signal sent by the central processor 14. When the image sub-data cached in the cache unit 112 is greater than or equal to the cache threshold, each data packaging unit can alternately obtain the image sub-data from the cache unit 112, and package the received image sub-data according to the communication protocol corresponding to the mode signal, and transmit the packaged image data packet to the data transmission interface connected thereto.

[0076] Figure 6 A schematic diagram of a data transmission method provided by the present application is shown. The method can be applied to Figure 2 The industrial camera shown in the figure may include a data distribution module and N data transmission interfaces. The above data transmission method may specifically include the following steps.

[0077] S601 . Acquire an image to be transmitted, and divide the image to be transmitted into M image data packets according to a mode signal and a distribution algorithm.

[0078] In this embodiment, in response to the mode signal, the data distribution module on the industrial camera can obtain the image to be transmitted from the memory. The mode signal can be initiated by the user to the industrial camera through the target device, or the industrial camera can detect the data transmission mode supported by the target device and automatically generate the mode signal according to the data transmission mode supported by the target device. After obtaining the image to be transmitted, the data distribution module can divide the obtained image to be transmitted into M image data packets according to the mode signal and distribution algorithm input by the user.

[0079] In a possible implementation, after acquiring the image to be transmitted, the data distribution module may split the image to be transmitted into M image sub-data through a distribution algorithm. Specifically, the data distribution module may determine the distribution algorithm corresponding to the image to be transmitted according to the resolution of the image to be transmitted. Among them, the data amount of each image sub-data split out by the distribution algorithm may be less than or equal to the maximum transmission unit of the data transmission interface. When splitting the image to be transmitted, the data distribution module may also count the image sub-data split out of the same image to be transmitted to determine the splitting order. After the data distribution module splits the image to be transmitted into M image sub-data, the corresponding communication protocol may be determined according to the mode signal input by the user. The data distribution module may package the split image sub-data, the algorithm identifier corresponding to the distribution algorithm used to split the image to be transmitted, and the splitting order corresponding to the image sub-data according to the communication protocol corresponding to the mode signal to generate an image data packet.

[0080] In a possible implementation, when there are two data transmission interfaces on the industrial camera, the distribution algorithm can be an odd-even row distribution algorithm preset by the R&D personnel. Specifically, the data distribution module can split each row of data in the image to be transmitted into an image sub-data, and package each split image sub-data according to the communication protocol corresponding to the mode signal, and generate an image data packet corresponding to each image sub-data. Then, the data distribution module can transmit the image data packet corresponding to the image sub-data of the odd-numbered rows to the first data transmission interface, and transmit the image data packet corresponding to the image sub-data of the even-numbered rows to the second data transmission interface.

[0081] In a possible implementation, after acquiring the image to be transmitted, the data distribution module may determine whether the resolution of the currently acquired image to be transmitted is within the resolution range preset by the R&D personnel. Specifically, the resolution of the image to be transmitted may include the number of horizontal pixels and the number of vertical pixels. The number of horizontal pixels of the image to be transmitted may indicate the total number of pixels of each row of the image to be transmitted in the horizontal direction. The number of vertical pixels of the image to be transmitted may indicate the total number of pixels of each column of the image to be transmitted in the vertical direction. The data distribution module may determine whether the image to be transmitted is within the resolution range according to the number of horizontal pixels of the image to be transmitted. The resolution range is used to determine whether the number of horizontal pixels of the image to be transmitted meets the transmission requirements of the data transmission interface, and may be specifically used to determine whether the number of horizontal pixels of the image to be transmitted exceeds the number of pixels corresponding to the maximum transmission unit of the data transmission interface, and whether the number of horizontal pixels of the image to be transmitted is less than the optimal transmission unit of the data transmission interface. If the number of horizontal pixels of the image to be transmitted is greater than or equal to the lower limit value in the resolution range, and / or the number of horizontal pixels of the image to be transmitted is less than or equal to the upper limit value in the resolution range, the data distribution module may determine that the resolution of the image to be transmitted is within the resolution range preset by the R&D personnel. If the number of horizontal pixels of the image to be transmitted is less than the lower limit of the resolution range, or the number of horizontal pixels of the image to be transmitted is greater than the upper limit of the resolution range, the data distribution module can determine that the resolution of the image to be transmitted is not within the resolution range.

[0082] Among them, the resolution range can be determined by the R&D personnel according to the maximum transmission unit (Maximum Transmission Unit, MTU) of the data transmission interface. The upper limit value in the resolution range can be less than or equal to the maximum transmission unit of the data transmission interface. The lower limit value in the resolution range can be greater than or equal to the optimal transmission unit of the data transmission interface. Specifically, the upper limit value in the resolution range can be determined by the maximum transmission unit of the data transmission interface and the number of bytes per unit of a single pixel. Exemplarily, when the maximum transmission unit of the data transmission interface is 9000 kilobytes and the number of bytes per unit of a single pixel is 1 byte, the upper limit value in the resolution range can be less than or equal to 9000. The resolution range can be used to ensure that the amount of data of the split image sub-data will not be greater than the maximum transmission unit of the data transmission interface, and will not be less than the optimal transmission unit of the data transmission interface. Thereby, while ensuring that the data transmission interface can transmit the split image data packets, it is avoided that the split image data packets are too small, resulting in low utilization of the data transmission interface.

[0083] If the resolution of the image to be transmitted is within the resolution range, the data distribution module can split the image to be transmitted into M image sub-data according to the number of rows of the image to be transmitted. Exemplarily, the data distribution module can split each row of data in the data to be transmitted into one image sub-data.

[0084] In a possible implementation, if the resolution of the image to be transmitted is not within the resolution range, the data distribution module can split the image to be transmitted according to the effective data length preset by the developer to ensure that the split image sub-data meets the optimal transmission size of the data transmission interface. The effective data length can be determined by the developer according to the maximum transmission unit of the data transmission interface and the field length corresponding to the fixed field in the image data packet.

[0085] In a possible implementation, after the image to be transmitted is split into image sub-data, the data distribution module can also determine the header and trailer of the image data packet according to the communication protocol corresponding to the mode signal, and package the split image sub-data according to the header and trailer corresponding to the communication protocol to generate image data packets corresponding to each image sub-data. Specifically, when the mode signal is a first mode signal, the data distribution module can package the split image sub-data according to the first communication protocol corresponding to the first mode signal. When the mode signal is a second mode signal, the data distribution module can package the split image sub-data according to the second communication protocol corresponding to the second mode signal. Among them, the first communication protocol can be a GVSP protocol, and the second communication protocol can be a private protocol set by the R&D personnel.

[0086] Through the method provided in this embodiment, the industrial camera can not only generate image data packets according to the communication protocol set by the R&D personnel, but also generate image data packets according to the GVSP protocol. Therefore, the data transmission method provided in the embodiment of the present application has high compatibility. In addition, since the industrial camera can generate image data packets according to the private protocol set by the R&D personnel, that is, each data transmission interface in the industrial camera can transmit image data packets according to the transmission method corresponding to the private protocol, the method provided in this embodiment can improve the transmission stability of the image data packets.

[0087] S602 , alternately transmitting M image data packets to a target device through N data transmission interfaces.

[0088] In this embodiment, after the data distribution module in the industrial camera divides the image to be transmitted into M image data packets, it can alternately transmit the divided M image data packets to each data transmission interface, so as to transmit the divided M image data packets in parallel to the target device through N data transmission interfaces.

[0089] In a possible implementation, when the mode signal initiated by the user is the first mode signal, the central processor in the industrial camera can run the link aggregation algorithm preset by the developer to aggregate N data transmission interfaces into a group of data transmission interfaces. Therefore, in the first mode, the central processor in the industrial camera can configure the protocol addresses of all data transmission interfaces to the first protocol address preset by the developer, and the N data transmission interfaces on the industrial camera can transmit each received image data packet to the target device through the same first protocol address.

[0090] In a possible implementation, when the mode signal initiated by the user is the second mode signal, the central processing module on the industrial camera can query the address mapping table pre-set by the R&D personnel to determine the second protocol addresses corresponding to each data transmission interface. The central processing unit can configure the protocol address on the data transmission interface as its corresponding second protocol address. Each data transmission interface on the industrial camera can transmit the received image data packet to the target device through its own corresponding second protocol address. Among them, the second protocol addresses corresponding to each data transmission interface are different.

[0091] Through the method provided in this embodiment, the industrial camera can not only use multiple data transmission interfaces to transmit image data packets using their respective corresponding second protocol addresses, but also transmit image data packets to the target device through link aggregation. The user can choose a suitable data transmission mode according to the specific situation of the target device. Therefore, the method provided in this embodiment improves the data transmission availability of the industrial camera.

[0092] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0093] Reference Figure 7 , shows a schematic diagram of a data transmission device provided in an embodiment of the present application, which may specifically include a distribution module 701 and a transmission module 702, wherein:

[0094] The distribution module 701 is used to obtain an image to be transmitted, and divide the image to be transmitted into M image data packets according to a mode signal input by a user and a distribution algorithm; M is a positive integer greater than or equal to 2;

[0095] The transmission module 702 is used to alternately transmit the M image data packets to the target device through the N data transmission interfaces.

[0096] The distribution module can also be used to split the image to be transmitted into M image sub-data based on the distribution algorithm corresponding to the resolution of the image to be transmitted; and to package the M image sub-data and the algorithm identifier corresponding to the distribution algorithm according to the communication protocol corresponding to the mode signal to generate the M image data packets.

[0097] The distribution module may also be configured to split the image to be transmitted into the M image sub-data based on the number of rows of the image to be transmitted if the resolution of the image to be transmitted is within a preset resolution range.

[0098] The transmission module can also be used to transmit the M image data packets to the target device through the N data transmission interfaces and the preset first protocol address if the mode signal is a first mode signal; if the mode signal is a second mode signal, determine the second protocol address corresponding to each of the data transmission interfaces according to a preset address mapping table, and transmit the M image data packets to the target device through the N data transmission interfaces and the second protocol address corresponding to each of the data transmission interfaces.

[0099] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0100] Reference Figure 8 , shows a schematic diagram of an industrial camera provided by an embodiment of the present application. Figure 8As shown, the industrial camera 800 in the embodiment of the present application includes: a processor 810, a memory 820, and a computer program 821 stored in the memory 820 and executable on the processor 810. When the processor 810 executes the computer program 821, the steps in each embodiment of the above-mentioned data transmission method are implemented, such as Figure 1 Alternatively, when the processor 810 executes the computer program 821, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 7 Functions of modules 701 to 702 are shown.

[0101] Exemplarily, the computer program 821 may be divided into one or more modules / units, which are stored in the memory 820 and executed by the processor 810 to complete the present application. The one or more modules / units may be a series of computer program instruction segments or logic circuits that can perform specific functions, and the instruction segments or logic circuits may be used to describe the execution process of the computer program 821 in the industrial camera 800. For example, the computer program 821 may be divided into a distribution module and a transmission module, and the specific functions of each module are as follows:

[0102] A distribution module, used for acquiring an image to be transmitted, and dividing the image to be transmitted into M image data packets according to a mode signal input by a user and a distribution algorithm; wherein M is a positive integer greater than or equal to 2;

[0103] A transmission module is used to alternately transmit the M image data packets to a target device through the N data transmission interfaces.

[0104] The industrial camera 800 may include, but is not limited to, a processor 810 and a memory 820. Those skilled in the art will appreciate that Figure 8 It is only an example of the industrial camera 800 and does not constitute a limitation of the industrial camera 800. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the industrial camera 800 may also include input and output devices, network access devices, buses, etc.

[0105] The processor 810 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0106] The memory 820 may be an internal storage unit of the industrial camera 800, such as a hard disk or memory of the industrial camera 800. The memory 820 may also be an external storage device of the industrial camera 800, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the industrial camera 800. Further, the memory 820 may also include both an internal storage unit of the industrial camera 800 and an external storage device. The memory 820 is used to store the computer program 821 and other programs and data required by the industrial camera 800. The memory 820 may also be used to temporarily store data that has been output or is to be output.

[0107] An embodiment of the present application further discloses an industrial camera, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data transmission method as described in the above-mentioned embodiments is implemented.

[0108] An embodiment of the present application further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data transmission method as described in the above embodiments is implemented.

[0109] The embodiment of the present application further discloses a computer program product. When the computer program product is executed on a computer, the computer is enabled to execute the data transmission method described in the above-mentioned embodiments.

[0110] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. An industrial camera, characterized in that: include: A data distribution module, wherein the data output end of the data distribution module is respectively connected to N data transmission interfaces, and is used to divide the image to be transmitted into M image data packets according to the mode signal, and sequentially and alternately transmit the M image data packets to each of the data transmission interfaces; N is a positive integer greater than or equal to 2; M is a positive integer greater than or equal to 2; N data transmission interfaces, data output ends of the N data transmission interfaces are connected to data input ends of the target device, and are used to transmit the M image data packets to the target device through the transmission method corresponding to the mode signal.

2. The industrial camera according to claim 1, characterized in that: The data distribution module comprises: A data splitting unit, used for splitting the image to be transmitted into M image sub-data according to a preset distribution algorithm, and transmitting the M image sub-data to the data packaging module; A data packing module, wherein the data input end of the data packing module is connected to the data output end of the data splitting unit, and the data output end of the data packing module is respectively connected to the data input ends of the N data transmission interfaces, for packing the M image sub-data respectively according to the communication protocol corresponding to the mode signal, and transmitting the image data packets generated by the packing to each of the data transmission interfaces alternately in turn.

3. The industrial camera according to claim 2, characterized in that: The data packaging module comprises: N data packing units, each of which is connected to the corresponding data transmission interface.

4. The industrial camera according to claim 2, characterized in that: The mode signal includes a first mode signal and a second mode signal; The data packaging module is used to package the M image sub-data according to the first communication protocol corresponding to the first mode signal after receiving the first mode signal; and to package the M image sub-data according to the second communication protocol corresponding to the second mode signal after receiving the second mode signal.

5. The industrial camera according to claim 2, characterized in that: The data distribution module also includes: A cache unit, wherein the cache unit is connected between the data splitting unit and the data packaging module, and is used for caching the image sub-data generated by the data splitting unit, and when the amount of the cached image sub-data is greater than or equal to a preset cache threshold, transmitting the cached image sub-data to the data packaging module.

6. The industrial camera according to any one of claims 1 to 5, characterized in that: The data transmission interface is a Gigabit network port.

7. A data transmission method, applied to an industrial camera comprising N data transmission interfaces, wherein N is a positive integer greater than or equal to 2, characterized in that: include: Acquire an image to be transmitted, and divide the image to be transmitted into M image data packets according to a mode signal and a distribution algorithm; M is a positive integer greater than or equal to 2; The M image data packets are transmitted alternately to the target device through the N data transmission interfaces.

8. The method according to claim 7, characterized in that The step of acquiring the image to be transmitted and generating M image data packets corresponding to the image to be transmitted according to the mode signal input by the user and the distribution algorithm includes: Based on a distribution algorithm, the image to be transmitted is split into M image sub-data; the data volume of the image sub-data split by the distribution algorithm is less than or equal to the maximum transmission unit of the data transmission interface; The data is packaged based on the communication protocol and the distribution algorithm to generate the M image data packets.

9. The method according to claim 8, characterized in that The distribution algorithm, which splits the image to be transmitted into M image sub-data, includes: If the resolution of the image to be transmitted is within a preset resolution range, the image to be transmitted is split into the M image sub-data based on the number of rows of the image to be transmitted; the upper limit value in the resolution range is less than or equal to the maximum transmission unit of the data transmission interface.

10. The method according to any one of claims 7 to 9, characterized in that: The transmitting the M image data packets to the target device through the N data transmission interfaces includes: If the mode signal is the first mode signal, the M image data packets are transmitted to the target device through the N data transmission interfaces and the preset first protocol address; If the mode signal is a second mode signal, the second protocol addresses corresponding to each of the data transmission interfaces are determined according to a preset address mapping table, and the M image data packets are transmitted to the target device through the N data transmission interfaces and the second protocol addresses corresponding to each of the data transmission interfaces.

Citation Information

Cited By

  • Video processing device and equipment, video data transmission method, medium and product

    CN119946334A