CN114385083B - Data frame statistics acquisition device and method - Google Patents

Data frame statistics acquisition device and method Download PDF

Info

Publication number
CN114385083B
CN114385083B CN202210015463.XA CN202210015463A CN114385083B CN 114385083 B CN114385083 B CN 114385083B CN 202210015463 A CN202210015463 A CN 202210015463A CN 114385083 B CN114385083 B CN 114385083B
Authority
CN
China
Prior art keywords
module
storage
address
sampling
central processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210015463.XA
Other languages
Chinese (zh)
Other versions
CN114385083A (en
Inventor
郑海升
杨彦波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fiberhome Telecommunication Technologies Co Ltd
Wuhan Fisilink Microelectronics Technology Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Wuhan Fisilink Microelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd, Wuhan Fisilink Microelectronics Technology Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202210015463.XA priority Critical patent/CN114385083B/en
Publication of CN114385083A publication Critical patent/CN114385083A/en
Application granted granted Critical
Publication of CN114385083B publication Critical patent/CN114385083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data frame statistics acquisition device and a method, and relates to the technical field of data packet switching. The method comprises the following steps: when a data packet enters, the sampling address generation module generates a corresponding storage module address based on a sampling period, and marks the data packet by taking the address as a mark; the marked data packets sequentially enter each statistic module, each statistic module counts the data packets according to service requirements, and the statistic values are stored in the corresponding storage modules according to marked storage module addresses; the storage module stores in a RAM parallel access mode; when the sampling address change judging module detects that the address of the storage module changes, a storage completion instruction of the corresponding storage module is generated and transmitted to the central processing module; and the central processing module reads the corresponding storage module according to the reading requirement. The invention not only can read statistics and simultaneously support on-line packet loss diagnosis, and meets the actual application requirements.

Description

Data frame statistics acquisition device and method
Technical Field
The invention relates to the technical field of data packet switching, in particular to a data frame statistics acquisition device and a method.
Background
Currently, in communication networks, packet switching technology based on IP or ethernet packets is widely adopted. With the expansion of the size of communication networks and the increasing growth of various applications, the size of networks is expanding, and in order to better perform operation and maintenance on the networks, the communication networks are moving toward SDN (Software Defined Network, software defined networking) and intelligent operation and maintenance. This trend requires a more timely and accurate knowledge of the operating state of the network.
Statistics on data frames are commonly employed in communication networks to learn the status of network operation and usage.
In the current equipment, the adopted traditional data statistics and collection method is as follows: the statistics are carried out at each statistic point by hardware, and each hardware statistic is read by software at fixed time. This approach is feasible in traditional network management where statistics are not very large and where the statistics are long. However, when the amount of statistics increases and the required sampling points become dense, it is difficult to achieve the concurrency of reading the statistics due to the time-sharing property of reading, and thus the method cannot be adapted to the development requirements of future network management (for example, the currently proposed technology function sometimes requires that hundreds of samplings are completed per second). In addition, the traditional statistical method is adopted, because the time when the same data frame passes through each sampling point is different (unsynchronized), the statistical contents of the same type of statistics are different in the same sampling period, and whether the packet is lost or the statistical time difference cannot be accurately judged, so that the on-line packet loss diagnosis is not facilitated, and the packet can be stopped.
Disclosure of Invention
The invention aims to overcome the defects of the background technology, and provides a data frame statistics acquisition device and a data frame statistics acquisition method, which can achieve the reading statistics simultaneity, ensure that the statistics content of the same type of statistics is the same in the same sampling period, support the online packet loss diagnosis and meet the actual application requirements.
In order to achieve the above purpose, the invention provides a data frame statistics acquisition device, which comprises a sampling address generation module, at least one statistics module, at least two storage modules, a sampling address change judgment module and a central processing module;
the sampling address generation module is used for: when a data packet enters, generating a storage module address corresponding to the data packet based on a sampling period, and marking the data packet by taking the generated address as a mark;
the statistics module is used for: counting the data packets according to service requirements, and storing the counted values into corresponding storage modules according to the storage module addresses marked by the data packets;
the storage module is used for: storing the received statistical value in a RAM parallel access mode;
the sampling address change judging module is used for: detecting whether the address of the storage module changes, and if so, generating a storage completion instruction of the corresponding storage module; and transmitting the storage completion indication to the central processing module;
the central processing module is used for: and after the storage completion instruction is obtained, reading the corresponding storage module according to the reading requirement.
On the basis of the technical scheme, the sampling address generation module generates the storage module address corresponding to the data packet based on the sampling period, and specifically comprises the following steps:
and the sampling address generation module sequentially and circularly selects a corresponding storage module according to the number of the storage modules by taking the sampling period as a unit, and takes the address of the storage module as the address of the storage module corresponding to the data packet.
On the basis of the technical scheme, the sampling address generation module generates the storage module address corresponding to the data packet based on the sampling period, and specifically comprises the following steps:
the sampling address generation module selects a corresponding one for storage according to the number of the storage modules and a preset random algorithm by taking the sampling period as a unit, and takes the address of the storage module as the address of the storage module corresponding to the data packet.
On the basis of the technical scheme, the storage modules comprise storage areas with the same number as the statistic modules; the storage modules store the statistical values of the statistical modules into corresponding storage areas according to a one-to-one correspondence mode.
On the basis of the technical scheme, the storage module comprises at least one storage area; the storage module stores the statistic value of each statistic module into a corresponding storage area according to a time division multiplexing mode.
On the basis of the technical scheme, the central processing module is further used for: issuing a sampling period to a sampling address generation module;
the apparatus further comprises a configuration module for: and configuring the sampling period issued by the central processing module to a sampling address generation module.
On the basis of the technical scheme, the device further comprises a reporting module which is used for: and reporting the storage completion indication generated by the sampling address change judging module to a central processing module.
On the basis of the technical scheme, when the reporting module reports the storage completion indication, the following mode is adopted: either in a packed manner or in a DMA manner or for active reading by the central processing module.
Based on the technical scheme, the central processing module reads the corresponding storage module according to the reading requirement, and specifically comprises the following steps: and the central processing module reads only one storage module with the storage completion indication at a time or simultaneously reads a plurality of storage modules with the storage completion indication according to the reading requirement.
On the basis of the technical scheme, the central processing module is a CPU or a software module.
The invention also provides a data frame statistical acquisition method, which comprises the following steps:
when a data packet enters, the sampling address generation module generates a storage module address corresponding to the data packet based on a sampling period, and marks the data packet by taking the generated address as a mark;
the marked data packets sequentially enter each statistic module, each statistic module counts the data packets according to service requirements, and the statistic values are stored in the corresponding storage modules according to the storage module addresses marked by the data packets; the storage module stores the received statistic value in a RAM parallel access mode;
the sampling address change judging module detects whether the address of the storage module changes, if so, a storage completion instruction of the corresponding storage module is generated and transmitted to the central processing module;
after the central processing module acquires the storage completion instruction, the corresponding storage module is read according to the reading requirement.
The invention has the beneficial effects that:
(1) In the invention, as the plurality of storage modules are arranged and the storage is distributed and based on the principle of sampling period, the storage is carried out in a period-by-period storage module mode, so that the invention not only adapts to the non-uniformity of subsequent reading, but also can achieve the synchronism of reading statistics, ensures that the statistics content of the same type of statistics is the same in the same sampling period, can support the online packet loss diagnosis and meets the actual application requirements.
(2) According to the invention, each storage module can store the received statistic value in a RAM parallel access mode, so that the statistic modules can be in a parallel statistic and parallel storage efficient working mode, and the requirements of timeliness, simultaneity and the like are met.
Drawings
FIG. 1 is a block diagram of a data frame statistics acquisition device in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a memory module according to an embodiment;
FIG. 3 is a schematic diagram of a memory module according to another embodiment;
fig. 4 is a flowchart of a data frame statistics collection method according to an embodiment of the present invention.
Detailed Description
Aiming at the prior art, the traditional data statistics acquisition method is difficult to achieve the simultaneity of the reading statistics due to the timeliness of the reading, so that the method cannot adapt to the development requirement of future network management; and because of time difference between statistics and reading, each statistic is asynchronous, which is unfavorable for on-line analysis and judgment. The invention aims to provide a data frame statistics acquisition device and a data frame statistics acquisition method, which can achieve the synchronism of the reading statistics, ensure that the statistics content of the same type of statistics is the same in the same sampling period, support the online packet loss diagnosis and meet the actual application requirements.
In order to achieve the above purpose, the main design concept of the invention is as follows: the data frame statistics acquisition device comprises a sampling address generation module, at least one statistics module, at least two storage modules, a sampling address change judgment module and a central processing module.
The sampling address generation module is used for: when a data packet enters, a storage module address corresponding to the data packet is generated based on a sampling period, and the generated address is used as a mark to mark the data packet. A statistics module for: and counting the data packets according to service requirements, and storing the statistic value into a corresponding storage module according to the storage module addresses marked by the data packets. A storage module for: and storing the received statistical value in a RAM parallel access mode. The sampling address change judging module is used for: detecting whether the address of the storage module changes, and if so, generating a storage completion instruction of the corresponding storage module; and passes the storage complete indication to the central processing module. The central processing module is used for: and after the storage completion instruction is obtained, reading the corresponding storage module according to the reading requirement.
In the scheme, corresponding memory module addresses are generated according to the sampling period, and memory resources are allocated; and after all statistics in the sampling period are stored, the operation of reading the statistics is performed, so that the concurrency of the statistics is not affected even if the statistics are not completed at the same time. And the plurality of storage modules are used for carrying out periodical storage according to a mode of one period and one storage module, so that statistic values of different sampling periods can be respectively stored, and the statistic values can be uniformly read in the subsequent reading, thereby not only being suitable for the non-uniformity of the subsequent reading, but also being capable of achieving the synchronism of the reading statistics, ensuring that the statistic content of the same type of statistics is the same in the same sampling period, and being capable of supporting the online packet loss diagnosis and meeting the actual application requirements. Meanwhile, each storage module can store the received statistic value in a RAM parallel access mode, so that the statistic modules can be in a parallel statistic and parallel storage efficient working mode, and the requirements on timeliness, simultaneity and the like are met.
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
However, it should be noted that: the examples to be presented below are only a few specific examples and are not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can, upon reading the present specification, make and use the concepts of the invention to construct further embodiments not mentioned in the specification.
Example 1
Referring to fig. 1, the embodiment provides a data frame statistics acquisition device, which includes a sampling address generation module, at least one statistics module, at least two storage modules, a sampling address change judgment module and a central processing module.
The sampling address generation module is used for: when a data packet enters, generating a storage module address corresponding to the packet based on a sampling period, and marking the data packet by taking the generated address as a mark; the marked data packet sequentially enters each statistic module for statistics.
Illustratively, as an alternative implementation manner, the sampling address generating module generates the address of the storage module corresponding to the packet based on the sampling period may be: and taking the sampling period as a unit, sequentially and circularly selecting a corresponding storage module according to the number of the storage modules, and taking the address of the storage module as the address of the storage module corresponding to the data packet. For example, assuming that there are three memory modules, the memory module addresses generated in the 1/2/3 sampling period correspond to the 1/2/3 memory modules (i.e. the 1 st memory module is stored in the 1 st sampling period, the 2 nd memory module is stored in the 2 nd sampling period, and the 3 rd memory module is stored in the 3 rd sampling period) in turn, the memory module addresses generated in the 4 th sampling period correspond to the 1 st memory module (i.e. the 1 st memory module is stored in the 4 th sampling period), and so on. Of course, in practical application, a corresponding storage module may be selected according to a certain random algorithm to store according to the number of storage modules, so long as it follows the principle based on the sampling period, and the selection is performed according to a mode of "one cycle one storage module", and the specific selection mode is not limited in detail in this embodiment. Illustratively, the random algorithm employed in the practical application may be: and adding the randomly generated numerical value to the serial number of the current sampling period, and then modulo the total number of the memory modules to obtain the memory module address corresponding to the current sampling period. For example, assuming that the current sampling period is the 1 st sampling period, the total number of memory modules is 3, and the randomly generated value is 3, then the memory module address of the sampling period is: and after the random number 3 is added to the sampling period sequence number 1, the sampling period sequence number is modulo 3 to obtain the memory module address 1. Or, only taking the serial number of the sampling period as a random seed, calculating a random value by adopting a random function, and then taking a modulus with the total number of the memory modules to obtain the memory module address corresponding to the current sampling period.
Also illustratively, when the sampling address generating module marks the data packet using the generated address as a label, the sampling address generating module may use the generated address as packet description information and mark the data packet using the information as a label.
A statistics module for: and counting the data packets according to service requirements, and storing the statistic value into a corresponding storage module according to the storage module addresses marked by the data packets. It will be appreciated that there may be statistics of various traffic demands (traffic patterns) in the communication device, such as port-based statistics, IP-based statistics, flow-class-based statistics, etc. Therefore, in this embodiment, the marked data packet sequentially enters each statistics module, and each statistics module performs statistics on the data packet according to the service requirement.
A storage module for: and storing the received statistical value in a RAM parallel access mode. It can be understood that when the storage module in this embodiment caches the statistics, the statistics are implemented by using RAM, and the RAM parallel access effect can be implemented. And just because the storage module in this embodiment can store the received statistics value through the parallel access mode of the RAM, the efficient working mode of parallel statistics and parallel storage can be achieved among all the statistics modules, and the requirements of timeliness, simultaneity and the like are satisfied. For example, assume that in the 1 st sampling period, the data packet 1 enters at 1 st second and enters the statistics module 1 for statistics, and after the statistics is completed, the data packet is stored in the storage module 1; in the 2 nd second, the data packet 1 will enter the statistics module 2 for statistics, if a new data packet 2 enters at this time, the data packet 2 can enter the statistics module 1 at the same time for statistics, and the two statistics modules (statistics modules 1 and 2) can perform statistics at the same time, and because the storage module 1 can realize parallel access of the RAM, the two statistics modules can be smoothly stored in the storage module 1 after the statistics is completed.
The sampling address change judging module is used for: detecting whether the address of the storage module changes, and if so, generating a storage completion instruction of the corresponding storage module; and passes the storage complete indication to the central processing module. It can be understood that, since the sampling address change determining module in this embodiment is disposed at the tail of the statistics module (i.e., is disposed at the tail of the last statistics module in time as shown in fig. 1), when the sampling address change determining module detects that the address of the storage module changes (in particular, when detecting, the detecting and determining can be performed according to whether the address of the storage module marked by the data packet changes), it indicates that the sampling period has ended, and the corresponding storage module should also complete the storage of the statistics value, a storage completion indication of the corresponding storage module can be generated to indicate that the statistics in the sampling period is completed, so as to be processed by the subsequent central processing module.
For example, assuming that in the 1 st sampling period, all the marked addresses of the incoming data packets are the memory module 1, the marked memory module addresses detected by the sampling address change judging module in the period are the memory module 1, and are not changed, so that the storage completion indication of the memory module 1 is not generated; when the 1 st sampling period is finished and the 2 nd sampling period is started, the marking address of the incoming data packet is the storage module 2, then when the sampling address change judging module receives the data packet marked as the storage module 2, the storage module address can be judged to change, the 1 st sampling period is finished and the 2 nd sampling period is started to enter, the storage module 1 corresponding to the 1 st sampling period also completes the storage of the statistic value (each statistic module stores after one statistic is finished, when the last data packet in the period is counted and stored by the last statistic module, all the statistic values of the period complete the storage), a storage completion indication of the storage module 1 can be generated, the storage completion indication can be used for indicating the completion of the statistics in the 1 st sampling period, and the subsequent central processing module can process the storage module 1. Similarly, the sampling address change judging module may continue to receive the data packet marked as the storage module 2 until the data packet marked as the storage module 3 (or other storage modules) appears, which indicates that the 2 nd sampling period has ended, and the corresponding storage module 2 should also complete the storage of the statistics value, and then a storage completion indication of the storage module 2 may be generated to indicate that the statistics in the 2 nd sampling period is completed.
The central processing module is used for: and after the storage completion instruction is obtained, reading the corresponding storage module according to the reading requirement. It can be understood that in this embodiment, after the central processing module obtains the storage completion instruction, the central processing module may read the corresponding storage module according to the reading requirement, and may read only one storage module with the storage completion instruction at a time, or may read a plurality of storage modules with the storage completion instructions at the same time. For example, assume that the 3 rd sampling period is currently completed, at this time, the central processing module acquires the storage completion indication of the 3 rd storage module, and when the previous 1 st and 2 nd sampling periods are completed, correspondingly acquires the storage completion indication of the 1 st and 2 nd storage modules. Then, the central processing module can only read the statistic value of the 3 rd storage module according to the reading requirement, and can also read the statistic values of the 1 st, 2 nd and 3 rd storage modules at one time. In addition, in practical application, the central processing module may be a CPU or a software module, and if the central processing module is a software module, it refers to a code module in the software program for implementing the above functions.
As can be seen from the above description, in this embodiment, at least two storage modules are provided, and the storage is divided into periods according to the principle of sampling period based on the storage allocation, so as to not only adapt to the non-uniformity of subsequent reading, for example, sampling is periodic, but also can be uniformly read after one or more sampling periods are completed during reading; and the method can achieve the synchronism of the reading statistics, ensure that the statistics content of the same type of statistics is the same in the same sampling period, support the online packet loss diagnosis and meet the actual application requirements. Meanwhile, each storage module can store the received statistic value in a RAM parallel access mode, so that the statistic modules can be in a parallel statistic and parallel storage efficient working mode, and the requirements on timeliness, simultaneity and the like are met.
Further, as a preferred embodiment, the central processing module is further configured to: and issuing a sampling period to a sampling address generation module. The sampling period can be adjusted in real time according to the requirement; and, in the sampling address generation module, the sampling period can be completed by a built-in timer. On this basis, as an alternative embodiment, as shown in fig. 1, the apparatus further includes a configuration module. The configuration module is used for: and configuring the sampling period issued by the central processing module to a sampling address generation module.
Further, as an optional implementation manner, as shown in fig. 1, the device further includes a reporting module. The reporting module is used for: and reporting the storage completion indication generated by the sampling address change judging module to a central processing module. In practical application, when the reporting module reports the storage completion instruction, the reporting module may include the following three modes:
(1) Transmitting to the central processing module in a packet mode;
(2) Transmitting to the central processing module in a DMA (Direct Memory Access ) mode;
(3) For the central processing module to actively read.
It can be appreciated that, since the memory module in this embodiment needs to achieve the RAM parallel access effect, in order to better understand the specific embodiment of the present invention, the embodiment of the memory module capable of achieving the RAM parallel access will be described in detail below by using two examples.
Example two
The basic structure of the data frame statistics collection device provided in this embodiment is the same as that of the first embodiment, and is different in that, as a preferred implementation manner, as shown in fig. 2, the storage modules include storage areas with the same number as that of the statistics modules, and each storage area corresponds to one of the statistics modules. The storage modules store the statistical values of the statistical modules into corresponding storage areas according to a one-to-one correspondence mode. For example, if N storage areas are provided for the statistics modules, N storage areas will be provided in each storage module, and the statistics values of the statistics modules 1 will be stored in the storage areas 1 of the storage modules, the statistics values of the statistics modules 2 will be stored in the storage areas 2 of the storage modules, and the statistics values of the statistics modules N will be stored in the storage areas N of the storage modules, i.e. the storage areas correspond to the statistics modules one by one.
In this embodiment, each statistical module corresponds to a respective independent storage area, so that parallel storage can be performed, thereby achieving the effect of parallel access of the RAM. In addition, by adopting the design mode of the embodiment, each statistical module can have independent storage areas, and data from different statistical modules can be distinguished through different storage areas when the statistical values are read later, so that the follow-up statistical analysis is facilitated.
Example III
The basic structure of the data frame statistics collection device provided in this embodiment is the same as that of the first embodiment, except that, as a preferred implementation manner, as shown in fig. 3, the storage module includes at least one storage area, and the storage module stores the statistics values of each statistics module into the corresponding storage area in a time division multiplexing manner. For example, assuming that N statistical modules are provided, M storage areas may be provided in each storage module, where N is not associated with M; when the storage module performs storage, according to a time division multiplexing mode, a time 1 responds to a read-write request of the statistics module 1 and stores the read-write request of the statistics module 2 in the storage area 1, a time 2 responds to a read-write request of the statistics module 2 and stores the read-write request of the statistics module Y in the storage area M, and the like.
In this embodiment, the memory module stores in a time division multiplexing manner, so that the RAM parallel access effect can be achieved. In addition, compared with the design mode of the second embodiment, the number of the set storage areas is not limited, and each storage area can be reused, so that the flexibility is higher and the resource utilization rate is better.
Example IV
Referring to fig. 4, based on the same inventive concept, the embodiment of the invention further provides a data frame statistics acquisition method, which includes the following steps:
s1, when a data packet is input, the sampling address generation module generates a storage module address corresponding to the data packet based on a sampling period, and marks the data packet by taking the generated address as a mark;
s2, the marked data packets sequentially enter each statistic module, each statistic module counts the data packets according to service requirements, and the statistic values are stored in the corresponding storage modules according to the storage module addresses marked by the data packets; the storage module stores the received statistic value in a RAM parallel access mode;
s3, the sampling address change judging module detects whether the address of the storage module changes, if so, a storage completion instruction of the corresponding storage module is generated and transmitted to the central processing module;
and S4, after the central processing module acquires the storage completion instruction, reading the corresponding storage module according to the reading requirement.
In addition, it should be noted that, since the method of the present embodiment is similar to the devices of the first, second and third embodiments in terms of solving the problem, the implementation of the method may refer to the implementation of the device, and the repetition is omitted.
Note that: the particular embodiments described above are illustrative only and not restrictive, and those skilled in the art may combine and combine steps and means from the various embodiments described above separately to achieve the benefits of the present invention in accordance with the concepts of the present invention, such combined and combined embodiments also being encompassed by the present invention, such combination and combination not being described in detail herein.
The advantages, effects, etc. mentioned in the embodiments of the present invention are merely examples, and are not to be construed as necessarily limiting the various embodiments of the present invention. In addition, the foregoing specific details of the embodiments of the invention have been disclosed for purposes of illustration and understanding only, and are not intended to be limiting, since the embodiments of the invention must not be practiced with the specific details.
The block diagrams of the devices, apparatuses, devices, systems according to the embodiments of the present invention are merely illustrative examples, and are not intended to require or imply that connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used in embodiments of the present invention refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used in embodiments of the present invention refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The step flow diagrams in the embodiments of the invention and the method descriptions above are merely illustrative examples and are not intended to require or imply that the steps of the various embodiments must be performed in the order presented. The order of steps in the above embodiments may be performed in any order, as will be appreciated by those skilled in the art. Words such as "thereafter," "then," "next," and the like are not intended to limit the order of the steps; these words are simply used to guide the reader through the description of these methods. Furthermore, any reference to an element in the singular, for example, using the articles "a," "an," or "the," is not to be construed as limiting the element to the singular.
In addition, the steps and means in the various embodiments of the present invention are not limited to practice in a certain embodiment, and indeed, the relevant partial steps and partial means in the various embodiments herein may be combined according to the concept of the present invention to contemplate new embodiments, which are also included in the scope of the present invention.
The operations of embodiments of the present invention may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and/or software components and/or modules including, but not limited to, circuitry or a processor of the hardware.
The method of an embodiment of the invention includes one or more acts for implementing the method described above. The methods and/or acts may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of acts is specified, the order and/or use of specific acts may be modified without departing from the scope of the claims.
The functions of the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions on a tangible computer-readable medium. A storage media may be any available tangible media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. As used herein, discs (disks) and disks include Compact Disks (CDs), laser disks, optical disks, DVDs (Digital Versatile Disc, digital versatile disks), floppy disks, and blu-ray disks where disks reproduce data magnetically, while disks reproduce data optically with lasers.
Thus, the computer program product may perform the operations presented herein. For example, such a computer program product may be a computer-readable tangible medium having instructions tangibly stored (and/or encoded) thereon, the instructions being executable by one or more processors to perform the operations described herein. The computer program product may comprise packaged material.
Other examples and implementations are within the scope and spirit of embodiments of the invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired or any combination of these. Features that implement the functions may also be physically located at various locations including being distributed such that portions of the functions are implemented at different physical locations.
Various changes, substitutions, and alterations to the techniques described herein may be made by those skilled in the art without departing from the teachings as defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. The processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the invention to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof. And what is not described in detail in this specification is prior art known to those skilled in the art.

Claims (11)

1. The utility model provides a data frame statistics collection system which characterized in that: the device comprises a sampling address generation module, at least one statistics module, at least two storage modules, a sampling address change judgment module and a central processing module;
the sampling address generation module is used for: when a data packet enters, generating a storage module address corresponding to the data packet based on a sampling period, and marking the data packet by taking the generated address as a mark;
the statistics module is used for: counting the data packets according to service requirements, and storing the counted values into corresponding storage modules according to the storage module addresses marked by the data packets;
the storage module is used for: storing the received statistical value in a RAM parallel access mode;
the sampling address change judging module is used for: detecting whether the address of the storage module changes, and if so, generating a storage completion instruction of the corresponding storage module; and transmitting the storage completion indication to the central processing module;
the central processing module is used for: and after the storage completion instruction is obtained, reading the corresponding storage module according to the reading requirement.
2. The data frame statistics acquisition apparatus of claim 1, wherein: the sampling address generating module generates a storage module address corresponding to the data packet based on a sampling period, and specifically includes:
and the sampling address generation module sequentially and circularly selects a corresponding storage module according to the number of the storage modules by taking the sampling period as a unit, and takes the address of the storage module as the address of the storage module corresponding to the data packet.
3. The data frame statistics acquisition apparatus of claim 1, wherein: the sampling address generating module generates a storage module address corresponding to the data packet based on a sampling period, and specifically includes:
the sampling address generation module selects a corresponding one for storage according to the number of the storage modules and a preset random algorithm by taking the sampling period as a unit, and takes the address of the storage module as the address of the storage module corresponding to the data packet.
4. The data frame statistics acquisition apparatus of claim 1, wherein: the storage modules comprise storage areas with the same quantity as the statistic modules;
the storage modules store the statistical values of the statistical modules into corresponding storage areas according to a one-to-one correspondence mode.
5. The data frame statistics acquisition apparatus of claim 1, wherein: the memory module comprises at least one memory area;
the storage module stores the statistic value of each statistic module into a corresponding storage area according to a time division multiplexing mode.
6. The data frame statistics acquisition apparatus of claim 1, wherein the central processing module is further configured to: issuing a sampling period to a sampling address generation module;
the apparatus further comprises a configuration module for: and configuring the sampling period issued by the central processing module to a sampling address generation module.
7. The data frame statistics collection apparatus of claim 1, further comprising a reporting module configured to: and reporting the storage completion indication generated by the sampling address change judging module to a central processing module.
8. The data frame statistics collection apparatus of claim 7, wherein when the reporting module reports the storage completion indication, the following manner is adopted: either in a packed manner or in a DMA manner or for active reading by the central processing module.
9. The data frame statistics and collection device according to claim 1, wherein the central processing module reads the corresponding storage module according to the reading requirement, specifically comprising:
and the central processing module reads only one storage module with the storage completion indication at a time or simultaneously reads a plurality of storage modules with the storage completion indication according to the reading requirement.
10. The data frame statistics acquisition apparatus of claim 1, wherein: the central processing module is a CPU or a software module.
11. A method of statistical acquisition of data frames based on the device of any one of claims 1 to 10, characterized in that it comprises the steps of:
when a data packet enters, the sampling address generation module generates a storage module address corresponding to the data packet based on a sampling period, and marks the data packet by taking the generated address as a mark;
the marked data packets sequentially enter each statistic module, each statistic module counts the data packets according to service requirements, and the statistic values are stored in the corresponding storage modules according to the storage module addresses marked by the data packets; the storage module stores the received statistic value in a RAM parallel access mode;
the sampling address change judging module detects whether the address of the storage module changes, if so, a storage completion instruction of the corresponding storage module is generated and transmitted to the central processing module;
after the central processing module acquires the storage completion instruction, the corresponding storage module is read according to the reading requirement.
CN202210015463.XA 2022-01-07 2022-01-07 Data frame statistics acquisition device and method Active CN114385083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210015463.XA CN114385083B (en) 2022-01-07 2022-01-07 Data frame statistics acquisition device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210015463.XA CN114385083B (en) 2022-01-07 2022-01-07 Data frame statistics acquisition device and method

Publications (2)

Publication Number Publication Date
CN114385083A CN114385083A (en) 2022-04-22
CN114385083B true CN114385083B (en) 2023-05-23

Family

ID=81199481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210015463.XA Active CN114385083B (en) 2022-01-07 2022-01-07 Data frame statistics acquisition device and method

Country Status (1)

Country Link
CN (1) CN114385083B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0694843A1 (en) * 1994-07-29 1996-01-31 Siemens Aktiengesellschaft Method for controlling a sequence of processor accesses to an associated memory
CN101416167A (en) * 2006-07-20 2009-04-22 日本电气株式会社 Memory access control device, memory access control method, data storage method, and memory access control program
CN106095328A (en) * 2015-04-29 2016-11-09 马维尔以色列(M.I.S.L.)有限公司 Each cycle has a read port and the multi-bank memory of one or more write port
JP2017163272A (en) * 2016-03-08 2017-09-14 富士通株式会社 Packet analysis program, packet analysis method, and packet analysis device
CN109901472A (en) * 2019-03-20 2019-06-18 电子科技大学 A kind of sequential equivalent system based on FPGA

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210004322A (en) * 2019-07-04 2021-01-13 에스케이하이닉스 주식회사 Apparatus and method for transmitting map information and read count in memory system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0694843A1 (en) * 1994-07-29 1996-01-31 Siemens Aktiengesellschaft Method for controlling a sequence of processor accesses to an associated memory
CN101416167A (en) * 2006-07-20 2009-04-22 日本电气株式会社 Memory access control device, memory access control method, data storage method, and memory access control program
CN106095328A (en) * 2015-04-29 2016-11-09 马维尔以色列(M.I.S.L.)有限公司 Each cycle has a read port and the multi-bank memory of one or more write port
JP2017163272A (en) * 2016-03-08 2017-09-14 富士通株式会社 Packet analysis program, packet analysis method, and packet analysis device
CN109901472A (en) * 2019-03-20 2019-06-18 电子科技大学 A kind of sequential equivalent system based on FPGA

Also Published As

Publication number Publication date
CN114385083A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
CN101534230B (en) A method for sending data based on Ethernet, Ethernet nodes and a control system
CN101599894B (en) Method, device and system for processing messages containing clock information
CN105634804B (en) A kind of service dial testing method, device and system
CN104156255B (en) A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host
CN103188116A (en) Network performance detection method and system of blade server
CN111966289A (en) Partition optimization method and system based on Kafka cluster
CN108616556B (en) Data processing method, device and system
CN101841436A (en) Method for testing performance of IPFIX (Internet Protocol Flow Information Export) server, device and system thereof
CN109412875A (en) Zookeeper cluster automatic maintenance method and device
CN112422361A (en) Switch testing method, device and medium
CN114385083B (en) Data frame statistics acquisition device and method
CN106358237A (en) Mobile terminal and traffic sharing control method thereof
CN113791892B (en) Data path arbitration method, data path arbitration device and chip
CN105516023A (en) Message forwarding method and apparatus
CN104281587B (en) A kind of method and device for establishing connection
CN105024875A (en) Method and system for measuring network flow rate of broadband classified users
CN102143533A (en) Methods and equipment for reporting information generated in random access process and determining parameters
CN108833304A (en) The management method and device of message in cloud data system
CN103095525B (en) Based on intelligent exchange process layer network virtual secondary circuit monitoring method and system
CN109117295A (en) A kind of overtime monitoring method of transaction and device
CN102217257A (en) Method, destination network node apparatus and mobile transmission network system for processing packet loss
CN102612058B (en) Method and device for determining performance index statistical result
CN103986601A (en) Message transmission delay obtaining method and device
CN108880930A (en) A kind of detection method and equipment of network loop
CN111787584B (en) Data acquisition method and system based on Internet of things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant