Image data transmission method and device, computer equipment and storage medium

By monitoring the write address information of the central processor, determining the update coordinate range of image data, and transmitting only the data within this range, the problems of wasted calculation process and high network bandwidth occupation in traditional image data transmission methods are solved, and more efficient image data transmission is achieved.

CN119865614AActive Publication Date: 2025-04-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the field of server technology, traditional image data transmission methods will compress and transmit each frame of data, resulting in waste of calculation process, high network bandwidth usage, and low transmission efficiency.

Method used

By monitoring the write address information from the central processor to memory, the first coordinate range of the updated pixel is determined, and only the image data within the coordinate range is obtained for compression and transmission.

Benefits of technology

This reduces the amount of image data transmission, reduces the network bandwidth usage, and improves the transmission efficiency of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865614A_ABST
    Figure CN119865614A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses an image data transmission method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining at least one piece of write address information in a processing period of a current frame; according to each piece of write address information in the at least one piece of write address information, a first preset storage space size and a second preset storage space size, determining a first coordinate range of the updated pixel, the first preset storage space size being a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size being a storage space size occupied by image data of a row of pixels in the image; the second preset storage space size is the size of the storage space occupied by the image data of one pixel in the image; acquiring image data in the first coordinate range according to the first coordinate range; compressing the image data in the first coordinate range to obtain the compressed image data in the first coordinate range; and transmitting the compressed image data in the first coordinate range to a remote terminal. The transmission efficiency of the image data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to an image data transmission method, device, computer equipment and storage medium. Background Art

[0002] In the field of server technology, the baseboard management controller (BMC) is generally used to monitor and manage servers. Users can log in to the BMC's Web service on their own terminals to operate the BMC. The BMC can obtain image data from the local server and send it to the remote terminal through the network, so that the administrator can see the relevant display interface in the remote terminal. At the same time, the user's control behaviors such as mouse and keyboard operations in the terminal are also transmitted back to the server BMC through the network, and the BMC parses and executes it, thereby realizing remote control.

[0003] In the process of transmitting image data over the network, since the content of the displayed picture does not change much, there may even be many consecutive frames that are exactly the same. The traditional capture and compression method will compress and transmit each frame of data, which may cause a lot of computing process waste. Repeated image data transmission occupies a large amount of network bandwidth, and the image data transmission efficiency is low. Summary of the invention

[0004] In view of this, the present invention provides an image data transmission method, apparatus, computer equipment, storage medium and program product to solve the problem that repeated image data transmission occupies a large amount of storage space and network bandwidth, thereby reducing the overall performance of the BMC.

[0005] In a first aspect, the present invention provides a method for image data transmission, the method comprising:

[0006] In a processing cycle of a current frame, obtaining at least one piece of write address information, wherein the write address information is the starting address information for the central processing unit to write the image data of the updated pixel in the memory;

[0007] Determine a first coordinate range of the updated pixel according to each of the write address information in at least one of the write address information, a first preset storage space size, and a second preset storage space size, wherein the first preset storage space size is a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size is a storage space size occupied by image data of one pixel in the image;

[0008] According to the first coordinate range, acquiring image data within the first coordinate range;

[0009] compressing the image data within the first coordinate range to obtain compressed image data within the first coordinate range;

[0010] The compressed image data within the first coordinate range is transmitted to a remote terminal.

[0011] The image data transmission method provided by the present invention has the following advantages:

[0012] When updating the image data of each frame, since the image data of only some pixels are different between the current frame and the previous frame, the central processing unit generally only writes the image data of the changed pixels into the memory. Therefore, this solution monitors the write address information of the bus from the central processing unit to the memory during the processing cycle of the current frame. Furthermore, the first coordinate range of the updated pixel can be determined based on the write address information, the first preset storage space size, and the second preset storage space size. Finally, it is only necessary to obtain the image data of the pixels within the first coordinate range, compress it, and transmit it to the remote terminal. In this way, the amount of compressed image data and the amount of transmitted image data are greatly reduced (from complete image data to image data within the first coordinate range), which can reduce the occupancy of network bandwidth and improve the transmission efficiency of image data.

[0013] In an optional implementation, determining the first coordinate range of the updated pixel according to each of the write address information in the at least one write address information, the first preset storage space size, and the second preset storage space size includes:

[0014] Determine, according to the target write address information and the first preset storage space size, a ordinate value corresponding to the target write address information, wherein the target write address information is any one of the at least one write address information;

[0015] Determining a horizontal coordinate value corresponding to the target write address information according to the target write address information, the first preset storage space size, and the second preset storage space size;

[0016] The first coordinate range is determined according to the ordinate value and the abscissa value corresponding to each piece of the write address information.

[0017] Specifically, since the image data of adjacent pixels needs to be considered during the compression process of the image data, if you want to minimize the amount of data, you can perform a detailed analysis of the write address information to determine one or more pixel blocks (composed of multiple consecutive pixels) to facilitate subsequent compression of each pixel block. This makes the analysis process more complicated, and the compression process is also more complicated and less efficient. However, this solution determines the first coordinate range based on the ordinate value and the abscissa value of the write address information, and treats the pixels within the first coordinate range as a pixel block. In this way, the complexity of the analysis process and compression can be reduced, the processing efficiency of the image data can be improved, and further, the data transmission efficiency can be improved.

[0018] In an optional implementation manner, determining the first coordinate range according to the ordinate value and the abscissa value corresponding to each of the write address information includes:

[0019] Determine a maximum first ordinate value and a minimum second ordinate value according to the ordinate value corresponding to each of the write address information;

[0020] Determine a maximum first horizontal coordinate value and a minimum second horizontal coordinate value according to the horizontal coordinate value corresponding to each of the write address information;

[0021] The first coordinate range is determined according to the first ordinate value, the second ordinate value, the first abscissa value, and the second abscissa value.

[0022] Specifically, by finding the maximum and minimum coordinate values, the boundary of the data set can be quickly determined to obtain a rectangular frame, and the calculation process is simple.

[0023] In an optional implementation, acquiring image data within the first coordinate range according to the first coordinate range includes:

[0024] Determine a target address range according to the first coordinate range, the first preset storage space size, and the second preset storage space size;

[0025] According to the target address range, the image data within the first coordinate range is read from a storage location in the memory corresponding to the target address range.

[0026] Specifically, the target address range where the corresponding image data is located can be determined based on the first coordinate range. By reading the image data in the target address range, there is no need to read the image data at various scattered storage locations, which can improve the reading efficiency of the image data and further improve the transmission efficiency of the image data.

[0027] In an optional implementation, acquiring image data within the first coordinate range according to the first coordinate range includes:

[0028] In the process of the video graphics array controller starting to transmit the image data of the current frame to the local terminal, each time a horizontal synchronization signal is detected, the count value of the pre-constructed first counter is increased by a first preset value, and the count value of the pre-constructed second counter is cleared, wherein the horizontal synchronization signal is used to indicate the start of transmission of the image data of a new row of pixels;

[0029] Whenever it is detected that image data of one pixel in the image reaches a monitoring position, the count value of the second counter is increased by a second preset value;

[0030] Obtaining a current first count value of the first counter and a current second count value of a pre-built second counter;

[0031] determining the first count value as a target ordinate value, and determining the second count value as a target abscissa value;

[0032] Determine the target coordinates according to the target ordinate value and the target abscissa value;

[0033] Determine whether the target coordinates are within the first coordinate range;

[0034] When it is determined that the target coordinates are within the first coordinate range, capturing image data of the target update pixel corresponding to the target coordinates from a target data transmission channel, wherein the target data transmission channel is an image data transmission channel from the video graphics array controller to the local terminal;

[0035] When it is determined that the first count value is equal to the first ordinate value and the second count value is equal to the first abscissa value, it is determined that the capture operation of the image data within the first coordinate range is completed.

[0036] Specifically, in each process of updating image data to the local terminal, the video graphics array controller reads the image data of each pixel in the image from the memory and transmits it to the local terminal respectively. This solution monitors the pixels transmitted in the target data transmission channel through the first counter and the second counter, that is, the vertical coordinate value of the pixel is obtained through the first counter, and the horizontal coordinate value of the pixel is obtained through the second counter. Further, according to the vertical coordinate value and the horizontal coordinate value of the pixel, the coordinate of the pixel is obtained, and then it is determined whether the coordinate of the pixel is within the first coordinate range. If so, it is determined that the pixel is a pixel that needs to be transmitted to the remote terminal, and the image data of the pixel can be captured. In this way, directly capturing image data during the transmission of local image data can reduce the number of accesses to the memory, reduce the occupancy of memory bandwidth, and reduce the impact on other services.

[0037] In an optional implementation manner, the ordinate value corresponding to the target write address information is determined according to the target write address information and the first preset storage space size, using the following expression:

[0038] Y = wtite_addr / k1

[0039] Among them, Y is the vertical coordinate value, wtite_addr is the target write address information, and k1 is the first preset storage space size.

[0040] In an optional implementation manner, the abscissa value corresponding to the target write address information is determined according to the target write address information, the first preset storage space size, and the second preset storage space size, using the following expression:

[0041] X = wtite_addr% k1 / k2

[0042] Wherein, X is the horizontal coordinate value, wtite_addr is the target write address information, k1 is the first preset storage space size, and k2 is the second preset storage space size.

[0043] In a second aspect, the present invention provides an image data transmission device, the device comprising:

[0044] An acquisition module, used to acquire at least one write address information in a processing cycle of a current frame, wherein the write address information is the starting address information for the central processing unit to write the image data of the updated pixel in the memory;

[0045] a determination module, configured to determine a first coordinate range of an update pixel according to each of the write address information in at least one of the write address information, a first preset storage space size, and a second preset storage space size, wherein the first preset storage space size is a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size is a storage space size occupied by image data of one pixel in the image;

[0046] The acquisition module is further used to acquire image data within the first coordinate range according to the first coordinate range;

[0047] A compression module, used for compressing the image data within the first coordinate range to obtain compressed image data within the first coordinate range;

[0048] A transmission module is used to transmit the compressed image data within the first coordinate range to a remote terminal.

[0049] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image data transmission method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0050] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image data transmission method of the first aspect or any corresponding embodiment thereof.

[0051] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the image data transmission method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 is a schematic diagram of the architecture of an image data transmission system according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of an image data transmission method according to an embodiment of the present invention;

[0055] Figure 3 is a schematic diagram of the correspondence between pixel coordinates and address information according to an embodiment of the present invention;

[0056] Figure 4 is a schematic diagram of a compression process according to an embodiment of the present invention;

[0057] Figure 5 is a schematic diagram of updating a displayed image according to an embodiment of the present invention;

[0058] Figure 6 is a structural block diagram of an image data transmission device according to an embodiment of the present invention;

[0059] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0061] The professional terms involved in the embodiments of the present invention are analyzed below.

[0062] RGB: is a color model, its full name is Red-Green-Blue. The RGB model creates a wide range of colors by combining different intensities of three basic colors. These three basic colors are red, green, and blue.

[0063] YUV: Y stands for Luminance, U and V stand for Chrominance. Y (Luminance) represents the brightness information in the image, that is, black and white information. The Y component reflects the sensitivity of the human eye to brightness, because the human eye is more sensitive to changes in brightness. U (Color Difference): Also known as BY (blue component minus brightness component), it represents the difference in blue information relative to brightness. V (Color Difference): Also known as RY (red component minus brightness component), it represents the difference in red information relative to brightness.

[0064] 32bpp mode: "bpp" is the abbreviation of "bits per pixel". 32bpp (32bitsperpixel) mode refers to an image format that uses 32 bits per pixel to represent color information, where the R, G, and B color components each occupy 8 bits, and the high-order 8 bits are idle.

[0065] Entropy coding: is a lossless data compression technique used to reduce the number of bits required to represent data without losing any information. Since the implementation principle of entropy coding is that the probability of different symbols or patterns in the data is usually uneven, entropy coding can effectively reduce the total number of bits required to represent the data by giving shorter codes to symbols that appear frequently and longer codes to symbols that appear less frequently. For example, entropy coding can be Huffman Coding, etc.

[0066] The embodiment of the present invention provides an image data transmission system, such as Figure 1 As shown, the architecture of the image data transmission system may include a local terminal, a remote terminal, a central processing unit (CPU), a baseboard management controller and a memory.

[0067] Among them, the local terminal is a terminal within a preset distance range from the location of the baseboard management controller. Within the preset distance range, the baseboard management controller can complete the interaction with the local terminal without any network facilities. The remote terminal refers to a terminal that the baseboard management controller needs to use the network to interact with.

[0068] The baseboard management controller may be provided with a peripheral component interconnect express (PCIE) interface, a video graphics array (VGA) controller, an address information parser, an image data compression engine, an Ethernet media access controller (EMAC), a memory controller, and a digital visual interface (DVI). The PCIE interface may be electrically connected to the VGA controller. The VGA may be electrically connected to the address information parser. The address information parser may be electrically connected to the memory controller and the image data compression engine, respectively. The image data compression engine may be connected to the memory controller and the EMAC, respectively.

