Data information statistical method and device, computer device and storage medium

By storing data transfer completion information and performing statistical processing during SSD read operations, the problem of unclear data sources is solved, enabling accurate location of lost packet data and improving problem diagnosis efficiency.

CN116185293BActive Publication Date: 2025-11-04SUZHOU UNIONMEMORY INFORMATION SYST LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310145914.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2025-11-04
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

Existing SSDs cannot effectively distinguish the source of lost data and the amount of lost data during read operations, especially when sending mixed FW data and NFC data, making problem diagnosis difficult.

Method used

By storing data transfer completion information into a FIFO during read operations, the total amount of data transferred globally or read from on-chip RAM is counted and accumulated. The data source is distinguished and the data type is marked using the command ID number, thus achieving accurate location of the data volume.

Benefits of technology

In the event of data loss or anomalies, the source of the lost data and the amount of data lost can be determined, improving the efficiency of SSD development and maintenance and the progress of problem resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185293B_ABST
    Figure CN116185293B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose data information statistical method and device, computer equipment and storage medium. The method comprises: obtaining data transmission completion information; judging whether the data transmission completion information is a read operation; if the data transmission completion information is a read operation, storing the data transmission completion information in a FIFO; and according to the data transmission completion information in the FIFO, counting and accumulating the global read transmission data volume or the on-chip RAM read data volume. Through the method of the embodiments of the present application, when the transmitted data appears packet loss or other abnormalities, the source of the packet loss data and the lost data volume can be determined.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a solid state disk, more particularly to a data information statistical method, device, computer equipment and storage medium. BACKGROUND

[0002] In the read operation of the existing SSD (Solid State Drive), sometimes the data in the on-chip cache and the particle data are mixed and sent to the host. When packet loss or other abnormalities occur, it is impossible to determine the source of the lost data and the amount of lost data. For example, when there are mixed FW data and NFC data under the same command, it is often impossible to determine which data is lost or which path is stuck when a problem occurs.

[0003] Therefore, it is necessary to design a new method to determine the source of the lost data and the amount of lost data when the transmitted data has packet loss or other abnormalities. SUMMARY

[0004] The present application aims to overcome the defects of the prior art and provide a data information statistical method, device, computer equipment and storage medium.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solution: a data information statistical method, comprising:

[0006] obtaining data transmission completion information;

[0007] determining whether the data transmission completion information is a read operation;

[0008] if the data transmission completion information is a read operation, storing the data transmission completion information in a FIFO;

[0009] statistically accumulating the data amount of global read transmission or the data amount of on-chip RAM readout according to the data transmission completion information in the FIFO.

[0010] Further technical solutions are as follows: the statistically accumulating the data amount of global read transmission or the data amount of on-chip RAM readout according to the data transmission completion information in the FIFO, comprising:

[0011] determining whether the current operation is statistical accumulation of the data amount of global read transmission;

[0012] if the current operation is statistical accumulation of the data amount of global read transmission, statistically accumulating the data amount of global read transmission according to the data transmission completion information in the FIFO;

[0013] if the current operation is not statistical accumulation of the data amount of global read transmission, statistically accumulating the data amount of on-chip RAM readout according to the data transmission completion information in the FIFO.

[0014] Further, the technical solutions are as follows: the global read transmission data amount is counted and accumulated according to the data transmission completion information in the FIFO, comprising:

[0015] Firstly, it is judged whether the transmission total amount buffer is idle;

[0016] If the transmission total amount buffer is idle, the cumulative transmission total amount is read from the transmission total amount buffer according to the command ID number in the data transmission completion information;

[0017] The cumulative transmission total amount is accumulated with the transmission data amount in the data transmission completion information to obtain a new cumulative transmission total amount;

[0018] Secondly, it is judged whether the transmission total amount buffer is idle;

[0019] If the transmission total amount buffer is idle, the new cumulative transmission total amount is written into the transmission total amount buffer to update the cumulative transmission total amount.

[0020] Further, the technical solutions are as follows: the data transmission completion information comprises data source and data label tag.

[0021] Further, the technical solutions are as follows: the global read transmission data amount is counted and accumulated according to the data transmission completion information in the FIFO, comprising:

[0022] It is judged whether the data transmission completion information in the FIFO is a FW data read command;

[0023] If the data transmission completion information in the FIFO is a FW data read command, it is judged whether the FW data statistical buffer is idle and readable;

[0024] If the FW data statistical buffer is idle and readable, the cumulative FW data transmission total amount is read from the FW data statistical buffer according to the command ID number in the data transmission completion information in the FIFO;

[0025] The cumulative FW data transmission total amount is accumulated with the transmission data amount in the data transmission completion information to obtain a new cumulative FW data transmission total amount;

[0026] It is judged whether the FW data statistical buffer is idle and writable;

[0027] If the FW data statistical buffer is idle and writable, the new cumulative FW data transmission total amount is written into the FW data statistical buffer to update the cumulative FW data transmission total amount.

[0028] Further, the technical solutions are as follows: after the first judgment of whether the transmission total amount buffer is idle, further comprising:

[0029] If the total transmission buffer is not idle, then enter the waiting state.

[0030] Further technical solutions are as follows: after judging whether the FW data statistical buffer is idle, the method further comprises:

[0031] If the FW data statistical buffer is not idle, then enter the waiting state.

[0032] The application further provides a data information statistical device, comprising:

[0033] an information acquisition unit, configured to acquire data transmission completion information;

[0034] a judgment unit, configured to judge whether the data transmission completion information is a read operation;

[0035] a storage unit, configured to store the data transmission completion information in a FIFO if the data transmission completion information is a read operation;

[0036] a statistical unit, configured to statistically count and accumulate the global read transmission data volume or the on-chip RAM read data volume according to the data transmission completion information in the FIFO.

[0037] The application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0038] The application further provides a storage medium, which stores a computer program, and the computer program can implement the above method when executed by a processor.

[0039] Compared with the prior art, the application has the beneficial effects that: in the case of a read operation, the data transmission completion information is stored in a FIFO, and the global read transmission data volume or the on-chip RAM read data volume is statistically counted and accumulated according to the data transmission completion information in the FIFO, and according to the statistical content, which data the read operation is composed of, the proportion of various data, and other information, when the transmitted data has packet loss or other abnormalities, the source of the packet loss data and the lost data volume can be determined.

[0040] The application will be further described below in combination with the drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort based on these drawings.

[0042] Figure 1 The application scenario diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0043] Figure 2 The flow diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0044] Figure 3 The sub-flow diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0045] Figure 4 The sub-flow diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0046] Figure 5 The sub-flow diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0047] Figure 6 The data interaction diagram of the prior art is shown.

[0048] Figure 7 The data interaction diagram of the data information statistical method provided by the embodiment of the present application is shown.

[0049] Figure 8 The data transmission diagram provided by the embodiment of the present application is shown.

[0050] Figure 9 The schematic block diagram of the data information statistical device provided by the embodiment of the present application is shown.

[0051] Figure 10 The schematic block diagram of the statistical unit of the data information statistical device provided by the embodiment of the present application is shown.

[0052] Figure 11 The schematic block diagram of the first processing sub-unit of the data information statistical device provided by the embodiment of the present application is shown.

[0053] Figure 12 The schematic block diagram of the second processing sub-unit of the data information statistical device provided by the embodiment of the present application is shown.

[0054] Figure 13 The schematic block diagram of the computer device provided by the embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0056] It should be understood that the terms "comprise" and "include" as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0057] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0058] It should be further understood that the term "and / or" as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0059] Please refer to Figure 1 and Figure 2 , Figure 1 The application scenario of the data information statistical method provided in the embodiments of the present application is shown in the figure. Figure 2 The schematic flowchart of the data information statistical method provided in the embodiments of the present application is shown in the figure. The data information statistical method is applied to a master control device with a solid state disk. The master control device interacts with a host and a NAND FLASH for data transmission, realizes statistical processing of the data amount of the command transmission according to the command number in the transmission and distinguishes the data amount sources, separately marks the read data of the on-chip RAM, and makes data amount statistics to distinguish.

[0060] In the read operation of the solid state disk, data can be obtained from the NFC data on the NAND Flash particles, or the FW data from the on-chip RAM, and then sent to the host. In the development and maintenance process, developers need to observe and record a lot of information for testing functions and reliability. In some scenarios, the data in the internal cache of the host and the data on the particles need to be mixed and packaged in the read operation. If the transmission fails or is lost in this process, it is necessary to clarify the source of the problem data and determine the amount of lost data. If these key information cannot be counted and read, it will definitely cause difficulties and block the work progress of the SSD development and maintenance. In order to count the data source and data amount of each piece of data in the read operation of the SSD, the method of the embodiment synchronously counts the data attribute and the amount of hardware devices in the read operation. After the hardware detects the read operation, the read data will be accumulated according to the command number and stored in the specified area. When debugging, the developer can determine the data amount and data source of the command number in the read operation through a specific tool, which helps to clarify the problem and promote the problem solving progress.

[0061] Figure 2 is a flowchart of the data information counting method provided by the embodiment of the application. As shown in Figure 2 , the method comprises the following steps S110 to S140.

[0062] S110, obtaining data transmission completion information.

[0063] In the embodiment, the data transmission completion information comprises data source and data tag label, etc. For example, if the data source is the on-chip RAM cache of the host, the data amount will be additionally marked as FW data.

[0064] S120, judging whether the data transmission completion information is a read operation.

[0065] In the embodiment, the operation information is carried in the data transmission completion information, so that it can be directly judged whether the current data operation belongs to the read operation or the write operation.

[0066] S130, if the data transmission completion information is a read operation, storing the data transmission completion information in the FIFO;

[0067] S140, counting and accumulating the data amount of the global read transmission or the data amount of the on-chip RAM readout according to the data transmission completion information in the FIFO.

[0068] In an embodiment, referring to Figure 3 , the above step S140 can comprise steps S141-S143.

[0069] S141, judging whether the current operation is counting and accumulating the data amount of the global read transmission.

[0070] In the embodiment, it is judged whether the current operation of the master server is to count and accumulate the data volume of global read transmission.

[0071] S142, if the current operation is to count and accumulate the data volume of global read transmission, then the data volume of global read transmission is counted and accumulated according to the data transmission completion information in the FIFO.

[0072] In an embodiment, referring to Figure 4 The step S142 can include steps S1421-S142

[0073] S1421, first judge whether the transmission total volume buffer is idle;

[0074] S1422, if the transmission total volume buffer is idle, then the accumulated transmission total volume is read from the transmission total volume buffer according to the command ID number in the data transmission completion information.

[0075] In the embodiment, the command ID number carries the identification content of reading the accumulated transmission total volume, such as the identification number of reading which accumulated transmission total volume.

[0076] S1423, the accumulated transmission total volume is accumulated with the transmission data volume in the data transmission completion information to obtain a new accumulated transmission total volume;

[0077] S1424, the transmission total volume buffer is judged again whether it is idle;

[0078] S1425, if the transmission total volume buffer is idle, then the new accumulated transmission total volume is written into the transmission total volume buffer to update the accumulated transmission total volume.

[0079] S1426, if the transmission total volume buffer is not idle, then a waiting state is entered.

[0080] S143, if the current operation is not to count and accumulate the data volume of global read transmission, then the data volume is read from the on-chip RAM according to the data transmission completion information in the FIFO.

[0081] Specifically, when receiving a new transmission completion information, it is judged whether the transmission completion information is a read operation, if not, it returns to IDLE state to wait for the next transmission completion information; if yes, the transmission completion information of the read operation is packed and stored in the special FIFO; it is judged whether the transmission total amount Buffer is idle to read out, if not, it stays in this step; if yes, the transmission total amount accumulated before is read out from the Buffer according to the command ID number, and the data amount completed this time is accumulated; it is judged whether the transmission total amount Buffer is idle to write in, if not, it stays in this step; if yes, the new accumulated value is written into the Buffer, and the read-write operation is completed.

[0082] In an embodiment, referring to Figure 5 The step S143 above can include steps S1431-S1437.

[0083] S1431, judging whether the data transmission completion information in the FIFO is a FW data read command.

[0084] Specifically, it is judged whether the source of the data corresponding to the data transmission completion information in the FIFO is the on-chip RAM cache, if yes, the data transmission completion information in the FIFO is the FW data read command; if not, the data transmission completion information in the FIFO is not the FW data read command, and the step S110 is executed.

[0085] S1432, if the data transmission completion information in the FIFO is the FW data read command, it is judged whether the FW data statistical buffer is idle to read out;

[0086] S1433, if the FW data statistical buffer is idle to read out, the accumulated FW data transmission total amount is read out from the FW data statistical buffer according to the command ID number in the data transmission completion information in the FIFO;

[0087] S1434, the accumulated FW data transmission total amount and the transmission data amount in the data transmission completion information are accumulated to obtain a new accumulated FW data transmission total amount.

[0088] In the embodiment, the new accumulated FW data transmission total amount refers to the sum of the accumulated FW data transmission total amount and the transmission data amount in the data transmission completion information.

[0089] S1435, judging whether the FW data statistical buffer is idle to write in;

[0090] S1436, if the FW data statistical buffer is idle to write in, the new accumulated FW data transmission total amount is written into the FW data statistical buffer to update the accumulated FW data transmission total amount.

[0091] S1437, if the FW data statistics buffer is not idle readable, enter the waiting state.

[0092] Specifically, when the host server receives new transmission completion information; determine whether this transmission completion information is a read operation, if not, return to the IDLE state and wait for the next transmission completion information, if yes, package the transmission completion information of this read operation into a special FIFO; determine whether this completion information is a FW data read command, if not, do not do statistics and return to the IDLE state, if yes, determine whether the FW data statistics buffer is idle readable at this time, if not, stay at this step, if yes, read the total amount of FW data transmission accumulated before from the buffer according to the command ID number, and do cumulative calculation with the amount of data completed this time; determine whether the FW data statistics buffer is idle writable at this time, if not, stay at this step, if yes, write the calculated new cumulative value into the buffer, and the read-write operation is completed.

[0093] For the method of the present embodiment, when the SSD transmits data to the host, the hardware internally accumulates how many units of data are moved according to the command id. In read transmission, if a certain piece of data is obtained from the internal RAM of the host rather than from the NAND Flash particle, the hardware internally distinguishes and records the amount of data obtained and transmitted from the RAM when counting the total amount of data moved for the command. After the command is completed, through reading the serial port or traversing, it can be counted and distinguished which data the read operation is composed of, and how much each data occupies, and other information.

[0094] Please refer to Figure 6 , the existing SSD will mix the data from the NAND Flash particle and the data cached on the on-chip RAM and send them to the host in some scenarios. There is a mixture of FW data and NFC data under the same command, and when a problem occurs, it is often difficult to distinguish which data is lost or which path is stuck. Please refer to Figure 7 , the method of the present embodiment can temporarily store data in the internal host server under specified scenarios while completing regular read and write. When the host server receives the same read and write command again, the hardware internally determines whether the command information matches the internal data information in the cache, and after matching, the host server switches the read and write port to the special cache and sends the data in the cache directly to the particle or the host, avoiding repeated communication and transmission with the host and the particle. After sending, the host is reported that the command has been completed. Please refer to Figure 8In the SSD mixed data read scenario, while ensuring normal data management transmission, the data is marked according to the data source. For read data transmitted at different times for the same command, the hardware obtains the data amount of the command transmitted from the statistical management module according to the unique ID number of the command, adds the newly transmitted data amount to obtain a new transmission total amount, and writes the transmission total amount to the transmission total amount special area.

[0095] If the data source is the main control chip RAM Buffer, the data amount is additionally marked as FW DATA. The FW DATA data amount transmitted for the command is read according to the command ID number, and the updated amount is added and written to the FW DATA transmission amount special area.

[0096] The above data information statistical method stores the data transmission completion information in the FIFO in the read operation, and statistically adds the global read transmission data amount or the on-chip RAM read data amount according to the data transmission completion information in the FIFO. According to the information such as which data the read operation is composed of and the proportion of various data, when the transmitted data is lost or abnormally, the source of the lost data and the lost data amount can be determined.

[0097] Figure 9 is a schematic block diagram of a data information statistical device 300 provided by an embodiment of the present application. As shown in Figure 9 According to the above data information statistical method, the present application further provides a data information statistical device 300. The data information statistical device 300 includes a unit for executing the above data information statistical method, and the device can be configured in a server. Specifically, referring to Figure 9 The data information statistical device 300 includes an information acquisition unit 301, a judgment unit 302, a storage unit 303, and a statistical unit 304.

[0098] The information acquisition unit 301 is used for acquiring data transmission completion information; the judgment unit 302 is used for judging whether the data transmission completion information is a read operation; the storage unit 303 is used for storing the data transmission completion information in the FIFO if the data transmission completion information is a read operation; and the statistical unit 304 is used for statistically adding the global read transmission data amount or the on-chip RAM read data amount according to the data transmission completion information in the FIFO.

[0099] In an embodiment, as shown in Figure 10 The statistical unit 304 includes an operation judgment subunit 3041, a first processing subunit 3042, and a second processing subunit 3043.

