Multi-subframe cascade equipment data caching method and system

By calculating TRIX and TRMA indicators, the data loss and transmission timeout problems in multi-subframe cascade devices are solved, and the stability of data transmission and device performance are improved.

CN119011671AActive Publication Date: 2024-11-22FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411031184.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-22
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In a multi-subframe cascade device, due to the insufficient default cache preset by the upstream cascade subframe switching chip and limited data processing capabilities, data congestion, cache overflow, and data delay are prone to occur when there is a large amount of burst data between the boxes. Problems such as sending can lead to data loss or transmission timeout.

Method used

By calculating the triple exponential smooth average (TRIX) and triangular moving average (TRMA) indicators, dynamically manage the on and off of the first-level cache and the second-level cache, and use the first-level cache and the second-level cache to store data to ensure that the data transmission is not Performs when the preset rate exceeds to avoid cache overflow.

Benefits of technology

It effectively avoids data loss or transmission timeout caused by cache overflow, improves the data caching capability of the subframe, improves the overall performance of the equipment, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011671A_ABST
    Figure CN119011671A_ABST
Patent Text Reader

Abstract

A multi-subframe cascade device data caching method and system belong to the technical field of storage space management, and the method comprises the following steps: for each subframe, collecting the data inflow of a switch chip, the first-level cache data outflow, and the total data cache amount of the switch chip; calculating a TRIX index and a TRMA index of the first-level cache data outflow volume of the current period in combination with the period number and the data outflow volume; calculating a correction value of the TRIX index in the current period and a corrected MTRIX index by combining the period number, the data outflow volume threshold, the data outflow volume and the total data cache amount; when the first-level cache data outflow volume exceeds the data outflow volume threshold and the MTRIX index is greater than the TRMA index in a plurality of continuous sampling periods, starting the second-level cache; and after the second-level cache is opened, closing the second-level cache when the MTRIX index is smaller than the TRMA index. According to the method and the device, the trend change of the data flow flowing into and out of each sub-frame exchange chip can be accurately pre-judged, and the second-level cache is started and closed in time to ensure the data caching capability of the sub-frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage space management, and in particular to a multi-subframe cascade device data caching method and system. Background Art

[0002] To meet the rapid development of big data services such as 5G / AR / VR, transmission equipment is becoming increasingly complex. To meet the needs of big data services, the functions of a network element usually need to be cascaded by multiple sub-frames and implemented based on the boards (also known as single disks) in multiple sub-frames. When the number of cascaded sub-frames and single disks is large, the communication data carried by the upstream cascaded sub-frame switching chip will increase dramatically.

[0003] When the default cache preset by the upstream cascaded sub-frame switching chip is insufficient and the data processing capacity is limited, and there is a large amount of burst data between frames (such as broadcast collection performance, single-disk configuration, etc.), the switching chip is prone to data congestion, cache overflow, delayed data transmission and other problems, which in turn lead to problems such as data loss or transmission timeout between frames. Summary of the invention

[0004] The present application provides a multi-sub-frame cascade device data caching method and system, which can solve the technical problems in the prior art that when there is a large amount of burst data between frames, it is easy to cause data loss or transmission timeout due to the limited default cache and data processing capacity preset by the sub-frame switching chip.

[0005] In a first aspect, an embodiment of the present application provides a multi-subframe cascade device data caching method, the method comprising:

[0006] For each sub-frame, the data inflow of its switch chip, the data outflow of the first-level cache, and the total data cache of the switch chip are collected in each sampling period;

[0007] Combined with the number of the current sampling cycle, the number of the lookback cycle, and the data outflow volume of the first-level cache in each sampling cycle, the triple exponential smoothing average (TRIX) indicator of the data outflow volume of the first-level cache in the current sampling cycle is calculated. The TRIX indicator is used to characterize the change trend of the data outflow volume of the first-level cache in the current sampling cycle;

[0008] Combined with the current sampling period number, the outflow volume of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the outflow volume of the first-level cache in each sampling period, the correction value of the TRIX index of the current sampling period and the corrected TRIX index are calculated; the correction value is positively correlated with the outflow volume of the data and the total amount of the data cache, and negatively correlated with the preset threshold value;

[0009] Combine the current sampling period and the TRIX indicator to calculate the triangular moving average (TRMA) indicator of the TRIX indicator in the specified period;

[0010] When the data outflow from the first-level cache exceeds the preset threshold value in multiple consecutive sampling periods and the corrected TRIX indicator is greater than the TRMA indicator, the second-level cache of the sub-frame is started, and the first-level cache and the second-level cache are used to store data; when the corrected TRIX indicator is not greater than the TRMA indicator, the second-level cache of the sub-frame is closed, and the first-level cache is used to store data.

[0011] In combination with the first aspect, in one implementation, the first-level cache is a default storage space in a switch chip;

[0012] The secondary cache is additional storage space in the switch chip and / or other storage units in the sub-frame.

[0013] In combination with the first aspect, in one implementation, the calculation of the TRIX indicator specifically includes the following steps:

[0014] Calculate the data outflow D of the first-level cache in the mth sampling period m The exponential average AX of N lookback periods m , then:

[0015] AX m =(2×D m +(N-1)×AX m-1 ) / (N+1)

[0016] Calculate AX for the mth sampling period m The exponential average value BX of N retrospective periods m , then:

[0017] BX m =(2×AX m +(N-1)×BX m-1 ) / (N+1)

[0018] Calculate BX for the mth sampling period m The exponential average of N lookback periods TRIX m , then:

[0019] TRIX m =(2*BX m +(N-1)*TRIX m-1 ) / (N+1).

[0020] In combination with the first aspect, in one implementation, the correction value of the current sampling period is calculated using the following formula:

[0021] δ m =[(D out_m -D th )+DIF m ] / D th

[0022] in,

[0023] m represents the period number of the current sampling period;

[0024] δ m Represents the correction value of the mth sampling period;

[0025] Dout_ m Indicates the data outflow of the first-level cache in the mth sampling period;

[0026] Dth represents the preset threshold value of the first-level cache in each sampling period; the preset threshold value is 70% to 80% of the maximum amount of data interaction between the first-level cache in a single cycle frame in each sampling period;

[0027] DIF m Indicates the total amount of data cache of the exchange chip at the end of the mth sampling period.

[0028] In combination with the first aspect, in one implementation, the modified TRIX index is calculated using the following formula:

[0029] M_TRIX m =TRIX m +δ m

[0030] in,

[0031] m represents the period number of the current sampling period;

[0032] M_TRIX m Indicates the mth sampling period for TRIX m Corrected value;

[0033] TRIX m The TRIX indicator representing the amount of data outflow from the first-level cache in the mth sampling period;

[0034] δ m Indicates the correction value of the mth sampling period.

[0035] In combination with the first aspect, in one implementation, the TRMA index is calculated using the following formula:

[0036]

[0037] in,

[0038] TRMAm Indicates TRIX of the mth sampling period m The moving average value of the value in M ​​specified periods;

[0039] M is used to calculate TRIX m The specified number of periods;

[0040] m represents the period number of the current sampling period;

[0041] TRIX i The TRIX value representing the amount of data outflow from the L1 cache in the i-th sampling period.

[0042] In combination with the first aspect, in one implementation, the period is calculated using the following formula:

[0043]

[0044] in,

[0045] T represents the duration of the sampling period;

[0046] Cach_total indicates the storage space capacity of the first-level cache;

[0047] Rated indicates the maximum rate of inter-chassis data communication per second of the L1 cache in each sampling period;

[0048] N represents the number of lookback periods for calculating the TRIX indicator.

[0049] In combination with the first aspect, in one implementation, the method further includes:

[0050] After the secondary cache is turned on, when sending data to the control disk, the data is stored in the secondary cache and preprocessed, and then the preprocessed data is stored from the secondary cache to the primary cache according to the maximum rate of inter-frame data communication per second of the primary cache in each sampling period, and the control disk extracts the corresponding data from the primary cache;

[0051] After closing the secondary cache, when sending data to the control disk, the data is stored in the primary cache, and the control disk extracts the corresponding data from the primary cache;

[0052] The control disk sends data outward through the first-level cache at a transmission rate that does not exceed the maximum rate of inter-frame data communication per second of each preset sampling period.

[0053] In combination with the first aspect, in one implementation, the method further includes:

[0054] The preprocessing includes classifying the data and then merging and compressing each type of data.

[0055] In a second aspect, an embodiment of the present application provides a multi-subframe cascade device data cache system, the system comprising:

[0056] A data collection module is used to collect the data inflow of the switching chip, the data outflow of the first-level cache, and the total data cache of the switching chip for each sub-frame in each sampling period;

[0057] A data processing module is used to calculate the triple exponential smoothing average (TRIX) index of the data outflow of the first-level cache in the current sampling period by combining the number of the current sampling period, the number of the backtracking period, and the data outflow of the first-level cache in each sampling period, wherein the TRIX index is used to characterize the change trend of the data outflow of the first-level cache in the current adoption period; a correction value of the TRIX index of the current sampling period and a corrected TRIX index are calculated by combining the number of the current sampling period, the data outflow of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the data outflow of the first-level cache in each sampling period; the correction value is positively correlated with the data outflow and the total amount of the data cache, and negatively correlated with the preset threshold value; a moving average (TRMA) index of the TRIX index in a specified period is calculated by combining the number of the current sampling period and the TRIX index;

[0058] A cache management module is used to start the secondary cache of the subframe and use the primary cache and the secondary cache to store data when the data outflow of the primary cache exceeds the preset threshold value in multiple consecutive sampling periods and the corrected TRIX indicator is greater than the TRMA indicator; when the corrected TRIX indicator is not greater than the TRMA indicator, close the secondary cache of the subframe and use the primary cache to store data.

[0059] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0060] Combined with the number of the current sampling cycle, the number of the backtracking cycle, the data inflow of the switching chip in each sampling cycle, the data outflow of the first-level cache, and the total data cache of the switching chip, the TRMA index, the TRIX index and the modified M_TRIX index of the data outflow of the current sampling cycle are calculated. Compared with the TRIX index, the modified TRIX index (i.e., the M_TRIX index) can more accurately predict the trend of the change of the data outflow of the first-level cache. By comparing the M_TRIX index with the mean TRMA index, it is possible to accurately predict whether the trend of the change of the data outflow of the first-level cache is strengthening or weakening, so as to determine whether to open or close the second-level cache in advance, that is, to quickly open the second-level cache in advance before the data transmission volume between the frames surges to improve the data cache capacity of the sub-frame, avoid data loss or transmission timeout caused by cache overflow, and close the second-level cache switch when the data outflow volume between the frames and the total data cache have fallen back to normal levels and there will be no cache overflow, so as to release the second-level cache for other functions and improve the overall performance of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a flow chart of an embodiment of a multi-subframe cascade device data caching method of the present application;

[0062] Figure 2 This is a schematic diagram of the architecture of an embodiment of a multi-subframe cascade device of the present application;

[0063] Figure 3 This is a schematic diagram of the internal data flow of the switching chip when the secondary cache switch is turned off in an embodiment of the present application;

