Data transmission state monitoring method and system based on FPGA

By monitoring the status of the previous data transmission, dynamically adjusting the compression encoding parameters of the FPGA system, and using McAdam ellipse and multi-connection chain coding technology, the problem of fixing data compression parameters in the existing technology cannot adapt to changes, achieving efficient data transmission and image quality fidelity.

CN119835427AActive Publication Date: 2025-04-15SUZHOU SEMIDE SEMICON TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510096742.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-04-15
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

In the existing FPGA-based data transmission system, the parameters of data compression remain unchanged, and it is impossible to adapt to the changing data characteristics and transmission environment, resulting in the inability to balance the compression effect and image quality.

Method used

By monitoring the status of the previous data transmission, dynamically adjusting the compression encoding parameters during the current data transmission, using McAdam ellipse and multi-connection chain code technology, the image data is converted into color feature sequences and converted into multiple chain codes for compression encoding.

Benefits of technology

It realizes dynamic adjustment of compression encoding parameters according to data characteristics and transmission environment, balances compression effects and image quality, and improves data transmission efficiency and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835427A_ABST
    Figure CN119835427A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data transmission, and particularly relates to a data transmission state monitoring method and system based on an FPGA (Field Programmable Gate Array), and the method comprises the steps that: a # imgabs0 # end sets the order of a Mecanum ellipse during the current data transmission according to the state monitoring result of the last data transmission, and the order of the Mecanum ellipse during the current data transmission is calculated through all Mecanum ellipses distributed on a chromaticity graph; the method comprises the following steps of: screening a plurality of Mecanum ellipses which can completely cover a whole chromaticity image and have the minimum number as a plurality of color features, scanning all pixel points in to-be-transmitted image data to obtain a pixel point sequence, and forming a color feature sequence by using the color features of all the pixel points in the pixel point sequence; and setting a multi-connected chain code of each color feature for converting the color feature sequence into a plurality of chain codes, and performing compression coding on all the chain codes to obtain a compression coding result of the to-be-transmitted image data, and transmitting the compression coding result. The method can adapt to the current data characteristics and transmission environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and more specifically, to a method and system for monitoring data transmission status based on FPGA. Background Art

[0002] Field-Programmable Gate Array (FPGA) is a reconfigurable hardware platform that allows users to configure logic blocks, memory, and input / output systems as needed to implement specific functions; FPGA is used in communications, computing, military, aerospace and other fields, especially in scenarios that require high-performance computing and fast data processing, such as high-definition video streaming, sensor data processing, etc.

[0003] In the related technology, for example, the Chinese patent application document with application publication number CN113365016A discloses a real-time acquisition system for map image data, including: a CPU, at least one FPGA connected to each of the CPUs, and at least one image acquisition device connected to each of the FPGAs; the image acquisition device is used to acquire geographic environment images and send them to the FPGA; the FPGA is used to receive in parallel the geographic environment images sent by the connected image acquisition devices, perform color mixing and interpolation processing on the geographic environment images to obtain image data in RGB format, perform color space conversion on the image data in RGB format to obtain image data in YUV format and output them by channels, perform data compression on the image data of each channel in turn, and transfer the compressed image data to the memory; the CPU is used to store the compressed image data in the memory in real time; this solution realizes real-time compression of image data and improves the stability of data storage.

[0004] Communication systems designed based on FPGA need to consider the balance between compression effect and image quality. However, the parameters of data compression in related technologies are fixed and cannot adapt to changing data characteristics and transmission environments, which leads to the inability to balance compression effect and image quality. Summary of the invention

[0005] In order to solve the technical problem that the parameters of the above-mentioned data compression are fixed and cannot adapt to the changing data characteristics and transmission environment, thereby resulting in the inability to balance the compression effect and image quality, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a data transmission status monitoring method based on FPGA, comprising: after receiving image data transmitted from the FPGA end each time, the data receiving end feeds back the data receiving time and the data attention as the status monitoring result to the FPGA end; the FPGA end sets the order of the MacAdam ellipse at the current data transmission according to the status monitoring result of the last data transmission and records it as ; Through all the distribution on the chromaticity diagram The MacAdam ellipse is used to screen out the smallest number of multiple chromaticity diagrams that can completely cover the entire chromaticity diagram. The method comprises the following steps: obtaining the image data to be transmitted; scanning all pixels in the image data to obtain a pixel sequence; obtaining the color feature of each pixel according to the color value of each pixel in the pixel sequence, and recording the sequence composed of the color features of all pixels as a color feature sequence; setting a multi-connected chain code for each color feature, wherein the multi-connected chain code gives multiple adjacent color features of each color feature and a direction symbol of each adjacent color feature; combining the multi-connected chain codes of each color feature, converting the color feature sequence into multiple chain codes, wherein the first element of the chain code belongs to the color feature and the other elements belong to the direction symbol; performing compression encoding on all chain codes, thereby obtaining the compression encoding result of the image data to be transmitted; The end sends the compression encoding result of the image data to be transmitted to the data receiving end.