[0100] The operation judging subunit 3041 is configured to judge whether the current operation is to count and accumulate the data amount of global read transmission; the first processing subunit 3042 is configured to, if the current operation is to count and accumulate the data amount of global read transmission, count and accumulate the data amount of global read transmission according to the data transmission completion information in the FIFO; and the second processing subunit 3043 is configured to, if the current operation is not to count and accumulate the data amount of global read transmission, read the data amount from the on-chip RAM according to the data transmission completion information in the FIFO.

[0101] In an embodiment, as shown in FIG. 3B, the first processing subunit 3042 includes a first judging module 30421, a first reading module 30422, a first accumulating module 30423, a second judging module 30424 and a first writing module 30425. Figure 11

[0102] The first judging module 30421 is configured to judge whether the transmission total amount buffer is idle for the first time; if the transmission total amount buffer is not idle, enter a waiting state. The first reading module 30422 is configured to, if the transmission total amount buffer is idle, read the cumulative transmission total amount from the transmission total amount buffer according to the command ID number in the data transmission completion information; the first accumulating module 30423 is configured to accumulate the cumulative transmission total amount and the transmission data amount in the data transmission completion information to obtain a new cumulative transmission total amount; the second judging module 30424 is configured to judge whether the transmission total amount buffer is idle again; and the first writing module 30425 is configured to, if the transmission total amount buffer is idle, write the new cumulative transmission total amount into the transmission total amount buffer to update the cumulative transmission total amount.

[0103] In an embodiment, as shown in FIG. 3C, the second processing subunit 3043 includes a third judging module 30431, a fourth judging module 30432, a second reading module 30433, a second accumulating module 30434, a fifth judging module 30435 and a second updating module 30436. Figure 12

[0104] ​​The third judging module 30431 is configured to judge whether the data transmission completion information in the FIFO is a FW data read command. The fourth judging module 30432 is configured to, if the data transmission completion information in the FIFO is the FW data read command, judge whether the FW data statistical buffer is idle and readable. If the FW data statistical buffer is not idle and readable, the second reading module 30433 is entered. The second reading module 30433 is configured to, if the FW data statistical buffer is idle and readable, read the cumulative FW data transmission total from the FW data statistical buffer according to the command ID number in the data transmission completion information in the FIFO. The second accumulating module 30434 is configured to accumulate the cumulative FW data transmission total and the transmission data amount in the data transmission completion information, to obtain a new cumulative FW data transmission total. The fifth judging module 30435 is configured to judge whether the FW data statistical buffer is idle and writable. The second updating module 30436 is configured to, if the FW data statistical buffer is idle and writable, write the new cumulative FW data transmission total into the FW data statistical buffer, to update the cumulative FW data transmission total.

[0105] It should be noted that the specific implementation process of the data information statistical apparatus 300 and each unit can be clearly understood by those skilled in the art, and can refer to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, details are not repeated here.

[0106] The data information statistical apparatus 300 can be implemented in the form of a computer program, which can run on a computer device as shown in the specification. Figure 13

[0107] Please refer to Figure 13 , Figure 13 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a server, wherein the server can be a stand-alone server or a server cluster composed of multiple servers.

[0108] Referring to Figure 13 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.

[0109] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can cause the processor 502 to perform a data information statistical method.

[0110] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.​

[0111] The internal memory 504 provides an environment for the running of the computer program 5032 in the non-volatile storage medium 503, which, when executed by the processor 502, can cause the processor 502 to perform a data information statistical method.

[0112] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that the network interface 505 can be implemented by a network card, a network adapter, a network controller, etc. Figure 13 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:

[0114] obtain data transmission completion information; determine whether the data transmission completion information is a read operation; if the data transmission completion information is a read operation, store the data transmission completion information in a FIFO; and according to the data transmission completion information in the FIFO, count and accumulate a global read transmission data volume or an on-chip RAM read data volume.

[0115] The data transmission completion information includes data source and data tag label.

[0116] In an embodiment, when implementing the step of counting and accumulating the global read transmission data volume according to the data transmission completion information in the FIFO, the processor 502 specifically implements the following steps:

[0117] determine whether the current operation is counting and accumulating the global read transmission data volume; if the current operation is counting and accumulating the global read transmission data volume, count and accumulate the global read transmission data volume according to the data transmission completion information in the FIFO; and if the current operation is not counting and accumulating the global read transmission data volume, read the data volume from the on-chip RAM according to the data transmission completion information in the FIFO.