[0069] Accordingly, the baseboard management controller can be connected to the central processing unit through the PCIE interface, connected to the local terminal through the DVI interface, connected to the remote terminal through the EMAC, and connected to the memory through the memory controller.

[0070] The memory may be a double data rate (DDR) synchronous dynamic random access memory (SDRAM) memory. A frame buffer area may be provided in the memory for storing image data.

[0071] Under the above-mentioned image data transmission system architecture, the central processor can write the image data of all updated pixels in each frame into the frame buffer area in the memory through the PCIE interface and the memory controller. VGA can read the image data of all pixels in the image (including other pixels except the updated pixels) from the memory according to the memory controller and transmit it to the local terminal. EMAC can read the image data from the memory through the memory controller and transmit it to the remote terminal. The specific transmission process can be seen in the subsequent description.

[0072] The embodiment of the present invention provides an image data transmission method, which reduces the image data transmission amount and improves the image data transmission efficiency by transmitting image data within a first coordinate range.

[0073] According to an embodiment of the present invention, an embodiment of an image data transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0074] In this embodiment, a method for transmitting image data is provided, which can be executed by a computer device. For example, the computer device can be the above-mentioned baseboard management controller. The baseboard management controller can complete the process of image data transmission by interacting with various components included therein. Figure 1 The baseboard management controller shown is a detailed description of the execution entity.

[0075] Figure 2 is a flowchart of an image data transmission method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0076] Step S201: acquiring at least one write address information in a processing cycle of a current frame.

[0077] The write address information may be the starting address information for the central processing unit to write the image data for the updated pixel in the memory.

[0078] Specifically, whenever the address information parser detects the vertical synchronization (Vertical Synchronization, VSync) signal, it indicates that a new frame of image processing cycle has begun. During the processing of a new frame of image, the central processing unit will write the image data of the updated pixels into the memory through the bus. Therefore, the address information parser in the baseboard management controller can obtain the write address information from the bus in each processing cycle. At this time, the image data written into the memory can be in RGB format.

[0079] Step S202: determining a first coordinate range of an update pixel according to each piece of write address information in the at least one piece of write address information, a first preset storage space size, and a second preset storage space size.

[0080] The first preset storage space size is the storage space size occupied by the image data of a row of pixels in the image, and the second preset storage space size is the storage space size occupied by the image data of one pixel in the image. For example, the first preset storage space size may be 1000H (hexadecimal value), and the second preset storage space size may be 4 bytes.

[0081] Specifically, the address information parser can convert each write address information collected in the processing cycle of the current frame according to the first preset storage space size and the second preset storage space size to obtain the coordinates corresponding to each write address information, and then determine the first coordinate range of the updated pixel according to the coordinates corresponding to each write address information.

[0082] Taking a 1024×768 resolution image in 32bpp mode as an example, the space occupied by a frame of 1024×768 image in the video memory is 1024×768×32=3145728Byte. Converted to hexadecimal, the range of the storage space is from 00H to 300000H, and the address space occupied by each row is 1000H. Accordingly, the correspondence between pixel coordinates and write address information can be as follows Figure 3 shown.

[0083] The specific process of determining the first coordinate range of the updated pixel according to the coordinates corresponding to each write address information can be as follows:

[0084] Step 1: Determine a ordinate value corresponding to the target write address information according to the target write address information and a first preset storage space size.

[0085] The target write address information is any write address information in the at least one write address information.

[0086] Step 2: determining a horizontal coordinate value corresponding to the target write address information according to the target write address information, the first preset storage space size and the second preset storage space size.

[0087] Specifically, the address information parser can determine the row number of the pixel corresponding to the target write address information in the image based on the target write address information and the first preset storage space size, that is, determine the ordinate value corresponding to the target write address information. Furthermore, the address information parser can determine the row number of the pixel corresponding to the target write address information in the image based on the target write address information, the first preset storage space size, and the second preset storage space size, that is, determine the abscissa value corresponding to the target write address information.

[0088] For example, step 1 can be expressed as follows:

[0089] Y=wtite_addr / k1 (Formula 1)

[0090] Wherein, Y is the vertical coordinate value, wtite_addr is the target write address information, and k1 is the first preset storage space size.

