Method, apparatus, electronic device and medium for multicasting a message

By introducing user settings modules and multicast modules into the switch, and using multidimensional linked lists to obtain node information to preset the packets, the problem that the switch can only forward but cannot process messages is solved, and the flexibility and efficiency of service processing are improved.

CN116074266BActive Publication Date: 2025-05-27SEAL CORE SEMICON (NANJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211442024.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-05-27
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

In the prior art, switch devices can only forward messages, but cannot process them according to user configuration, affecting the service processing process.

Method used

The user setting module and multicast module are introduced into the switch, node information is obtained through multi-dimensional linked lists, and packets are preset based on node information.

Benefits of technology

When the switch receives packets, it realizes that the processing rules are obtained through interaction with the user configuration module, and the problem of direct forwarding without processing is avoided, and the flexibility and efficiency of service processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074266B_ABST
    Figure CN116074266B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, electronic device and medium for multicasting a message. By applying the technical solution of the present application, when a switch receives a message, it does not directly forward the message, but first interacts with the user configuration module to obtain the node information configured by the user in the multi-dimensional linked list for corresponding processing of the message. So as to process the message based on the processing rules reflected by the node information subsequently. Thereby avoiding the problem in the related art that the switch only forwards the message and cannot perform certain processing on it, which affects the user service processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data processing technologies, and in particular, to a method, apparatus, electronic device, and medium for multicasting packets. Background Art

[0002] Multicasting is a network technology that allows one or more hosts (i.e., multicast sources) to send a single multicast packet to multiple hosts. It can be understood that multicast technology can save bandwidth resources and reduce network load, and thus has been widely applied in various fields such as video conferencing, online games, and IPTV.

[0003] In the prior art, during the process of packet multicasting, when a packet enters a switch device in a data communication network, the switch can forward the packet to its own multicast module, so that the multicast module forwards the packet to corresponding multiple destination addresses.

[0004] However, in the prior art, the switch only forwards packets and cannot perform certain processing on them, which also affects the service processing process. Summary of the Invention

[0005] Embodiments of the present application provide a method, apparatus, electronic device, and medium for multicasting packets, which are used to solve the problem in the related art that a switch device can only forward packets and cannot perform corresponding processing on them according to user configurations.

[0006] Among them, according to one aspect of the embodiments of the present application, a method for multicasting packets, which is applied to a switch including a multicast module and a user setting module, includes:

[0007] After the multicast module receives a packet to be processed, it sends a request message for obtaining node information of a node in a multidimensional linked list to the user setting module, and the request message includes the current processing state of the packet to be processed;

[0008] After receiving the request message, the user setting module selects target node information that matches the current processing state from a preset multidimensional linked list, and returns the target node information to the multicast module;

[0009] After receiving the target node information, the multicast module performs preset processing on the packet to be processed based on the processing rule represented by the target node information.

[0010] Optionally, in another embodiment based on the above method of the present application, after receiving the request message, the user setting module selects target node information that matches the current processing state from a preset multidimensional linked list, including:

[0011] If the user setting module determines that the message to be processed is processed for the first time based on the current processing status, select target node information for characterizing the first processing rule from the multi-dimensional linked list; or,

[0012] If the user setting module determines that the message to be processed is not processed for the first time based on the current processing status, detect the first processing rule for performing a preset process on the message to be processed last time;

[0013] Traverse the second processing rules adjacent to the first processing rule in the multi-dimensional linked list, and select target node information for characterizing the second processing rule.

[0014] Optionally, in another embodiment based on the above method of the present application, after traversing the second processing rules adjacent to the first processing rule in the multi-dimensional linked list, further include:

[0015] If the second processing rule adjacent to the first processing rule is not found in the multi-dimensional linked list, return a reply message to the multicast module for informing that the message to be processed has been processed.

[0016] Optionally, in another embodiment based on the above method of the present application, performing a preset process on the message to be processed based on the processing rule characterized by the target node information includes:

[0017] The multicast module performs one of modification processing, unicast processing, replication processing, mirroring processing, multicast processing, and discarding processing on the message to be processed based on the processing rule characterized by the target node information.

[0018] Optionally, in another embodiment based on the above method of the present application, after performing a preset process on the message to be processed based on the processing rule characterized by the target node information, further include:

[0019] The multicast module determines whether the processing of the message to be processed is completed based on the processing result obtained by performing a preset process on the message to be processed;

[0020] If so, send the message to be processed to the message object;

[0021] If not, continue to send a request message to the user setting module for obtaining another node information in the multi-dimensional linked list.

[0022] Optionally, in another embodiment based on the above method of the present application, before the multicast module receives the message to be processed, further include:

[0023] The user setting module obtains an initial multi-dimensional linked list; and,

[0024] Obtain the configuration instruction of the user, and obtain the multi-dimensional linked list based on the configuration instruction and the initial multi-dimensional linked list;

[0025] Wherein, the configuration instruction is used to add corresponding preset rules to at least one node information in the initial multi-dimensional linked list.

[0026] Wherein, according to another aspect of the embodiments of the present application, a device for multicasting a message is provided, which is applied to a switch including a multicast module and a user setting module, and includes:

[0027] The multicast module is configured to, when receiving a message to be processed, send a request message for obtaining a node information in the multi-dimensional linked list to the user setting module, where the request message includes the current processing status of the message to be processed; and after receiving the target node information, perform preset processing on the message to be processed based on the processing rule represented by the target node information;

[0028] The user setting module is configured to, when receiving the request message, select target node information that matches the current processing status from a preset multi-dimensional linked list, and return the target node information to the multicast module.

[0029] According to another aspect of the embodiments of the present application, an electronic device is provided, including:

[0030] A memory for storing executable instructions; and

[0031] A display for cooperating with the memory to execute the executable instructions to complete the operation of any of the above methods for multicasting a message.

[0032] According to still another aspect of the embodiments of the present application, a computer-readable storage medium is provided for storing computer-readable instructions, and when the instructions are executed, the operations of any of the above methods for multicasting a message are performed.

[0033] In this application, when the multicast module in the switch receives a message to be processed, it sends a request message for obtaining the information of a node in the multidimensional linked list to the user setting module. The request message includes the current processing status of the message to be processed. After receiving the request message, the user setting module selects the target node information that matches the current processing status from the preset multidimensional linked list and returns the target node information to the multicast module. After receiving the target node information, the multicast module performs preset processing on the message to be processed based on the processing rules represented by the target node information. By applying the technical solution of this application, when the switch receives a message, it does not directly forward it but first interacts with the user configuration module to obtain the node information configured by the user in the multidimensional linked list for corresponding processing of the message. So as to perform processing on the message based on the processing rules reflected by the node information subsequently. Thus, it avoids the problem in the related art that the switch only forwards the message and cannot perform certain processing on it, which affects the user service processing process.

[0034] The following further describes the technical solution of this application in detail through the accompanying drawings and embodiments. Brief Description of the Drawings

[0035] The accompanying drawings that form a part of the specification depict embodiments of this application and, together with the description, are used to explain the principles of this application.

[0036] Referring to the accompanying drawings, this application can be understood more clearly according to the following detailed description, where:

[0037] Figure 1 It shows a schematic diagram of a method for multicasting a message provided by an embodiment of this application;

[0038] Figure 2 It shows a schematic diagram of a system architecture for multicasting a message provided by an embodiment of this application;

[0039] Figure 3 It shows a flowchart of a method for multicasting a message provided by an embodiment of this application;

[0040] Figure 4 It shows a schematic diagram of the multidimensional linked list provided by an embodiment of this application;

[0041] Figure 5 It shows a flowchart of another method for multicasting a message provided by an embodiment of this application;

[0042] Figure 6 It shows a flowchart of another method for multicasting a message provided by an embodiment of this application;

[0043] Figure 7 The figure shows a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0044] Figure 8 The figure shows a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0045] Figure 9 The figure shows a schematic diagram of a storage medium provided by an embodiment of the present application. Detailed implementation manners

[0046] Now, various exemplary embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that: Unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0047] Meanwhile, it should be understood that, for the sake of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationships.

[0048] The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended as any limitation to the present application and its application or use.

[0049] Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the specification.

[0050] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0051] In addition, the technical solutions between the various embodiments of the present application can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0052] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.

[0053] The following in combination with Figures 1-6To describe a method for multicasting packets according to an exemplary embodiment of the present application. It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0054] The present application also proposes a method, apparatus, electronic device, and medium for multicasting packets.

[0055] Figure 1 Schematically shows a flowchart of a method for multicasting packets according to an embodiment of the present application. As Figure 1 shown, this method is applied to a switch including a multicast module and a user setting module, and includes:

[0056] S101, when the multicast module receives a packet to be processed, it sends a request message for obtaining the information of a node in the multidimensional linked list to the user setting module, and the request message includes the current processing status of the packet to be processed.

[0057] S102, after receiving the request message, the user setting module selects the target node information that matches the current processing status from the preset multidimensional linked list, and returns the target node information to the multicast module.

[0058] S103, after receiving the target node information, the multicast module performs preset processing on the packet to be processed based on the processing rules represented by the target node information.

[0059] Among them, the multidimensional linked list proposed in the present application is a storage structure that is non - continuous and non - sequential on the physical storage structure in the switch, and the logical order of data elements is realized through the pointer link order in the linked list.

[0060] In one way, multiple node information can be stored in the multidimensional linked list. And each node information stores one or more processing rules. It can be understood that the processing rules are pre - configured by the user in the multidimensional linked list, such as copying, deleting, mapping, etc. for the packet to be processed. So that the multicast module can obtain in real - time the rules that the user wants to process a certain packet.

[0061] Specifically, as Figure 2 shown, when the packet to be processed enters the data communication network switch device and passes through the multicast module therein, the multicast module will parse the packet, and then combine the corresponding node information in the multidimensional linked list set by the user to implement the preset processing of the input packet.

[0062] In one way, during the multicast control process, this application uses a multi-dimensional linked list analysis method to specifically analyze each node of the multicast linked list, so as to determine the corresponding processing method for the message: unicast, replication, mirroring, multicast, discarding, etc., and then perform corresponding operations on the input message to meet the user's setting requirements, avoiding situations such as missed broadcasts and misbroadcasts.

[0063] Furthermore, this application combines Figure 3 to illustrate the specific steps of the solution:

[0064] Step 1: When the multicast module receives a message to be processed, it sends a request message to the user setting module to obtain the information of a node in the multi-dimensional linked list.

[0065] Among them, the request message includes the current processing status of the message to be processed.

[0066] Step 2: The user setting module receives the request message. Then, step 3 or step 4 is executed.

[0067] Step 3: If the user setting module determines that the message to be processed is being processed for the first time based on the current processing status, it selects the target node information representing the first processing rule from the multi-dimensional linked list.

[0068] In one way, the multicast module can access the user setting module through an initialization address passed in from the input end in the switch. Further, the user setting module processes the input address through various internal look-up table and other logical processes, and returns the processing result (i.e., the information of a certain node in the multi-dimensional linked list) to the multicast module.

[0069] Then, the multicast module parses the return result of the user setting module to determine the corresponding processing of the message to be processed, and outputs the processed message generated after processing. The embodiments of this application can implement the traversal processing of the message to be processed using the multi-dimensional linked list by repeatedly implementing the above steps, so as to complete the multicast processing of the message to be processed.

[0070] In one way, the structure of the multi-dimensional linked list proposed in this application is as Figure 4 shown. For example, if both the l2_ptr and l3_ptr of the current node in the multi-dimensional linked list are not null and there is no temporarily stored l3_ptr, then the current l3_ptr will be temporarily stored and the next access will be to l2_ptr.

[0071] In another way, if both l2_ptr and l3_ptr are not null and there is a temporarily stored l3_ptr, then the current l3_ptr will be ignored and the next access will be to l2_ptr.

[0072] In another way, if l2_ptr is not null and l3_ptr is null, then the next access is to l2_ptr

[0073] In another way, if l2_ptr is null and there is a cached l3_ptr, regardless of the state of the current node l3_ptr, clear the cached l3_ptr and use it as the next node for traversal

[0074] In another way, if l2_ptr is null, l3_ptr is not null and there is no cached l3_ptr, then the next access is to l3_ptr

[0075] In another way, if l2_ptr is null, l3_ptr is also null and there is no cached l3_ptr, then the traversal ends.

[0076] Step 4: When the user setting module determines, based on the current processing state, that the message to be processed is not processed for the first time, detect the first processing rule for the preset processing of the message to be processed last time.

[0077] Step 5: Traverse the second processing rule adjacent to the first processing rule in the multi-dimensional linked list, and select the target node information representing the second processing rule.

[0078] Step 6: If no second processing rule adjacent to the first processing rule is found in the multi-dimensional linked list, return a reply message to the multicast module to inform that the message to be processed has been processed.

[0079] In one way, as Figure 5 shown, message interaction is carried out between the multicast module and the user setting module proposed in this application, and the response message of the user setting module is parsed. According to the parsing result, at least one corresponding processing is performed on the message to be processed, such as: modifying the byte value of part of the message, and then performing processing such as copying, mirroring, multicasting, or discarding.

[0080] Step 7: The user setting module returns the target node information to the multicast module.

[0081] Step 8: The multicast module performs preset processing on the message to be processed based on the processing rule represented by the target node information.

[0082] Step 9: The multicast module determines whether the processing of the message to be processed is completed based on the processing result obtained by performing preset processing on the message to be processed.

[0083] Step 10: If so, send the message to be processed to the message object.

[0084] Step 11: If not, continue to send a request message to the user setting module to obtain information about another node in the multi-dimensional linked list.

[0085] In one way, the management method of packets in the switch using a multi-dimensional linked list in this application can parse and process the response message Response of the user setting module. According to the parsing result, corresponding processing is performed on the input ingress packet, such as unicast, replication, mirroring, multicast, discarding, etc., and it is cached locally for output.

[0086] In one way, as Figure 6 shown, the multicast module will determine whether to continue interacting with the user setting module according to the parsing result. If so, update the initial mcr_ptr address, and then send the message again until the parsing result of the response message returned by the user setting module indicates that the traversal is completed, then the traversal ends and the multicast processing process ends. In another way, it can also be determined by the user setting module that the packet has been processed when the second processing rule adjacent to the first processing rule is not found in the multi-dimensional linked list. And return a reply message to the multicast module to inform that the packet to be processed has been processed.

[0087] In this application, when the multicast module in the switch receives a packet to be processed, it sends a request message to the user setting module to obtain information about a node in the multi-dimensional linked list. The request message contains the current processing status of the packet to be processed; after receiving the request message, the user setting module selects target node information that matches the current processing status from the preset multi-dimensional linked list, and returns the target node information to the multicast module; after receiving the target node information, the multicast module performs preset processing on the packet to be processed based on the processing rule represented by the target node information.

[0088] By applying the technical solution of this application, when the switch receives a packet, it does not directly forward it, but first interacts with the user configuration module to obtain the node information configured by the user in the multi-dimensional linked list for corresponding processing of the packet. So as to perform processing on the packet based on the processing rule reflected by the node information subsequently. Thereby avoiding the problem in the related art that the switch only forwards the packet and cannot perform certain processing on it, which affects the user service processing process.