[0007] The present invention monitors the state of the previous data transmission to understand the data characteristics and the transmission environment, thereby dynamically adjusting the compression coding parameters during the current data transmission to adapt to the current data characteristics and the transmission environment, and balancing the compression effect and the image quality; wherein, the image data to be transmitted is converted into a color feature sequence by using the characteristic that the color difference of the MacAdam ellipse color points distributed on the chromaticity diagram is not easily perceived by the human eye, thereby ensuring the image quality of the compression coding result of the image data to be transmitted, and utilizing the characteristic that the color features corresponding to the pixel points in the image data to be transmitted have spatial proximity in the chromaticity diagram, combining the multiple adjacent color features of each color feature in the multi-connected chain code of each color feature and the direction symbol of each adjacent color feature, the color feature sequence is converted into multiple chain codes, thereby reducing the data volume of the compression coding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted, and at the same time ensuring the image quality of the received compression coding result.

[0008] Preferably, the data receiving time refers to the time when the data receiving end receives the image data transmitted from the FPGA end; the data attention degree is given by the data receiving end after analyzing the received image data, and the value range of the data attention degree is .

[0009] Preferably, the method for obtaining the order of the MacAdam ellipse during the current data transmission is as follows: the FPGA end stores the data sending time of each data transmission; after the FPGA end receives the status monitoring result of the last data transmission fed back by the data receiving end, the duration of the last data transmission is calculated according to the data receiving time and the data sending time of the last data transmission, and the duration is equal to the difference between the data receiving time and the data sending time; the transmission speed of the last data transmission is calculated according to the data volume and duration of the last data transmission, and the transmission speed is equal to the data volume transmitted divided by the duration; the order of the MacAdam ellipse during the current data transmission is calculated according to the transmission speed and data attention of the last data transmission , , are the preset first coefficient and second coefficient respectively, To obtain the minimum function, is the transmission speed of the last data transmission, is the base value of transmission speed, is the data attention of the last data transmission, is the base value of the order, Indicates rounding up.

[0010] The present invention obtains the transmission speed and data attention of the previous data transmission by monitoring the status of the previous data transmission, and dynamically adjusts the compression encoding parameters of the current data transmission according to the amount of data that can be transmitted within a fixed time and the image quality requirements of the data receiving end for the received compression encoding results, so as to adapt to the current data characteristics and transmission environment and balance the compression effect and image quality.

[0011] Preferably, the multi-connected chain code for each color feature is set, including: Any integer in the range is used as the pre-selected quantity. Equal to the preset value; according to the pre-selected number, set the multi-connected chain code of each color feature, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature color features, as the adjacent color features of the central color feature, is the pre-selected number, and the direction symbol of each adjacent color feature is set to 0 to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain codes of the central color feature.

[0012] The present invention utilizes the characteristic that color features corresponding to pixel points in image data to be transmitted have spatial proximity in a chromaticity diagram, and uses multiple color features with the smallest distance to a central color feature as adjacent color features of the central color feature, and assigns corresponding direction symbols, so as to facilitate subsequent combination of the direction symbols of multiple adjacent color features of each color feature, and convert the color feature sequence into multiple chain codes, thereby reducing the data volume of the compression encoding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted.

[0013] Preferably, the multi-connected chain code for each color feature is set, including: Any integer in the range is used as the pre-selected quantity. equal to the preset value; calculate the preference of taking the pre-selected number as the target number, and take the integer with the largest preference as the target number; according to the target number, set the multi-connected chain code of each color feature, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature as the target number; color features, as the adjacent color features of the central color feature, is the target number, and the direction symbol of each adjacent color feature is set to 0 to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain codes of the central color feature.

[0014] The present invention calculates different preselected quantities The target quantity is determined based on the priority degree to maximize the transmission efficiency of the image data to be transmitted.

[0015] Preferably, the calculation of the preference of taking the preselected quantity as the target quantity comprises: taking any color feature in the color feature sequence as the target color feature, and , get the previous color feature of the target color feature adjacent color features, determine whether the target color feature belongs to the adjacent color feature of the previous color feature: if the target color feature belongs to the adjacent color feature of the previous color feature, divide the target color feature into the preselected number Otherwise, the target color feature is divided into a preselected number of in the second category; according to the pre-selected number The number of color features in the first and second categories will be calculated to preselect the number As the priority of the target quantity, the preselected quantity As the preferred number of targets The calculation formula is: ; In the formula, Preselected quantity The number of color features in the first and second categories, is the number of types of all color features.

[0016] Preferably, the step of converting the color feature sequence into a plurality of chain codes comprises: The color feature is The first element of the chain code, get the A chain code, including: Starting from a color feature, each color feature is judged in order whether it is the adjacent color feature of the previous color feature, until a color feature is not the adjacent color feature of the previous color feature. At this time, the sequence number of the color feature is recorded as , will Color features to The direction symbol of the color feature is added as an element to the Among the chain codes, get chain code; among them, when hour, , that is, the first The color feature is The first element of a chain code; and so on, until the judgment of the last color feature in the color feature sequence is completed, so as to convert the color feature sequence into multiple chain codes.

[0017] Preferably, the direction symbol of a color feature can only be obtained when it is an adjacent color feature of its previous color feature. The method for obtaining the direction symbol of the color feature is: taking the direction symbol of the adjacent color feature corresponding to the color feature among all the adjacent color features of the previous color feature of the color feature as the direction symbol of the color feature.

[0018] Preferably, the compression encoding of all chain codes to obtain the compression encoding result of the image data to be transmitted includes: for any chain code, the process of compression encoding the chain code is: for the first elements, when At that time, elements belong to the color feature, and the The sequence number of the element in all color features , the serial number The corresponding length is equal to The binary data is The compressed encoding result of elements is is the number of all color features; when At that time, The element belongs to the direction symbol. The length of the corresponding element is equal to The binary data is The compressed encoding result of elements is is the number of all kinds of direction symbols; the compression coding results of all elements in the chain code constitute the compression coding result of the chain code; the compression coding results of all chain codes are used as the compression coding results of the image data to be transmitted.

[0019] The present invention uses direction symbols of fewer types to replace color features of greater number, thereby reducing the data volume of the compression encoding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted.

[0020] In a second aspect, the present invention provides an FPGA-based data transmission status monitoring system, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned FPGA-based data transmission status monitoring method is implemented.

[0021] By adopting the above technical solution, the above-mentioned FPGA-based data transmission status monitoring method is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is made according to the memory and the processor for easy use.

[0022] The beneficial effects of the present invention are: The present invention monitors the state of the previous data transmission to understand the data characteristics and the transmission environment, thereby dynamically adjusting the compression coding parameters during the current data transmission to adapt to the current data characteristics and the transmission environment, and balancing the compression effect and the image quality; wherein, the image data to be transmitted is converted into a color feature sequence by using the characteristic that the color difference of the MacAdam ellipse color points distributed on the chromaticity diagram is not easily perceived by the human eye, thereby ensuring the image quality of the compression coding result of the image data to be transmitted, and utilizing the characteristic that the color features corresponding to the pixel points in the image data to be transmitted have spatial proximity in the chromaticity diagram, combining the multiple adjacent color features of each color feature in the multi-connected chain code of each color feature and the direction symbol of each adjacent color feature, the color feature sequence is converted into multiple chain codes, thereby reducing the data volume of the compression coding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted, and at the same time ensuring the image quality of the received compression coding result. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 is a flow chart schematically illustrating a method for monitoring data transmission status based on FPGA in the present invention; Figure 2 is a schematic diagram schematically showing a third-order MacAdam ellipse; Figure 3 is a schematic diagram showing the 3rd order Schematic diagram of the curve. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0026] The embodiment of the present invention discloses a data transmission status monitoring method based on FPGA, referring to Figure 1 , comprising steps S1 to S4: S1. According to the status monitoring result of the last data transmission, the order of the MacAdam ellipse during the current data transmission is set and recorded as ; Through all the distribution on the chromaticity diagram The MacAdam ellipse is used to screen out the smallest number of multiple chromaticity diagrams that can completely cover the entire chromaticity diagram. MacAdam ellipse, and as a variety of color features.

[0027] It should be noted that by monitoring the status of the previous data transmission, the data characteristics and transmission environment can be understood, so as to dynamically adjust the compression encoding parameters to adapt to the current data characteristics and transmission environment, and balance the compression effect and image quality.

[0028] Specifically, each time the data receiving end receives After the image data is transmitted by the end, the data receiving time and data attention are fed back to the end; wherein, the data receiving time of the data transmission refers to the time when the data receiving end receives the data from The moment when the image data is transmitted by the receiving end, and the data receiving moment needs to be accurate to seconds; the data attention degree is given by the data receiving end after analyzing the received image data, and the value range of the data attention degree is .

[0029] The data attention degree of the image data is equal to the product of the attention degree of the monitoring area to which the image data belongs and the time attention degree of the time period to which the image data belongs.

[0030] Among them, in the traffic monitoring scenario, there are multiple types of monitoring areas, namely, monitoring areas belonging to traffic intersections, monitoring areas belonging to main roads, and monitoring areas belonging to secondary roads; each monitoring area has at least one FPGA, each FPGA is connected to at least one image acquisition device, and image data of the monitoring area is collected through the image acquisition device; different monitoring areas have different traffic flows and accident risks, so different monitoring areas have different levels of attention. According to the traffic flows and accident risks of different monitoring areas, a regional attention degree is set for each monitoring area, and the value range of the regional attention degree is ; Traffic intersections are where vehicles and pedestrians meet, with heavy traffic and high accident risk. Therefore, the regional attention of the monitoring area belonging to the traffic intersection is set to , The trunk road is the main channel of urban traffic, with large vehicle flow and high accident risk. Therefore, the regional attention of the monitoring area belonging to the trunk road is set to The traffic volume of secondary roads is relatively small and the accident risk is relatively low. Therefore, the regional attention of the monitoring area belonging to the secondary roads is set to ;Will , , Set to 0.8, 0.5 and 0.2 respectively.

[0031] In the traffic monitoring scenario, the traffic flow and accident risk are different at different times of the day. Therefore, the attention level is different for different time periods. According to the traffic flow and accident risk at different time periods, a day is divided into multiple time periods and a time attention level is set for each time period. The value range of time attention level is ; Among them, 7 to 9 is the morning peak period, and 17 to 19 is the evening peak period. The traffic flow during the morning and evening peak periods is large and the risk of accidents is high. Therefore, the time attention during the morning and evening peak periods is set to , ; 9:00 to 12:00 is the morning period, 16:00 to 17:00 is the afternoon period. The traffic volume in the morning and afternoon periods is large and the risk of accidents is high. Therefore, the time attention of the morning and afternoon periods is set to , and ; 12:00 to 14:00 is the lunch break period, and 19:00 to 22:00 is the evening period. The traffic volume during the lunch break and evening periods is small and the accident risk is low. Therefore, the time attention of the lunch break and evening periods is set to , and ; 22:00 to 7:00 the next day is the night time period, during which the traffic volume is small and the accident risk is low. Therefore, the time focus of the night time period is set to , and ;Will , , , Set to 0.7, 0.5, 0.3 and 0.1 respectively.

[0032] in addition, The terminal stores the data transmission time and data volume of the last data transmission, and the data transmission time needs to be accurate to seconds. The unit of the data volume is MB (Megabyte, abbreviated as "M").

[0033] Further, in After the end receives the status monitoring result of the last data transmission fed back by the data receiving end, it calculates the duration of the last data transmission according to the data receiving time and the data sending time of the last data transmission, and the duration is equal to the difference between the data receiving time and the data sending time, and the unit is seconds; according to the data volume and duration of the last data transmission, it calculates the transmission speed of the last data transmission, and the transmission speed is equal to the amount of data transmitted divided by the duration, and the unit is MB / second.

[0034] It should be noted that color tolerance is a term that describes the human eye's perception of color differences through the human eye's tolerance of differences in different colors in a specific color space, and the MacAdam ellipse of each color point in the CIE xyz chromaticity diagram is a graph used to measure color tolerance, and the color points inside the MacAdam ellipse are indistinguishable to the human eye; therefore, the present invention uses the MacAdam ellipse to compress and encode the image data to be transmitted.

[0035] It should be further explained that the parameter that determines the size of the MacAdam ellipse is the order. The order here actually refers to the standard deviation, and the smaller the order, the smaller the MacAdam ellipse; the first-order MacAdam ellipse refers to the standard deviation of the color matching result change at a distance of 1 times the target color point, and the third-order MacAdam ellipse refers to the standard deviation of the color matching result change at a distance of 3 times the target color point. The schematic diagram of the third-order MacAdam ellipse is as follows Figure 2As shown; if the coordinates of two color points fall within the 1st-order MacAdam ellipse, the human eye can hardly see any difference between the two, and the difference in color points corresponding to the boundary of the 3rd-order MacAdam ellipse is the color difference that the human eye can just perceive. In other words, the smaller the order, the less likely the color difference of the color points represented by the MacAdam ellipse is to be perceived by the human eye.

[0036] It should be further explained that the smaller the order of the MacAdam ellipse, the smaller the MacAdam ellipse, and the greater the number of types of MacAdam ellipses that are subsequently screened out and can completely cover the entire chromaticity diagram; when all types of MacAdam ellipses are encoded by fixed-length binary numbers, the longer the fixed length of the binary number, the worse the compression effect; the smaller the order of the MacAdam ellipse, the less noticeable the color difference of the color points represented by the MacAdam ellipse is to the human eye, and the higher the image quality of the compressed encoding result.

[0037] Furthermore, according to the transmission speed and data attention of the last data transmission, the order of the MacAdam ellipse during the current data transmission is calculated, and the calculation formula of the order of the MacAdam ellipse during the current data transmission is: ; In the formula, is the order of the MacAdam ellipse during current data transmission, are the preset first coefficient and second coefficient respectively, To obtain the minimum function, is the transmission speed of the last data transmission, is the base value of transmission speed, is the data attention of the last data transmission, is the base value of the order, Indicates rounding up.

[0038] The transmission speed is the base value. The base value of the order It can be set according to the actual application scenario and requirements. The present invention sets the reference value of the transmission speed Set to 4, and the unit is MB / s, and the base value of the order Set to 3; the first coefficient and the second coefficient It can be set according to the actual application scenario and requirements. and are greater than 0, the present invention sets the first coefficient Set to 0.3, the second coefficient is 0.7.