[0064] Figure 4 This is a schematic diagram of the internal data flow of the switching chip when the secondary cache switch is turned on in an embodiment of the present application;

[0065] Figure 5 This is a schematic diagram of the data volume and index value of the switching chip in each cycle obtained from actual testing in an embodiment of the present application;

[0066] Figure 6 This is a schematic diagram of the total amount of cache of a switching chip in each cycle obtained from actual testing in an embodiment of the present application;

[0067] Figure 7 This is a functional module diagram of an embodiment of a multi-subframe cascade device data cache system of the present application. DETAILED DESCRIPTION

[0068] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] First, some technical terms in the present application are explained to facilitate those skilled in the art to understand the present application.

[0070] TRIX indicator: Triple Exponentially Smoothed Average, full name is triple exponential smoothed average, it is a medium- and long-term indicator, a long-term technical analysis tool for studying stock price trends (or the decay trend of building life, etc.). It filters out many unnecessary fluctuations to reflect the long-term fluctuation trend of stock prices.

[0071] TRMA indicator: Triangular Moving Average in English, the full name is triangular moving average, which is a dynamic technical indicator. It is a moving average that calculates price fluctuations. It can be used to confirm the direction of price trends (or the decay trend of building life, etc.) and judge the strength of the trend.

[0072] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0073] In a first aspect, an embodiment of the present application provides a data caching method for a multi-subframe cascade device.

[0074] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a multi-subframe cascade device data caching method of the present application, as shown in FIG. Figure 1 As shown, the data caching method for multi-subframe cascade devices includes:

[0075] Step S1: for each sub-frame, the data inflow of the switch chip, the data outflow of the first-level cache, and the total data cache of the switch chip are collected in each sampling period.

[0076] Step S2, combining the number of the current sampling cycle, the number of the backtracking cycle, and the data outflow volume of the first-level cache in each sampling cycle, calculate the TRIX index of the data outflow volume of the current sampling cycle. The TRIX index is used to characterize the change trend of the data outflow volume of the first-level cache in the backtracking cycle.

[0077] Step S3, combining the current sampling period number, the outflow volume of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the outflow volume of the first-level cache in each sampling period, calculate the correction value of the TRIX index of the current sampling period and the corrected TRIX index. The correction value is positively correlated with the outflow volume of data and the total amount of data cache, and negatively correlated with the preset threshold value.

[0078] Step S4: Combine the current sampling period number and the TRIX indicator to calculate the TRMA indicator of the TRIX indicator in the specified period.

[0079] Step S5: When the data outflow exceeds the preset threshold value in multiple consecutive sampling periods and the modified TRIX index is greater than the TRMA index, the secondary cache of the subframe is started, and the primary cache and the secondary cache are used to store data. When the modified TRIX index is not greater than the TRMA index, the secondary cache of the subframe is closed, and the primary cache is used to store data.

[0080] In this embodiment, refer to Figure 2 , Figure 2 This is a schematic diagram of the architecture of an embodiment of a multi-subframe cascade device of the present application. Usually, the function of a network element needs to be implemented by multiple subframes after cascading based on the single disks in the multiple subframes, wherein the multiple single disks in the subframe can be divided into a control disk (referred to as frame control) and a service disk. The control disk in the same subframe manages each service disk. All single disks in the same subframe are connected to the switching chip in the frame, and the default cache of the switching chip is the first-level cache of the subframe. The control disk is responsible for data transmission with the service disk in the subframe and the upstream and downstream subframes cascaded with it. The interactive data between the control disk and the service disk in the subframe is the intra-frame data, and the interactive data between the control disk and other subframes is the inter-frame data. Both the inter-frame data and the intra-frame data enter and exit from the first-level cache.

[0081] The switching chip is usually integrated in the control panel, and can also be integrated in the service panel or sub-frame. At the same time, each sub-frame is cascaded with the upstream and downstream sub-frames through the data interface (such as Ethernet port) and network connection line (such as RJ45 line) in the frame. The data interface in the frame is connected to the switching chip, and the control panel transmits data with the outside through the switching chip.

[0082] Among all control panels, the control panel used to manage all sub-frames and single disks of the entire network element is the main control panel. Other control panels are called frame control panels. The sub-frame where the main control panel is located is the main frame, and the other sub-frames are extension frames.

[0083] Under normal circumstances, the inter-frame data traffic between the control disk and each service disk in the sub-frame and each single disk in other sub-frames is relatively balanced and the data traffic is small. That is, under normal circumstances, the rate of inter-frame data flowing out of the first-level cache is much lower than the designed maximum rate of inter-frame data. The maximum rate of inter-frame data refers to the maximum rate of inter-frame data communication per second of the first-level cache in each sampling period.

[0084] When there is a large amount of burst data between frames (such as broadcast collection performance, single-disk configuration, etc.), the inter-frame data flowing into the first-level cache increases sharply. When the rate of intra-frame data and inter-frame data flowing into the first-level cache is greater than the designed maximum inter-frame data rate, the first-level cache will usually only send inter-frame data outward at the preset maximum inter-frame data rate.

[0085] In addition, the in-frame data that interacts between the business disk and the main control disk on the downstream cascade sub-frame must pass through the first-level cache on the upstream cascade sub-frame, resulting in a larger amount of circulating data in the first-level cache on the cascade sub-frame that is closer to the main frame. That is, when the number of cascaded sub-frames and single disks is large, the communication data carried by the first-level cache of the upstream cascade sub-frame will increase sharply. Therefore, the first-level cache on the upstream cascade sub-frame is more likely to have problems such as data congestion, cache overflow, and delayed data transmission due to insufficient preset cache.

