Data processing system and data transmission method thereof

By actively configuring data packet operation information in the data processing system, the production module specifies the operation mode of the consumption module, and releases the memory space in real time after processing, the problem of memory resources not being released in a timely manner is solved, thus improving system efficiency.

CN122018798APending Publication Date: 2026-05-12SIGMASTAR TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SIGMASTAR TECH LTD
Filing Date
2026-01-27
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing data processing systems, due to data dependencies and processing timing between modules, blocks of data stored in memory cannot be released at the appropriate time, and unnecessary data copying occupies memory space, reducing system performance.

Method used

In the data processing system, the production module actively configures the copy and delete operation information in the data packets, specifies whether the consumer module should use the "copy" or "reference" operation, and releases the memory space in real time based on the reference count after the data processing is completed.

Benefits of technology

It achieves efficient utilization of memory resources, improves the overall system performance, ensures real-time release of memory space, and enhances computer performance and efficiency in the field of information processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018798A_ABST
    Figure CN122018798A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing system and a data transmission method thereof, and the method comprises the steps: building a first data packet through a production module, and transmitting the first data packet to a consumption module; using the consumption module to perform a first or second operation according to the first data packet; wherein the first operation comprises: copying first data indicated by the first data packet to generate a second data packet; and performing data processing using second data indicated by the second data packet, where the first and second data have the same content and are stored in different blocks in the memory, and the second operation includes: performing data processing using the first data; and after the data processing is completed, reducing the reference number of a corresponding data packet in the first and second data packets through the consumption module, and releasing the block for storing the first or second data indicated by the corresponding data packet in the memory when the reference number returns to zero. According to the invention, the occupied storage space in the memory can be released in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This case relates to data processing systems, and in particular to data processing systems and data transmission methods that can release occupied storage space in memory in real time. Background Technology

[0002] In existing data processing systems, data is often transmitted between modules in the form of packets, with the receiving module deciding whether to directly reference the data or copy it before use. However, in practical applications, due to the data dependencies and processing timing between modules, the aforementioned mechanism may result in data blocks in memory not being released at the appropriate time, or unnecessary data copying occupying additional memory space, thereby reducing system performance. Summary of the Invention

[0003] In some embodiments, one of the objectives of this invention, but not limited to, is to provide a data processing system and data transmission method that can release occupied storage space in memory in real time, thereby improving the problems of the prior art.

[0004] In some implementations, the data processing system includes a memory and at least one processor. The at least one processor runs a production module and a consumption module. The production module creates a first data packet and transmits the first data packet to the consumption module. The consumption module performs a first operation or a second operation based on the first data packet. The first operation includes: copying first data indicated by the first data packet to generate a second data packet; and performing data processing using 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 count of a corresponding data packet in the first and second data packets, and releases at least one block in the memory storing the corresponding data packet and the first or second data indicated by the corresponding data packet when the reference count of the corresponding data packet reaches zero.

[0005] In some embodiments, a data processing method executed by a processor (which runs a production module and a consumption module) includes the following operations: establishing a first data packet via the production module and transmitting the first data packet to the consumption module; performing a first operation or a second operation via the consumption module based on the first data packet; wherein the first operation includes: copying first data indicated by the first data packet to generate a second data packet; and performing data processing using 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 memory; wherein the second operation includes: performing the data processing using the first data; and after the data processing is completed, decrementing the reference count of a corresponding data packet in the first data packet and the second data packet via the consumption module, and releasing at least one block in memory storing the corresponding data packet and storing the first data or the second data indicated by the corresponding data packet when the reference count of the corresponding data packet reaches zero.

[0006] Regarding the features, specific implementation, and effects of this case, the following detailed description of the preferred embodiments, in conjunction with the accompanying drawings, is provided. Attached Figure Description

[0007] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0008] Figure 1 This is a schematic diagram of a data processing system according to some embodiments of this case; Figure 2A This is a schematic diagram illustrating the format of the first data packet generated by the production module and its corresponding operation, based on some embodiments of this case. Figure 2B The production module and consumption module, drawn according to some embodiments of this case, are based on the first scenario. Figure 2A The flowchart of the operations performed by the first data packet; Figure 3 The production module, first consumer module, and second consumer module, drawn according to some embodiments of this case, are based on a second scenario. Figure 2A The flowchart of the operations performed by the first data packet; Figure 4A This is a schematic diagram illustrating the format of the first data packet generated by the production module and its corresponding operation, based on some embodiments of this case. Figure 4BThis is a schematic diagram illustrating the format of the second data packet generated by the consumption module and its corresponding operation, based on some embodiments of this case. Figure 4C The production module and consumption module, drawn according to some embodiments of this case, are based on the first scenario. Figure 4A The first data packet and Figure 4B The flowchart of the operations performed by the second data packet; Figure 5 The production module, first consumer module, and second consumer module, drawn according to some embodiments of this case, are based on the fourth scenario. Figure 4A The first data packet and Figure 4B The flowchart of the operations performed by the second data packet; and Figure 6 This is a flowchart illustrating a data transmission method based on some embodiments of this case.

[0009] Explanation of reference numerals in the attached figures: 100: Data processing system; 110: Memory; 120: Processor; 120A, 120B, 120C: Functional modules; 130: Camera; 140: Encoder; 150: Disk disk; 200, 400: First data packet; 410: Second data packet; 600: Data transmission method; PD: Program code; S201, S202, S203, S204: Operations; S301, S302, S303, S304, S305, S306: Operation; S401, S402, S403, S404: Operation; S501, S502, S503, S504, S505, S506: Operation; S610, S620, S630: Operation. Detailed Implementation

[0010] All terms used herein have their ordinary meanings. The definitions of the terms used in this document, as found in commonly used dictionaries, and any terms used in this section, are merely illustrative and do not constitute a limitation on the scope or meaning of this document. Similarly, this document is not limited to the various embodiments shown in this specification.

[0011] As used herein, “coupled” or “connected” can refer to two or more components making direct physical or electrical contact with each other, or indirectly making direct physical or electrical contact with each other, or to two or more components operating or acting on each other. As used herein, the term “circuit” can be a device consisting of at least one transistor and / or at least one active or passive component connected in a certain manner to process signals.

[0012] Figure 1 This is a schematic diagram of a data processing system 100 according to some embodiments of the present invention. In some embodiments, the data processing system 100 may include a memory 110 and at least one processor 120. The at least one processor 120 may run relevant functions in functional modules 120A, 120B, and 120C, which are mainly implemented by software (or firmware, or a combination of both), thereby controlling other circuits or modules in the system. For example, functional module 120A may be a video input module, and the processor 120 may control a camera 130 by running functional module 120A. Functional module 120B may be an encoder module, and the processor 120 may control an encoder 140 by running functional module 120B. Similarly, functional module 120C may be a data storage module, and the processor 120 may read corresponding data from the memory 110 and write it to a disk 150 by running the data storage module.

[0013] It should be understood that the above-mentioned actual application types of functional modules 120A, 120B, and 120C are merely examples, and this case is not limited to them. All types of functional modules 120A, 120B, and 120C are within the scope of this case.

[0014] In some embodiments, the aforementioned functional modules 120A, 120B, and 120C can be configured as either production modules or consumption modules. When configured as a production module, the corresponding functional module generates or creates data, creates a data packet based on the data, and provides the data packet to the consumption module. When configured as a consumption module, the consumption module uses the data packet to perform various data processing tasks. For example, functional module 120A can be configured as a production module to create a first data packet based on video (or image) data. Functional module 120B can be configured as a consumption module to perform encoding processing based on the first data packet. Similarly, functional module 120C can also be configured as a consumption module to store the first data packet on disk 150.

[0015] In some embodiments, data transmission processing can be divided into two categories: "copying" and "referencing". In some embodiments, "referencing" means that the consumer module directly uses the data packet without requesting additional blocks in the memory 110 to store the data indicated by the received data packet. In some embodiments, "copying" means that the consumer module requests additional blocks from the memory 110 based on the received data packet, copies the data indicated in the data packet and stores it in the block, and generates a new data packet based on the new data generated by copying in the block. In some embodiments, the aforementioned production module can actively define parameters or information such as copy operation information, copy packet variables, reference count, and deletion operation information in the data packet when it is created, so that the consumer module can perform a first operation (corresponding to the aforementioned "copying" processing method) or a second operation (corresponding to the aforementioned "referencing" processing method) based on these parameters in the data packet.

[0016] In some embodiments, the first operation includes: copying a first data packet indicated by a first data packet generated by a production module to generate a second data packet; and performing data processing using the second data packet 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. In some embodiments, the second operation includes: performing data processing using the first data packet indicated by a first data packet generated by a production module. The practical application of the first and second operations will be discussed later. Figures 2A to 5 illustrate.