[0039] It should be noted that the order of the MacAdam ellipse during the current data transmission obtained by the calculation formula is an integer and is one of 1, 2, and 3; for example, when the transmission speed of the last data transmission is And the data attention of the last data transmission The order of the MacAdam ellipse during the current data transmission is ; The transfer speed when the last data was transferred And the data attention of the last data transmission The order of the MacAdam ellipse during the current data transmission is ; The transfer speed when the last data was transferred And the data attention of the last data transmission The order of the MacAdam ellipse during the current data transmission is .

[0040] It should be noted that, the greater the transmission speed of the last data transmission, the greater the amount of data that can be transmitted in a fixed time. Therefore, the order of the MacAdam ellipse can be appropriately reduced during the current data transmission; and the greater the data attention of the last data transmission, the higher the image quality requirements of the received compression encoding result at the data receiving end. Therefore, the order of the MacAdam ellipse should be appropriately reduced during the current data transmission.

[0041] It should be further explained that the present invention obtains the transmission speed and data attention of the previous data transmission by monitoring the status of the previous data transmission, and dynamically adjusts the compression coding parameters during the current data transmission according to the amount of data that can be transmitted within a fixed time and the image quality requirements of the data receiving end for the received compression coding results, so as to adapt to the current data characteristics and transmission environment and balance the compression effect and image quality.

[0042] The color point in the CIE xyz color space has two chromaticity values ​​and a brightness, wherein the two chromaticity values ​​are respectively the first chromaticity value and the second chromaticity value , the brightness is ; The CIE xyz chromaticity diagram is composed of the first chromaticity value and the second chromaticity value constituted.

[0043] Finally, all the orders distributed on the CIE xyz chromaticity diagram are equal to The MacAdam ellipse is used to screen out the MacAdam ellipse that can completely cover the entire chromaticity diagram and has the least number of MacAdam ellipses, which are recorded as target MacAdam ellipses and used as multiple color features; the number of types of all color features is recorded as , and the serial numbers of all color features are from 0 to .

[0044] S2. Scan all pixels in the image data to be transmitted to obtain a pixel sequence, and combine the color features of each pixel in the pixel sequence into a color feature sequence.

[0045] Specifically, when FPGA is applied to high-definition video stream transmission, the image data to be transmitted is a color image in the high-definition video stream, and the color space to which the color image belongs is the CIE xyz color space. Therefore, each pixel in the color image has two chromaticity values ​​and one brightness, wherein the two chromaticity values ​​are respectively the first chromaticity value and the second chromaticity value , the brightness is .

[0046] It should be noted that the Hilbert curve is a one-dimensional curve that can fill a two-dimensional space. That is to say, the Hilbert curve and the points in the two-dimensional space have a one-to-one correspondence, and using the Hilbert curve to scan a two-dimensional image can better preserve many visual characteristics of the image and the spatial proximity between image pixel values.

[0047] In one embodiment, according to The curve scans all the pixels in the image data to be transmitted to obtain a pixel sequence; The curve is a well-known technology and will not be described here in detail. The order of the curve can be set according to the actual application scenario and requirements. The order of the curve is set to 3, 3rd order The schematic diagram of the curve is as follows Figure 3 shown.

[0048] In other embodiments, the method of scanning all pixel points in the image data to be transmitted includes but is not limited to a Z-order curve, a serpentine scan, etc.; wherein the Z-order curve is a sorting algorithm that maps a multi-dimensional space to a one-dimensional space, and a serpentine scan (Snake or Zigzag Scan) is a data arrangement method commonly used in image and video compression. Both the Z-order curve and the serpentine scan are well-known technologies and will not be described in detail here.

[0049] Further, according to the color value of each pixel in the pixel sequence, the color feature of each pixel is obtained, and the sequence composed of the color features of each pixel in the pixel sequence is recorded as a color feature sequence; the obtaining of the color feature of each pixel according to the color value of each pixel in the pixel sequence includes: according to the color value of each pixel in the pixel sequence, the color value refers to the two chromaticity values ​​of the pixel, and the color point corresponding to each pixel in the chromaticity diagram is determined, and the color feature corresponding to the target MacAdam ellipse where the color point corresponding to each pixel is located is used as the color feature of each pixel.

[0050] S3. Set multi-connected chain codes with various color features.

[0051] It should be noted that the present invention utilizes the characteristic that the color features corresponding to the pixels in the image data to be transmitted have spatial proximity in the chromaticity diagram, and uses multiple color features with the smallest distance to the central color feature as adjacent color features of the central color feature, and assigns corresponding direction symbols, so as to facilitate the subsequent combination of the direction symbols of multiple adjacent color features of each color feature, and convert the color feature sequence into multiple chain codes, thereby reducing the data amount of the compression encoding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted.

[0052] Specifically, a multi-connected chain code is set for each color feature, and the multi-connected chain code provides a plurality of adjacent color features of each color feature and a direction symbol of each adjacent color feature.

