Data processing method and device, storage medium, program product and chip system
By setting the end flag to a preset value during data processing and updating it after obtaining the target value, the problem of low transmission efficiency in the UniPro protocol stack is solved, and efficient transmission of data segments is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING X RING TECHNOLOGY CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-07-24
AI Technical Summary
The UniPro protocol stack only completes the header for each PDU after receiving the complete data packet, which affects transmission efficiency. Furthermore, existing methods require temporary storage of units or increase latency, resulting in additional transmission overhead.
When acquiring the data segment to be sent, the end flag is set to a preset value and updated after the target value is acquired, avoiding waiting for the message end flag and improving the transmission preparation process.
By rapidly updating preset and target values, the transmission efficiency of data segments is improved, avoiding transmission delays and additional overhead.
Smart Images

Figure CN122457572A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, apparatus, storage medium, program product, and chip system. Background Technology
[0002] The Unified Protocol (UniPro) protocol stack can divide the data packets to be sent into multiple Protocol Data Units (PDUs) and add a header to each PDU to transmit each PDU to the corresponding location.
[0003] However, each PDU's header must include a flag indicating whether the corresponding PDU is the end of a data packet segment. The UniPro protocol stack can only complete the headers for all PDUs after receiving the complete data packet, impacting the transmission efficiency of each PDU. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a data processing method, apparatus, storage medium, program product, and chip system.
[0005] According to a first aspect of the present disclosure, a data processing method is provided, comprising: acquiring a target data segment of a data packet to be sent, and setting the value of an end flag bit of the target data segment to a preset value; determining a target value of the end flag bit, and updating the value of the end flag bit from the preset value to the target value; the target value is used to indicate whether the target data segment is the end data segment of a data packet.
[0006] According to a first aspect of the present disclosure, in some embodiments, determining the target value of the end flag bit includes: determining the target value of the end flag bit based on the acquisition result of the message end identifier during the process of obtaining the target data segment; the message end identifier is sent by the data source when the last character of the data packet is sent.
[0007] According to a first aspect of the present disclosure, in some embodiments, determining the target value of the end flag bit based on the result of obtaining the message end identifier includes: if the message end identifier is obtained, determining the target value of the end flag bit as a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
[0008] According to a first aspect of the present disclosure, in some embodiments, determining the target value of the end flag bit based on the result of obtaining the message end identifier includes: if the message end identifier is not obtained, determining the target value of the end flag bit as a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
[0009] According to a first aspect of the present disclosure, in some embodiments, the data processing method provided by the present disclosure is applied to a data processing apparatus; the data processing apparatus includes a transport layer and a data link layer; the above-mentioned setting the value of the end flag bit of the target data segment to a preset value includes: setting the value of the end flag bit of the target data segment to a preset value through the transport layer, and sending the target data segment to the data link layer; the above-mentioned determining the target value of the end flag bit and updating the value of the end flag bit from the preset value to the target value includes: determining the target value of the end flag bit through the transport layer, and sending the target value of the end flag bit to the data link layer; updating the value of the end flag bit of the target data segment from the preset value to the target value through the data link layer.
[0010] According to a first aspect of the present disclosure, in some embodiments, the data link layer includes a buffer unit; the sending of a target data segment to the data link layer via the transport layer includes: sending the target data segment to the buffer unit via the transport layer in the system clock domain to write the target data segment into the buffer unit; the sending of a target value of an end flag bit to the data link layer via the transport layer includes: sending the target value of an end flag bit to the buffer unit via the transport layer in the system clock domain to write the target value of the end flag bit into the buffer unit.
[0011] According to a first aspect of the present disclosure, in some embodiments, the buffer unit is a static random access memory.
[0012] According to a first aspect of the present disclosure, in some embodiments, the data link layer further includes a processing unit; the method of updating the value of the end flag bit of the target data segment from a preset value to a target value through the data link layer includes: through the processing unit, reading the target data segment and the target value of the end flag bit from the buffer unit in the transmit clock domain, and updating the value of the end flag bit of the target data segment from the preset value to the target value.
[0013] According to a second aspect of the present disclosure, a data processing apparatus is provided, comprising: The transport layer is used to acquire the target data segment of the data packet to be sent and set the value of the end flag bit of the target data segment to a preset value; the transport layer is also used to determine the target value of the end flag bit; the data link layer is used to update the value of the end flag bit from the preset value to the target value; the target value is used to indicate whether the target data segment is the end data segment of the data packet.
[0014] According to a second aspect of the present disclosure, in some embodiments, the transport layer is specifically used to: determine the target value of the end flag bit based on the result of obtaining the message end flag during the process of obtaining the target data segment; the message end flag is sent by the data source when the last character of the data packet is sent.
[0015] According to a second aspect of the present disclosure, in some embodiments, the transport layer is specifically used to: if a message end identifier is obtained, determine that the target value of the end flag bit is a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
[0016] According to a second aspect of the present disclosure, in some embodiments, the transport layer is specifically used to: if the message end identifier is not obtained, determine that the target value of the end flag bit is a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
[0017] According to a second aspect of the present disclosure, in some embodiments, the data link layer includes a buffer unit; the transport layer is specifically configured to: send a target data segment to the buffer unit in the system clock domain to write the target data segment into the buffer unit; and send a target value of an end flag bit to the buffer unit in the system clock domain to write the target value of the end flag bit into the buffer unit.
[0018] According to a second aspect of the present disclosure, in some embodiments, the data link layer further includes a processing unit; the processing unit is configured to: read the target value of the target data segment and the end flag bit from the buffer unit in the transmit clock domain, and update the value of the end flag bit of the target data segment from a preset value to the target value.
[0019] According to a third aspect of the present disclosure, a data processing apparatus is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the data processing method described in the first aspect of the present disclosure and any embodiment thereof.
[0020] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor, the processor is able to perform the data processing method described in the first aspect of the present disclosure and any of its embodiments.
[0021] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the first aspect of the present disclosure and the data processing method described in any embodiment thereof.
[0022] According to a sixth aspect of the present disclosure, a chip system is provided. The chip system includes a processing unit and an interface circuit. The processing unit obtains program instructions through the interface circuit. The program instructions are executed by the processing unit. The processing unit is used to execute the data processing method described in the first aspect of the present disclosure and any of its embodiments.
[0023] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: This method first sets the end flag of the target data segment to a preset value, and can advance the transmission preparation process for the target data segment without waiting for the target value of the end flag. Subsequently, when the target value of the end flag is obtained, the transmission process for the target data segment can be started simply by updating the value of the end flag to the target value, which can improve the transmission efficiency of the target data segment.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0025] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0026] Figure 1 This is a schematic diagram of the structure of a UniPro protocol stack; Figure 2 This is a schematic diagram of the header structure of a PDU in related technologies; Figure 3 This is a schematic diagram of a process for processing the header of a PDU in related technologies; Figure 4 This is a schematic diagram of another process for processing the header of a PDU in related technologies; Figure 5 This is a schematic flowchart illustrating a data processing method according to some embodiments of the present disclosure; Figure 6 This is a flowchart illustrating a process for determining a target value for an end flag bit according to some embodiments of the present disclosure; Figure 7 This is a flowchart illustrating a method for updating the value of an end flag bit according to some embodiments of the present disclosure; Figure 8 This is a schematic diagram illustrating the structure of a data processing apparatus according to some embodiments of the present disclosure; Figure 9 This is a schematic diagram illustrating the structure of a data link layer according to some embodiments of the present disclosure; Figure 10 This is a schematic diagram illustrating the data processing apparatus in a specific scenario according to some embodiments of the present disclosure; Figure 11 This is a block diagram illustrating an apparatus 1100 for data processing according to some embodiments of the present disclosure; Figure 12 This is a block diagram illustrating a chip system according to some embodiments of the present disclosure. Detailed Implementation
[0027] Some embodiments of this disclosure will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. Various changes, modifications, and equivalents of the methods and apparatus described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a particular order. Furthermore, for clarity and brevity, descriptions of features known in the art may be omitted.
[0028] The embodiments described in the following examples of this disclosure are not intended to represent all embodiments consistent with this disclosure. Rather, they are merely examples of methods, protocol stacks, apparatuses, etc., consistent with some aspects of this disclosure as detailed in the appended claims.
[0029] Figure 1 This is a schematic diagram of a UniPro protocol stack. Figure 1 As shown, the UniPro protocol stack can include a transport layer, a network layer, a data link layer, and a physical adaptation layer.
[0030] The UniPro protocol stack can split and encapsulate unlimited data packets from the application layer (of the terminal) into multiple PDUs with length limits, and add appropriate headers to each PDU at each layer. See also... Figure 2 The transport layer needs to include an End of Message (EOM) flag in the header added to the PDU. The EOM indicates whether the corresponding PDU is the end segment (last segment) of the data packet.
[0031] However, the application layer typically sends the end-of-message identifier to the UniPro protocol stack only when sending the last character of a data packet. This allows the transport layer to determine the end of the data packet based on the received end-of-message identifier. The transport layer then appends the header to each PDU upon receiving the end-of-message identifier, impacting the transmission efficiency of each PDU. For example, see... Figure 3After the transport layer determines the PDU to be the end segment, it can set the EOM of the PDU to 1 (indicating that the corresponding PDU is the end segment of the data packet) and set the EOM of other PDUs to 0 (indicating that the corresponding PDU is not the end segment of the data packet). Then, each PDU is sent through the network layer, data link layer and physical adaptation layer in sequence and sent to the Universal Flash Storage (UFS) system, which affects the efficiency of each PDU being stored in the UFS system.
[0032] In one related technology, see Figure 4 If the transport layer does not obtain the message end marker, it can set the EOM of each obtained PDU to 0 and send each PDU sequentially through the network layer, data link layer, and physical adaptation layer. If the transport layer obtains the message end marker, it can split the current PDU. That is, it encapsulates the data in the current PDU that has not been transmitted to the network layer into a new PDU (e.g., ...). Figure 4 The PDU' is then processed by setting its EOM to 1 and then sending the PDU' through the network layer, data link layer and physical adaptation layer in sequence.
[0033] However, splitting data that could be integrated into a single PDU into two PDUs for transmission increases the number of packet headers, thereby introducing additional transmission overhead.
[0034] In another related technology, if the transport layer cannot determine whether a PDU is the end segment of a data packet to be processed when encapsulating it, it can temporarily store the PDU header and the data in the PDU that are in the same processing cycle as the header, and send the other data in the PDU as the PDU body through the network layer to the data link layer. After the transport layer determines the EOM value corresponding to the PDU, it can fill in the PDU header based on the EOM value, and send the filled header and the temporarily stored data through the network layer to the data link layer. The data link layer can integrate the received PDU body, the filled header, and the data temporarily stored by the transport layer to transmit the integrated data to the corresponding location through the physical adaptation layer.
[0035] However, the above method requires additional temporary storage units in the transport layer, increasing transmission overhead. Furthermore, the temporary storage of packet headers and data in the transport layer also increases the latency of the entire data processing flow, affecting the transmission efficiency of the PDU.
[0036] Therefore, to address the aforementioned problems, this disclosure provides a data processing method, apparatus, storage medium, program product, and chip system. By first setting the end flag of the target data segment to a preset value, the transmission preparation process for the target data segment can proceed without waiting for the target value of the end flag. Subsequently, when the target value of the end flag is obtained, the transmission process for the target data segment can be started simply by updating the value of the end flag to the target value, thereby improving the transmission efficiency of the target data segment.
[0037] The solutions provided by the embodiments of this disclosure will now be described in conjunction with the accompanying drawings.
[0038] Figure 5 This is a flowchart illustrating a data processing method according to some embodiments of the present disclosure. The data processing methods illustrated in some embodiments of the present disclosure can be applied to a data processing apparatus, which may include a protocol stack such as the UniPro protocol stack for performing data processing. The data processing method illustrated in some embodiments of the present disclosure will be described in detail below, taking this data processing apparatus as the execution subject.
[0039] like Figure 5 As shown, some embodiments of this disclosure illustrate a data processing method that may include the following steps S501-S502: S501: Obtain the target data segment of the data packet to be sent, and set the value of the end flag bit of the target data segment to a preset value.
[0040] The data packets to be sent can be obtained from a data source. The data source can be a device or a software or hardware module included in the device. For example, the data source can be an application software in a mobile phone. This application embodiment does not limit this.
[0041] The data packets to be sent can be a collection of data continuously output by the data source. The length of each data packet output by the data source can vary; that is, the data source can continuously output corresponding data packets based on the actual situation, and the length of the data packets output in different outputs can be different, rather than being limited to outputting only a fixed-length data packet each time.
[0042] Since the length of the data packets output by the data source is not fixed, and the data source may need to continuously output a large amount of data to achieve the output of the complete data packet to be sent, the data processing device can perform group processing on the received data (the data included in the data packet to be sent) to split the data packet to be sent into at least one data segment (the target data segment in this application embodiment can be any of the at least one data segment), thereby ensuring that subsequent data can be successfully transmitted.
[0043] In one implementation, the data processing device can group the received data based on a length threshold. Taking a length threshold of 5 characters as an example, the data source can continuously output a series of data (data1, data2, data3...), with each data item occupying one character. When the data processing device receives data1, it can divide data1 into data segment 1, and continue dividing the received data2-data5 into data segment 1. In this case, the data processing device can determine that data segment 1 has reached the length threshold (including 5 characters). Then, when the data processing device receives data6, it can divide data6 into data segment 2, and continue dividing the received data6-data10 into data segment 2. In this case, the data processing device can determine that data segment 2 has reached the length threshold (including 5 characters). Afterward, the data processing device can continue to group the received data11, data12, etc., to obtain more data segments.
[0044] The data processing device can generate a header for each data segment before it begins splitting it. For example, the data processing device generates the header for data segment 1 when it receives data1 in the aforementioned example. As another example, the data processing device generates the header for data segment 2 when it receives data6 in the aforementioned example. The header of a data segment may include a length bit indicating the length of the data segment, an end flag bit indicating whether the data segment is the end of a data packet, and a destination address bit indicating the receiving location of the data segment, etc.
[0045] Because the data source sends the message end marker to the data processing device only when sending the last character of the data packet to be sent, and the data processing device has not yet obtained the message end marker when generating the data segment header and splitting the data segments, it cannot determine in advance whether the current data segment is the last segment of the data packet. Therefore, the value of the end marker can be set to a preset value. This preset value can be a pre-set fixed value, such as 0 (a value of 0 in the end marker indicates that the corresponding data segment is not the end segment of the data packet to be sent). In this way, the data processing device can quickly complete the splitting of the data segment and the preliminary configuration of the corresponding data segment header without waiting for the message end marker to be obtained, thereby advancing the subsequent data processing flow and avoiding transmission delays caused by waiting for the message end marker to be obtained.
[0046] It should be noted that the aforementioned length threshold can be determined based on the maximum transmission unit (MTU) required by the data transmission protocol followed by the data processing device. The length of each data segment split by the data processing device based on the length threshold is less than or equal to the value corresponding to that maximum MTU, to ensure that each data segment will not fail to transmit normally during subsequent transmission due to exceeding the length limit.
[0047] S502: Determine the target value of the end flag and update the value of the end flag from the preset value to the target value.
[0048] The target value indicates whether the target data segment is the end segment of a data packet. The data processing device generates a target value for the end flag bit of each data segment it determines is the end segment of a data packet. Then, based on the target value of the end flag bit, the value of the end flag bit in the header of the corresponding data segment is updated from a preset value to the target value. After the update, the end flag bit in the header of the data segment accurately reflects whether the corresponding data segment is the end segment of the data packet. In subsequent data transmission, the receiving end can quickly identify the position of each data segment based on the target value of the end flag bit. For example, if the target value of the end flag bit of the target data segment is 0, it can be determined that the target data segment is not the end segment, and other data segments need to be received; if the target value of the end flag bit of the target data segment is 1, it can be determined that the target data segment is the end segment, and no other data segments need to be received. The received data can then be integrated and processed accordingly.
[0049] As can be seen, by first setting the end flag of the target data segment to a preset value, the transmission preparation process for the target data segment can be advanced without waiting for the target value of the end flag. Subsequently, when the target value of the end flag is obtained, the transmission process for the target data segment can be started simply by updating the value of the end flag to the target value, which can improve the transmission efficiency of the target data segment.
[0050] In some embodiments of this disclosure, step S502, determining the target value of the end flag bit, includes: during the process of obtaining the target data segment, determining the target value of the end flag bit based on the result of obtaining the message end identifier; the message end identifier is sent by the data source when the last character of the data packet is sent.
[0051] In this process, the data source does not send a separate message end marker during the output of data packets. Instead, it outputs the message end marker synchronously with the last character of the data packet. Therefore, during the generation of the target data segment, the data processing device can determine whether the target data segment is the end data segment of the data packet based on the result of obtaining the message end marker, and generate the target value of the end flag bit of the target data segment.
[0052] As can be seen, the data processing device can determine the target value of the end flag bit during the generation of the target data segment, without the need to add an independent step of flag acquisition and target value determination after the target data segment is generated, thus avoiding redundancy and time consumption in the overall data processing flow.
[0053] In some embodiments of this disclosure, see Figure 6 The above-mentioned determination of the target value of the end flag bit based on the result of obtaining the message end identifier includes: if the message end identifier is obtained, the target value of the end flag bit is determined to be a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
[0054] In the process of obtaining the target data segment, if the data processing device confirms that it has obtained the message end identifier, it can determine the target value of the end flag bit corresponding to the target data segment as the first value (for example, determine the target value of the end flag bit corresponding to the target data segment as 1) to clarify that the target data segment is the end data segment of the data packet.
[0055] This method of determining the end of a message directly by associating the acquired message end marker with the determined first value is logically clear and direct, eliminating the need for complex intermediate determination processes and improving the efficiency of the data processing device in determining the target value of the end marker. Furthermore, the first value clearly indicates that the corresponding target data segment is the end of the data packet, providing a clear and unambiguous basis for subsequent data processing device updates to the end marker value, thus avoiding update errors caused by ambiguous determination criteria.
[0056] In some embodiments of this disclosure, see also [link to previous document]. Figure 6 The above-mentioned determination of the target value of the end flag bit based on the result of obtaining the message end identifier includes: if the message end identifier is not obtained, the target value of the end flag bit is determined to be a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
[0057] In the process of obtaining the target data segment, if the data processing device confirms that the message end identifier has not been obtained, it can determine the target value of the end flag bit corresponding to the target data segment as a second value (for example, determine the target value of the end flag bit corresponding to the target data segment as 0) to clarify that the target data segment is not the end data segment of the data packet.
[0058] This method of directly linking the acquisition of the message end marker with the determination of the second value is logically clear and direct, eliminating the need for complex intermediate determination processes and improving the efficiency of the data processing device in determining the target value of the end marker. Furthermore, the second value clearly indicates that the corresponding target data segment is not the end segment of the data packet, providing a clear and unambiguous basis for subsequent data processing device updates of the end marker value, avoiding update errors caused by ambiguous determination criteria.
[0059] In some embodiments of this disclosure, the data processing method provided in the above embodiments can be applied to a data processing apparatus, which may include a transport layer and a data link layer. Step S501, setting the value of the end flag bit of the target data segment to a preset value, includes: setting the value of the end flag bit of the target data segment to a preset value through the transport layer, and sending the target data segment to the data link layer.
[0060] The transport layer can acquire data sent by the data source and perform grouping processing on the acquired data to split the data packet to be sent into at least one data segment, thereby ensuring that subsequent data can be successfully transmitted. For a description of the transport layer's grouping processing of the acquired data, please refer to the description of the data processing device's grouping processing of the acquired data in the foregoing embodiments, which will not be repeated here.
[0061] Furthermore, the transport layer can add a header (also referred to as a transport layer header in this embodiment) to the target data segment. The transport layer header may include fields serving end-to-end application data transmission and segmentation management. For example, the transport layer header may include a length bit, an end flag bit, a source port identifier (corresponding to the sending application port of the data packet), a destination port identifier (corresponding to the receiving application port of the data packet), a command field (used to identify the transmission command type corresponding to the target data segment, such as data transmission, acknowledgment feedback, etc.), and a transport layer check field (used to verify whether errors occur during the internal flow of transport layer data). The transport layer can set the value of the end flag bit to a preset value and send the target data segment configured with the transport layer header to the data link layer. A description of the preset value can be found in the description in the foregoing embodiments, and will not be repeated here.
[0062] In one implementation, the data processing device further includes a network layer. The transport layer can send the target data segment to the network layer, which then forwards it to the data link layer. Upon receiving the target data segment from the transport layer, the network layer can add a network layer header. This header may include fields for routing and addressing, such as a source network address (corresponding to the network identifier of the data sending device), a destination network address (corresponding to the network identifier of the data receiving device), a protocol type field (identifying the transport layer protocol type corresponding to the upper-layer data), a routing priority field (used to distinguish the transmission priority of different data), and a network layer checksum field (used to verify the integrity of the network layer header itself). The network layer can adapt the transmission path of the target data segment to ensure it is accurately delivered to the corresponding receiving end. Finally, the network layer can send the target data segment, configured with the transport layer header and network layer header, to the data link layer.
[0063] As can be seen, by setting the end flag of the target data segment to a preset value at the transport layer and sending the target data segment to the data link layer, the transport layer can quickly advance the flow of the target data segment within the data processing device without waiting for the determination of the target value of the end flag. Furthermore, it allows the data link layer to receive the target data segment in advance, avoiding process stagnation caused by the transport layer waiting for the target value determination, thus improving the processing efficiency of the target data segment and consequently improving the processing efficiency of the entire data packet to be sent.
[0064] Figure 7 This is a flowchart illustrating a method for updating the value of an end flag bit according to some embodiments of the present disclosure. Figure 7 As shown, step S502 above, determining the target value of the end flag and updating the value of the end flag from the preset value to the target value, includes the following steps S701-S702: S701: Determine the target value of the end flag bit through the transport layer and send the target value of the end flag bit to the data link layer.
[0065] Specifically, the transport layer can generate a target value for the end flag bit of each data segment it determines as to whether it is the end segment of a data packet. The transport layer can then send the target value of the end flag bit to the data link layer.
[0066] In one implementation, when the transport layer sends a target value to the data link layer, it can send the target value along with the associated information of the corresponding data segment (such as the sequence number and length information of the data segment). This associated information can be consistent with the information carried by the target data segment previously sent by the transport layer to the data link layer, enabling the data link layer to quickly and accurately match the received target value with the target data segment, thus avoiding a correspondence error between the target value and the data segment.
[0067] In one implementation, the transport layer can directly send the target value of the obtained end flag to the data link layer without going through other intermediate layers for forwarding. This shortens the transmission path of the target value, improves transmission efficiency, and allows the data link layer to receive the target value faster, thereby enabling timely updates to the subsequent end flag and ensuring the efficient progress of the data processing flow.
[0068] In another implementation, the transport layer can send the target value obtained from the end flag to the network layer, which then forwards the target value to the data link layer. This network layer forwarding method ensures that the transmission of the target value follows the same internal flow logic as the transmission of the target data segment, guaranteeing the consistency of the transmission mechanism within the data processing device. Furthermore, the forwarding function of the network layer can adapt to the architecture design of the data processing device, including the network layer, ensuring that in scenarios requiring path planning through the network layer, the target value arrives at the data link layer synchronously with the transmission rhythm of the target data segment. This avoids matching delays between the target value and the target data segment due to differences in transmission paths, thus ensuring the stability of the data processing flow.
[0069] S702: Through the data link layer, update the value of the end flag bit of the target data segment from the preset value to the target value.
[0070] When the data link layer receives the target value sent by the transport layer, it can match the corresponding target data segment and update the value of the end flag of the target data segment to the target value, so that the end flag can accurately identify the position of the target data segment in the data packet and provide support for the transmission of subsequent target data segments.
[0071] This design, where the transport layer determines and sends the target value of the end flag, and the data link layer performs the numerical update, ensures precise coordination between the target value determination and update processes, avoiding process disconnects within the data processing device. The transport layer proactively sends the target value, ensuring the data link layer can obtain accurate update information promptly without additional queries or waiting, thus improving the efficiency of the end flag update. The data link layer, by directly updating the value, enables the target data segment to quickly carry accurate end status information, providing a reliable guarantee for the smooth transmission of subsequent target data segments, thereby improving the overall data packet processing and transmission efficiency.
[0072] In some embodiments of this disclosure, the data link layer includes a buffer unit; sending a target data segment to the data link layer via the transport layer includes: sending the target data segment to the buffer unit via the transport layer in the system clock domain to write the target data segment to the buffer unit. Sending a target value of an end flag bit to the data link layer via the transport layer includes: sending the target value of the end flag bit to the buffer unit via the transport layer in the system clock domain to write the target value of the end flag bit to the buffer unit.
[0073] The system clock domain refers to the unified clock synchronization reference within the data processing device. The operations of each functional module in the data processing device (including the buffer units of the transport layer and data link layer) can be executed according to the clock reference, thereby ensuring the timing consistency of data transmission and processing within the data processing device.
[0074] In this system, the transport layer and the buffer unit interact with each other based on the same clock cycle. This avoids transmission delays or loss of target data segments or values, or misordering of their reception, caused by timing deviations in different clock domains. Furthermore, the transmit and write operations performed by the transport layer under a unified clock domain enable the buffer unit to accurately store target data segments and their corresponding target values in the order of reception. This ensures a stable correspondence between the same data segment and its target value within the buffer unit, eliminating the need for additional timing calibration or order adjustment. This provides a reliable timing-level guarantee for the data link layer to quickly match data segments and target values and efficiently update the end flag.
[0075] In some embodiments of this disclosure, the buffer unit described above is a static random access memory.
[0076] Static Random Access Memory (SRAM) features fast read / write speeds and no need for dynamic refresh, enabling it to precisely match the high-speed data transmission rhythm of the transport layer under the system clock domain, as well as the buffer unit's need for rapid storage of target data segments and end flag values. When the transport layer sends target data segments and target values according to the system clock cycle, SRAM can receive and complete the write operation immediately without waiting for an additional refresh cycle, avoiding data transmission timing deviations caused by storage latency and ensuring the synchronous storage efficiency of target data segments and corresponding target values. Furthermore, the stable storage characteristics of SRAM ensure that target data segments and target values maintain data integrity during storage, preventing data loss or errors due to the inherent characteristics of the storage medium itself. This provides reliable storage support for the data link layer to subsequently quickly read and match data segments and target values, and efficiently execute end flag update operations, thus meeting the high-efficiency requirements of data processing devices for data transmission and processing.
[0077] In some embodiments, the buffer unit may also be a dynamic random access memory, a register set, a first-in-first-out memory, a ferroelectric random access memory, etc., and the embodiments of this application are not limited thereto.
[0078] In some embodiments of this disclosure, the data link layer further includes a processing unit; step S702, updating the value of the end flag bit of the target data segment from a preset value to a target value through the data link layer, includes: through the processing unit, reading the target data segment and the target value of the end flag bit from the buffer unit in the transmit clock domain, and updating the value of the end flag bit of the target data segment from the preset value to the target value.
[0079] The transmit clock domain serves as the timing reference for the data link layer when sending data. Its timing is adapted to the transmission requirements of the data transmission link, ensuring that the updated target data segment can be sent stably according to the link's timing requirements. When the processing unit performs operations under the transmit clock domain, it can read the target data segment and its corresponding end flag value from the buffer unit in a preset order based on the storage association between the target data segment and its corresponding target value. After reading, the processing unit can locate the end flag field in the header of the target data segment and replace its value with the read target value. The entire update process is synchronized with the timing of the transmit clock domain, ensuring both the accuracy of the end flag update and the ability of the updated target data segment to instantly adapt to the transmission timing of the transmit clock domain. This allows it to enter the subsequent transmission process without additional timing calibration, further improving the continuity and efficiency of data processing and transmission.
[0080] Figure 8 This is a schematic diagram illustrating the structure of a data processing apparatus according to some embodiments of the present disclosure. Figure 8 As shown in some embodiments of this disclosure, the data processing apparatus includes a transport layer and a data link layer.
[0081] The transport layer is used to acquire the target data segment of the data packet to be sent and set the value of the end flag bit of the target data segment to a preset value; the transport layer is also used to determine the target value of the end flag bit. The data link layer is used to update the value of the end flag bit from the preset value to the target value; the target value is used to indicate whether the target data segment is the end data segment of the data packet.
[0082] In some embodiments of this disclosure, in determining the target value of the end flag bit, the transport layer is specifically used to: determine the target value of the end flag bit based on the result of obtaining the message end identifier during the process of obtaining the target data segment; the message end identifier is sent by the data source when the last character of the data packet is sent.
[0083] In some embodiments of this disclosure, in determining the target value of the end flag bit based on the result of obtaining the message end identifier, the transport layer is specifically used to: if the message end identifier is obtained, determine the target value of the end flag bit as a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
[0084] In some embodiments of this disclosure, in determining the target value of the end flag bit based on the result of obtaining the message end identifier, the transport layer is specifically used to: if the message end identifier is not obtained, determine that the target value of the end flag bit is a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
[0085] In some embodiments of this disclosure, when setting the value of the end flag bit of the target data segment to a preset value, the transport layer is specifically used to: set the value of the end flag bit of the target data segment to a preset value and send the target data segment to the data link layer; In determining the target value of the end flag, the transport layer is specifically used to: determine the target value of the end flag and send the target value of the end flag to the data link layer; In updating the end flag value from the preset value to the target value, the data link layer is specifically used to: update the end flag value of the target data segment from the preset value to the target value.
[0086] In some embodiments of this disclosure, Figure 9 This is a schematic diagram illustrating the structure of a data link layer according to some embodiments of this disclosure. Figure 9 As shown, the data link layer may include a buffer unit. Specifically, the transport layer is used to: send a target data segment to the buffer unit under the system clock domain to write the target data segment into the buffer unit; and send the target value of the end flag bit to the buffer unit under the system clock domain to write the target value of the end flag bit into the buffer unit.
[0087] In some embodiments of this disclosure, the buffer unit is a static random access memory.
[0088] In some embodiments of this disclosure, see also [link to previous document]. Figure 9 The data link layer also includes a processing unit; the processing unit is used to: read the target value of the target data segment and the end flag bit from the buffer unit in the transmit clock domain, and update the value of the end flag bit of the target data segment from the preset value to the target value.
[0089] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation can be referred to the description in the embodiments of the method, and will not be repeated here.
[0090] The data processing apparatus shown in some embodiments of this disclosure will now be described in detail with reference to specific scenarios.
[0091] See Figure 10The data source can continuously output a series of data (data1, data2, data3...), with each data item occupying one character. The transport layer can group the received data to split the data packet to be sent into data segment 1 (including data1-data5), data segment 2 (including data6-data10), data segment 3 (including data11-data15), etc. The transport layer can also configure a header for each data segment, set the end flag bit in the header of each data segment to 0 (indicating that the corresponding data segment is not the end segment of the data packet to be sent), and, under the system clock domain, send each data segment with configured headers to the data link layer through the network layer.
[0092] During the process of obtaining data segment 1, the transport layer did not receive the message end identifier sent by the data source. Therefore, it determined that the target value of the end flag bit of data segment 1 was 0 (0 is the second value in the embodiment of this application). The transport layer can send the target value 0 to the data link layer in the system clock domain. The data link layer can read data segment 1 and the target value 0 in the transmission clock domain, and update the end flag bit included in the packet header of data segment 1 from 0 to 0, so as to send the updated data segment 1 (such as sending it to the physical adaptation layer included in the data processing device, and sending it to the external storage system through the physical adaptation layer).
[0093] During the process of obtaining data segment 2, the transport layer did not receive the message end identifier sent by the data source. Therefore, it determined that the target value of the end flag bit of data segment 2 was 0 (0 is the second value in the embodiment of this application). The transport layer can send the target value 0 to the data link layer in the system clock domain. The data link layer can read data segment 2 and the target value 0 in the transmission clock domain, and update the end flag bit included in the packet header of data segment 2 from 0 to 0, so as to send the updated data segment 2 (such as sending it to the physical adaptation layer included in the data processing device, and sending it to the external storage system through the physical adaptation layer).
[0094] During the process of obtaining data segment 3, the transport layer receives the message end identifier sent by the data source, and therefore determines that the target value of the end flag bit of data segment 3 is 1 (1 is the first value in the embodiment of this application). The transport layer can send the target value 1 to the data link layer in the system clock domain. The data link layer can read data segment 3 and target value 1 in the transmission clock domain, and update the end flag bit included in the packet header of data segment 3 from 0 to 1, so as to send the updated data segment 3 (such as sending it to the physical adaptation layer included in the data processing device, and sending it to the external storage system through the physical adaptation layer).
[0095] Figure 11This is a block diagram illustrating an apparatus 1100 for data processing according to some embodiments of the present disclosure. For example, apparatus 1100 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0096] Reference Figure 11 The device 1100 may include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input / output (I / O) interface 1112, a sensor component 1114, and a communication component 1116.
[0097] Processing component 1102 typically controls the overall operation of device 1100, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1102 may include one or more modules to facilitate interaction between processing component 1102 and other components. For example, processing component 1102 may include a multimedia module to facilitate interaction between multimedia component 1108 and processing component 1102.
[0098] Memory 1104 is configured to store various types of data to support the operation of device 1100. Examples of this data include instructions for any application or method operating on device 1100, contact data, phonebook data, messages, pictures, videos, etc. Memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0099] The power component 1106 provides power to the various components of the device 1100. The power component 1106 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 1100.
[0100] Multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1108 includes a front-facing camera and / or a rear-facing camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0101] Audio component 1110 is configured to output and / or input audio signals. For example, audio component 1110 includes a microphone (MIC) configured to receive external audio signals when device 1100 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1104 or transmitted via communication component 1116. In some embodiments, audio component 1110 also includes a speaker for outputting audio signals.
[0102] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0103] Sensor assembly 1114 includes one or more sensors for providing status assessments of various aspects of device 1100. For example, sensor assembly 1114 may detect the on / off state of device 1100, the relative positioning of components such as the display and keypad of device 1100, changes in the position of device 1100 or a component of device 1100, the presence or absence of user contact with device 1100, the orientation or acceleration / deceleration of device 1100, and temperature changes of device 1100. Sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1114 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0104] Communication component 1116 is configured to facilitate wired or wireless communication between device 1100 and other devices. Device 1100 can access wireless networks based on communication standards, such as WiFi, 3G, 4G, 5G, other communication standards, or combinations thereof. In some embodiments of this disclosure, communication component 1116 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In some embodiments of this disclosure, communication component 1116 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0105] In some embodiments of this disclosure, the apparatus 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the data processing methods described above.
[0106] In some embodiments of this disclosure, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, which can be executed by the processor 1120 of the device 1100 to complete the above-described data processing method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0107] In some embodiments of this disclosure, a computer program is also provided, which, when executed by the processor 1120 of the aforementioned apparatus 1100, implements the aforementioned data processing method.
[0108] Some embodiments of this disclosure also provide a chip system, such as Figure 12 As shown, the chip system includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 are interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1202 can be used to send signals to other devices (e.g., the processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in memory and send those instructions to the processor 1201. When the instructions are executed by the processor 1201, the aforementioned device 1100 can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and some embodiments of this disclosure do not specifically limit this.
[0109] In some embodiments of this disclosure, the interface circuit 1202 can acquire data, program instructions, and / or information from the internal storage area of the chip system; it can also acquire data, program instructions, and / or information from outside the chip system.
[0110] Optionally, the chip system also includes a memory 1203 for storing necessary computer programs and data.
[0111] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.
[0112] It should be understood that, unless otherwise specifically indicated, features of various embodiments of this disclosure described herein can be combined with each other. As used herein, the term “and / or” includes any one of the relevant listed items and any combination of any two or more; similarly, “at least one of…” includes any one of the relevant listed items and any combination of any two or more.
[0113] Although terms such as “first” and “second” may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Rather, these terms are used only to distinguish one component, part, region, layer, or section from another. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section. Furthermore, the terms “first” and “second” are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include at least one of that feature. In the description herein, “a plurality” means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0114] Furthermore, the term “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as advantageous compared to other aspects or designs. Rather, the use of the term “exemplary” is intended to present the concept in a concrete manner. As used herein, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from the context, “X applies A or B” is intended to mean any of the natural inclusive arrangements. That is, “X applies A or B” satisfies any of the foregoing instances if X applies A; X applies B; or both X applies A and B. Additionally, unless otherwise specified or clear from the context to refer to the singular form, the articles “a” and “an” as used in this application and the appended claims are generally understood to mean “one or more.”
[0115] Similarly, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terminology used to describe such components is intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if structurally not equivalent to the disclosed structure. Furthermore, although specific features of this disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations, as may be desired and advantageous to any given or particular application. Moreover, with regard to the terms “comprising,” “owning,” “having,” “having,” or variations thereof as used in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term “including.”
[0116] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0117] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that, include: Obtain the target data segment of the data packet to be sent, and set the value of the end flag bit of the target data segment to a preset value; Determine the target value of the end flag bit, and update the value of the end flag bit from the preset value to the target value; The target value is used to indicate whether the target data segment is the end data segment of the data packet.
2. The method according to claim 1, characterized in that, Determining the target value of the end flag bit includes: During the process of obtaining the target data segment, the target value of the end flag is determined based on the result of obtaining the message end identifier; the message end identifier is sent by the data source when the last character of the data packet is sent.
3. The method according to claim 2, characterized in that, Determining the target value of the end flag bit based on the result of obtaining the message end identifier includes: If the message end identifier is obtained, the target value of the end flag is determined to be a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
4. The method according to claim 2, characterized in that, Determining the target value of the end flag bit based on the result of obtaining the message end identifier includes: If the message end identifier is not obtained, the target value of the end flag is determined to be a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
5. The method according to any one of claims 1-4, characterized in that, Applied to a data processing device; the data processing device includes a transport layer and a data link layer; setting the value of the end flag bit of the target data segment to a preset value includes: The transport layer sets the end flag of the target data segment to a preset value and sends the target data segment to the data link layer. Determining the target value of the end flag and updating the value of the end flag from the preset value to the target value includes: The target value of the end flag is determined by the transport layer and sent to the data link layer. The data link layer updates the value of the end flag of the target data segment from the preset value to the target value.
6. The method according to claim 5, characterized in that, The data link layer includes a buffer unit; sending the target data segment to the data link layer through the transport layer includes: The target data segment is sent to the buffer unit through the transport layer in the system clock domain to write the target data segment into the buffer unit; Sending the target value of the end flag bit to the data link layer through the transport layer includes: The target value of the end flag is sent to the buffer unit through the transport layer in the system clock domain, so as to write the target value of the end flag into the buffer unit.
7. The method according to claim 6, characterized in that, The buffer unit is a static random access memory.
8. The method according to claim 6, characterized in that, The data link layer further includes a processing unit; updating the value of the end flag bit of the target data segment from the preset value to the target value through the data link layer includes: The processing unit reads the target value of the target data segment and the end flag bit from the buffer unit in the transmit clock domain, and updates the value of the end flag bit of the target data segment from the preset value to the target value.
9. A data processing apparatus, characterized in that, include: The transport layer is used to acquire the target data segment of the data packet to be sent and set the value of the end flag bit of the target data segment to a preset value; The transport layer is also used to determine the target value of the end flag bit; The data link layer is used to update the value of the end flag bit from the preset value to the target value; the target value is used to indicate whether the target data segment is the end data segment of the data packet.
10. The apparatus according to claim 9, characterized in that, The transport layer is specifically used for: During the process of obtaining the target data segment, the target value of the end flag is determined based on the result of obtaining the message end identifier; the message end identifier is sent by the data source when the last character of the data packet is sent.
11. The apparatus according to claim 10, characterized in that, The transport layer is specifically used for: If the message end identifier is obtained, the target value of the end flag is determined to be a first value; the first value is used to indicate that the target data segment is the end data segment of the data packet.
12. The apparatus according to claim 10, characterized in that, The transport layer is specifically used for: If the message end identifier is not obtained, the target value of the end flag is determined to be a second value; the second value is used to indicate that the target data segment is not the end data segment of the data packet.
13. The apparatus according to any one of claims 9-12, characterized in that, The data link layer includes a buffer unit; the transport layer is specifically used for: The target data segment is sent to the buffer unit under the system clock domain to write the target data segment into the buffer unit; The target value of the end flag is sent to the buffer unit under the system clock domain so as to write the target value of the end flag into the buffer unit.
14. The apparatus according to claim 13, characterized in that, The data link layer further includes a processing unit; the processing unit is used for: Under the transmit clock domain, the target value of the target data segment and the end flag bit are read from the buffer unit, and the value of the end flag bit of the target data segment is updated from the preset value to the target value.
15. A data processing apparatus, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the executable instructions to implement the data processing method according to any one of claims 1-8.
16. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor, enable the processor to perform the data processing method according to any one of claims 1-8.
17. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data processing method as described in any one of claims 1-8.
18. A chip system, characterized in that, The chip system includes a processing unit and an interface circuit. The processing unit obtains program instructions through the interface circuit, and the program instructions are executed by the processing unit. The processing unit is used to perform the data processing method as described in any one of claims 1-8.