[0017] To illustrate the first scenario, please refer to the following: Figure 2A and Figure 2B . Figure 2A This is a schematic diagram illustrating the format of the first data packet 200 generated by the production module according to some embodiments of this case and its corresponding operation. Figure 2B The production module and consumption module, drawn according to some embodiments of this case, are based on the first scenario. Figure 2A The flowchart of the operation performed by the first data packet 200.

[0018] In the first scenario, the production module (e.g., can be...) Figure 1 The functional module 120A) establishes a first data packet 200 and transmits the first data packet 200 to the consumer module (e.g., it can be a...). Figure 1 Functional module 120B or functional module 120C). For example... Figure 2AAs shown, in some embodiments, the first data packet 200 established by the production module may include packet type, reference count, format of the first data (in this embodiment, the first data is image data, so its format information includes pixel format, width and height), data address (i.e., the memory address indicating the first data in memory 110), copy operation information (i.e., the memory address indicating the memory address storing the relevant program code for this copy operation), and deletion operation information (i.e., the memory address indicating the memory address storing the relevant program code for this deletion operation). In this embodiment, since the first data packet 200 does not specifically define a copy operation, the consumption module will read the corresponding program code from the corresponding memory address according to this copy operation information to execute the aforementioned second operation (equivalent to executing a preset reference operation; i.e., the data processing method corresponding to "reference"), and increase the reference count of the first data packet 200, and obtain the first data packet 200 returned based on the execution of the second operation.

[0019] In detail, such as Figure 2B As shown, in operation S201, the production module establishes a first data packet 200 and transmits it to the consumption module. In operation S202, the consumption module receives the first data packet 200 and reads the corresponding program code based on the copy operation information of the first data packet 200 to execute a preset reference operation, thereby increasing the reference count of the first data packet 200. The consumption module then obtains the first data packet 200 returned based on the reference operation and uses the first data indicated by the first data packet 200 for subsequent data processing. In other words, in operation S201, the reference count of the first data packet 200 is 1, and in operation S202, the reference count of the first data packet 200 will increase from 1 to 2.

[0020] In operation S203, after the production module completely transmits the first data packet 200 to the consumer module, it reads the corresponding program code based on the deletion operation information of the first data packet 200 to execute the deletion operation, thereby reducing the reference count of the first data packet 200. In some embodiments, after the reference count of the first data packet 200 is reduced, the production module further determines whether the current reference count of the first data packet 200 is zero, and when the reference count of the first data packet 200 is zero, it deletes the first data and the first data packet 200 and releases at least one block of the memory 110 storing the first data and the first data packet 200. In other words, after completely transmitting the first data packet 200 to the consumer module, the production module further reduces the reference count of the first data packet 200 from 2 to 1. Furthermore, since the reference count of the first data packet 200 has not yet reached zero, it means that other modules (i.e., the consumer module) are using this first data packet 200, so the production module will not directly delete the first data packet 200.

[0021] In operation S204, the consumption module completes data processing and reads the corresponding program code based on the deletion operation information of the first data packet 200 to execute the deletion operation, thereby reducing the reference count of the first data packet 200. In some embodiments, after the reference count of the first data packet 200 is reduced, the consumption module further determines whether the current reference count of the first data packet 200 is zero, and when the reference count of the first data packet 200 is zero, deletes the first data and the first data packet 200 and releases at least one block of the memory 110 storing the first data and the first data packet 200. For example, after completing data processing, the consumption module no longer uses the first data packet 200. Under this condition, the consumption module can execute the corresponding program code to perform the deletion operation based on the deletion operation information in the first data packet 200. Through the deletion operation, the consumption module can reduce the reference count of the first data packet 200 from 1 to 0. Since the reference count has reached zero, it means that no circuit or module in the system is accessing the first data anymore. Therefore, the consumer module can delete the first data and the first data packet 200, thereby releasing at least one block in the memory 110 that stores the first data and the first data packet 200 (i.e., in different embodiments, the first data packet 200 and the first data can be stored in the same block or different blocks in the memory 110). In this way, it can be ensured that the resources of the memory 110 are not occupied by invalid data, thereby improving the resource utilization efficiency of the memory 110.