[0091] For example, step 2 can use the following expression:

[0092] X=wtite_addr%k1 / k2 (Formula 2)

[0093] Wherein, X is the horizontal coordinate value, wtite_addr is the target write address information, k1 is the first preset storage space size, and k2 is the second preset storage space size.

[0094] For example, the target write address information is 04H, k1 is 1000H, k2 is 4, the calculated ordinate value is 0, and the calculated abscissa value is 1.

[0095] Step three: determine the first coordinate range according to the ordinate value and the abscissa value corresponding to each write address information.

[0096] Specifically, the address information parser can determine the maximum first ordinate value and the minimum second ordinate value according to the ordinate value corresponding to each write address information, and determine the maximum first abscissa value and the minimum second abscissa value according to the abscissa value corresponding to each write address information. Further, the first coordinate range can be determined according to the first ordinate value, the second ordinate value, the first abscissa value, and the second abscissa value. Specifically, the abscissa range can be determined according to the first abscissa value and the second abscissa value, and the ordinate range can be determined according to the first ordinate value and the second ordinate value, and the abscissa range and the ordinate range constitute the first coordinate range.

[0097] For example, the first coordinate range may be {x:256-263, y:256-271}.

[0098] Step S203: acquiring image data within the first coordinate range according to the first coordinate range.

[0099] Specifically, the address information parser may send the first coordinate range to the image data compression engine, and the image data compression engine may obtain the image data within the first coordinate range according to any one of the following methods.

[0100] In method 1, the image data compression engine can determine the target address range according to the first coordinate range, the first preset storage space size, and the second preset storage space size. Then, according to the target address range, the image data within the first coordinate range can be read from the storage location corresponding to the target address range in the memory.

[0101] Specifically, the image data compression engine can use the above formula (1) and formula (2) to convert the first coordinate range into the target address range. Further, the image data compression engine can read the image data within the target address range from the memory according to the target address range, that is, read the image data within the first coordinate range.

[0102] Method 2: When the video graphics array controller starts to transmit the image data of the current frame to the local terminal, each time a horizontal synchronization signal (Horizontal Synchronization, HSync) is detected, the count value of the pre-constructed first counter is increased by a first preset value, and the count value of the pre-constructed second counter is cleared. The horizontal synchronization signal is used to indicate the start of the transmission of the image data of a new row of pixels. Each time the image data of a pixel in the image is detected to arrive at the monitoring position, the count value of the second counter is increased by a second preset value. The current first count value of the first counter and the current second count value of the pre-constructed second counter are obtained. The first count value is determined as the target ordinate value, and the second count value is determined as the target abscissa value. According to the target ordinate value and the target abscissa value, the target coordinate is determined. It is determined whether the target coordinate is a coordinate within the first coordinate range. When it is determined that the target coordinate is a coordinate within the first coordinate range, the image data of the target update pixel corresponding to the target coordinate is captured from the target data transmission channel. When it is determined that the first count value is equal to the first ordinate value and the second count value is equal to the first abscissa value, it is determined that the capture operation of the image data within the first coordinate range is completed.

[0103] The target data transmission channel is an image data transmission channel from a video graphics array controller to a local terminal. The first preset value and the second preset value may both be 1.

[0104] Specifically, the image data compression engine can be provided with two counters, namely the first counter and the second counter mentioned above. In the process of the video graphics array controller starting to transmit the image data of the current frame to the local terminal, each time the image data compression engine detects a horizontal synchronization signal, it indicates that the transmission operation of the image data of a new row of pixels has started. At this time, the count value of the first counter can be increased by a first preset value, and the count value of the second counter can be cleared to start the statistical operation of the pixels of the current row. Each time the image data of a pixel is monitored to arrive at the monitoring position (for example, the monitoring position can be a DVI interface), the count value of the second counter is increased by a second preset value. In addition, the image data compression engine can also determine whether the first count value is equal to the first ordinate value, and determine whether the second count value is equal to the first abscissa value. If both judgment results are yes, it means that the image data of all pixels within the first coordinate range have been captured.

[0105] In some optional implementations, before acquiring the image data within the first coordinate range, the image data compression engine may first acquire the current memory bandwidth and determine whether the memory bandwidth is less than a preset bandwidth threshold. If so, the image data may be read from the memory in method one, and if not, the image data may be captured from the monitoring position in method two. In this way, when the memory bandwidth is sufficient, the data may be read from the memory immediately, and when the memory bandwidth is insufficient, the image data may be captured from the transmission channel of the local image data (i.e., the target data transmission channel). In the case of insufficient memory bandwidth, the transmission of image data may be slow. In this case, the channel that originally needs to transmit image data may be used to capture image data, which can speed up the acquisition efficiency of image data within the first coordinate range.

