A table entry replication method and device

By determining the number and shape of replicas based on the resource requirements of table items and selecting the basic copy unit for replication, the problem of many and inflexible table items replication configuration parameters in the prior art is solved, and efficient and flexible utilization of storage resources is achieved.

CN112580304BActive Publication Date: 2025-04-04SANECHIPS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910933954.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-29
Publication Date
2025-04-04
Estimated Expiration
2039-09-29

AI Technical Summary

Technical Problem

In the prior art, in communication data processing, the table entry replication method has the problem that there are many configuration parameters and are inflexible, so that the storage resources cannot be fully utilized.

Method used

By determining the number of replicates and the copied shape based on the resource requirements required by the table item, selecting the basic copy unit, and copying the table item according to its properties. This method utilizes a variety of pre-set basic copy units to reduce configuration parameters, improves the plasticity of the copy shape, improves efficiency and ease of use.

Benefits of technology

It realizes that there are few configuration parameters and good replication shape plasticity when replicating table items, improves the utilization rate of storage resources and solves the problem of resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112580304B_ABST
    Figure CN112580304B_ABST
Patent Text Reader

Abstract

The present application discloses a table item duplication method and device, including: determining the number of copies and the shape after duplication according to the resource requirements of the table item; selecting a basic duplication unit according to the determined number of copies and the shape after duplication; and duplicating the table item according to the properties of the selected basic duplication unit. The present application achieves the purpose of requiring fewer configuration parameters for duplication purposes through a variety of pre-set basic duplication units, and the duplication shape has good plasticity, which improves the efficiency and ease of use when duplicating the table item, thereby making full use of storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, communication data processing technology, and in particular to a table entry replication method and device. Background Art

[0002] In the process of processing network communication messages, it is necessary to match the characteristic fields of the message by table lookup for forwarding. There are two main ways to store table entries: external memory and embedded memory. Among them, external memory mainly includes synchronous dynamic random-access memory (SDRAM). SDRAM has the characteristics of large capacity, high storage density and low price, but the bandwidth utilization is low. In the design using SDRAM as embedded storage, because SDRAM needs to be refreshed continuously, and in order to prevent conflicts with read and write operations during the refresh, it is generally limited to refreshing a storage body (bank), and normal data reading and writing of the current bank cannot be performed, so the refresh process actually occupies the access bandwidth of the memory interface.

[0003] With the rapid increase in network transmission speed in the communication field, various communication devices, especially data exchange devices in metropolitan area networks and backbone networks, have put forward greater bandwidth requirements for storage units. In the field of communication data processing, there is a method to improve bandwidth utilization by duplicating table entries. The so-called table entry replication is to store the data of a table sent by the control plane or forwarding plane on multiple banks at the same time. The control plane or forwarding plane only sends the data of one table entry, and the chip automatically completes the replication to other banks. When the forwarding plane searches, the chip polls the forwarding plane's request between these banks, thereby absorbing the bank access waiting delay and improving the access bandwidth.

[0004] Generally, there are two ways to copy table entries.

[0005] One is a flexible mode, such as Figure 1 As shown, when configuring table entry replication, the user needs to specify all bank locations to be replicated, such as Figure 1 The banks occupied by the table entries can be distributed in various locations of the SDRAM. However, the problem brought about by this is that there are many parameters to be configured, and the scattered table entries are not conducive to management.

[0006] The other is a fixed mode, where the user can select only a limited number of copy types, such as Figure 2The 7*4 and 7*2 replication types in the example are not flexible enough to match bandwidth changes, resulting in a waste of banks. In addition, due to the rigidity of the replication type, bank holes cannot be fully utilized, resulting in a waste of resources. Figure 2 As shown in the figure, the fixed mode supports two fixed replication modes, one is 7*4 copies, and the other is 7*2 copies. When the bandwidth required for table lookup is less than the bandwidth provided by the number of copies, it will cause a waste of the number of banks; if the bandwidth required for table lookup is greater than the bandwidth provided by the number of copies, it is necessary to add another set of replication blocks, which will also cause a waste of storage resources. In addition, when the remaining number of banks is not enough to place a set of replication blocks, it will also cause a waste of storage resources. Summary of the invention

[0007] The present application provides a table entry replication method and device, which can fully utilize storage resources.

[0008] The present application provides a table entry replication method, including:

[0009] Determine the number of copies and the shape after copying based on the resource requirements of the table item;

[0010] Selecting a basic replication unit according to the determined number of copies and the shape after replication;

[0011] The table entries are copied according to the attributes of the selected basic copy unit.

[0012] In an exemplary embodiment, the resource requirements include: bandwidth and capacity.

[0013] In an exemplary embodiment, the selecting a basic replication unit includes:

[0014] The user is received through a preset interface to select the basic replication unit according to the number of copies and the shape after replication.

[0015] In an exemplary embodiment, the selecting a basic replication unit includes:

[0016] Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network;

[0017] The current number of copies and the shape after copying are input into a trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

[0018] In an exemplary embodiment, the selected basic replication unit includes: any combination of the preset basic replication units, and the same basic replication unit can be reused.

[0019] In an exemplary embodiment, the attributes of the selected basic replication units include: a start address and an end address of each selected basic replication unit, and the number of the selected basic replication units.

[0020] In an exemplary embodiment, the copied shape is a shape after the table item is copied in the two-dimensional expansion diagram of the memory;

[0021] The memory includes: an external synchronous dynamic random access memory SDRAM.

[0022] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above-mentioned table entry replication methods.

[0023] The present application further provides a device for implementing table entry replication, including a processor and a memory; wherein the memory stores a computer program that can be run on the processor: used to execute the steps of any of the table entry replication methods described above.

[0024] The present application further provides a table entry replication device, comprising: a processing unit, a replication processing unit, and a storage unit; wherein,

[0025] The processing unit is used to determine the number of copies and the shape after the copies according to the resource requirements of the table item; select a basic copy unit according to the determined number of copies and the shape after the copies; and output the attributes of the selected basic copy unit to the copy processing unit;

[0026] A copy processing unit, used to copy the table entry according to the attribute of the basic copy unit selected from the processing unit, and store the copied table entry in the storage unit;

[0027] The storage unit includes: one or more external storage interfaces, which are used to connect one or more external storages.

[0028] In an exemplary embodiment, the external memory includes: an external SDRAM.

[0029] In an exemplary embodiment, the SDRAM includes: a double data rate DDR memory and a high bandwidth memory HBM.

[0030] In an exemplary embodiment, the selecting of the basic replication unit in the processing unit includes:

[0031] The basic replication unit is selected based on the determined number of copies and the shape after replication and received from the user through a preset interface.

[0032] In an exemplary embodiment, the selecting of the basic replication unit in the processing unit includes:

[0033] Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network;

[0034] The current number of copies and the shape after copying are input into a trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

[0035] In an exemplary embodiment, the selected basic replication unit includes: any combination of the preset basic replication units, and the same basic replication unit can be reused.

[0036] In an exemplary embodiment, the attributes of the selected basic replication units include: a start address and an end address of each selected basic replication unit, and the number of the selected basic replication units.

[0037] The present application includes: determining the number of copies and the shape after copying according to the resource requirements of the table item; selecting a basic copy unit according to the determined number of copies and the shape after copying; and copying the table item according to the properties of the selected basic copy unit. The present application achieves the purpose of requiring fewer configuration parameters for the copying purpose through a variety of pre-set basic copy units, and the plasticity of the copy shape is very good, which improves the efficiency and ease of use when copying the table item, thereby making full use of the storage resources.

[0038] Furthermore, the present application realizes flexible replication of table entries by including a basic replication unit of a table entry, thereby providing a guarantee for fully utilizing storage resources.

[0039] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0041] Figure 1 It is a schematic diagram of an embodiment of a flexible replication mode in the related art;

[0042] Figure 2 It is a schematic diagram of an embodiment of a fixed replication mode in the related art;

[0043] Figure 3 This is a flowchart of the method for copying items in this application form;

[0044] Figure 4 This application is a two-bit expansion diagram of the SDRAM storage space;

[0045] Figure 5 A schematic diagram of an embodiment of a basic replication unit of the present application;

[0046] Figure 6 It is a schematic diagram of an embodiment of a two-dimensional plane diagram after being replicated according to a selected basic replication unit of the present application;

[0047] Figure 7 This is a schematic diagram of the composition structure of the application form item copying device. DETAILED DESCRIPTION

[0048] In a typical configuration of the present application, a computing device includes one or more processors (CPU), an input / output interface, a network interface, and a memory.

[0049] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0050] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0051] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0052] Figure 3 This is a flow chart of the space replication method of this application, such as Figure 3 As shown, including:

[0053] Step 300: Determine the number of copies and the shape after the copies according to the resource requirements of the table item.

[0054] In an exemplary embodiment, the resource requirements of the table entry include, but are not limited to: bandwidth and capacity.

[0055] In an exemplary embodiment, the shape after replication refers to the shape after the table entry is replicated in the two-dimensional expansion diagram of the memory. Figure 4 , which is a two-bit expansion diagram of the SDRAM storage space, showing that the SDRAM includes 16 storage banks, bank0 to bank15, and each storage bank includes 16 table entries, 0 to 15.

[0056] In an exemplary embodiment, the memory may include, but is not limited to: an external SDRAM.

[0057] In an exemplary embodiment, SDRAM may include, but is not limited to: Double Data Rate (DDR) memory and High Bandwidth Memory (HBM).