[0022] To illustrate the second scenario, please refer to... Figure 3 ,and Figure 3 The production module, first consumer module, and second consumer module, drawn according to some embodiments of this case, are based on a second scenario. Figure 2A The flowchart of the operation performed by the first data packet 200.

[0023] Unlike the first scenario, in the second scenario, the production module (e.g., can be...) Figure 1 Functional module 120A) establishes a first data packet 200 (i.e., in this embodiment, the format of the data packet established by the production module is the same as that of...). Figure 2A The first data packet 200 is transmitted to the first consumer module (e.g., it can be a first data packet 200). Figure 1 Functional module 120B) and second consumer module (e.g., can be Figure 1 (Functional module 120C). Similarly, in this embodiment, since the first data packet 200 does not specifically define a copy operation, the consumption module performs the aforementioned second operation (equivalent to performing a preset reference operation) based on this copy operation information, increases the reference count of the first data packet 200, and obtains the first data packet 200 returned based on the execution of the second operation.

[0024] In detail, such as Figure 3As shown, in operation S301, the production module establishes a first data packet 200 and transmits it sequentially to the first consumer module and the second consumer module. In operation S302, the first consumer module receives the first data packet 200 and reads the corresponding program code based on the copy operation information of the first data packet 200 to execute a preset reference operation, thereby increasing the reference count of the first data packet 200. It then obtains the first data packet 200 returned based on the reference operation and uses the first data indicated by the first data packet 200 for subsequent data processing. In other words, in operation S301, the reference count of the first data packet 200 is 1, and in operation S302, the reference count of the first data packet 200 will increase from 1 to 2.

[0025] In operation S303, the second consumer module receives the first data packet 200 and reads the corresponding program code based on the copy operation information of the first data packet 200 to execute a preset reference operation, thereby increasing the reference count of the first data packet 200. It then obtains the first data packet 200 returned based on the reference operation and uses the first data indicated by the first data packet 200 for subsequent data processing. In other words, in operation S303, the reference count of the first data packet 200 will increase from 2 to 3.

[0026] In operation S304, after the production module completely transmits the first data packet 200 to the first and second consumer modules, it reads the corresponding program code based on the deletion operation information of the first data packet 200 to execute the deletion operation, thereby reducing the reference count of the first data packet 200. In some embodiments, after the reference count of the first data packet 200 is reduced, the production module determines whether the current reference count of the first data packet 200 is zero. If the reference count of the first data packet 200 is zero, the production module deletes the first data and the first data packet 200 and releases at least one block of the memory 110 storing the first data and the first data packet 200. In other words, the production module reduces the reference count of the first data packet 200 from 3 to 2. Since the reference count of the first data packet 200 has not yet reached zero, it means that other modules (i.e., the first and second consumer modules) are using this first data packet 200, so the production module will not directly delete the first data packet 200.

[0027] In operation S305, the first consumer module completes data processing and reads the corresponding program code according to the deletion operation information of the first data packet 200 to execute the deletion operation, thereby reducing the reference count of the first data packet 200. In some embodiments, after the reference count of the first data packet 200 is reduced, the first consumer module determines whether the current reference count of the first data packet 200 is zero, and when the reference count of the first data packet 200 is zero, deletes the first data and the first data packet 200 and releases at least one block in the memory 110 storing the first data and the first data packet 200. For example, after completing data processing, the first consumer module no longer uses the first data. Under this condition, the first consumer module can execute the corresponding program code to perform the deletion operation according to the deletion operation information in the first data packet 200. Through the deletion operation, the first consumer module can reduce the reference count of the first data packet 200 from 2 to 1. Since the reference count has not yet reached zero, the first consumer module does not delete this first data packet 200 and the first data.

[0028] In operation S306, the second consumption module completes data processing and reads the corresponding program code according to the deletion operation information of the first data packet 200 to execute the deletion operation, thereby reducing the reference count of the first data packet 200. In some embodiments, after the reference count of the first data packet 200 is reduced, the second consumption module determines whether the current reference count of the first data packet 200 is zero, and when the reference count of the first data packet 200 is zero, deletes the first data and the first data packet 200 and releases at least one block of the memory 110 storing the first data and the first data packet 200. For example, after completing data processing, the second consumption module no longer uses the first data. Under this condition, the second consumption module can execute the corresponding program code to perform the deletion operation according to the deletion operation information in the first data packet 200. Through the deletion operation, the second consumption module can reduce the reference count of the first data packet 200 from 1 to 0. Since the reference count has been reduced to zero, the second consumption module will delete the first data packet 200 and the first data, and accordingly release at least one block in the memory 110 that stores the first data packet 200 and the first data.

[0029] To illustrate the third scenario, please refer to the following: Figure 4A , Figure 4B and Figure 4C . Figure 4A This is a schematic diagram illustrating the format of the first data packet 400 generated by the production module and its corresponding operation, based on some embodiments of this case. Figure 4B This is a schematic diagram illustrating the format of the second data packet 410 generated by the consumption module according to some embodiments of this case and its corresponding operation. Figure 4C The production module and consumption module drawn according to some embodiments of this case are based on the third scenario. Figure 4A First data packet 400 and Figure 4B The flowchart of the operation performed by the second data packet 410.

[0030] In the third scenario, the production module (e.g., can be...) Figure 1 The functional module 120A) establishes a first data packet 400 and transmits the first data packet 400 to the consumer module (e.g., it can be a...). Figure 1 Functional module 120B or functional module 120C). For example... Figure 4A As shown, in some embodiments, compared to Figure 2A The first data packet 200, and the first data packet 400 created by the production module, may further include a copy packet variable. In this embodiment, the copy packet variable is null, and the production module defines a copy operation in the first data packet 400. The corresponding program code PD is described as follows: If the copy packet variable is null, copy the first data indicated by the first data packet 400 and create a second data packet, and return the second data packet; or, if the copy packet variable is not null, return the packet indicated by the copy packet variable as the second data packet. Accordingly, in this embodiment, the deletion operation defined in the first data packet 400 will delete not only the first data packet 400 itself, but also the data packet generated by the copy operation (e.g., the second data packet 410).