[0089] Optionally, in another embodiment based on the above method of this application, after receiving the request message, the user setting module selects target node information that matches the current processing status from the preset multi-dimensional linked list, including:

[0090] If the user setting module determines that the message to be processed is processed for the first time based on the current processing status, select target node information for characterizing the first processing rule from the multi-dimensional linked list; or,

[0091] If the user setting module determines that the message to be processed is not processed for the first time based on the current processing status, detect the first processing rule for the previous preset processing of the message to be processed;

[0092] Traverse the second processing rules adjacent to the first processing rule in the multi-dimensional linked list, and select target node information for characterizing the second processing rule.

[0093] Optionally, in another embodiment of the method based on the present application, after traversing the second processing rules adjacent to the first processing rule in the multi-dimensional linked list, it further includes:

[0094] If no second processing rule adjacent to the first processing rule is found in the multi-dimensional linked list, return a reply message to the multicast module for informing that the message to be processed has been processed.

[0095] Optionally, in another embodiment of the method based on the present application, the preset processing of the message to be processed based on the processing rule characterized by the target node information includes:

[0096] The multicast module performs one of modification processing, unicast processing, replication processing, mirroring processing, multicast processing, and discarding processing on the message to be processed based on the processing rule characterized by the target node information.

[0097] Optionally, in another embodiment of the method based on the present application, after the preset processing of the message to be processed based on the processing rule characterized by the target node information, it further includes:

[0098] The multicast module determines whether the processing of the message to be processed is completed based on the processing result obtained by the preset processing of the message to be processed;

[0099] If so, send the message to be processed to the message object;

[0100] If not, continue to send a request message to the user setting module for obtaining another node information in the multi-dimensional linked list.

[0101] Optionally, in another embodiment of the method based on the present application, before the multicast module receives the message to be processed, it further includes:

[0102] The user setting module obtains an initial multi-dimensional linked list; and,

[0103] Obtain the configuration instruction of the user, and obtain the multi-dimensional linked list based on the configuration instruction and the initial multi-dimensional linked list;

[0104] Wherein, the configuration instruction is used to add corresponding preset rules to at least one node information in the initial multi-dimensional linked list.

[0105] By applying the technical solution of the present application, when the switch receives a message, it can be realized that instead of directly forwarding it, it first interacts with the user configuration module to obtain the node information configured by the user in the multi-dimensional linked list for corresponding processing of the message. So as to process the message based on the processing rules reflected by the node information subsequently. Thereby avoiding the problem in the related art that the switch only forwards the message and cannot perform certain processing on it, which affects the user service processing process.

[0106] Optionally, in another implementation manner of the present application, as Figure 7 shown, the present application further provides a device for multicasting messages. It includes:

[0107] The multicast module 201 is configured to, when receiving a message to be processed, send a request message for obtaining a node information in the multi-dimensional linked list to the user setting module, where the request message includes the current processing status of the message to be processed; and after receiving the target node information, perform a preset process on the message to be processed based on the processing rules represented by the target node information;

[0108] The user setting module 202 is configured to, when receiving the request message, select target node information that matches the current processing status from a preset multi-dimensional linked list and return the target node information to the multicast module.

[0109] By applying the technical solution of the present application, when the switch receives a message, it can be realized that instead of directly forwarding it, it first interacts with the user configuration module to obtain the node information configured by the user in the multi-dimensional linked list for corresponding processing of the message. So as to process the message based on the processing rules reflected by the node information subsequently. Thereby avoiding the problem in the related art that the switch only forwards the message and cannot perform certain processing on it, which affects the user service processing process.

[0110] In another implementation manner of the present application, the steps configured to be executed by the multicast module 201 include:

[0111] When the user setting module determines, based on the current processing status, that the message to be processed is being processed for the first time, it selects target node information for characterizing the first processing rule from the multi-dimensional linked list; or,

[0112] When the user setting module determines, based on the current processing status, that the message to be processed is not being processed for the first time, it detects the first processing rule for the most recent preset processing of the message to be processed;

[0113] It traverses the second processing rules adjacent to the first processing rule in the multi-dimensional linked list, and selects target node information for characterizing the second processing rule.

[0114] In another implementation manner of the present application, the steps that the multicast module 201 is configured to execute include:

[0115] If no second processing rule adjacent to the first processing rule is found in the multi-dimensional linked list, a reply message for informing that the message to be processed has been processed is returned to the multicast module.

[0116] In another implementation manner of the present application, the steps that the multicast module 201 is configured to execute include:

[0117] The multicast module performs one of modification processing, unicast processing, replication processing, mirroring processing, multicast processing, and discarding processing on the message to be processed based on the processing rule characterized by the target node information.

[0118] In another implementation manner of the present application, the steps that the multicast module 201 is configured to execute include:

[0119] The multicast module determines whether the processing of the message to be processed has been completed based on the processing result obtained by performing preset processing on the message to be processed;

[0120] If so, the message to be processed is sent to the message object;

[0121] If not, a request message for obtaining another node information in the multi-dimensional linked list is continuously sent to the user setting module.

[0122] In another implementation manner of the present application, the steps that the multicast module 201 is configured to execute include:

[0123] The user setting module obtains an initial multi-dimensional linked list; and,

[0124] Obtains a configuration instruction of the user, and based on the configuration instruction and the initial multi-dimensional linked list, obtains the multi-dimensional linked list;

[0125] Among them, the configuration instruction is used to add corresponding preset rules to at least one node information in the initial multi-dimensional linked list.

[0126] The embodiment of the present application also provides an interactive device to execute the method for multicasting the message as described above. Please refer to Figure 8 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. As Figure 8 shown, the electronic device 8 includes: a processor 300, a memory 301, a bus 302, and a communication interface 303. The processor 300, the communication interface 303, and the memory 301 are connected through the bus 302. A computer program that can run on the processor 300 is stored in the memory 301. When the processor 300 runs the computer program, it executes the method for multicasting the message provided by any one of the foregoing embodiments of the present application.

[0127] Among them, the memory 301 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 303 (which can be wired or wireless), a communication connection is established between the device network element and at least one other network element, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0128] The bus 302 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 301 is used to store a program. After receiving an execution instruction, the processor 300 executes the program. The method for multicasting the message disclosed in any one of the foregoing embodiments of the present application can be applied to the processor 300 or implemented by the processor 300.

[0129] The processor 300 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method may be completed by the integrated logic circuit of the hardware in the processor 300 or the instructions in the form of software. The above-mentioned processor 300 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 301, and the processor 300 reads the information in the memory 301 and combines its hardware to complete the steps of the above method.

[0130] The electronic device provided in the embodiments of the present application and the method for multicasting packets provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run, or implemented by it.

[0131] The embodiments of the present application also provide a computer-readable storage medium corresponding to the method for multicasting packets provided in the foregoing embodiments. Please refer to Figure 9 , which shows that the computer-readable storage medium is an optical disc 40, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the method for multicasting packets provided in any of the foregoing embodiments.

[0132] It should be noted that examples of the computer-readable storage medium may also 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 optical and magnetic storage media, which will not be elaborated here one by one.

[0133] The computer-readable storage medium provided by the above embodiments of the present application and the method for multicasting packets provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.

[0134] It should be noted that:

[0135] In the specification provided herein, a large number of specific details are set forth. However, it is understood that the embodiments of the present application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0136] Similarly, it should be understood that, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the following schematic: that the claimed present application requires more features than are expressly recited in each claim.

[0137] Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Thus, the claims following the detailed description hereby expressly incorporate the detailed description, where each claim itself serves as a separate embodiment of the present application.