[0118] In an embodiment, when implementing the step of counting and accumulating the global read transmission data volume according to the data transmission completion information in the FIFO, the processor 502 specifically implements the following steps:

[0119] firstly judging whether the transmission total buffer is idle; if the transmission total buffer is idle, reading the accumulated transmission total from the transmission total buffer according to the command ID number in the data transmission completion information; adding the accumulated transmission total and the transmission data amount in the data transmission completion information to obtain a new accumulated transmission total; secondly judging whether the transmission total buffer is idle; if the transmission total buffer is idle, writing the new accumulated transmission total into the transmission total buffer to update the accumulated transmission total.

[0120] In an embodiment, the processor 502, when implementing the step of counting and adding the data amount of global read transmission according to the data transmission completion information in the FIFO, implements the following steps:

[0121] judging whether the data transmission completion information in the FIFO is a FW data read command; if the data transmission completion information in the FIFO is a FW data read command, judging whether the FW data statistic buffer is idle and readable; if the FW data statistic buffer is idle and readable, reading the accumulated FW data transmission total from the FW data statistic buffer according to the command ID number in the data transmission completion information in the FIFO; adding the accumulated FW data transmission total and the transmission data amount in the data transmission completion information to obtain a new accumulated FW data transmission total; judging whether the FW data statistic buffer is idle and writable; if the FW data statistic buffer is idle and writable, writing the new accumulated FW data transmission total into the FW data statistic buffer to update the accumulated FW data transmission total.

[0122] In an embodiment, after implementing the step of firstly judging whether the transmission total buffer is idle, the processor 502 further implements the following steps:

[0123] if the transmission total buffer is not idle, entering a waiting state.

[0124] In an embodiment, after implementing the step of judging whether the FW data statistic buffer is idle and readable, the processor 502 further implements the following steps:

[0125] if the FW data statistic buffer is not idle and readable, entering a waiting state.

[0126] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0127] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments.

[0128] Therefore, the present application further provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program is executed by a processor to make the processor perform the following steps:

[0129] obtaining data transmission completion information; determining whether the data transmission completion information is a read operation; if the data transmission completion information is a read operation, storing the data transmission completion information in a FIFO; and counting and accumulating a global read transmission data volume or an on-chip RAM read data volume according to the data transmission completion information in the FIFO.

[0130] The data transmission completion information includes data source and data tag.

[0131] In an embodiment, when the processor executes the computer program to implement the step of counting and accumulating a global read transmission data volume or an on-chip RAM read data volume according to the data transmission completion information in the FIFO, the processor specifically implements the following steps:

[0132] determining whether the current operation is to count and accumulate the data amount of global read transmission; if the current operation is to count and accumulate the data amount of global read transmission, counting and accumulating the data amount of global read transmission according to the data transmission completion information in the FIFO; and if the current operation is not to count and accumulate the data amount of global read transmission, reading the data amount from the on-chip RAM according to the data transmission completion information in the FIFO.

[0133] In one embodiment, the processor, when executing the computer program to implement the step of counting and accumulating the data amount of global read transmission according to the data transmission completion information in the FIFO, implements the following steps:

[0134] firstly determining whether the transmission total amount buffer is idle; if the transmission total amount buffer is idle, reading the accumulated transmission total amount from the transmission total amount buffer according to the command ID number in the data transmission completion information; accumulating the accumulated transmission total amount and the transmission data amount in the data transmission completion information to obtain a new accumulated transmission total amount; secondly determining whether the transmission total amount buffer is idle; and if the transmission total amount buffer is idle, writing the new accumulated transmission total amount into the transmission total amount buffer to update the accumulated transmission total amount.

[0135] In one embodiment, the processor, when executing the computer program to implement the step of the data transmission completion information including data source and data tag, implements the following steps:

[0136] determining whether the data transmission completion information in the FIFO is a FW data read command; if the data transmission completion information in the FIFO is a FW data read command, determining whether the FW data statistics buffer is idle and readable; if the FW data statistics buffer is idle and readable, reading the accumulated FW data transmission total amount from the FW data statistics buffer according to the command ID number in the data transmission completion information in the FIFO; accumulating the accumulated FW data transmission total amount and the transmission data amount in the data transmission completion information to obtain a new accumulated FW data transmission total amount; determining whether the FW data statistics buffer is idle and writable; and if the FW data statistics buffer is idle and writable, writing the new accumulated FW data transmission total amount into the FW data statistics buffer to update the accumulated FW data transmission total amount.

[0137] In one embodiment, the processor, after implementing the step of firstly determining whether the transmission total amount buffer is idle, implements the following steps:

[0138] if the transmission total amount buffer is not idle, entering a waiting state.

[0139] In an embodiment, the processor, after implementing the step of determining whether the FW data statistics buffer is idle for reading out, further implements the following steps:

[0140] If the FW data statistics buffer is not idle for reading out, a waiting state is entered.

[0141] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, and the like, which are various computer-readable storage media that can store program codes.

[0142] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0143] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed.

[0144] The steps in the method embodiments of the present application can be adjusted, combined, and reduced in sequence according to actual needs. The units in the device embodiments of the present application can be combined, divided, and reduced according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0145] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.

[0146] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of data information statistics, characterized in that, The method comprises the following steps: acquiring data transmission completion information; judging whether the data transmission completion information is a read operation; if the data transmission completion information is a read operation, storing the data transmission completion information in a FIFO; counting and accumulating the data volume of global read transmission or the data volume of on-chip RAM readout according to the data transmission completion information in the FIFO; the counting and accumulating the data volume of global read transmission according to the data transmission completion information in the FIFO comprises the following steps: judging whether the current operation is counting and accumulating the data volume of global read transmission; if the current operation is counting and accumulating the data volume of global read transmission, counting and accumulating the data volume of global read transmission according to the data transmission completion information in the FIFO; if the current operation is not counting and accumulating the data volume of global read transmission, judging whether the data transmission completion information in the FIFO is a FW data read command; if the data transmission completion information in the FIFO is a FW data read command, judging whether the FW data statistic buffer is idle and can be read out; if the FW data statistic buffer is idle and can be read out, reading out the accumulated total volume of FW data transmission from the FW data statistic buffer according to the command ID number in the data transmission completion information in the FIFO; accumulating the accumulated total volume of FW data transmission and the transmission data volume in the data transmission completion information to obtain a new accumulated total volume of FW data transmission; judging whether the FW data statistic buffer is idle and can be written into; if the FW data statistic buffer is idle and can be written into, writing the new accumulated total volume of FW data transmission into the FW data statistic buffer to update the accumulated total volume of FW data transmission.

2. The data information statistics method of claim 1, wherein, the counting and accumulating the data volume of global read transmission according to the data transmission completion information in the FIFO comprises the following steps: firstly judging whether the transmission total volume buffer is idle; if the transmission total volume buffer is idle, reading out the accumulated total volume from the transmission total volume buffer according to the command ID number in the data transmission completion information; accumulating the accumulated total volume and the transmission data volume in the data transmission completion information to obtain a new accumulated total volume; secondly judging whether the transmission total volume buffer is idle; if the transmission total volume buffer is idle, writing the new accumulated total volume into the transmission total volume buffer to update the accumulated total volume.

3. The data information statistics method of claim 1, wherein, the data transmission completion information comprises data source and data tag label.

4. The data information statistics method of claim 2, wherein, after the first step of judging whether the transmission total volume buffer is idle, the method further comprises the following step: if the transmission total volume buffer is not idle, entering a waiting state.

5. The data information statistics method of claim 4, wherein, after the step of judging whether the FW data statistic buffer is idle and can be read out, the method further comprises the following step: if the FW data statistic buffer is not idle and can be read out, entering a waiting state.

6. A data information statistics device, characterized by the device uses the data information counting method according to any one of claims 1 to 5, comprising: an information acquisition unit for acquiring data transmission completion information; a judging unit for judging whether the data transmission completion information is a read operation; a storage unit for storing the data transmission completion information in a FIFO if the data transmission completion information is a read operation; A statistics unit is configured to count and accumulate the global read transmission data volume or the on-chip RAM read data volume according to the data transmission completion information in the FIFO.

7. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method in any one of claims 1 to 5 when executing the computer program.

8. A storage medium, characterized by The storage medium stores a computer program, and the computer program is executable by a processor to implement the method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Channelizing logic single channel statistic method and apparatus

    CN101141296A

  • Method and device for realizing hybrid read-write of solid state disk

    CN114286989A