[0031] In this embodiment, since the first data packet 400 has a specially defined copy operation, the consumption module will read the corresponding program code according to the copy operation information to execute the aforementioned first operation (equivalent to performing a copy operation; that is, the data processing method corresponding to "copy"), thereby copying the first data indicated by the first data packet 400 to generate the second data packet 410, increasing the reference count of the second data packet 410, and obtaining the second data packet 410 returned based on the first operation. Furthermore, in this embodiment, the packet type of the first data packet 400 is video data, therefore the first data it indicates is video data, and its format information includes encoding type (h264), width, height, etc.

[0032] In detail, such as Figure 4CAs shown, in operation S401, the production module establishes a first data packet 400 and transmits the first data packet 400 to the consumption module. In operation S402, the consumption module receives the first data packet 400 and performs a copy operation according to the copy packet variable and copy operation information of the first data packet 400, thereby copying the first data indicated by the first data packet 400 (since the copy packet variable is empty) to generate a second data packet 410. The second data packet 410 is assigned to the copy packet variable of the first data packet 400, and the reference count of the second data packet 410 is incremented to use the second data indicated by the second data packet 410 (wherein, the first data and the second data have the same data content, but are stored in different blocks in the memory 110) for subsequent data processing.

[0033] For example, the consumption module can obtain the copy packet variable and copy operation information in the first data packet 400 based on the first data packet 400. Since the copy packet variable is null, the consumption module executes the copy operation defined in the first data packet 400 based on the copy operation information, thereby copying the first data indicated in the first data packet 400 to generate... Figure 4B The second data packet 410. More specifically, the consumer module can request an additional block from the memory 110 to store the second data packet 410 and the second data generated by copying the first data. The packet type of the second data packet 410 is copied video data, and its format information and data content are the same as the first data indicated by the first data packet 400. The data address of the second data packet 410 is different from the data address of the first data packet 400 (because the first data and the second data are stored in different blocks in the memory 110). The consumer module does not specifically define copy operation information and delete operation information, so they are preset reference operation and delete operation respectively (same as the first data). Figure 2A ).

[0034] After the second data packet 410 is established, its reference count is preset to 1. The consumer module increases the reference count of the second data packet 410 in operation S402 and uses the second data packet 410 for subsequent data processing, thus increasing the reference count of the second data packet 410 from 1 to 2.

[0035] Continue to refer to Figure 4CIn operation S403, after the production module completely transmits the first data packet 400 to the consumer module, it reads the corresponding program code according to the deletion operation information of the first data packet 400 to perform the deletion operation, thereby reducing the reference count of both the first data packet 400 and the second data packet 410. In some embodiments, when the reference count of a corresponding data packet in the first data packet 400 and the second data packet 410 reaches zero, the production module further deletes the first data or second data indicated by the corresponding data packet and the corresponding data packet, thereby releasing at least one block in the memory 110 storing the first data or second data indicated by the corresponding data packet and the corresponding data packet.

[0036] For example, after transmission is complete, the production module performs a deletion operation based on the deletion operation information of the first data packet 400, thereby decrementing the reference counts of both the first data packet 400 and the second data packet 410 (which is a data packet generated via a copy operation). Thus, the reference count of the first data packet 400 decreases from 1 to 0, and the reference count of the second data packet 410 decreases from 2 to 1. Since the reference count of the first data packet 400 has reached zero, the production module deletes the first data packet 400 and the first data it indicates, thereby releasing at least one block in the memory 110 that stores the first data packet 400 and the first data it indicates. On the other hand, since the reference count of the second data packet 410 has not yet reached zero, the production module does not directly delete the second data packet 410 and the second data it indicates.

[0037] In operation S404, the consumer module completes data processing and reads the corresponding program code according to the deletion operation information of the second data packet 410 to execute the deletion operation, thereby reducing the reference count of the second data packet 410. In some embodiments, after the reference count of the second data packet 410 is reduced, the consumer module determines whether the current reference count of the second data packet 410 is zero. If the reference count of the second data packet 410 is zero, the consumer module deletes the second data and the second data packet 410, and releases at least one block of the memory 110 storing the second data and the second data packet 410. For example, after completing data processing, the consumer module no longer uses the second data indicated by the second data packet 410. Under this condition, the consumer module can execute the corresponding program code to perform the deletion operation according to the deletion operation information in the second data packet 410. Through the deletion operation, the consumer module can reduce the reference count of the second data packet 410 from 1 to 0. Since the reference count has been reduced to zero, the consumption module will delete the second data packet 410 and the second data it indicates, and thereby release at least one block in the memory 110 that stores the second data packet 410 and the second data it indicates.

[0038] To illustrate the fourth scenario, please refer to... Figure 5 ,and Figure 5 The production module, first consumer module, and second consumer module, drawn according to some embodiments of this case, are based on the fourth scenario. Figure 4A First data packet 400 and Figure 4B The flowchart of the operation performed by the second data packet 410.