[0138] In addition, those skilled in the art will appreciate that, although some of the embodiments described herein include certain features included in other embodiments but not others, the combination of features of different embodiments means that it is within the scope of the present application and forms different embodiments.

[0139] For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0140] As described above, the above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for multicasting a message, characterized in that, it is applied to a switch including a multicast module and a user setting module, and includes: After the multicast module receives the message to be processed, it sends a request message for obtaining the information of a node in the multidimensional linked list to the user setting module, and the request message includes the current processing status of the message to be processed; After receiving the request message, the user setting module selects target node information that matches the current processing status from the preset multidimensional linked list, and returns the target node information to the multicast module; After receiving the target node information, the multicast module performs a preset process on the message to be processed based on the processing rule represented by the target node information; Before the multicast module receives the message to be processed, it further includes: The user setting module obtains an initial multidimensional linked list; and, Obtains a configuration instruction of the user, and based on the configuration instruction and the initial multidimensional linked list, obtains the multidimensional linked list; Wherein, the configuration instruction is used to add corresponding preset rules to at least one node information in the initial multidimensional linked list.

2. The method according to claim 1, characterized in that, After receiving the request message, the user setting module selects target node information that matches the current processing status from the preset multidimensional linked list, including: If the user setting module determines that the message to be processed is processed for the first time based on the current processing status, it selects target node information for representing the first processing rule from the multidimensional linked list; or, If the user setting module determines that the message to be processed is not processed for the first time based on the current processing status, it detects the first processing rule for the last preset process on the message to be processed; Traverses the second processing rules adjacent to the first processing rule in the multidimensional linked list, and selects target node information for representing the second processing rule.

3. The method according to claim 2, characterized in that, After traversing the second processing rules adjacent to the first processing rule in the multidimensional linked list, it further includes: If no second processing rule adjacent to the first processing rule is found in the multidimensional linked list, it returns a reply message to the multicast module for informing that the message to be processed has been processed.

4. The method according to claim 1, characterized in that, Performing a preset process on the message to be processed based on the processing rule represented by the target node information includes: The multicast module performs one of modification processing, unicast processing, replication processing, mirroring processing, multicast processing, and discarding processing on the message to be processed based on the processing rule represented by the target node information.

5. The method according to claim 1 or 4, characterized in that, After performing a preset process on the message to be processed based on the processing rule represented by the target node information, it further includes: The multicast module determines whether the processing of the message to be processed is completed based on the processing result obtained by performing a preset process on the message to be processed; If so, send the message to be processed to the message object; If not, continue to send a request message for obtaining information of another node in the multi-dimensional linked list to the user setting module.

6. A device for multicasting messages, characterized in that, applied to a switch including a multicast module and a user setting module, and comprising: The multicast module is configured to send a request message for obtaining information of a node in the multi-dimensional linked list to the user setting module when receiving a message to be processed, where the request message includes the current processing status of the message to be processed; and after receiving the target node information, perform a preset process on the message to be processed based on the processing rule characterized by the target node information; The user setting module is configured to select target node information matching the current processing status from a preset multi-dimensional linked list when receiving the request message, and return the target node information to the multicast module; The device is further configured to: Before the multicast module receives a message to be processed, the user setting module obtains an initial multi-dimensional linked list; and, obtain a configuration instruction of the user, and obtain the multi-dimensional linked list based on the configuration instruction and the initial multi-dimensional linked list; wherein the configuration instruction is used to add corresponding preset rules to at least one node information in the initial multi-dimensional linked list.

7. A switch, characterized in that, comprising: a memory for storing executable instructions; and, a processor for executing the executable instructions to complete the operations of the method for multicasting messages according to any one of claims 1-5.

8. A computer-readable storage medium for storing computer-readable instructions, characterized in that, when the instructions are executed by a processor, the operations of the method for multicasting messages according to any one of claims 1-5 are executed.

Citation Information

Patent Citations

  • Long-link service request timeout retransmission method and intermediate node

    CN107276729A