[0086] In order to solve the problem that the default cache space preset by the switching chip or the cascade sub-frame is insufficient, and the data processing capacity is limited, the present invention combines the above-mentioned sampling cycle number, the number of the backtracking cycle, and the data inflow of the switching chip in each sampling cycle, the first-level cache data outflow and the total amount of data cache of the switching chip (referred to as the cache amount), and calculates the TRMA index, TRIX index and the modified M_TRIX index of the data outflow of the current sampling cycle. Compared with the TRIX index, the modified TRIX index (i.e., the M_TRIX index) can more accurately predict the change trend of the first-level cache data outflow. By comparing the M_TRIX index with the mean TRMA index, it is possible to accurately predict whether the change trend of the first-level cache data outflow is strengthening or weakening, thereby determining whether to open or close the second-level cache switch in advance, that is, to open the second-level cache in advance before the data transmission between the frames surges to improve the data caching capacity of the sub-frame, and avoid problems such as data loss or transmission timeout. That is, when the inter-frame data outflow and the total amount of data cache have returned to normal levels and no cache overflow will occur, turn off the L2 cache switch to release the L2 cache for other functions and improve the overall performance of the device.

[0087] Furthermore, in one embodiment, the above-mentioned first-level cache is a default storage space in the switching chip.

[0088] The above-mentioned secondary cache is an additional storage space in the switching chip and / or other storage units in the above-mentioned sub-frame.

[0089] In this embodiment, the secondary cache may be other caches / slices in the switch chip except the default cache, or may be other storage units in the subframe except the switch chip, such as a memory chip.

[0090] The switch chip is a conventional configuration that provides a first-level cache in a subframe, and the memory chip is a conventional configuration in some subframes or a chip that is easy to add to and manage in a subframe. Therefore, the first-level cache and the second-level cache can be used to improve the data cache capacity of the subframe. If the subframe itself has a switch chip and a memory chip, this method can improve the storage capacity without involving the addition and improvement of hardware, and can reduce the cost of multi-cascade subframe equipment.

[0091] Furthermore, in one embodiment, the calculation of the TRIX indicator specifically includes the following steps:

[0092] Calculate the data outflow volume D of the first-level cache in the mth sampling cycle m The exponential average AX of N lookback periods m , then:

[0093] AX m =(2×D m +(N-1)×AX m-1 ) / (N+1)

[0094] Calculate AX for the mth sampling period m The exponential average value BX of N retrospective periods m , then:

[0095] BX m =(2×AX m +(N-1)×BX m-1 ) / (N+1)

[0096] Calculate BX for the mth sampling period m The exponential average of N lookback periods TRIX m , then:

[0097] TRIX m =(2*BX m +(N-1)*TRIX m-1 ) / (N+1).

[0098] In this embodiment, refer to Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of the internal architecture of a switching chip in an embodiment of the present application. Figure 4Schematic diagram of the internal data flow of the switching chip when the secondary cache switch is turned on in one embodiment of the present application. Figure 3 and Figure 4 As shown, the switch chip includes a default cache and a secondary cache. The default cache is also the primary cache. The secondary cache is started and closed by the secondary cache switch (not shown in the figure). After the secondary cache is started, it can receive and store data, and then the secondary cache sends the data to the primary cache for storage. After the secondary cache is closed, it no longer receives data. Port1, port2, and port3 are both data inflow ports and data outflow ports. The solid arrows in the figure are the data inflow direction, and the dotted arrows in the figure are the data outflow direction.

[0099] The switching chip also includes a data transceiver unit 11, a traffic monitoring unit 21, a data cache preprocessing unit 32, and a data sending preprocessing unit 31. The data transceiver unit 11 is responsible for receiving and sending data from each port that the control disk communicates with other single disks through the first-level cache, and sending the data to the traffic monitoring unit 21 for data analysis. The data cache preprocessing unit 32 can preprocess the data that needs to be stored in the second-level cache, and the data sending preprocessing unit 31 can preprocess the data output by the second-level cache.

[0100] Specifically, the traffic monitoring unit 21 periodically (according to a sampling period) analyzes the data that the control disk communicates with other single disks through the switching chip, and counts the amount of data flowing into and out of the switching chip.

[0101] The traffic monitoring unit 21 takes a period of time T as a cycle, counts the data inflow Din of the switching chip and the data outflow Dout of the first-level cache within a sampling period, and calculates the total data cache DIF = (Din-Dout) in the current sampling period. Din is the amount of data flowing into the first-level cache before turning on the second-level cache switch, and is the amount of data flowing into the second-level cache after turning on the second-level cache switch.

[0102] In addition, the traffic monitoring unit 21 counts the total amount of data cache in each cycle. For example, at the end of the mth sampling cycle, the total amount of data cache of the switching chip DIF m The following formula (1) is used to calculate:

[0103]

[0104] TRIX is a long-term technical analysis indicator for studying commodity price trends, which can be used to predict the future growth and decline trends of commodity prices. The data outflow volume Dout of the first-level cache at the end of each sampling period is used as the commodity price, and the improved TRIX algorithm is used to calculate its M_TRIX indicator value. The M_TRIX indicator can be used to predict the growth or decline trend of the first-level cache data outflow volume, and turn on and off the data second-level cache switch when the M_TRIX indicator value meets the conditions.

[0105] The amount of data outflow from the first-level cache during the current sampling period (assuming it is the mth sampling period) is D m The average index value of N retrospective periods AX is denoted as AX m , AX m-1 is the amount of L1 cache data outflow calculated in the previous sampling period D m-1 The exponential average of N backtracking periods. The backtracking period is the number of past sampling periods including the current sampling period. The value of the number of backtracking periods N is selected according to actual needs. m The following formula (2) is used to calculate:

[0106] AX m =(2 × D m + (N - 1) × AX m-1 ) / (N + 1) (2)

[0107] The average value of the N back-test period exponentials of the current sampling period AX is BX, denoted as BX m , BX m-1 AX calculated for the previous sampling period m-1 The exponential average of N lookback periods. BX m The following formula (3) is used to calculate:

[0108] BX m = (2 × AX m + (N - 1) × BX m-1 ) / (N + 1) (3)

[0109] The average value of the N back-test period index TRIX of the current sampling period BX, denoted as TRIX m , TRIX m-1 BX calculated for the previous sampling period m-1 The exponential average of N lookback periods. TRIX m The following formula (4) is used to calculate:

[0110] TRIX m = (2 * BX m + (N - 1)* TRIXm-1 ) / (N + 1) (4)

[0111] The M-period moving average TRMA of the TRIX value of the current sampling period, denoted as TRMA m , TRMA i Indicates the TRIX value of the ith period. The value of the specified period number M is selected according to actual needs. TRMA m The following formula (5) is used to calculate:

[0112]

[0113] Among them, TRMA m Indicates TRIX of the current sampling period m m The moving average of the M specified periods of the value. M represents the value used to calculate TRIX m TRIX is the specified cycle number. m is the cycle number of the current sampling cycle. i Indicates the TRIX indicator value of the i-th sampling period.

[0114] Traditional usage of TRIX: m >TRMA m , indicating that the upward momentum of commodity prices is strengthening. You can consider buying commodities at low prices in combination with other indicators. m <TRMA m , indicating that the downward momentum of commodity prices is strengthening, and other indicators can be combined to consider selling commodities at high levels.