[0039] Unlike the third scenario, in the fourth scenario, the production module (e.g., can be...) Figure 1 Functional module 120A) establishes a first data packet 400 (i.e., in this embodiment, the format of the data packet established by the production module is the same as that of...). Figure 4A The first data packet 400), and transmit the first data packet 400 to the first consumer module (e.g., it can be a... Figure 1 Functional module 120B) and second consumer module (e.g., can be Figure 1 (Functional module 120C). Similarly, in this embodiment, since the first data packet 400 has a specially defined copy operation, the first (or second) consumer module performs the aforementioned first operation (equivalent to a copy operation) according to this copy operation information to generate the second data packet 410, increases the reference count of the second data packet 410, and obtains the second data packet 410 returned based on the first operation.

[0040] In operation S501, the production module creates a first data packet 400 and transmits it sequentially to the first consumer module and the second consumer module. In operation S502, the first consumer module receives the first data packet 400 and performs a copy operation based on the copy packet variable and copy operation information of the first data packet 400. This copies the first data indicated by the first data packet 400 (since the copy packet variable is null) to generate a second data packet 410. The module obtains the second data packet 410 returned by the copy operation and increments the reference count of the second data packet 410 to use the second data indicated by the second data packet 410 (wherein, the first data and the second data have the same data content but are stored in different blocks in the memory 110) for subsequent data processing. Under this condition, the first consumer module increments the reference count of the second data packet 410 from 1 to 2. The first consumer module also changes the copy packet variable of the first data packet 400 to non-empty accordingly, for example, assigning the second data packet 410 to the copy packet variable.

[0041] In operation S503, the second consumer module receives the first data packet 400, reads the corresponding program code based on the copy packet variable and copy operation information of the first data packet 400 to execute the copy operation, and returns the second data packet 410 created by the first consumer module (because the copy packet variable is not null). It also increments the reference count of the second data packet 410 to use the second data indicated by the second data packet 410 for subsequent data processing. For example, after the first consumer module creates the second data packet 410 based on the first data packet 400, the copy packet variable of the first data packet 400 has been updated from null to point to the second data packet 410. Therefore, in operation S503, the second consumer module will obtain the second data packet 410 according to the updated copy packet variable and use the second data packet 410 for subsequent data processing. Under this condition, the second consumer module increments the reference count of the second data packet 410 from 2 to 3.

[0042] In operation S504, after the transmission of the first data packet 400 is completed, the production module reads the corresponding program code according to the deletion operation information of the first data packet 400 to perform the deletion operation, thereby reducing the reference count of both the first data packet 400 and the second data packet 410. In some embodiments, when the reference count of a corresponding data packet in the first data packet 400 and the second data packet 410 reaches zero, the production module deletes a corresponding data in the first data or the second data indicated by the corresponding data packet, as well as the corresponding data packet, thereby releasing at least one block in the memory 110 that stores the corresponding data and the corresponding data packet.

[0043] For example, after transmission is complete, the production module performs a deletion operation based on the deletion operation information of the first data packet 400, thereby decrementing the reference counts of both the first data packet 400 and the second data packet 410 (which is a data packet generated via a copy operation). Thus, the reference count of the first data packet 400 decreases from 1 to 0, and the reference count of the second data packet 410 decreases from 3 to 2. Since the reference count of the first data packet 400 has reached zero, the production module deletes the first data packet 400 and the first data it indicates, thereby releasing at least one block in the memory 110 storing the first data packet 400 and the first data it indicates. On the other hand, since the reference count of the second data packet 410 has not yet reached zero, the production module does not directly delete the second data packet 410 and the second data it indicates.

[0044] In operation S505, the first consumer module completes data processing and reads the corresponding program code according to the deletion operation information of the second data packet 410 to execute the deletion operation, thereby reducing the reference count of the second data packet 410. In some embodiments, after the reference count of the second data packet 410 is reduced, the first consumer module determines whether the current reference count of the second data packet 410 is zero, and when the reference count of the second data packet 410 is zero, deletes the second data and the second data packet 410, and releases at least one block in the memory 110 storing the second data and the second data packet 410. For example, after completing data processing, the first consumer module no longer uses the second data indicated by the second data packet 410. Under this condition, the first consumer module can execute the corresponding program code to perform the deletion operation according to the deletion operation information in the second data packet 410. Through the deletion operation, the first consumer module can reduce the reference count of the second data packet 410 from 2 to 1. Since the reference count has not yet reached zero, the first consumer module does not directly delete the second data packet 410 and the second data it indicates.

[0045] In operation S506, the second consumer module completes data processing and reads the corresponding program code according to the deletion operation information of the second data packet 410 to execute the deletion operation, thereby reducing the reference count of the second data packet 410. In some embodiments, after the reference count of the second data packet 410 is reduced, the second consumer module determines whether the current reference count of the second data packet 410 is zero, and when the reference count of the second data packet 410 is zero, deletes the second data and the second data packet 410, and releases at least one block of the memory 110 storing the second data and the second data packet 410. For example, after completing data processing, the second consumer module no longer uses the second data indicated by the second data packet 410. Under this condition, the second consumer module can execute the corresponding program code to perform the deletion operation according to the deletion operation information in the second data packet 410. Through the deletion operation, the second consumer module can reduce the reference count of the second data packet 410 from 1 to 0. Since the reference count has been reduced to zero, the second consumption module deletes the second data packet 410 and the second data indicated therein, thereby releasing at least one block of memory 110 that stores the second data packet 410 and the second data indicated therein.

[0046] In some related technologies, the data processing system is determined by the consumer module to use data by "copying" or "referencing," which in some cases makes it impossible to release memory resources in real time, and may even consume more memory resources due to unnecessary copying operations.

[0047] Compared to the aforementioned related technologies, based on scenarios one through four, it should be understood that in different embodiments of this case, the production module can actively configure the copy operation information and deletion operation information in the data packet to specify that the consumer module receiving the data packet should use the aforementioned first operation (corresponding to "copy") or second operation (corresponding to "reference") to use the data indicated by the data packet. Furthermore, after completing data processing or data transmission, the consumer module or production module can, based on the reference count of the corresponding data packet used, decide in real time whether to delete the corresponding data packet and its indicated data, thereby releasing the storage space occupied by the data packet and its indicated data in the memory 110. In other words, in different embodiments, through the aforementioned packet configuration and the corresponding first or second operation, data transmission between the data processing systems 100 can be made more efficient, and the resources of the memory 110 can be released in real time, allowing other circuits or modules of the system to use more system resources. This can bring significant improvements to computer performance, information processing (e.g., including, but not limited to, image or video processing), and other fields.

[0048] Figure 6 This is a flowchart illustrating a data transmission method 600 according to some embodiments of this case. In some embodiments, the data transmission method 600 may be, but is not limited to, Figure 1 The data processing system 100 executes the following steps: In operation S610, a first data packet is created using the production module and transmitted to the consumption module. In operation S620, the consumption module performs a first operation or a second operation based on the first data packet; wherein the first operation includes: copying first data indicated by the first data packet to generate a second data packet; and performing data processing using 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; and the second operation includes: performing the data processing using the first data. In operation S630, after the data processing is completed, the consumption module reduces the reference count of a corresponding data packet in the first and second data packets, and releases at least one block in the memory storing the corresponding data packet and the first or second data indicated by the corresponding data packet when the reference count of the corresponding data packet reaches zero.

[0049] The above operations can be understood by referring to the descriptions of the foregoing embodiments, and therefore will not be repeated here. The operations in the data transmission method 600 are merely examples and are not limited to being executed in the order shown in this example. Without departing from the operation mode and scope of the embodiments of this case, these operations may be appropriately added, replaced, omitted, executed in a different order, or executed simultaneously or partially simultaneously.

[0050] In summary, the data processing system and data transmission method provided in some embodiments of this case can allow the data-generating functional modules to actively define the data usage methods of lower-level modules, thereby enabling each functional module to release the storage space of the memory in real time after data processing or data transmission is completed, thus improving the overall system performance.

[0051] Although the embodiments of this case are described above, these embodiments are not intended to limit this case. Those skilled in the art can make variations to the technical features of this case based on the express or implied content of this case. All such variations may fall within the scope of patent protection sought in this case. In other words, the scope of patent protection in this case shall be determined by the scope of the patent application in this specification.

Claims

1. A data processing system, characterized in that, Include: A memory; and 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 performs a first operation or a second operation based on the first data packet. The first operation includes: Copy the first data indicated by the first data packet to generate a second data packet; and A data processing is performed 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: The data processing is performed using the first data; Wherein, after the data processing is completed, the consumption module reduces the reference count of a corresponding data packet in the first data packet and the second data packet, and releases at least one block in the memory that stores the corresponding data packet and the first data or the second data indicated by the corresponding data packet when the reference count of the corresponding data packet reaches zero.

2. The data processing system as described in claim 1, characterized in that, The second operation also includes: Increase the reference count of the first data packet.

3. The data processing system as described in claim 1, characterized in that, After the production module completely transmits the first data packet to the consumption module, it further reduces the reference count of the first data packet.

4. The data processing system as described in claim 1, characterized in that, After the first data packet is completely transmitted to the consumer module, the production module further deletes the first data packet and the first data when the reference count of the first data packet reaches zero.

5. The data processing system as described in claim 1, characterized in that, 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 as described in claim 1, characterized in that, 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, so as to obtain the packet indicated by the copy packet variable as the second data packet when the copy packet variable is not empty.

7. The data processing system as described in claim 1, characterized in that, The first data packet contains copy operation information, and the consumption module performs a default reference operation based on the copy operation information to increase the reference count of the first data packet and perform the second operation.

8. The data processing system as described in claim 1, characterized in that, The corresponding data packet contains deletion operation information, and when the reference count of the corresponding data packet is zero, the consumption module performs a deletion operation according to the deletion operation information to delete the corresponding data packet and the corresponding data.

9. The data processing system as described in claim 1, characterized in that, 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 via a processor, characterized in that, The processor executes a production module and a consumption module, and the data transfer method includes: A first data packet is created via the production module and transmitted to the consumption module; The consumption module performs a first operation or a second operation based on the first data packet. The first operation includes: Copy the first data indicated by the first data packet to generate a second data packet; And perform 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; The second operation includes: The data processing is performed using the first data; and After the data processing is completed, the reference count of a corresponding data packet in the first data packet and the second data packet is reduced by the consumption module, and at least one block in the memory storing the corresponding data packet and the first data or the second data indicated by the corresponding data packet is released when the reference count of the corresponding data packet reaches zero.