[0053] In one embodiment, Any integer in the range is used as the pre-selected quantity. Equal to the preset value, and the preset value can be set according to the actual application scenario and requirements, and its value range is , the present invention sets the preset value to 8; according to the preselected number, set the multi-connected chain code of various color features, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature as the central color feature. color features, as the adjacent color features of the central color feature, then the adjacent color features of the central color feature have indivual, is the pre-selected number, and the direction symbol of each adjacent color feature is set to 0 to , then the number of all kinds of direction symbols is equal to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain code of the central color feature; and the multi-connected chain codes of various color features are further obtained.

[0054] Among them, for any color feature, the calculation formula of the distance between the color feature and the central color feature is: ; In the formula, is the distance between the color feature and the central color feature, are the first chromaticity value and the second chromaticity value of the color feature, respectively. are the first chromaticity value and the second chromaticity value of the central color feature respectively.

[0055] It should be noted that the pre-selected quantity If the color features are different, the number of all adjacent color features of each color feature is different, resulting in different lengths of the compressed encoding results of the direction symbols of all adjacent color features; at the same time, the preselected number Different from each other, when the color feature sequence is subsequently converted into a chain code by combining the adjacent color features in the multi-connected chain code of each color feature, the number of all chain codes obtained by the conversion is different, which further affects the length of the compression coding result; therefore, in order to maximize the transmission efficiency of the image data to be transmitted, the present invention calculates different pre-selected numbers The target quantity is determined based on the priority.

[0056] In another embodiment, the calculation will Any integer in the range is used as the pre-selected quantity. equal to the preset value, calculate the preference of taking the pre-selected number as the target number, take the integer with the largest preference as the target number, and set the multi-connected chain code of various color features according to the target number, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature. color features, as the adjacent color features of the central color feature, then the adjacent color features of the central color feature have indivual, is the target number, and the direction symbol of each adjacent color feature is set to 0 to , then the number of all kinds of direction symbols is equal to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain code of the central color feature; and the multi-connected chain codes of various color features are further obtained.

[0057] The method for calculating the preference of taking the pre-selected quantity as the target quantity is as follows: taking any color feature in the color feature sequence as the target color feature; recording the pre-selected quantity as , according to the pre-selected quantity , get the previous color feature of the target color feature adjacent color features; determine whether the target color feature belongs to the adjacent color feature of the previous color feature: if the target color feature belongs to the adjacent color feature of the previous color feature, divide the target color feature into a preselected number In the first category of , if the target color feature does not belong to the adjacent color feature of the previous color feature, the target color feature is divided into a preselected number of in the second category; according to the pre-selected number The number of color features in the first and second categories will be calculated to preselect the number As the priority of the target quantity, the preselected quantity The calculation formula for the preference of the target quantity is: ; In the formula, To preselect the quantity As the preferred degree of target quantity, For preselected quantity The number of color features in the first category of For preselected quantity The number of color features in the second category of is the preselected quantity, each color feature has adjacent color features, each with a direction symbol, so there are Directional symbols, that is, the number of all types of direction symbols is equal to , is the number of types of all color features.

[0058] Among them, for the color features in the first category, when compression coding is performed, the object of compression coding is the direction symbol corresponding to the color feature; when the direction symbol corresponding to the color feature is used as the object of compression coding, the length of the compression coding result is ; For the color features in the second category, when compression coding is performed, the object of compression coding is the color feature itself; when the color feature itself is used as the object of compression coding, the length of the compression coding result is ; Therefore, the number of preselected As the target quantity, the amount of data resulting from the compression encoding of the image data to be transmitted is equal to The smaller the amount of data, the better the compression effect. The higher the preference as the target number.

[0059] S4. Combining the multi-connected chain codes of each color feature, converting the color feature sequence into multiple chain codes; compressing and encoding all the chain codes to obtain the compression encoding result of the image data to be transmitted and transmit it.

[0060] It should be noted that a chain code is a set of number sequences composed of the starting point of a line segment plus several direction symbols; the present invention utilizes the characteristic that the color features corresponding to the pixels in the image data to be transmitted have spatial proximity in the chromaticity diagram, and combines the multi-connected chain codes of each color feature to convert the color feature sequence into multiple chain codes.

[0061] Specifically, the color feature sequence is converted into multiple chain codes by combining the multi-connected chain codes of each color feature; the first element of the chain code is the color feature, and the other elements are direction symbols, specifically including: 1. Initially, the first The color feature is The first element of the chain code, i.e. ; The color feature is The first element of the chain code, get the A chain code, including: Starting from a color feature, each color feature is judged in order whether it is the adjacent color feature of the previous color feature, until a color feature is not the adjacent color feature of the previous color feature. At this time, the sequence number of the color feature is recorded as , will Color features to The direction symbol of the color feature is added as an element to the In the chain code, get Chain code.