[0115] Most of the time, the data flow between frames is relatively small, and the Dout of each sampling period is m Relatively stable and meets TRIX m <TRMA m When the data traffic between frames increases gradually, Dout m Corresponding TRIX m 、TRMA m will increase accordingly (TRIX m Growth trend than TRMA m According to the traditional usage, once TRIX appears m >TRMA m Then perform a buy operation, that is, turn on the data secondary cache switch.

[0116] When the actual data flow between frames is low and the first-level cache consumption is very small, occasional large changes in flow may also cause TRIX m >TRMA mThis will inevitably lead to unnecessary switching actions on the L2 cache. In order to increase the reliability and availability of judging the growth or decline trend of data outflow between L1 cache frames, based on the characteristics of data traffic flowing through the L1 cache, we have modified the traditional TRIX m The calculation method is improved, that is, the TRIX obtained by the traditional calculation method is corrected by using the correction value. m By making corrections, we can obtain the TRIX indicator that can more accurately reflect the trend of data outflow between L1 cache frames.

[0117] Furthermore, according to conventional usage, if each sampling period Dout m The TRIX value is not modified. Once TRIX m <TRMA m , then a sell operation is made, that is, the secondary cache switch is turned off, and there may be a risk of cache overflow. m The value decreases, and TRIX m <TRMA m It only means that the amount of inter-frame data flowing out of the first-level cache is decreasing, that is, it shows a downward trend, but it does not mean that the previously cached inter-frame data and intra-frame data have been processed, nor does it mean that no data flows into the first-level cache at this time. At this time, the total amount of data cache in the switching chip may still be at a high level (the data inflow has been greater than the data outflow for a long time in the early stage, resulting in a large amount of cached data in the switching chip). If the second-level cache switch is turned off at this time, there may still be a risk of cache overflow or the second-level cache switch may be frequently turned on and off.

[0118] Therefore, it is necessary to revise the TRIX indicator calculated by traditional methods to improve the prediction accuracy.

[0119] Furthermore, in one embodiment, the correction value of the current sampling period is calculated using the following formula (6):

[0120] δ m = [( D out_m -D th )+ DIF m ] / D th (6)

[0121] Where m represents the period number of the current sampling period. m Indicates the correction value of the mth sampling period. m Indicates the data outflow of the first-level cache in the mth sampling period. Dth indicates the preset threshold value of the first-level cache in each sampling period. The value of the above preset threshold value is 70% to 80% of the maximum data interaction between the first-level cache in a single cycle in each sampling period. DIF mIndicates the total amount of data cache of the exchange chip at the end of the mth sampling period.

[0122] The modified TRIX indicator is calculated using the following formula (7):

[0123] M_TRIX m = TRIX m +δ m (7)

[0124] Where m represents the cycle number of the current sampling cycle. m Indicates the mth sampling period for TRIX m Corrected value. TRIX m The TRIX indicator representing the amount of data outflow from the first-level cache in the mth sampling period. m Indicates the correction value of the mth sampling period.

[0125] In this embodiment, Drated is the designed maximum data interaction amount between the first-level cache frames in each sampling cycle, such as the common 100Mbits\1000Mbits (the corresponding rates are 100Mbps\1000Mbps respectively), and Dth is the threshold value. It has been tested and verified that Drated with a value of 70% to 80% is most suitable.

[0126] In addition to directly replacing TRIX in formula (7) m and δ m Add to TRIX m In addition to the correction method, we can also use δ m Size correction TRIX m , for example, increase or decrease TRIX proportionally according to the size of δ m The value of .

[0127] M_TRIX modified according to this method m The value can perfectly solve the above-mentioned problem caused by directly using TRIXm to predict the growth or decline trend of the first-level cache data outflow and then turning on or off the second-level cache.

[0128] In order to more clearly show the effectiveness and reliability of the M_TRIX value calculated by the modified TRIX algorithm in predicting the rising or falling trend of the amount of data flowing out of the first-level cache frame, a table is drawn based on the data obtained from the actual test. Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of the data volume and index value of the switching chip in each cycle obtained by actual testing in an embodiment of the present application. Figure 6This is a schematic diagram of the total amount of cache of the switching chip in each cycle obtained from the actual test in an embodiment of the present application. In the actual test, the TRIX value cycle N=12, M=15, the preset threshold value of the data outflow per second is 70Mbits, T=1s, and the maximum outflow per second is designed to be 100Mbits. The units of L_IN, L_OUT, and DIF in the table are 10Mbits.

[0129] from Figure 5 It can be clearly seen that according to M_TRIX m Determine whether to enable the secondary cache switch, which can effectively filter TRIX when the data flow between frames is low. m >TRMA m The switch of the secondary cache is turned on, such as Figure 5 Due to the fluctuation of data flowing into the L1 cache in the 16th to 46th sampling periods, the amount of data flowing into the L1 cache in some sampling periods has changed significantly compared with the previous sampling periods, resulting in the TRIX m Both are greater than TRMA m value, but the first-level cache still has enough space to store data, so there is no need to enable the second-level cache.

[0130] from Figure 5 It can be clearly seen that when the data outflow of the first-level cache exceeds the Dth threshold for two consecutive cycles and M_TRIX m >TRMA m The strategy of only turning on the L2 cache switch when the data flow between frames occasionally changes greatly, which may cause the M_TRIX m >TRMA m Then turn on the secondary cache switch, such as Figure 5 M_TRIX for each sampling period from the 27th to the 39th sampling period m Both are greater than TRMA m But there is only one sampling period in which the Dout value is greater than 70Mbits. Figure 5 , the amount of data flowing into the first-level cache increases around the 70th sampling cycle, resulting in the amount of data flowing out of the first-level cache Dout m And the total amount of data cache DIF for each m sampling period m At the same time, the outflow of the first-level cache exceeds the Dth threshold in the 69th and 70th sampling cycles, and M_TRIX m >TRMA m Based on this, it can be predicted that the amount of data flowing into the first-level cache will increase sharply. At this time, opening the second-level cache in advance can avoid the problem of cache overflow in the first-level cache due to the rapid increase in the amount of data flowing in subsequently.

[0131] from Figure 5 and Figure 6 It can be clearly seen that when the amount of data flowing out of the switch chip in each sampling period reaches the rated maximum data outflow of 100Mbits in each sampling period, most of the sampling periods TRIX m Already smaller than TRMA m However, the total amount of data in the exchange chip cache during these sampling cycles has remained at a high level. At this time, turning off the secondary cache switch still poses a risk of data overflow. For example, TRIX has already appeared in the 89th sampling cycle. m Already smaller than TRMA m However, at this time, the total amount of data cached by the switch chip is 977.4Mbits, which is at a high cache level. At this time, the L2 cache switch should not be turned off.

[0132] from Figure 5 and Figure 6 It can be clearly seen that after turning on the L2 cache switch, the M_TRIX value calculated according to the improved method appears M_TRIX m Smaller than TRMA m When each sampling period Dout m The outflow volume and total data cache volume have returned to normal levels. At this time, turning off the L2 cache switch will basically eliminate the risk of data overflow.

[0133] In summary, this method can solve or greatly improve the problems of switch chip cache overflow and data delay during big data collection in the sub-frame cascade scenario, reduce operation and maintenance manpower and economic costs, and improve customer perception.

[0134] Furthermore, in one embodiment, the above period is calculated using the following formula (8):

[0135]

[0136] Where T represents the duration of the sampling period. Cach_total represents the storage space capacity of the first-level cache. Rated represents the maximum rate of inter-frame data communication per second of the first-level cache in each sampling period. N represents the number of backtracking periods for calculating the TRIX indicator.

[0137] In this embodiment, in the actual implementation process, the default cache space of some switching chips may be small. When the rate of data exchange of the switching chip is relatively high, the default cache will be quickly filled when a large amount of burst data arrives. In order to effectively monitor the data flowing into or out of the switching chip, the duration T of each sampling cycle needs to be reasonably configured. Among them, Cach_total is the default cache space size of the switching chip (i.e., the storage space capacity of the first-level cache), Rated is the designed maximum rate of inter-frame data communication per second, and N is the number of cycles for calculating TRIX and M_TRIX.

[0138] In addition, in the implementation process, in order to increase the reliability and availability of the growth or decline trend of the data outflow between the first-level cache frames of the switching chip, and effectively filter the TRIX that may occur due to occasional large changes in the data flow between frames, m >M_TRMA m In this case, you can set the M_TRIX to be used only when the outflow of L1 cache data exceeds the Dth threshold for two or more consecutive sampling cycles. m Determines whether to enable or disable the secondary cache switch.

[0139] Furthermore, in one embodiment, the above method further includes:

[0140] After the above-mentioned secondary cache is turned on, when sending data to the control disk, the data is stored in the secondary cache and preprocessed. Then, the preprocessed data is stored from the secondary cache to the primary cache according to the maximum rate of inter-frame data communication per second of the primary cache in each sampling period, and the control disk extracts the corresponding data from the primary cache.

[0141] After closing the above-mentioned secondary cache, when sending data to the control disk, the data is stored in the primary cache, and the control disk extracts the corresponding data from the primary cache.

[0142] The control disk sends data outward through the first-level cache at a transmission rate that does not exceed the maximum rate of inter-frame data communication per second of each preset sampling period.

[0143] Furthermore, in one embodiment, the above method further includes:

[0144] The above sub-frame sends inter-frame data to other sub-frames according to the rated flow through the first-level cache.

[0145] In this embodiment, the data transmission preprocessing unit 31 obtains data from the secondary cache at a fixed time, and sends the inter-frame data to the default cache (i.e., the primary cache) of the switching chip according to the preset maximum inter-frame rate (Rated). The switching chip also sends the inter-frame data of the main control disk and each board on each cascade sub-frame to the outside according to the preset maximum inter-frame rate corresponding to Rated, ensuring that the data sent by the switching chip is maintained at a stable level, thereby achieving traffic balance between the main control and each cascade sub-frame data interaction.

[0146] Furthermore, in one embodiment, the above method further includes:

[0147] The above preprocessing includes classifying the data and then merging and compressing each type of data.

[0148] In this embodiment, after the data secondary cache switch is turned on, when the data transceiver unit 11 receives the inter-frame data interacting between the main control board and each board on each level of the cascade sub-frame, the data is not sent to the default cache of the switching chip, but is sent to the data cache preprocessing unit 32. After receiving the data, the cache preprocessing unit classifies it according to the IP address and uses the memory for temporary storage, then merges and compresses the data stored in the memory, and sends the processed data to the secondary cache for data caching. This can reduce the amount of data transmitted between frames and improve the efficiency of data transmission between frames.

[0149] Later, after receiving the data reported by the downstream sub-frame, the main control decompresses and splits the data and identifies the correctness of the split data.

[0150] In a second aspect, an embodiment of the present application also provides a multi-subframe cascade device data caching system.

[0151] In one embodiment, referring to Figure 7 , Figure 7 This is a functional module diagram of an embodiment of a multi-subframe cascade device data cache system of the present application. Figure 7 As shown, the multi-subframe cascade device data cache system includes:

[0152] The data collection module 1 is used to collect the data inflow of the switching chip, the data outflow of the first-level cache, and the total data cache of the switching chip for each subframe in each sampling period. The data transceiver unit 11 belongs to the data collection module 1 .

[0153] The data processing module 2 is used to calculate the triple exponential smoothing average (TRIX) indicator of the data outflow of the first-level cache in the current sampling period in combination with the number of the current sampling cycle, the number of the backtracking cycle, and the data outflow of the first-level cache in each sampling period. The TRIX indicator is used to characterize the trend of the data outflow of the first-level cache in the current sampling period. In combination with the number of the current sampling cycle, the data outflow of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the data outflow of the first-level cache in each sampling period, the correction value of the TRIX indicator of the current sampling period and the corrected TRIX indicator are calculated. The above correction value is positively correlated with the above data outflow and the total amount of data cache, and negatively correlated with the above preset threshold value. In combination with the current sampling cycle number and the TRIX indicator, the moving average (TRMA) indicator of the TRIX indicator in the specified period is calculated. The traffic monitoring unit 21 belongs to the data processing module 2.

[0154] The cache management module 3 is used to start the secondary cache of the subframe and use the primary cache and the secondary cache to store data when the data outflow of the primary cache exceeds the preset threshold value in multiple consecutive sampling periods and the modified TRIX index is greater than the TRMA index. When the modified TRIX index is not greater than the TRMA index, the secondary cache of the subframe is closed and the primary cache is used to store data. The data transmission preprocessing unit 31 and the data cache preprocessing unit 32 belong to the cache management module 3.

[0155] In order to solve the problem of insufficient default cache space preset by the switching chip or cascade subframe, and limited data processing capacity, the present invention combines the current sampling cycle number, the backtracking cycle number, and the data inflow of the switching chip in each sampling cycle, the first-level cache data outflow and the total amount of data cache of the switching chip to calculate the TRMA index, TRIX index and its modified M_TRIX index of the first-level cache data outflow in the current sampling cycle. Compared with the TRIX index, the modified TRIX index (i.e., the M_TRIX index) can more accurately predict the changing trend of the first-level cache data outflow. By comparing the M_TRIX indicator with the mean TRMA indicator, we can accurately predict whether the trend of the change in the amount of data outflow from the first-level cache is strengthening or weakening, so as to determine whether to open or close the second-level cache in advance, that is, to quickly open the second-level cache in advance before the amount of data transmission between frames increases sharply to improve the data cache capacity of the sub-frame, avoid problems such as data loss or transmission timeout caused by cache overflow, and close the second-level cache switch when the amount of data outflow between frames and the total amount of data cache have fallen back to normal levels and there will be no cache overflow, so as to release the second-level cache for other functions and improve the overall performance of the device.

[0156] Among them, the functional implementation of each module in the above-mentioned multi-subframe cascade device data caching device corresponds to each step in the above-mentioned multi-subframe cascade device data caching method embodiment, and its functions and implementation processes are no longer repeated here.

[0157] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0158] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0159] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0160] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0161] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0163] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A multi-subframe cascade device data caching method, characterized in that: The method comprises: For each sub-frame, the data inflow of its switch chip, the data outflow of the first-level cache, and the total data cache of the switch chip are collected in each sampling period; Combined with the number of the current sampling cycle, the number of the lookback cycle, and the data outflow volume of the first-level cache in each sampling cycle, the triple exponential smoothing average (TRIX) indicator of the data outflow volume of the first-level cache in the current sampling cycle is calculated. The TRIX indicator is used to characterize the change trend of the data outflow volume of the first-level cache in the current sampling cycle; Combined with the current sampling period number, the outflow volume of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the outflow volume of the first-level cache in each sampling period, the correction value of the TRIX index of the current sampling period and the corrected TRIX index are calculated; the correction value is positively correlated with the outflow volume of the data and the total amount of the data cache, and negatively correlated with the preset threshold value; Combine the current sampling period and the TRIX indicator to calculate the triangular moving average (TRMA) indicator of the TRIX indicator in the specified period; When the data outflow from the first-level cache exceeds the preset threshold value in multiple consecutive sampling periods and the corrected TRIX indicator is greater than the TRMA indicator, the second-level cache of the sub-frame is started, and the first-level cache and the second-level cache are used to store data; when the corrected TRIX indicator is not greater than the TRMA indicator, the second-level cache of the sub-frame is closed, and the first-level cache is used to store data.

2. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The first-level cache is the default storage space in the switch chip; The secondary cache is additional storage space in the switch chip and / or other storage units in the sub-frame.

3. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The calculation of the TRIX indicator specifically includes the following steps: Calculate the data outflow D of the first-level cache in the mth sampling period m The exponential average AX of N lookback periods m , then: AX m =(2×D m +(N-1)×AX m-1 ) / (N+1) Calculate AX for the mth sampling period m The exponential average value BX of N retrospective periods m , then: BX m =(2×AX m +(N-1)×BX m-1 ) / (N+1) Calculate BX for the mth sampling period m The exponential average of N lookback periods TRIX m , then: TRIX m =(2*BX m +(N-1)*TRIX m-1 ) / (N+1)。 4. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The correction value of the current sampling period is calculated using the following formula: δ m =[(D out_m -D th )+DIF m ] / D th in, m represents the period number of the current sampling period; δ m Indicates the correction value of the mth sampling period; Dout_ m Indicates the data outflow of the first-level cache in the mth sampling period; Dth represents the preset threshold value of the first-level cache in each sampling period; the preset threshold value is 70% to 80% of the maximum amount of single-cycle frame data interaction of the first-level cache in each sampling period; DIF m Indicates the total amount of data cache of the exchange chip at the end of the mth sampling period.

5. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The modified TRIX indicator is calculated using the following formula: M_TRIX m =THREE m +δ m in, m represents the period number of the current sampling period; M_TRIX m Indicates the mth sampling period for TRIX m Corrected value; TRIX m The TRIX indicator representing the amount of data outflow from the first-level cache in the mth sampling period; δ m Indicates the correction value of the mth sampling period.

6. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The TRMA index is calculated using the following formula: in, TRMA m Indicates TRIX of the mth sampling period m The moving average value of the value in M ​​specified periods; M is used to calculate TRIX m The specified number of periods; m represents the period number of the current sampling period; TRIX i The TRIX value representing the amount of data outflow from the L1 cache in the i-th sampling period.

7. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The period is calculated using the following formula: in, T represents the duration of the sampling period; Cach_total indicates the storage space capacity of the first-level cache; Rated indicates the maximum rate of inter-chassis data communication per second of the L1 cache in each sampling period; N represents the number of lookback periods for calculating the TRIX indicator.

8. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The method further comprises: After the secondary cache is turned on, when sending data to the control disk, the data is stored in the secondary cache and preprocessed, and then the preprocessed data is stored from the secondary cache to the primary cache according to the maximum rate of inter-frame data communication per second of the primary cache in each sampling period, and the control disk extracts the corresponding data from the primary cache; After closing the secondary cache, when sending data to the control disk, the data is stored in the primary cache, and the control disk extracts the corresponding data from the primary cache; The control disk sends data outward through the first-level cache at a transmission rate that does not exceed the maximum rate of inter-frame data communication per second of each preset sampling period.

9. The multi-subframe cascade device data caching method according to claim 1, characterized in that: The method further comprises: The preprocessing includes classifying the data and then merging and compressing each type of data.

10. A multi-subframe cascade device data cache system, characterized in that: The system comprises: A data collection module is used to collect the data inflow of the switching chip, the data outflow of the first-level cache, and the total data cache of the switching chip for each sub-frame in each sampling period; A data processing module is used to calculate the triple exponential smoothing average (TRIX) index of the data outflow of the first-level cache in the current sampling period by combining the number of the current sampling period, the number of the backtracking period, and the data outflow of the first-level cache in each sampling period, wherein the TRIX index is used to characterize the change trend of the data outflow of the first-level cache in the current adoption period; a correction value of the TRIX index of the current sampling period and a corrected TRIX index are calculated by combining the number of the current sampling period, the data outflow of the first-level cache, the total amount of the data cache of the switching chip, and the preset threshold value of the data outflow of the first-level cache in each sampling period; the correction value is positively correlated with the data outflow and the total amount of the data cache, and negatively correlated with the preset threshold value; a moving average (TRMA) index of the TRIX index in a specified period is calculated by combining the number of the current sampling period and the TRIX index; A cache management module is used to start the secondary cache of the subframe and use the primary cache and the secondary cache to store data when the data outflow of the primary cache exceeds the preset threshold value in multiple consecutive sampling periods and the corrected TRIX indicator is greater than the TRMA indicator; when the corrected TRIX indicator is not greater than the TRMA indicator, close the secondary cache of the subframe and use the primary cache to store data.

Citation Information

Patent Citations

  • Processing method for dealing with warehousing bottleneck problem of relational database

    CN111221829A

  • Method and system for supervising a health of a server infrastructure

    CN111858230A

  • Multi-level message caching device and method for distributed communication equipment

    CN114867067A

  • Self-adaptive cache updating method and device for edge intelligence and edge server

    CN117675917A

  • Data processing method, related device and computer-readable storage medium

    WO2022041812A1