CN-122018798-A - Data processing system and data transmission method thereof
Abstract
A data processing system and its data transmission method includes creating the first data packet by the production module and transmitting it to the consumption module, executing the first or the second operation by the consumption module according to the first data packet, copying the first data indicated by the first data packet to generate the second data packet, and data processing the second data indicated by the second data packet, where the first and the second data have the same content and store different blocks in memory, and the second operation includes data processing by the first data, reducing the reference number of a corresponding data packet in the first and the second data packets by the consumption module after data processing is completed, and releasing the block of the first or the second data indicated by the corresponding data packet in memory when the reference number is zero. The application can release the occupied storage space in the memory in real time.
Inventors
- DONG HAODONG
Assignees
- 星宸科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260127
Claims (10)
- 1. A data processing system, comprising: a memory, and At least one processor running a production module and a consumption module; The production module establishes a first data packet and transmits the first data packet to the consumption module; Wherein, the consumption module executes a first operation or a second operation according to the first data packet; Wherein the first operation comprises: Copying a first data indicated by the first data packet to generate a second data packet, and Performing a data processing using a second data indicated by the second data packet, wherein the first data and the second data have the same content and are stored in different blocks in the memory; wherein the second operation comprises: Performing the data processing using the first data; After the data processing is completed, the consumption module reduces the reference number of a corresponding data packet in the first data packet and the second data packet, and releases at least one block in the memory for storing the corresponding data packet and storing the first data or the second data indicated by the corresponding data packet when the reference number of the corresponding data packet is zero.
- 2. The data processing system of claim 1, wherein the second operation further comprises: Increasing the reference number of the first data packet.
- 3. The data processing system of claim 1, wherein the production module is further to decrement the number of references to the first data packet after the first data packet is completely transferred to the consumption module.
- 4. The data processing system of claim 1, wherein after the first data packet is completely transferred to the consumption module, the production module further deletes the first data packet and the first data when the reference number of the first data packet is zeroed.
- 5. The data processing system of claim 1, wherein the first data packet includes a copy packet variable and copy operation information, and the consumption module performs a copy operation according to the copy operation information to copy the first data when the copy packet variable is null, thereby generating the second data packet.
- 6. The data processing system of claim 1 wherein the first data packet includes a copy packet variable and copy operation information, and the consumption module performs a copy operation according to the copy operation information to obtain a packet indicated by the copy packet variable as the second data packet when the copy packet variable is not null.
- 7. The data processing system of claim 1, wherein the first data packet includes a copy operation information, and the consumption module performs a default referencing operation based on the copy operation information to increase the number of references to the first data packet and perform the second operation.
- 8. The data processing system of claim 1, wherein the corresponding data packet includes a delete operation information, and wherein the consumption module performs a delete operation to delete the corresponding data packet and the corresponding data according to the delete operation information when the reference number of the corresponding data packet is zero.
- 9. The data processing system of claim 1, wherein the production module is a video input module and the consumption module is an encoder module or a data storage module.
- 10. A data transmission method executed by a processor, wherein the processor executes a production module and a consumption module, the data transmission method comprising: establishing a first data packet through the production module and transmitting the first data packet to the consumption module; executing a first operation or a second operation according to the first data packet by using the consumption module; Wherein the first operation comprises: Copying a first data indicated by the first data packet to generate a second data packet; And performing a data processing using a second data indicated by the second data packet, wherein the first data and the second data have the same content and are stored in different blocks in a memory; wherein the second operation comprises: and using the first data to perform the data processing, and And after the data processing is completed, reducing the reference number of a corresponding data packet in the first data packet and the second data packet through the consumption module, and releasing at least one block in the memory for storing the corresponding data packet and storing the first data or the second data indicated by the corresponding data packet when the reference number of the corresponding data packet is zero.
Description
Data processing system and data transmission method thereof Technical Field The present disclosure relates to data processing systems, and more particularly, to a data processing system and a data transmission method capable of releasing occupied memory space in a memory in real time. Background Data processing systems in the prior art often transmit data between modules in packets (packets) and use the packets after direct reference or copy of the data is determined by the module receiving the packets. However, in practical applications, the data dependency and processing timing between the modules are limited, and the above mechanism may cause the blocks storing data in the memory to be unable to be released at appropriate time points, or occupy additional memory space due to unnecessary data replication, thereby reducing system performance. Disclosure of Invention In some embodiments, one of the purposes of the present disclosure, but not limited to, is to provide a data processing system and a data transmission method capable of releasing occupied memory space in a memory in real time, so as to solve the problems of the prior art. In some implementations, a data processing system includes a memory and at least one processor. At least one processor runs a production module and a consumption module. The production module establishes a first data packet and transmits the first data packet to the consumption module. The consumption module executes a first operation or a second operation according to the first data packet. The first operation includes copying a first data indicated by the first data packet to generate a second data packet, and performing a data processing using a second data indicated by the second data packet, wherein the first data and the second data have the same content and are stored in different blocks in the memory. The second operation includes performing the data processing using the first data. After the data processing is completed, the consumption module further reduces the reference number of a corresponding data packet in the first data packet and the second data packet, and releases at least one block in the memory for storing the corresponding data packet and storing the first data or the second data indicated by the corresponding data packet when the reference number of the corresponding data packet is zero. In some embodiments, a data processing method performed by a processor (which runs a production module and a consumption module) includes creating a first data packet by the production module and transmitting the first data packet to the consumption module, performing a first operation or a second operation by the consumption module according to the first data packet, wherein the first operation includes copying a first data indicated by the first data packet to generate a second data packet, and performing a data processing by using a second data indicated by the second data packet, wherein the first data and the second data have the same content and are stored in different blocks in a memory, wherein the second operation includes performing the data processing by using the first data, and reducing a reference number of a corresponding data packet in the first data packet and the second data packet by the consumption module after the data processing is completed, and releasing the memory to store the corresponding data packet and at least one block of the first data or the second data packet of the corresponding data when the reference number of the corresponding data is zero. The features, embodiments and functions of the present invention are described in detail below with reference to the accompanying drawings. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. FIG. 1 is a schematic diagram of a data processing system according to some embodiments of the present disclosure; FIG. 2A is a diagram illustrating a format of a first data packet generated by a production module and a corresponding operation thereof according to some embodiments of the present disclosure; FIG. 2B is a flowchart illustrating operations performed by the production module and the consumption module based on the first data packet of FIG. 2A in a first scenario according to some embodiments of the present disclosure; FIG. 3 is a flowchart illustrating operations performed by a production module, a first consumption module, and a second consumption module according to some embodiments of the present disclosure based on the first data packet of FIG. 2A in a second scenario; FIG. 4A is a diagram i