[0062] Among them, the direction symbol of a color feature can only be obtained when a color feature is an adjacent color feature of its previous color feature. The method for obtaining the direction symbol of the color feature is: taking the direction symbol of the adjacent color feature corresponding to the color feature among all the adjacent color features of the previous color feature of the color feature as the direction symbol of the color feature.

[0063] 2. The color feature is The first element of the chain code, get the A chain code, including: Starting from a color feature, each color feature is judged in order whether it is the adjacent color feature of the previous color feature, until a color feature is not the adjacent color feature of the previous color feature. At this time, the sequence number of the color feature is recorded as , will Color features to The direction symbol of the color feature is added as an element to the Among the chain codes, get A chain code.

[0064] 3. This process is repeated in this way until the last color feature in the color feature sequence is judged, thereby converting the color feature sequence into multiple chain codes.

[0065] Furthermore, for any of the chain codes, the process of compressing the chain code is as follows: elements, when When The sequence number of the element in all color features , the serial number The corresponding length is equal to The binary data is The compressed encoding result of elements is is the number of all color features; when When The length of the corresponding element is equal to The binary data is The compressed encoding result of elements is is the number of all kinds of direction symbols; the compressed encoding results of all elements in the chain code are combined into the compressed encoding result of the chain code.

[0066] It should be noted that the number of all types of directional symbols is less than the number of all types of color features. The present invention uses a smaller number of directional symbols to replace a larger number of color features, thereby reducing the data volume of the compression encoding results of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted.

[0067] Furthermore, the compression coding results of all chain codes are used as the compression coding results of the image data to be transmitted and transmitted; in addition, the compression coding results of the order of the MacAdam ellipse and the brightness sequence during the current data transmission are added to the compression coding results of the image data to be transmitted as supplementary information, so that the data receiving end can obtain complete and clear image data by decompressing the compression coding results of the image data to be transmitted; finally, The end sends the compression encoding result of the image data to be transmitted to the data receiving end.

[0068] Among them, the brightness sequence is composed of the brightness of all pixels in the pixel sequence, and the compression coding result of the brightness sequence is obtained by compressing the brightness sequence. The compression coding method of the brightness sequence includes but is not limited to arithmetic coding and Huffman coding.

[0069] It should be noted that the present invention monitors the state of the previous data transmission to understand the data characteristics and the transmission environment, thereby dynamically adjusting the compression coding parameters during the current data transmission to adapt to the current data characteristics and the transmission environment, and balancing the compression effect and the image quality; wherein, the image data to be transmitted is converted into a color feature sequence by using the characteristic that the color difference of the MacAdam ellipse color points distributed on the chromaticity diagram is not easily perceived by the human eye, thereby ensuring the image quality of the compression coding result of the image data to be transmitted, and utilizing the characteristic that the color features corresponding to the pixel points in the image data to be transmitted have spatial proximity in the chromaticity diagram, combined with the multiple adjacent color features of each color feature in the multi-connected chain code of each color feature and the direction symbol of each adjacent color feature, the color feature sequence is converted into multiple chain codes, thereby reducing the data volume of the compression coding result of the image data to be transmitted, thereby improving the compression effect of the image data to be transmitted, and at the same time ensuring the image quality of the received compression coding result.

[0070] An embodiment of the present invention further discloses a data transmission status monitoring system based on FPGA, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an FPGA-based data transmission status monitoring method according to the present invention is implemented.

[0071] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0072] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0073] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A data transmission status monitoring method based on FPGA, characterized in that: include: Each time the data receiving end receives After the image data is transmitted by the end, the data receiving time and data attention are fed back to the end; According to the status monitoring result of the last data transmission, the end sets the order of the MacAdam ellipse during the current data transmission and records it as ; Through all the distribution on the chromaticity diagram The MacAdam ellipse is used to screen out the smallest number of multiple chromaticity diagrams that can completely cover the entire chromaticity diagram. order MacAdam ellipse, and as a variety of color features; Scan all pixels in the image data to be transmitted to obtain a pixel sequence; obtain the color feature of each pixel according to the color value of each pixel in the pixel sequence, and record the sequence composed of the color features of all pixels as a color feature sequence; Setting a multi-connected chain code for each color feature, wherein the multi-connected chain code gives a plurality of adjacent color features of each color feature and a direction symbol of each adjacent color feature; Combining the multi-connected chain codes of each color feature, the color feature sequence is converted into multiple chain codes, the first element of the chain code belongs to the color feature, and the other elements belong to the direction symbol; all the chain codes are compressed and encoded, so as to obtain the compression encoding result of the image data to be transmitted; The end sends the compression encoding result of the image data to be transmitted to the data receiving end.

2. The data transmission status monitoring method based on FPGA according to claim 1, characterized in that: The data receiving time refers to the time when the data receiving end receives the data from The data attention level is given by the data receiving end after analyzing the received image data, and the value range of the data attention level is .

3. The FPGA-based data transmission status monitoring method according to claim 2, characterized in that: The method for obtaining the order of the MacAdam ellipse during the current data transmission is: The FPGA end stores the data transmission time of each data transmission; exist After receiving the status monitoring result of the last data transmission fed back by the data receiving end, the terminal calculates the duration of the last data transmission according to the data receiving time and the data sending time of the last data transmission, and the duration is equal to the difference between the data receiving time and the data sending time; Calculate the transmission speed of the last data transmission according to the data volume and duration of the last data transmission, where the transmission speed is equal to the data volume transmitted divided by the duration; Calculate the order of the MacAdam ellipse during the current data transmission based on the transmission speed and data attention of the last data transmission , , are the preset first coefficient and second coefficient respectively, To obtain the minimum function, is the transmission speed of the last data transmission, is the base value of transmission speed, is the data attention of the last data transmission, is the base value of the order, Indicates rounding up.

4. The method for monitoring data transmission status based on FPGA according to claim 1, characterized in that: The multi-connected chain code for setting each color feature includes: Will Any integer in the range is used as the pre-selected quantity. Equal to the preset value; according to the pre-selected number, set the multi-connected chain code of each color feature, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature color features, as the adjacent color features of the central color feature, is the pre-selected number, and the direction symbol of each adjacent color feature is set to 0 to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain codes of the central color feature.

5. The method for monitoring data transmission status based on FPGA according to claim 1, characterized in that: The multi-connected chain code for setting each color feature includes: Will Any integer in the range is used as the pre-selected quantity. equal to the preset value; calculate the preference of taking the pre-selected number as the target number, and take the integer with the largest preference as the target number; according to the target number, set the multi-connected chain code of each color feature, including: taking any color feature as the central color feature, calculating the distance between all color features and the central color feature, and taking the color feature with the smallest distance to the central color feature as the target number; color features, as the adjacent color features of the central color feature, is the target number, and the direction symbol of each adjacent color feature is set to 0 to ; All adjacent color features of the central color feature and the direction symbols of all adjacent color features are used as the multi-connected chain codes of the central color feature.

6. The method for monitoring data transmission status based on FPGA according to claim 5, characterized in that: The calculation of the preference of taking the preselected quantity as the target quantity includes: Take any color feature in the color feature sequence as the target color feature, and , get the previous color feature of the target color feature adjacent color features, determine whether the target color feature belongs to the adjacent color feature of the previous color feature: if the target color feature belongs to the adjacent color feature of the previous color feature, divide the target color feature into the preselected number Otherwise, the target color feature is divided into a preselected number of in the second category; according to the pre-selected number The number of color features in the first and second categories will be calculated to preselect the number As the priority of the target quantity, the preselected quantity As the preferred number of targets The calculation formula is: ; In the formula, Preselected quantity The number of color features in the first and second categories, is the number of types of all color features.

7. The method for monitoring data transmission status based on FPGA according to claim 1, characterized in that: The step of converting the color feature sequence into a plurality of chain codes comprises: The first The color feature is The first element of the chain code, get the A chain code, including: Starting from a color feature, each color feature is judged in order whether it is the adjacent color feature of the previous color feature, until a color feature is not the adjacent color feature of the previous color feature. At this time, the sequence number of the color feature is recorded as , will Color features to The direction symbol of the color feature is added as an element to the Among the chain codes, get chain code; Among them, when hour, , that is, the first The color feature is The first element of a chain code; And so on, until the judgment of the last color feature in the color feature sequence is completed, so as to convert the color feature sequence into multiple chain codes.

8. The method for monitoring data transmission status based on FPGA according to claim 1, characterized in that: The direction symbol of a color feature can be obtained only when the color feature is the adjacent color feature of the previous color feature. The method for obtaining the direction symbol of the color feature is: The direction symbol of the adjacent color feature corresponding to the color feature among all the adjacent color features of the previous color feature of the color feature is used as the direction symbol of the color feature.

9. The method for monitoring data transmission status based on FPGA according to claim 1, characterized in that: The compression encoding of all chain codes to obtain the compression encoding result of the image data to be transmitted includes: For any chain code, the process of compressing the chain code is as follows: elements, when At that time, elements belong to the color feature, and the The sequence number of the element in all color features , the serial number The corresponding length is equal to The binary data is The compression encoding result of elements, is the number of all color features; when At that time, The element belongs to the direction symbol. The length of the corresponding element is equal to The binary data is The compression encoding result of elements, is the number of all types of direction symbols; the compressed encoding results of all elements in the chain code form the compressed encoding result of the chain code; The compression encoding results of all chain codes are used as the compression encoding results of the image data to be transmitted.

10. A data transmission status monitoring system based on FPGA, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an FPGA-based data transmission status monitoring method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Map image data real-time acquisition system and method

    CN113365016A

  • Data-transmitting method, data-sending method and data-receiving method

    CN101615929A

  • Lossy image compression transmission method and system

    CN109819254A

  • Image data transmission method, device and system

    CN111200693A

  • High-speed data transmission method and system of micro computing device

    CN119154997A