[0058] In an exemplary embodiment, taking bandwidth as an example of the resource requirement of a table entry, the number of copies required by the user can be determined by dividing the bandwidth required by the table entry by the maximum bandwidth that each bank can provide.

[0059] Step 301: Select a basic replication unit according to the determined number of copies and the shape after replication.

[0060] In one illustrative example, the basic replication unit is pre-set.

[0061] Figure 5 is a schematic diagram of an embodiment of a basic replication unit of the present application, such as Figure 5 As shown, this embodiment includes five basic replication units, namely, basic replication unit 1, basic replication unit 2, basic replication unit 3, basic replication unit 4, and basic replication unit 5. Figure 5 The following shows the shapes of the table items in the two-dimensional unfolded diagram of several basic replication units. Figure 4 The number in the table indicates the number of channels contained in an SDRAM particle; single indicates that the basic replication unit 5 is an entry in the table.

[0062] In particular, when the table entries are insufficient to be replicated by using the basic replication unit 1, the basic replication unit 2, the basic replication unit 3, and the basic replication unit 4, the basic replication unit 5 can be used to flexibly implement replication of the table entries.

[0063] In an exemplary embodiment, selecting a basic replication unit may include:

[0064] Through a preset interface, a basic replication unit is selected from the user according to the determined number of copies and the shape after replication.

[0065] In an exemplary embodiment, selecting a basic replication unit may include:

[0066] Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network;

[0067] The current number of copies and the shape after copying are input into the trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

[0068] In an exemplary embodiment, how to train a model through a neural network can be implemented using relevant technologies and is not used to limit the scope of protection of this application.

[0069] In an exemplary embodiment, the number of replication samples, the shape samples after replication, and the corresponding basic replication unit samples can be obtained through historical information. The number of replication samples, the shape samples after replication, and the corresponding basic replication unit samples may be unlimited.

[0070] In an exemplary embodiment, the basic replication unit selected in step 301 may include any combination of pre-set basic replication units, and the same basic replication unit may be reused.

[0071] Step 302: Copy the table entry according to the attributes of the selected basic copy unit.

[0072] In an exemplary embodiment, the attributes of the selected basic replication units include, but are not limited to, information such as the start address and end address of each selected basic replication unit and the number of the selected basic replication units.

[0073] Figure 6 This is a schematic diagram of an embodiment of a two-dimensional plane diagram after replication according to the selected basic replication unit of the present application, such as Figure 6As shown, assuming there are 7 table entries, table A requires 1800 Mpps of bandwidth, table B requires 560 Mpps of bandwidth, table C requires 720 Mpps of bandwidth, table D requires 640 Mpps of bandwidth, table E requires 1120 Mpps of bandwidth, and table F requires 280 Mpps of bandwidth;

[0074] Determine whether replication is required based on the bandwidth required by the table entry. If the bandwidth required by the table entry exceeds the bandwidth that can be provided by one bank, replication is required. If not, replication is not required.

[0075] Confirm the number of copies. Generally, the number of copies is greater than or equal to the quotient of the bandwidth required by the entry and the bank bandwidth. If the quotient is not divisible, round it up.

[0076] Determine the copy shape. In order to maximize resource utilization and facilitate management, rectangular copying can generally be used. That is, after the table entry is copied, the copy shape in the SRAM two-dimensional expansion diagram is a rectangle.

[0077] The basic replication unit combination is selected according to the replication shape. In this embodiment, Figure 6 As shown: Table A needs to be copied 90 times, then nine basic copying units 1 and eight basic copying units 5 can be used; Table B needs to be copied 28 times, then three basic copying units 2 and four basic copying units 5 can be used; Table C needs to be copied 36 times, then four basic copying units 1 and four basic copying units 5 can be used; Table D needs to be copied 32 times, then four basic copying units 3 can be used; Table E needs to be copied 56 times, then seven basic copying units 4 can be used; Table F needs to be copied 14 times, then one basic copying unit 3 and six basic copying units 5 can be used.

[0078] The present application achieves the purpose of requiring fewer configuration parameters for the purpose of replication through a variety of pre-set basic replication units, and the plasticity of the replication shape is very good, which improves the efficiency and ease of use when replicating table items, thereby fully utilizing storage resources. Furthermore, the present application realizes flexible replication of table items through a basic replication unit including a table item, which provides a guarantee for fully utilizing storage resources.

[0079] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above-mentioned entry replication methods.

[0080] An embodiment of the present invention further provides a device for implementing table entry replication, comprising a processor and a memory; wherein the memory stores a computer program executable on the processor: used to execute the steps of any of the table entry replication methods described above.

[0081] Figure 7 This is a schematic diagram of the composition structure of the copying device for this application form, such as Figure 7 As shown, it at least includes: a processing unit, a copy processing unit, and a storage unit; wherein,

[0082] The processing unit is used to determine the number of copies and the shape after the copies according to the resource requirements of the table item; select a basic copy unit according to the determined number of copies and the shape after the copies; and output the attributes of the selected basic copy unit to the copy processing unit;

[0083] A copy processing unit, used to copy the table entry according to the attribute of the basic copy unit selected from the processing unit, and store the copied table entry in the storage unit;

[0084] The storage unit includes: one or more external storage interfaces, which are used to connect one or more external storages.

[0085] In an exemplary embodiment, the external memory may include, but is not limited to: an external SDRAM.

[0086] In an exemplary embodiment, SDRAM may include, but is not limited to, DDR memory, HBM, and the like.

[0087] In an exemplary embodiment, the selecting of the basic replication unit in the processing unit may include:

[0088] Through a preset interface, a basic replication unit is selected from the user according to the determined number of copies and the shape after replication.

[0089] In an exemplary embodiment, the selecting of the basic replication unit in the processing unit may include:

[0090] Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network;

[0091] The current number of copies and the shape after copying are input into the trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

[0092] In one illustrative example, the basic replication unit is pre-set.

[0093] In an exemplary embodiment, the selected basic replication unit may include any combination of pre-set basic replication units, and the same basic replication unit may be reused.

[0094] In an exemplary embodiment, the attributes of the selected basic replication units include, but are not limited to, information such as the start address and end address of each selected basic replication unit and the number of the selected basic replication units.

[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A table entry replication method, comprising: Determine the number of copies and the shape after the copy according to the resource requirements of the table item, wherein the shape after the copy is the shape of the table item after the copy is completed in the two-dimensional expansion diagram of the memory; Selecting a basic replication unit according to the determined number of copies and the shape after replication, wherein the selected basic replication unit includes: any combination of the pre-set basic replication units, and the same basic replication unit can be reused; The table entries are copied according to the properties of the selected basic copy units, wherein the properties of the selected basic copy units include: the starting address and the ending address of each selected basic copy unit, and the number of the selected basic copy units.

2. The table entry replication method according to claim 1, wherein: The resource requirements include: bandwidth and capacity.

3. The table entry replication method according to claim 1, wherein: The selecting of the basic replication unit comprises: The user is received through a preset interface to select the basic replication unit according to the number of copies and the shape after replication.

4. The table entry replication method according to claim 1, wherein: The selecting of the basic replication unit comprises: Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network; The current number of copies and the shape after copying are input into a trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

5. The table entry replication method according to claim 1, wherein: The memory includes: an external synchronous dynamic random access memory SDRAM.

6. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the table entry replication method according to any one of claims 1 to 5.

7. A device for implementing table entry replication, comprising a processor and a memory; wherein: The memory stores a computer program that can be run on the processor: used to execute the steps of the table entry replication method described in any one of claims 1 to 5.

8. A table entry replication device, comprising: processing unit, copy processing unit, storage unit; wherein, The processing unit is used to determine the number of copies and the shape after the copy according to the resource requirements required by the table item, wherein the shape after the copy is the shape of the table item after the copy is completed in the two-dimensional expansion diagram of the memory; select a basic copy unit according to the determined number of copies and the shape after the copy, wherein the selected basic copy unit includes: any combination of the pre-set basic copy units, and the same basic copy unit can be reused; output the attributes of the selected basic copy unit to the copy processing unit, wherein the attributes of the selected basic copy unit include: the starting address and the ending address of each selected basic copy unit, and the number of the selected basic copy units; A copy processing unit, used to copy the table entry according to the attribute of the basic copy unit selected from the processing unit, and store the copied table entry in the storage unit; The storage unit includes: one or more external storage interfaces, which are used to connect one or more external storages.

9. The table entry replication device according to claim 8, wherein: The external memory includes: an external SDRAM.

10. The entry replication device according to claim 9, wherein: The SDRAM includes: a double rate DDR memory and a high bandwidth memory HBM.

11. The entry replication device according to claim 8, wherein: The selecting basic replication unit in the processing unit comprises: The basic replication unit is selected based on the determined number of copies and the shape after replication and received from the user through a preset interface.

12. The table entry replication device according to claim 8, wherein: The selecting basic replication unit in the processing unit comprises: Using the number of copies samples, the shape samples after replication, and the corresponding basic replication unit samples, a table item replication model is trained through a neural network; The current number of copies and the shape after copying are input into a trained table item copying model, and the output of the table item copying model is determined as the selected basic copying unit.

Citation Information

Patent Citations

  • Storage and polling method and storage controller and polling system

    CN101021814A

  • Random memory table look-up method, random memory table look-up device and random memory table look-up system

    CN103823762A