[0106] Step S204 , compressing the image data within the first coordinate range to obtain compressed image data within the first coordinate range.

[0107] The compressed image data within the first coordinate range may be in JPEG format.

[0108] Specifically, the image data compression engine can be as follows Figure 4 The compression process shown is to compress the image data within the first coordinate range, which can be specifically as follows:

[0109] First, the image data within the first coordinate range is converted from the RGB color space to the YUV color space to obtain image data in the converted color space.

[0110] Second, since the image data within the first coordinate range is arranged in pixels, the image data within the first coordinate range can be converted according to a preset pixel block size to obtain image data corresponding to at least one pixel block. For example, the pixel block size can be 8×8, that is, one pixel block can include 64 pixels.

[0111] Third, the image data corresponding to at least one pixel block is subjected to discrete cosine transform (DCT) to obtain image data after discrete cosine transform.

[0112] Fourth, the image data after discrete cosine transformation is subjected to quantization processing, entropy coding processing, and compression processing in sequence to obtain compressed image data within the first coordinate range.

[0113] Among them, discrete cosine transform is mainly used to convert spatial domain data into frequency domain. Quantization is used to convert the frequency domain data obtained after discrete cosine transform into integers for further compression and reduction of image data transmission volume.

[0114] Step S205: Transmit the compressed image data within the first coordinate range to a remote terminal.

[0115] Specifically, the image data compression engine can write the image data within the first coordinate range and the compressed image data within the first coordinate range to the corresponding storage location in the memory, and notify EMAC to perform a reading operation. After EMAC reads the image data within the first coordinate range and the compressed image data within the first coordinate range, it transmits it to the remote terminal. The remote terminal can overwrite and display the image data within the first coordinate range in the previous frame of the image according to the first coordinate range, such as Figure 5 shown.

[0116] The following is an explanation using a specific example. Between two VSync signals, the user operates the mouse to move from the original position (256, 256) to the new position (265, 250). The original position and the new position here can be the upper left corner of the mouse. If the mouse occupies 8×16 pixels, the CPU will update the image of the first coordinate range {x:256-263, y:256-271} and {x:265-272, y:250-257}, that is, the mouse display in the area {x:256-263, y:256-271} needs to be removed, and the mouse display in the area {x:265-272, y:250-257} needs to be added. The write address information corresponding to {x:256-263, y:256-271} includes: 100400H-10041fH, 101400H-10141fH, ..., 10f400H-10f41fH. The write address information corresponding to {x:265-272, y:250-257} includes: fa424H-fa443H, fb424H-101443H, ..., 101424H-101443H. Accordingly, the target address range can be the address range between fa000H-10f000H and the lower 12-bit address between 400H-440H.

[0117] The image data transmission method provided in this embodiment, when updating the image data of each frame, since generally only the image data of some pixels are different between the current frame and the previous frame, the central processing unit generally only writes the image data of the changed pixels into the memory. Therefore, this scheme monitors the write address information of the bus from the central processing unit to the memory during the processing cycle of the current frame. Further, the first coordinate range of the updated pixel can be determined based on the write address information, the first preset storage space size, and the second preset storage space size. Finally, it is only necessary to obtain the image data of the pixels within the first coordinate range, compress it, and transmit it to the remote terminal. In this way, the amount of compressed image data and the amount of transmitted image data are greatly reduced (from complete image data to image data within the first coordinate range), which can reduce the occupancy of network bandwidth and improve the transmission efficiency of image data.

[0118] In this embodiment, an image data transmission device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0119] This embodiment provides an image data transmission device, such as Figure 6 As shown, including:

[0120] The acquisition module 601 is used to acquire at least one write address information in the processing cycle of the current frame, wherein the write address information is the starting address information for the central processing unit to write the image data of the updated pixel in the memory;

[0121] A determination module 602 is used to determine a first coordinate range of an updated pixel according to each write address information in the at least one write address information, a first preset storage space size, and a second preset storage space size, wherein the first preset storage space size is a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size is a storage space size occupied by image data of one pixel in the image;

[0122] The acquisition module 601 is further used to acquire image data within the first coordinate range according to the first coordinate range;

[0123] A compression module 603, used to compress the image data within the first coordinate range to obtain compressed image data within the first coordinate range;

[0124] The transmission module 604 is used to transmit the compressed image data within the first coordinate range to a remote terminal.

[0125] In some optional implementations, the determination module 602 is specifically configured to:

[0126] Determine, according to the target write address information and the first preset storage space size, a ordinate value corresponding to the target write address information, wherein the target write address information is any one of the at least one write address information;

[0127] Determining a horizontal coordinate value corresponding to the target write address information according to the target write address information, the first preset storage space size, and the second preset storage space size;

[0128] The first coordinate range is determined according to the ordinate value and the abscissa value corresponding to each piece of write address information.

[0129] In some optional implementations, the determination module 602 is specifically configured to:

[0130] Determine a maximum first ordinate value and a minimum second ordinate value according to the ordinate value corresponding to each write address information;

[0131] Determine a maximum first horizontal coordinate value and a minimum second horizontal coordinate value according to the horizontal coordinate value corresponding to each write address information;

[0132] A first coordinate range is determined according to the first ordinate value, the second ordinate value, the first abscissa value, and the second abscissa value.

[0133] In some optional implementations, the acquisition module 601 is specifically configured to:

[0134] Determining a target address range according to the first coordinate range, the first preset storage space size, and the second preset storage space size;

[0135] According to the target address range, image data within the first coordinate range is read from a storage location in the memory corresponding to the target address range.

[0136] In some optional implementations, the acquisition module 601 is specifically configured to:

[0137] When the video graphics array controller starts to transmit the image data of the current frame to the local terminal, each time a target signal is detected, the count value of the pre-constructed first counter is increased by a first preset value;

[0138] Obtaining a current first count value of a first counter and a current second count value of a pre-constructed second counter, wherein the count value of the first counter is used to indicate that the pixel corresponding to the target signal is located in the current row of pixels, and the count value of the second counter is used to indicate the row number where the pixel corresponding to the target signal is located;

[0139] determining the first count value as a target ordinate value, and determining the second count value as a target abscissa value;

[0140] Determine the target coordinates according to the target ordinate value and the target abscissa value;

[0141] Determine whether the target coordinates are within the first coordinate range;

[0142] When the target coordinates are determined to be within the first coordinate range, capturing image data of the target update pixel corresponding to the target coordinates from a target data transmission channel, wherein the target data transmission channel is an image data transmission channel from a video graphics array controller to a local terminal;

[0143] When it is determined that the first count value is equal to the first ordinate value and the second count value is equal to the first abscissa value, it is determined that the capture operation of the image data within the first coordinate range is completed.

[0144] In some optional implementations, the ordinate value corresponding to the target write address information is determined according to the target write address information and the first preset storage space size, using the following expression:

[0145] Y = wtite_addr / k1

[0146] Wherein, Y is the vertical coordinate value, wtite_addr is the target write address information, and k1 is the first preset storage space size.

[0147] In some optional implementations, the abscissa value corresponding to the target write address information is determined according to the target write address information, the first preset storage space size, and the second preset storage space size, using the following expression:

[0148] X = wtite_addr% k1 / k2

[0149] Wherein, X is the horizontal coordinate value, wtite_addr is the target write address information, k1 is the first preset storage space size, and k2 is the second preset storage space size.

[0150] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0151] The image data transmission device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0152] The embodiment of the present invention also provides a computer device having the above Figure 6 The image data transmission device shown.

[0153] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0154] The processor 10 may be a central processing unit or an image processor. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0155] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0156] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0157] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0158] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0159] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0160] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0161] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for transmitting image data, characterized in that: The method comprises: In a processing cycle of a current frame, obtaining at least one piece of write address information, wherein the write address information is the starting address information for the central processing unit to write the image data of the updated pixel in the memory; Determine a first coordinate range of the updated pixel according to each of the write address information in at least one of the write address information, a first preset storage space size, and a second preset storage space size, wherein the first preset storage space size is a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size is a storage space size occupied by image data of one pixel in the image; According to the first coordinate range, acquiring image data within the first coordinate range; compressing the image data within the first coordinate range to obtain compressed image data within the first coordinate range; The compressed image data within the first coordinate range is transmitted to a remote terminal.

2. The method according to claim 1, characterized in that The step of determining the first coordinate range of the updated pixel according to each of the at least one write address information, the first preset storage space size, and the second preset storage space size comprises: Determine, according to the target write address information and the first preset storage space size, a ordinate value corresponding to the target write address information, wherein the target write address information is any one of the at least one write address information; Determining a horizontal coordinate value corresponding to the target write address information according to the target write address information, the first preset storage space size, and the second preset storage space size; The first coordinate range is determined according to the ordinate value and the abscissa value corresponding to each piece of the write address information.

3. The method according to claim 2, characterized in that The determining the first coordinate range according to the ordinate value and the abscissa value corresponding to each of the write address information includes: Determine a maximum first ordinate value and a minimum second ordinate value according to the ordinate value corresponding to each of the write address information; Determine a maximum first horizontal coordinate value and a minimum second horizontal coordinate value according to the horizontal coordinate value corresponding to each of the write address information; The first coordinate range is determined according to the first ordinate value, the second ordinate value, the first abscissa value, and the second abscissa value.

4. The method according to any one of claims 1 to 3, characterized in that: The acquiring, according to the first coordinate range, image data within the first coordinate range comprises: Determine a target address range according to the first coordinate range, the first preset storage space size, and the second preset storage space size; According to the target address range, the image data within the first coordinate range is read from a storage location in the memory corresponding to the target address range.

5. The method according to claim 3, characterized in that: The acquiring, according to the first coordinate range, image data within the first coordinate range comprises: In the process of the video graphics array controller starting to transmit the image data of the current frame to the local terminal, each time a horizontal synchronization signal is detected, the count value of the pre-constructed first counter is increased by a first preset value, and the count value of the pre-constructed second counter is cleared, wherein the horizontal synchronization signal is used to indicate the start of transmission of the image data of a new row of pixels; Whenever it is detected that image data of one pixel in the image reaches a monitoring position, the count value of the second counter is increased by a second preset value; Obtaining a current first count value of the first counter and a current second count value of a pre-built second counter; determining the first count value as a target ordinate value, and determining the second count value as a target abscissa value; Determine the target coordinates according to the target ordinate value and the target abscissa value; Determine whether the target coordinates are within the first coordinate range; When it is determined that the target coordinates are within the first coordinate range, capturing image data of the target update pixel corresponding to the target coordinates from a target data transmission channel, wherein the target data transmission channel is an image data transmission channel from the video graphics array controller to the local terminal; When it is determined that the first count value is equal to the first ordinate value and the second count value is equal to the first abscissa value, it is determined that the capture operation of the image data within the first coordinate range is completed.

6. The method according to claim 2, characterized in that The ordinate value corresponding to the target write address information is determined according to the target write address information and the first preset storage space size, using the following expression: Y = wtite_addr / k1 Among them, Y is the vertical coordinate value, wtite_addr is the target write address information, and k1 is the first preset storage space size.

7. The method according to claim 2, characterized in that The determining of the abscissa value corresponding to the target write address information according to the target write address information, the first preset storage space size, and the second preset storage space size adopts the following expression: X = wtite_addr% k1 / k2 Wherein, X is the horizontal coordinate value, wtite_addr is the target write address information, k1 is the first preset storage space size, and k2 is the second preset storage space size.

8. An image data transmission device, characterized in that: The device comprises: An acquisition module, used to acquire at least one piece of writing address information in a processing cycle of a current frame, wherein the writing address information is address information of image data written by a central processing unit in a memory; a determination module, configured to determine a first coordinate range of an update pixel according to each of the write address information in at least one of the write address information, a first preset storage space size, and a second preset storage space size, wherein the first preset storage space size is a storage space size occupied by image data of a row of pixels in the image, and the second preset storage space size is a storage space size occupied by image data of one pixel in the image; The acquisition module is further used to acquire image data within the first coordinate range according to the first coordinate range; A compression module, used for compressing the image data within the first coordinate range to obtain compressed image data within the first coordinate range; A transmission module is used to transmit the compressed image data within the first coordinate range to a remote terminal.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image data transmission method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image data transmission method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Wireless laser pen interaction system based on field programmable gate array (FPGA)

    CN102073395A

  • Video compression method, device and equipment and computer readable storage medium

    CN113079379A

  • Efficient video frame capturing

    US20070132771A1

  • Methods and apparatus for non-intrusive capturing of frame buffer memory information for remote display

    US20080291210A1