Message processing method and device, electronic equipment and readable storage medium
By analyzing messages and determining the vertical linked list in the two-dimensional linked list based on key information, batch processing of messages with the same key information is realized, solving the problems of load imbalance and low batch processing efficiency in the prior art, and improving system performance.
Patent Information
- Application Number
- CN202510322936.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art has load imbalance problems when processing packets, and cannot efficiently perform batch processing, which affects the overall performance of the system.
By analyzing the received target input message, extracting the target key information, and determining the target vertical link list in the two-dimensional linked list based on these key information and candidate key information, mounting the message to the corresponding linked list for processing.
It realizes batch processing of input messages with the same key information, improves the efficiency of message processing, and improves the performance and response speed of network communication systems in high-load environments.
Smart Images

Figure CN120151310A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and particularly to artificial intelligence technologies such as big data and cloud services. A method, apparatus, electronic device, and readable storage medium for processing packets are provided. Background Art
[0002] In high-performance network communication, the processing efficiency of packets directly affects the throughput and latency of the system. Existing technologies often adopt a fixed allocation method when processing packets, which has the problem of load imbalance and cannot perform efficient batch processing of packets, thus affecting the overall performance of the system. Summary of the Invention
[0003] According to a first aspect of the present disclosure, a method for processing a packet is provided, including: parsing a received target input packet, and obtaining target key information corresponding to the target input packet according to the parsing result; determining a target vertical linked list in a two-dimensional linked list according to the target key information and candidate key information, where different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list; mounting the target input packet after the target vertical linked list, and processing the target input packet.
[0004] According to a second aspect of the present disclosure, a packet processing apparatus is provided, including: a parsing unit configured to parse a received target input packet and obtain target key information corresponding to the target input packet according to the parsing result; a determining unit configured to determine a target vertical linked list in a two-dimensional linked list according to the target key information and candidate key information, where different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list; and a processing unit configured to mount the target input packet after the target vertical linked list and process the target input packet.
[0005] According to a third aspect of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method as described above.
[0006] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0007] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that implements the method as described above when executed by a processor.
[0008] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0010] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure;
[0011] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure;
[0012] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure;
[0013] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure;
[0014] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure;
[0015] Figure 6 is a block diagram of an electronic device for implementing the message processing method of the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and mechanisms are omitted for clarity and conciseness.
[0017] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. As Figure 1 shown, the message processing method of this embodiment specifically includes the following steps:
[0018] S101. Parse the received target input message, and obtain the target key information corresponding to the target input message according to the parsing result;
[0019] S102. Determine the target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information. Different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list;
[0020] S103. After mounting the target input message behind the target vertical linked list, process the target input message.
[0021] In the message processing method of this embodiment, after receiving a target input message, first extract target key information from the target input message, then determine a target vertical linked list in the two-dimensional linked list according to the target key information and at least one candidate key information, and finally mount the target input message after the determined target vertical linked list to process the target input message. In this embodiment, different input messages with the same key information are mounted to the same vertical linked list in the two-dimensional linked list, achieving the purpose of batch processing of input messages with related key information, improving the processing efficiency of input messages, and further improving the performance and response speed of the network communication system in a high-load environment.
[0022] In this embodiment, an input message refers to a message sent by other devices (such as gateways, network cards, switches, etc.) to the current device (such as gateways, network cards, switches, etc.), that is, a message entering the current device from the outside.
[0023] When this embodiment executes S101 to parse the received target input message and obtain the target key information corresponding to the target input message according to the parsing result, the following method can be adopted: parse the received target input message to obtain a parsing result; use the queue number obtained from the obtained parsing result as the target key information.
[0024] When this embodiment executes S101 to parse the received target input message and obtain the target key information corresponding to the target input message according to the parsing result, the following method can also be adopted: parse the received target input message to obtain a parsing result; obtain the target key information according to the five-tuple obtained from the obtained parsing result; where the five-tuple includes the source IP, destination IP, source port, destination port, and the network protocol used.
[0025] Among them, when this embodiment executes S101 to obtain the target key information according to the five-tuple obtained from the obtained parsing result, the obtained five-tuple can be directly used as the target key information, or partial information (such as a three-tuple, a four-tuple, etc.) extracted from the five-tuple can be used as the target key information.
[0026] That is to say, this embodiment can use the queue number or the five-tuple as the key information to divide different input messages, so that different input messages mounted to the same vertical linked list subsequently have the same queue number or five-tuple, thereby achieving the purpose of batch processing of different input messages with the same queue number or five-tuple.
[0027] In addition, when executing S101 in this embodiment, the received target input message can also be cached. For example, the target input message is cached in the internal storage unit of the current device, so that when mounting subsequently, the corresponding input message is obtained from the internal storage unit.
[0028] It can be understood that if multiple target input messages are obtained when executing S101 in this embodiment, the corresponding key information will be obtained separately according to different target input messages.
[0029] After this embodiment obtains the target key information corresponding to the target input message according to the parsing result when executing S101, it executes S102 to determine the target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information; different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list.
[0030] In this embodiment, the two-dimensional linked list includes a horizontal linked list and a vertical linked list; among them, the horizontal linked list includes multiple horizontal nodes with horizontal pointers (for example, to the right), each horizontal node corresponding to different candidate key information, and the vertical linked list includes multiple vertical nodes with vertical pointers (for example, downwards), each vertical node corresponding to different input messages with the same key information.
[0031] That is to say, in the two-dimensional linked list of this embodiment, the input messages with different key information are linked horizontally, and the input messages with the same key information are linked vertically. Different candidate key information corresponds to different horizontal nodes, and different horizontal nodes correspond to different vertical linked lists.
[0032] When executing S102 in this embodiment, it can first match the target key information with different candidate key information respectively to determine the candidate key information that matches the target key information (for example, the highest similarity or exactly the same), then determine the position of the horizontal node of the corresponding horizontal linked list in the two-dimensional linked list according to the determined candidate key information, and finally use the vertical linked list corresponding to the determined horizontal node position as the target vertical linked list.
[0033] When executing S102 in this embodiment, it can also include the following content: in response to determining that there is no candidate key information that matches the target key information, create a vertical linked list corresponding to the target key information in the two-dimensional linked list; use the created vertical linked list as the target vertical linked list.
[0034] That is to say, when this embodiment determines that the candidate key information does not include the subsequent key information that matches the target key information, it indicates that the corresponding vertical linked list is not included in the current two-dimensional linked list, so a vertical linked list corresponding to the target key information is created in the two-dimensional linked list as the target vertical linked list, so as to realize the subsequent mounting of the input message.
[0035] When creating a vertical linked list corresponding to the target key information in the two-dimensional linked list in step S102 of this embodiment, a horizontal node (the newly added horizontal node corresponds to the target key information) can be added to the tail of the horizontal linked list in the two-dimensional linked list, and then a vertical linked list corresponding to the target key information is created below the horizontal node.
[0036] In addition, when creating a vertical linked list corresponding to the target key information in the two-dimensional linked list in step S102 of this embodiment, the following content may also be included: obtaining the linked list length of the horizontal linked list in the two-dimensional linked list, and the obtained linked list length is the same as the number of horizontal nodes included in the current horizontal linked list; in response to determining that the obtained linked list length meets the first preset requirement, creating a vertical linked list corresponding to the target key information in the two-dimensional linked list.
[0037] Among them, when this embodiment executes S102, if it is determined that the obtained linked list length is less than the preset length, it is determined that the linked list length meets the first preset requirement.
[0038] That is to say, limited by resources, the length of the horizontal linked list in the two-dimensional linked list (that is, the number of horizontal nodes included in the horizontal linked list) is usually limited. This embodiment only creates a vertical linked list corresponding to the target key information when it is determined that the length of the horizontal linked list in the current two-dimensional linked list is less than the preset length, so as to avoid being unable to complete the creation of the vertical linked list due to resource constraints.
[0039] If the length of the horizontal linked list in the current two-dimensional linked list does not meet the preset requirement, this embodiment can perform a waiting process on the current target input message (for example, not obtaining the input message from the internal storage unit of the current device), and after the resources are released (that is, when the length of the horizontal linked list decreases), create a vertical linked list corresponding to the current target input message.
[0040] After determining the target vertical linked list in the two-dimensional linked list according to the matching result in step S102 of this embodiment, step S103 is executed to mount the target input message after the target vertical linked list and process the target input message.
[0041] In this embodiment, the processing performed on the target input message is usually forwarding processing or statistical processing on the target input message.
[0042] When this embodiment executes S103, the target input message is mounted to the tail of the target vertical linked list, that is, a vertical node is created at the tail of the target vertical linked list, and the target input message is mounted into the created vertical node.
[0043] After the target input message is mounted to the target vertical linked list in step S103 of this embodiment and before the target input message is processed, the implementation method that can be adopted is as follows: After the target input message is mounted to the target vertical linked list, obtain the number of input messages mounted in the target vertical linked list. The obtained number of messages is the same as the number of vertical nodes included in the current target vertical linked list. In response to determining that the obtained number of messages meets the second preset requirement, process multiple input messages including the target input message at the same time.
[0044] Among them, when this embodiment executes S103, it can determine that the number of messages meets the second preset requirement when it is determined that the obtained number of messages is a preset number, or it can also determine that the number of messages meets the second preset requirement when it is determined that the obtained number of messages is greater than 1.
[0045] That is to say, after this embodiment completes the mounting of the target input message, it determines whether to process the target input message according to the number of input messages currently mounted in the target vertical linked list, so as to achieve the purpose of batch processing of multiple input messages mounted in the same target vertical linked list, and can improve the processing efficiency of input messages.
[0046] In this embodiment, the input messages can be batch processed by processing engines (PEs) corresponding to different vertical linked lists, that is, one processing engine independently constitutes a processing pipeline.
[0047] It can be understood that if it is determined that the obtained number of messages does not meet the second preset requirement, it can continue to wait until the number of messages mounted in the target vertical linked list meets the second preset requirement; or it can stop waiting after the waiting time exceeds the preset time threshold and process the input messages mounted in the target vertical linked list.
[0048] Through the message processing method provided by this embodiment, the mounting and batch processing of input messages are performed based on the key information of the input messages, which can improve the processing efficiency of input messages, thereby significantly improving the performance and response speed of the network communication system in a high-load environment; the message processing method provided by this embodiment can be applied to the message processing of high-performance gateways or the message processing of nodes (network cards) and intermediate devices (switches) in high-performance RDMA (Remote Direct Memory Access) networks.
[0049] Figure 2 It is a schematic diagram according to the second embodiment of the present disclosure. As Figure 2 shown in the figure, when this embodiment executes S103 "process the target input message", it may include the following content:
[0050] S201. Generate a context data acquisition request according to the target key information;
[0051] S202. In response to determining that the first storage location includes context data corresponding to the context data acquisition request, obtain target context data from the first storage location; otherwise, obtain target context data from the second storage location;
[0052] S203. Process the target input message according to the target context data.
[0053] That is to say, in this embodiment, different context data are stored in different storage locations respectively, and then the acquisition of target context data is completed in the order of first querying in the first storage location and then querying in the second storage location, and then the target input message is processed according to the acquired target context data, which can improve the processing accuracy of the message.
[0054] In this embodiment, the acquired context data can be the sequence number corresponding to the target key information (that is, which message is being processed), or the statistical information corresponding to the target key information (such as the number of messages that have been forwarded).
[0055] In this embodiment, the first storage location is an on-chip cache (such as on-chip Cache), and the second storage location is an off-chip cache (such as DDR or HBM); that is, in this embodiment, first search in the on-chip cache according to the context data acquisition request, and if the corresponding context data is not found, search in the off-chip cache, so as to realize the efficient management of context data and improve the acquisition efficiency of context data.
[0056] It can be understood that if this embodiment obtains target context data from the second storage location, the obtained target context data can also be updated to the first storage location to accelerate subsequent access speed.
[0057] It can be understood that after this embodiment executes S203 to process the target input message according to the target context data, the context data can also be updated according to the processing result, and then the updated context data is written back to the first storage location.
[0058] Figure 3 It is a schematic diagram according to the third embodiment of the present disclosure. Figure 3 The system framework diagram when this embodiment processes messages is shown in: as Figure 3 As shown in, the system framework includes a message cache and key information extraction module, a scheduling module, a PE pipeline processing module, and a context data management module.
[0059] Among them, the message cache and key information extraction module is used to cache the input message and extract key information from the input message; the scheduling module is used to mount the input message to a two-dimensional linked list according to the extracted key information, and then process the input message through the two-dimensional linked list; the PE pipeline processing module is used to batch process multiple input messages in the same vertical linked list in the two-dimensional linked list after obtaining the corresponding context data, and write back the context data corresponding to the vertical linked list; the context data management module is used to obtain the corresponding context data in the first storage location or the second storage location according to the generated context data acquisition request, and store the context data written back by the PE pipeline processing module.
[0060] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure. Figure 4 The schematic diagram of different processing engines during pipeline processing is shown in: the input messages corresponding to the processing queue 1 include message 1, message 2, and message 3, the input messages corresponding to the processing queue 2 include message 4 and message 5, the input messages corresponding to the processing queue 3 include message 6 and message 7, and the input message corresponding to the processing queue 4 includes message 8; if the processing engine corresponding to the processing queue 1 is PE0, the processing engine corresponding to the processing queue 2 is PE1, the processing engine corresponding to the processing queue 3 is PE2, and the processing engine corresponding to the processing queue 4 is PE3.
[0061] If the second preset requirement for the processing engine to process the input message in this embodiment is that "the number of input messages is greater than 1", then in this embodiment, PE0 can process message 1, message 2, and message 3 simultaneously, PE1 can process message 4 and message 5 simultaneously, PE2 can process message 6 and message 7 simultaneously, and PE3 does not process message 8; in the figure, the boxes surrounding the messages are used to indicate that the processing engine processes the output message.
[0062] It can be seen from this embodiment that different processing engines independently form a processing pipeline to achieve the purpose of batch processing multiple input messages with the same key information, thereby effectively improving the processing efficiency of the input message.
[0063] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure. As Figure 5 shown, the message processing device 500 of this embodiment includes:
[0064] The acquisition unit 501 is used to parse the received target input message and obtain the target key information corresponding to the target input message according to the parsing result;
[0065] Determination unit 502, configured to determine a target vertical linked list in the two-dimensional linked list according to the target key information and candidate key information, where different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list;
[0066] Processing unit 503, configured to mount the target input message after the target vertical linked list and process the target input message.
[0067] In this embodiment, the input message refers to a message sent by other devices (such as gateways, network cards, switches, etc.) to the current device (such as gateways, network cards, switches, etc.), that is, a message entering the current device from the outside.
[0068] When the acquisition unit 501 parses the received target input message and obtains the target key information corresponding to the target input message according to the parsing result, the following method may be adopted: parse the received target input message to obtain a parsing result; use the queue number obtained from the obtained parsing result as the target key information.
[0069] When the acquisition unit 501 parses the received target input message and obtains the target key information corresponding to the target input message according to the parsing result, the following method may also be adopted: parse the received target input message to obtain a parsing result; obtain the target key information according to the five-tuple obtained from the obtained parsing result; the five-tuple includes the source IP, destination IP, source port, destination port, and the network protocol used.
[0070] Wherein, when the acquisition unit 501 obtains the target key information according to the five-tuple obtained from the obtained parsing result, the obtained five-tuple may be directly used as the target key information, or partial information (such as a three-tuple, a four-tuple, etc.) extracted from the five-tuple may be used as the target key information.
[0071] That is to say, the acquisition unit 501 may use the queue number or the five-tuple as the key information to divide different input messages, so that different input messages mounted on the same vertical linked list have the same queue number or five-tuple, thereby achieving the purpose of batch processing of different input messages with the same queue number or five-tuple.
[0072] In addition, the acquisition unit 501 may also cache the received target input message, for example, cache the target input message to the internal storage unit of the current device.
[0073] It can be understood that if the acquisition unit 501 obtains multiple target input messages, corresponding key information will be obtained respectively according to different target input messages.
[0074] After the obtaining unit 501 obtains the target key information corresponding to the target input message according to the parsing result in this embodiment, the determining unit 502 determines the target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information; different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list.
[0075] In this embodiment, the two-dimensional linked list includes a horizontal linked list and a vertical linked list; among them, the horizontal linked list includes multiple horizontal nodes with horizontal pointers (for example, to the right), each horizontal node corresponds to different candidate key information, and the vertical linked list includes multiple vertical nodes with vertical pointers (for example, downwards), and each vertical node corresponds to different input messages with the same key information.
[0076] That is to say, in the two-dimensional linked list of this embodiment, the input messages with different key information are linked horizontally, and the input messages with the same key information are linked vertically. Different key information corresponds to different horizontal nodes in the horizontal linked list, and different vertical linked lists are under different horizontal nodes.
[0077] The determining unit 502 can first match the target key information with different candidate key information respectively to determine the candidate key information that matches the target key information (for example, the highest similarity or exactly the same), then determine the position of the horizontal node corresponding to the horizontal linked list in the two-dimensional linked list according to the determined candidate key information, and finally use the vertical linked list corresponding to the determined horizontal node position as the target vertical linked list.
[0078] The determining unit 502 may further include the following: in response to determining that there is no candidate key information that matches the target key information, create a vertical linked list corresponding to the target key information in the two-dimensional linked list; use the created vertical linked list as the target vertical linked list.
[0079] That is to say, when the determining unit 502 determines that the candidate key information does not include the subsequent key information that matches the target key information, it indicates that the corresponding vertical linked list is not included in the current two-dimensional linked list, then a vertical linked list corresponding to the target key information is created in the two-dimensional linked list as the target vertical linked list, so as to realize the subsequent mounting of the input message.
[0080] When the determining unit 502 creates a vertical linked list corresponding to the target key information in the two-dimensional linked list, it can add a new horizontal node (the newly added horizontal node corresponds to the target key information) at the end of the horizontal linked list in the two-dimensional linked list, and then create a vertical linked list corresponding to the target key information below the horizontal node.
[0081] In addition, when the determination unit 502 creates a vertical linked list corresponding to the target key information in the two-dimensional linked list, the following content may also be included: obtaining the length of the horizontal linked list in the two-dimensional linked list; in response to determining that the obtained linked list length meets the first preset requirement, creating a vertical linked list corresponding to the target key information in the two-dimensional linked list.
[0082] Wherein, if the determination unit 502 determines that the obtained linked list length is less than the preset length, it determines that the linked list length meets the first preset requirement.
[0083] That is to say, limited by resources, the length of the horizontal linked list in the two-dimensional linked list is usually limited. The determination unit 502 only creates a vertical linked list corresponding to the target key information when it determines that the length of the horizontal linked list in the current two-dimensional linked list is less than the preset length, so as to avoid being unable to complete the creation of the vertical linked list due to resource constraints.
[0084] If the length of the horizontal linked list in the current two-dimensional linked list does not meet the preset requirement, the determination unit 502 can perform a waiting process on the current target input message (for example, not obtaining the input message from the internal storage unit of the current device), and after the resources are released (that is, when the length of the horizontal linked list decreases), create a vertical linked list corresponding to the current target input message.
[0085] In this embodiment, after the determination unit 502 determines the target vertical linked list in the two-dimensional linked list according to the matching result, the processing unit 503 mounts the target input message after the target vertical linked list and processes the target input message.
[0086] In this embodiment, the processing performed on the target input message is usually forwarding processing on the target input message or statistical processing on the target input message.
[0087] The processing unit 503 mounts the target input message at the tail of the target vertical linked list, that is, creates a vertical node at the tail of the target vertical linked list and mounts the target input message into the created vertical node.
[0088] After the processing unit 503 mounts the target input message to the target vertical linked list and processes the target input message, the implementation method that can be adopted is: after mounting the target input message to the target vertical linked list, obtaining the number of input messages mounted in the target vertical linked list; in response to determining that the obtained number of messages meets the second preset requirement, processing multiple input messages including the target input message at the same time.
[0089] Among them, the processing unit 503 may determine that the number of obtained packets meets the second preset requirement when determining that the number of obtained packets is the preset number, or may also determine that the number of obtained packets meets the second preset requirement when determining that the number of obtained packets is greater than 1.
[0090] That is to say, after the processing unit 503 completes the mounting of the target input packet, it determines whether to process the target input packet according to the number of input packets currently mounted on the target vertical linked list, so as to achieve the purpose of batch processing of multiple input packets mounted in the same target vertical linked list, and can improve the processing efficiency of the input packets.
[0091] In this embodiment, the input packets can be batch-processed by processing engines (PEs, Processing Engines) corresponding to different vertical linked lists, that is, one processing engine independently constitutes a processing pipeline.
[0092] It can be understood that if it is determined that the number of obtained packets does not meet the second preset requirement, the processing unit 503 can continue to wait until the number of packets mounted in the target vertical linked list meets the second preset requirement; or it can stop waiting after the waiting time exceeds the preset time threshold, and the processing unit 503 processes the input packets mounted in the target vertical linked list.
[0093] When the processing unit 503 processes the target input packet, it may include the following: generating a context data acquisition request according to the target key information; in response to determining that the first storage location includes the context data corresponding to the context data acquisition request, acquiring the target context data from the first storage location, otherwise acquiring the target context data from the second storage location; processing the target input packet according to the target context data.
[0094] That is to say, in this embodiment, different context data are stored in different storage locations respectively. The processing unit 503 completes the acquisition of the target context data in the order of first querying in the first storage location and then querying in the second storage location, and then processes the target input packet according to the acquired target context data, which can improve the processing accuracy of the packet.
[0095] In this embodiment, the acquired context data can be the sequence number corresponding to the target key information (that is, which packet has been processed), or the statistical information corresponding to the target key information (such as the number of packets that have been forwarded).
[0096] In this embodiment, the first storage location is an on-chip cache (such as on-chip Cache), and the second storage location is an off-chip cache (such as DDR or HBM); that is, the processing unit 503 first searches in the on-chip cache according to the context data acquisition request. If the corresponding context data is not found, it searches in the off-chip cache, thereby realizing the efficient management of context data and improving the acquisition efficiency of context data.
[0097] It can be understood that if the processing unit 503 obtains the target context data at the second storage location, it can also update the obtained target context data to the first storage location to accelerate subsequent access speed.
[0098] It can be understood that after the processing unit 503 processes the target input message according to the target context data, it can also update the context data according to the processing result, and then write the updated context data back to the first storage location.
[0099] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0100] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0101] As Figure 6 shown, it is a block diagram of an electronic device for a message processing method according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0102] As Figure 6 shown, the device 600 includes a computing unit 601, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 602 or the computer program loaded from the storage unit 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 300 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0103] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as a keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as a disk, optical disc, etc.; and communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0104] Computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 601 executes the various methods and processes described above, such as the message processing method. For example, in some embodiments, the message processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as storage unit 608.
[0105] In some embodiments, part or all of the computer program can be loaded and / or installed onto device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the message processing method described above can be executed. Alternatively, in other embodiments, computing unit 601 can be configured to execute the message processing method by any other suitable means (e.g., by means of firmware).
[0106] The various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] The program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable message processing devices, such that when executed by the processor or controller, the program codes cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] In order to provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device for presenting information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0111] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services (“Virtual Private Server”, or simply “VPS”). The server can also be a server of a distributed system, or a server combined with blockchain.
[0112] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0113] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A message processing method, comprising: Parsing the received target input message, and obtaining target key information corresponding to the target input message according to the parsing result; Determine a target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information, wherein different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list; After the target input message is mounted to the target vertical linked list, the target input message is processed.
2. The method according to claim 1, wherein: Determining the target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information includes: Matching the target key information with different candidate key information respectively to determine the candidate key information matching the target key information; Determine the horizontal node position of the corresponding horizontal linked list in the two-dimensional linked list according to the determined candidate key information; The vertical linked list corresponding to the determined horizontal node position is used as the target vertical linked list.
3. The method according to claim 2, further comprising: In response to determining that there is no candidate key information matching the target key information, creating a vertical linked list corresponding to the target key information in the two-dimensional linked list; The created vertical linked list is used as the target vertical linked list.
4. The method according to claim 3, wherein: The creating a vertical linked list corresponding to the target key information in the two-dimensional linked list comprises: Obtain the length of the horizontal linked list in the two-dimensional linked list; In response to determining that the length of the linked list meets the first preset requirement, a vertical linked list corresponding to the target key information is created in the two-dimensional linked list.
5. The method according to claim 1, wherein: After the target input message is mounted to the target vertical linked list, processing the target input message includes: After mounting the target input message to the target vertical linked list, obtaining the message quantity of the input message mounted in the target vertical linked list; In response to determining that the number of messages meets a second preset requirement, a plurality of input messages including the target input message are processed simultaneously.
6. The method according to claim 1, wherein: The processing of the target input message comprises: Generate a context data acquisition request according to the target key information; in response to determining that the first storage location includes contextual data corresponding to the contextual data acquisition request, acquiring target contextual data from the first storage location, otherwise acquiring target contextual data from a second storage location; The target input message is processed according to the target context data.
7. The method according to claim 1, wherein: The received target input message is parsed, and target key information corresponding to the target input message is obtained according to the parsing result, including: Parsing the target input message to obtain a parsing result; The target key information is obtained according to the five-tuple obtained from the parsing result.
8. The method according to claim 1, wherein: The received target input message is parsed, and target key information corresponding to the target input message is obtained according to the parsing result, including: Parsing the target input message to obtain a parsing result; The queue number obtained from the parsing result is used as the target key information.
9. A message processing device, comprising: A parsing unit, used to parse the received target input message, and obtain target key information corresponding to the target input message according to the parsing result; A determination unit, configured to determine a target vertical linked list in the two-dimensional linked list according to the target key information and the candidate key information, wherein different candidate key information corresponds to different vertical linked lists in the two-dimensional linked list; A processing unit is used to process the target input message after mounting the target input message to the target vertical linked list.
10. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
