Communication message processing control method and device and electronic equipment

By analyzing and controlling the priority of communication messages received by the network port in electronic devices and triggering the tail biting interrupt mechanism, the data loss problem caused by limited network port resources in the 5G small base station project is solved, and the testing efficiency and accuracy are improved.

CN118984497APending Publication Date: 2024-11-19LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411297148.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

During the installation and delivery of 5G small base station project, the existing network port resources of the station opening equipment are limited, resulting in the loss of upstream and downstream data during the business test, low testing efficiency, and reducing the accuracy and reliability of business tests.

Method used

By obtaining communication messages received by the network port of the electronic device, analyzing the message priority, and triggering the tail biting interrupt mechanism, it realizes processing control of messages of different priority levels, saves interrupt operations, reduces interrupt masking time, and improves communication message processing efficiency .

Benefits of technology

It improves the efficiency of communication message processing, increases network interface throughput, ensures the normal processing of communication messages, avoids data loss, and improves the reliability of business tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984497A_ABST
    Figure CN118984497A_ABST
Patent Text Reader

Abstract

The invention provides a communication message processing control method, a communication message processing control device and electronic equipment, which are characterized in that when hardware resources of the electronic equipment are limited, communication between a communication network configured by the electronic equipment and external equipment is realized through a network port, and each communication message received by the network port triggers the same type of interruption. Under the condition that hardware tail-biting interruption is not supported, acquiring a first communication message received by the network port, analyzing the first communication message, determining that the message priority of the first communication message is a first priority, and if a second communication message received by the network port is currently processed, determining that the message priority of the first communication message is a second priority; and if the second priority of the second communication message is higher than the first priority of the first communication message, triggering a tail biting interruption mechanism to realize processing control of the second communication message and the first communication message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication message processing control method, device and electronic device. Background Art

[0002] During the installation and delivery of 5G small base station projects, a portable site deployment device is required to deploy and test the core network, such as Figure 1 The application scenario shown realizes self-test and debugging of the base station without a network transmission environment.

[0003] However, the network port resources of existing site opening equipment are limited, which can easily lead to the loss of uplink and downlink data transmitted based on limited network port resources during business testing, and the test efficiency is also low, which reduces the business testing efficiency and the accuracy and reliability of the test results. Summary of the invention

[0004] In view of the above problems, this application provides the following technical solutions:

[0005] The first aspect of the present application proposes a communication message processing control method, comprising:

[0006] Acquire a first communication message received by a network port of an electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers an interrupt of the same type;

[0007] analyzing the first communication message to determine that the message priority of the first communication message is a first priority;

[0008] Determine that a second communication message received by the network port is currently being processed, and that a second priority of the second communication message is higher than a first priority of the first communication message, trigger a tail-biting interruption mechanism, and implement processing control of the second communication message and the first communication message.

[0009] In a possible implementation, the method further includes:

[0010] Based on the first priority of the first communication message, updating the status flag of the network port to a first status value corresponding to the first priority; the status flag indicates whether there is a pending communication message among the communication messages received by the network port, and is configured with different status values ​​corresponding to different message priorities of the pending communication messages;

[0011] Based on the first priority of the first communication message, the first communication message is written into a first interrupt message queue corresponding to the first priority; different message priorities correspond to different interrupt message queues.

[0012] In a possible implementation, determining that a second communication message received by the network port is currently being processed and a second priority of the second communication message is higher than a first priority of the first communication message includes:

[0013] Reading a state value of a state flag bit for the network port as a first state value;

[0014] Determine that the message priority of the unprocessed communication message received by the network port indicated by the first status value is a first priority, and the first priority is lower than the second priority of a second communication message; the second communication message is a communication message currently being processed and received by the network port.

[0015] In a possible implementation, the triggering of the tail-biting interruption mechanism to implement processing control of the second communication message and the first communication message includes:

[0016] After the processing of the second communication message is completed and before the pop operation corresponding to the push operation on the second communication message is performed, based on the first priority indicated by the first status value, obtaining the first communication message from the first interrupt message queue corresponding to the first priority for processing;

[0017] Determining that the processing of the first communication message is completed and the state value of the state flag is empty, performing a pop operation on the first communication message;

[0018] The message priority of the communication message to be processed received by the network port indicated by the second status value is the second priority;

[0019] The message priority of the communication message to be processed received by the network port indicated by the third status value is a third priority; the third priority is higher than the second priority.

[0020] In a possible implementation, updating the status value of the status flag bit of the network port based on whether each of the interrupt message queues stores a communication message to be processed includes:

[0021] If the first interrupt message queue does not store any communication message to be processed, and the second interrupt message queue and the third interrupt message queue both store at least one communication message to be processed, updating the state value of the state flag bit to a third state value corresponding to the third priority level;

[0022] If neither the second interrupt message queue nor the third interrupt message queue stores any communication message to be processed, and the first interrupt message queue stores at least one communication message to be processed, maintaining the state value of the state flag bit as the first state value;

[0023] Wherein, the second interrupt message queue is used to store the communication message of the second priority received by the network port;

[0024] The third interrupt message queue is used to store the communication message of the third priority received by the network port, and the third priority is higher than the second priority.

[0025] In a possible implementation, determining that a second communication message received by the network port is currently being processed, and that a second priority of the second communication message is higher than a first priority of the first communication message, triggering a tail-biting interruption mechanism, and implementing processing control of the second communication message and the first communication message, includes:

[0026] Reading message flags corresponding to different message priorities, determining that the message flag corresponding to the first priority is a target identifier; the target identifier indicates that a first interrupt message queue corresponding to the first priority stores a communication message to be processed;

[0027] If the first priority is lower than the second priority of the second communication message received by the network port currently being processed, after the processing of the second communication message is completed, obtaining the first communication message from the first interrupt message queue indicated by the target identifier for processing;

[0028] Determine that the processing of the first communication message is completed, and the message identification bit corresponding to the second priority or the third priority is the target identification, and perform a pop operation on the first communication message; the pop operation corresponds to the push operation performed before processing the second communication message, and the second priority is lower than the third priority.

[0029] In a possible implementation, analyzing the first communication message to determine that the message priority of the first communication message is the first priority includes:

[0030] Analyze application layer information of the first communication message to determine a message type of the first communication message;

[0031] According to the pre-configured correspondence between different message types and different message priorities, it is determined that the message type of the first communication message corresponds to the first priority.

[0032] In a possible implementation, the method further includes:

[0033] If analyzing the first communication message, it is determined that the message priority of the first communication message is the third priority, writing the first communication message into a third interrupt message queue corresponding to the third priority;

[0034] Determine that a second communication message received by the network port is currently being processed, the third priority of the first communication message is higher than the second priority of the second communication message, and interrupt the processing of the second communication message;

[0035] Performing a push operation on the first communication message to process the first communication message;

[0036] Determine that the processing of the first communication message is completed and the third interrupt message queue corresponding to the third priority does not store any communication message to be processed, perform a pop operation on the first communication message, and resume processing of the second communication message.

[0037] A second aspect of the present application provides a communication message processing control device, including:

[0038] A communication message acquisition module, used to acquire a first communication message received by a network port of an electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers an interrupt of the same type;

[0039] a message priority determination module, configured to analyze the first communication message and determine that the message priority of the first communication message is a first priority;

[0040] The communication message processing control module is used to determine that the second communication message received by the network port is currently being processed and the second priority of the second communication message is higher than the first priority of the first communication message, trigger the tail-biting interruption mechanism, and implement processing control of the second communication message and the first communication message.

[0041] A third aspect of the present application provides an electronic device, the electronic device comprising: a development board, a network port and a processor configured on the development board, wherein:

[0042] The network port is used to realize communication between an external device and a communication network configured by the electronic device, and to receive communication messages that trigger the same type of interruption;

[0043] The processor is connected to the network port and is used to execute computer instructions to implement the following steps:

[0044] Acquire a first communication message received by the network port;

[0045] analyzing the first communication message to determine that the message priority of the first communication message is a first priority;

[0046] It is determined that a second communication message received by the network port is currently being processed and that a second priority of the second communication message is higher than a first priority of the first communication message, and a tail-biting interruption mechanism is triggered to implement processing control of the second communication message and the first communication message. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0048] Figure 1 This is a schematic diagram of a 5G base station self-check and debugging scenario;

[0049] Figure 2 A schematic diagram of an application environment applicable to the communication message processing control method proposed in this application;

[0050] Figure 3 A schematic diagram of the hardware structure of an electronic device applicable to the communication message processing control method proposed in this application;

[0051] Figure 4 A flow chart of a communication message processing control method provided in Embodiment 1 of the present application;

[0052] Figure 5 A schematic diagram of an interrupt processing flow;

[0053] Figure 6 A schematic diagram of an interrupt processing flow applicable to a communication message processing control method provided in an embodiment of the present application;

[0054] Figure 7 A flow chart of a communication message processing control method provided in Embodiment 2 of the present application;

[0055] Figure 8a An optional schematic diagram of the correspondence between different message types and different message priorities in the communication message processing control method provided in an embodiment of the present application;

[0056] Figure 8b A schematic diagram of configuring different status values ​​for the status flag bit of a network port in the communication message processing control method provided in an embodiment of the present application;

[0057] Fig. 9 A flow chart of a communication message processing control method provided in Embodiment 3 of the present application;

[0058] Fig.10 A flow chart of a communication message processing control method provided in Embodiment 4 of the present application;

[0059] Fig.11 A schematic diagram of message flags configured for different message priorities in the communication message processing control method provided in an embodiment of the present application;

[0060] Fig.12 A flowchart of a communication message processing control method provided in Embodiment 5 of the present application;

[0061] Fig.13 A schematic diagram of the structure of a communication message processing control device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application. The embodiments of the present application are described below in conjunction with the drawings. It is known to those of ordinary skill in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0063] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0064] In order to solve the above problems, the present application proposes a communication message processing control method, which configures different message priorities for communication messages transmitted by limited network port resources of the above-mentioned war-starting device, and determines the processing order of each communication message accordingly, and in the process of processing any communication message that triggers a hardware interrupt (the present application refers to a peripheral interrupt), another communication message with a lower priority that can trigger the hardware interrupt is received through the same network port. The present application will trigger the tail-biting interrupt mechanism to realize the processing control of the two communication messages with different message priorities, saving one pop operation and one push operation in the interrupt control process of the communication messages of the two message priorities, reducing the interrupt masking time, improving the communication message processing efficiency, and increasing the network port throughput. At the same time, it ensures that various types of communication messages are processed normally (such as forwarding or responding, etc.). The following is a detailed introduction to the communication message processing control method of the embodiment of the present application and its applicable electronic device in conjunction with the accompanying drawings.

[0065] Combined with the above analysis, in order to realize the self-test and debugging of the base station without a network transmission environment, the communication network used to realize multi-terminal communication such as the base station, user terminal UE (User Equipment) and operator data network DN (Data Network) is deployed to the electronic equipment, such as Figure 2 The application scenario shown can be pre-configured to implement various functions of the communication network and loaded into an electronic device, that is, a mobile device that can realize self-inspection and debugging of base stations by connecting to the cloud communication network without network limitation. The electronic device is easy to carry and can better meet the self-inspection and debugging needs of base stations in environments without network transmission.

[0066] Currently, for Figure 1 The portable site opening device shown in the figure can be connected to the N2 / N3 port on the real base station side through the network port. The site opening device uses a lower-cost and smaller embedded device, which uses the Raspberry Pi as a physical carrier. Due to its limited interface resources, it uses a Gigabit Ethernet interface (corresponding to Figure 2 The network port shown in the figure is used to transmit the upstream and downstream traffic. Therefore, when hardware resources are limited, Figure 2 The network port Eth0 shown can be configured with the addresses of N2, N3, N6 and DN, so that it can realize the transmission of communication messages with the base station, user terminal and operator data network through this network port.

[0067] Based on this, in order to implement the communication message processing control method proposed in the embodiment of the present application, refer to Figure 3 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application, and the electronic device may be the above-mentioned portable station opening device, such as Figure 3 As shown, the electronic device may include: a development board 310, a network port 320 configured on the development board 310, and a processor 330, wherein:

[0068] The development board 310 may be a Raspberry Pi development board, etc. Such development boards have limited hardware resources and only include one network port 320. This application does not describe in detail the basic hardware components of such development boards.

[0069] In an embodiment of the present application, the network port 320 can be used to receive communication messages. Combined with the above description of the electronic device, the network port 320 can be used to implement communication between an external device and a communication network configured for the electronic device, and to receive various communication messages transmitted during the communication process. Each communication message can trigger the same type of interrupt, which is recorded as a peripheral interrupt, and a hardware tail-biting interrupt cannot be implemented.

[0070] Among them, the network port 320 can be an Ethernet network interface Eth0, which can be a network card in the Ethernet. In order to receive various communication messages in the 5G communication scenario, the network port 320 can be configured with N2 (i.e., the signaling plane interface between the access network (Radio Access Network, (R) AN) and the AMF (Access and Mobility Management Function) network element) / N3 (the user plane data interface between the (R) AN and the UPF (User Plane Function) network element) / N6 (the interface between the UPF and the DN) / the address of the data network DN. This application does not elaborate on the configuration implementation method of this type of network port 320 and the communication principle implemented thereby.

[0071] The processor 330 can be an ARM architecture processor, such as a Cortex-A7 chip, which can be used to execute computer instructions to implement the communication message processing control method proposed in the embodiment of the present application. The implementation process can refer to the description of the corresponding part of the method embodiment below. During the implementation of the method, the processor can execute the program / logic code of various functions of the communication network such as the base station core network (such as the core network of the 5G base station, denoted as 5GC) migrated from the cloud, so that the electronic device acts as the communication network to communicate with external devices such as user terminals UE, base stations (access networks) and operator data networks DN.

[0072] Among them, for the processor 330 such as the Cortex-A7 chip, the built-in interrupt controller (Generic Interrupt Controller, GIC), that is, the hardware component used to manage interrupts in the ARM architecture, is used to receive interrupt messages (that is, communication messages in the embodiment of the present application) from external devices, and to prioritize the interrupt messages and pass them to the appropriate processor core for processing. It can be seen that the Cortex-A7 chip provides complete hardware support for interrupt nesting through its built-in GIC, so that after determining the message priority of each communication message received by the network port 320 (equivalent to the interrupt priority of the interrupt message), the interrupt management mechanism of the GIC is used to control the automatic stacking and popping operations of the interrupts to achieve interrupt nesting.

[0073] However, since the interrupts triggered by each communication message received by the same network port 320 are all peripheral interrupts, it is impossible to efficiently process the uplink and downlink communication messages of the network port through the hardware interrupt management mechanism. The present application proposes to define an interrupt management mechanism through software, such as a software-defined tail-biting interrupt mechanism, and configure the logic code that implements the mechanism to run on the processor 330. In this way, when the hardware resources of the electronic device are limited and there is only one network port 320, the interrupt masking time is reduced, so that the hardware interrupt processing process triggered by each communication message can be fast in and out, that is, as many communication messages sent by external devices as possible are received through the network port 320 and written into the buffer, thereby increasing the throughput while ensuring the normal processing of other types of communication messages, improving the processing efficiency of uplink and downlink communication messages of the network port 320, avoiding the loss of communication messages generated during the business test, and ensuring the reliability of the business test.

[0074] In some embodiments, in order to adopt the communication message processing control method proposed in the embodiments of the present application and realize self-test and debugging of the base station in a network-free communication environment, the processor 330 can configure the ECOS (Embedded Configurable Operating System, embedded configurable operating system or embedded configurable real-time operating system) operating system, and use the rich network protocols and application program interfaces API provided by the ECOS to build the application required for realizing the self-test and debugging when the hardware resources of the electronic device are limited, such as configuring the communication address of the multi-level interface for communication between the communication network and external devices for the network port 320, and the program code for realizing the communication functions of the communication network (such as the 5G core network).

[0075] It should be understood that Figure 3 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiment of the present application. In practical applications, the electronic device may include Figure 3 More or fewer components than shown, or combinations of certain components.

[0076] In combination with the description of the electronic device composition structure and its application scenarios described in the above embodiments, the communication message processing control method provided in the embodiments of the present application will be described in detail below in combination with the accompanying drawings.

[0077] Reference Figure 4 , is a flow chart of a communication message processing control method provided in Embodiment 1 of the present application, and the communication message processing control method can be applied to the above-mentioned electronic device, such as Figure 1 As shown, the communication message processing control method proposed in this embodiment may include but is not limited to the following steps:

[0078] Step S41, obtaining a first communication message received by a network port of the electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers the same type of interruption;

[0079] Combined with the above Figure 1 and Figure 2 The relevant description of the application scenario shown in Figure 4 The hardware structure of the electronic device shown in the figure has only one network port for communicating with external devices, that is, sending communication messages to external devices through the network port, and receiving communication messages sent by external devices through the network port. For different external devices such as base stations, user terminals or operator data networks that communicate with the communication network, the interface addresses corresponding to the network port configuration of this application support the transmission of communication messages between the electronic device and the corresponding external device.

[0080] Among them, for each communication message received by the electronic device through the network port, if it can trigger a hardware interrupt, it can only trigger the same type of interrupt, that is, the peripheral interrupt. This application does not limit the type and content of each communication message that can trigger the interrupt. It should be understood that the communication messages transmitted between the electronic device and different external devices may be relatively independent, and the order of transmission through the network port is not limited. Multiple communication messages may be transmitted at the same time, which may be multiple uplink communication messages or downlink communication messages, or uplink and downlink communication messages may be transmitted at the same time, etc., which can be determined according to actual communication needs.

[0081] In an embodiment of the present application, in order to facilitate the description of the communication message processing control method, the communication message received by the current network port can be recorded as the first communication message, which can be a communication message sent by any external device to the electronic device, or a communication message to be sent by the electronic device to a corresponding external device, or a communication message that the electronic device itself needs to execute so that the electronic device performs a corresponding task or realizes a corresponding function, etc. The present application does not limit the content of the first communication message.

[0082] Step S42, analyzing the first communication message, and determining that the message priority of the first communication message is the first priority;

[0083] According to the above description of the technical solution of this application, the software-defined interrupt control mechanism of this application can divide different communication messages that trigger the same type of hardware interrupt into multiple message priorities, indicating the processing order of the corresponding communication messages, such as communication messages with higher message priorities need to be processed earlier to meet the actual needs of giving priority to important tasks. This application does not limit the configuration implementation method of each message priority.

[0084] Based on this, for each communication message received by the network port, the message priority to which each belongs can be determined by analysis, so as to promptly process high-priority communication messages. Taking the first communication message received by the network port as an example, the importance of the task performed by the first communication message, or the performance requirements of the communication protocol it relies on, or the relevance of the first communication message to the test service, etc. can be analyzed to determine which message priority the first communication message belongs to. This application records the message priority to which the first communication message belongs as the first priority.

[0085] Step S43, determining that the second communication message received by the network port is currently being processed and that the second priority of the second communication message is higher than the first priority of the first communication message, triggering a tail-biting interruption mechanism to implement processing control of the second communication message and the first communication message.

[0086] According to but not limited to the method described above, after determining that there is a first communication message to be processed and its first priority, if it is determined that a second communication message of the second priority is currently being processed, that is, any communication message received by the same network port that is different from the first communication message, and the second priority is higher than the first priority, it means that the processing order of the second communication message should be earlier than the first communication message, and there is no need to interrupt the processing of the second communication message, and the processing process of the second communication message by the electronic device can be maintained.

[0087] Among them, in the process of processing each communication message that can trigger the peripheral interrupt, the interrupt mechanism supported by the interrupt controller GIC of the processor of the electronic device adopts a stack structure to process the interrupt message, such as Figure 5 The traditional interrupt processing flow shown in the figure requires that any interrupt message be pushed into the stack first (i.e. Figure 5 The PUSH operation shown in the figure can also be called a stack push operation) before entering the processing stage to process the interrupt message. After the processing is completed, the stack pop operation is performed (i.e. Figure 5 After that, the low-priority interrupt message to be processed is processed only after the PUSH operation is performed. After the processing is completed, the POP operation is performed again to continue processing the next interrupt message. The stack push and pop operations are repeated, which greatly reduces the communication message processing efficiency.

[0088] In order to improve the efficiency of communication message processing, the present application defines in the processor the following in software: Figure 6 The tail-biting interrupt mechanism shown in the figure is that after the high-priority communication message (i.e., the second communication message in this embodiment) is processed (it will be pushed into a stack before being processed), as shown in the figure. Figure 6As shown, there is no need to first pop the stack, such as recovering the scene interrupted by the high-priority communication message, and then protect the scene to push the stack to process the lower-priority communication message, but directly process the lower-priority communication message to be processed (such as the first communication message in this embodiment), and then perform the pop operation after processing the lower-priority communication message, thereby saving time such as Figure 6 The POP operation for a high-priority communication message and the PUSH operation for a low-priority communication message are shown, thereby ensuring that the low-priority communication message will not be lost while reducing the number of interrupt writes, thereby improving the processing efficiency of multiple communication messages received by the same network port under limited hardware resources.

[0089] Reference Figure 7 , is a flow chart of a communication message processing control method provided in Embodiment 2 of the present application, such as Figure 7 As shown, the communication message processing control method may include:

[0090] Step S71, obtaining a first communication message received by a network port of the electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers the same type of interruption;

[0091] Step S72, analyzing the application layer information of the first communication message to determine the message type of the first communication message;

[0092] Step S73, determining that the message type of the first communication message corresponds to the first priority according to the pre-configured correspondence between different message types and different message priorities;

[0093] In an embodiment of the present application, combined with the above description of the message priority of each communication message, in the application scenario described in the present application, the various communication messages received by the network port of the electronic device may include signaling messages (such as 5G signaling messages), business messages or other types of messages. Since the communication message transmission can be configured according to the corresponding communication protocol, the communication and interaction between application processes can be realized at the application layer of the corresponding communication protocol stack. If the present application can prioritize each communication message according to the communication protocol type, the application layer information of each communication message received by the network port can be analyzed, such as identifying the application layer protocol category and determining the communication protocol category used for the communication message transmission, that is, the message category of the communication message.

[0094] Combined with the above analysis and the various communication protocols used in the communication network, refer to Figure 8aFor the message priority division method shown, it is assumed that each communication message is divided into three message priorities, which are sequentially recorded as the first priority, the second priority, and the third priority from low to high. The interrupt message levels (priorities) triggered by the communication messages corresponding to the message priorities can be sequentially recorded as IRQ1 task, IRQ2 task, and IRQ3 task, which can represent the task levels to be executed by the corresponding communication messages. It can be seen that the priority order of these three types of tasks is expressed as: IRQ1 task < IRQ2 task < IRQ3 task. This application does not limit the communication message content and category included in each task level.

[0095] Exemplarily, for the communication messages using the following communication protocol category (denoted as the third category of communication protocols), the message priority can be determined as the highest priority, which can correspond to the above third priority and be divided into IRQ3 tasks. Among them, the third category of communication protocols can include but are not limited to:

[0096] NGAP (Next Generation Application Protocol, a new generation of access protocol, which can be the application layer protocol between the 5G core network and the access network in the embodiments of this application, supporting communication messages transmitted through the N2 and N3 interfaces, such as signaling and control information transmitted in the 5G core network, for example, signaling messages for implementing functions such as service and session management, and mobility through access control of the 5G network), NAS (Non-Access Stratum, a non-access layer protocol, which is the control plane protocol between the user terminal UE and the core network and is responsible for processing control signaling such as registration, deregistration, call establishment, and release), GTP-C (GPRS Tunneling Protocol Control Plane, the control plane version of the GPRS tunneling protocol, which realizes the transmission of signaling messages between core network components to support the establishment, maintenance, and release of data transmission, as well as functions such as mobility management), etc.

[0097] It can be seen from this that the first category of communication protocols supports the transmission of signaling / control messages (such as signaling packets) through the network interface. During the encapsulation of the message content at the application layer, it can be realized by using an appropriate first category of communication protocols. Therefore, this application can analyze the application layer information of the communication messages received through the network interface to determine the corresponding communication protocol. After that, it can query the corresponding relationship as Figure 8a shown to determine which message type this communication protocol belongs to, so as to obtain the message priority corresponding to this message type. The corresponding relationship between different message types and different message priorities includes but is not limited to Figure 8a the table recording method shown, and it can also adopt the text recording method or others.

[0098] Similarly, the message priority of communication messages using a communication protocol such as GTP-U (referred to as the second type of communication protocol) can be determined as the second highest priority, which can correspond to the above second priority, and the task level executed by this type of communication message can be an IRQ2 task. Among them, GTP-U (GPRS Tunneling Protocol - User Plane, the user plane part of the GPRS tunneling protocol) is an IP-based tunneling protocol used to transmit user data between different nodes of the GPRS core network to implement corresponding services. Therefore, the configuration of service messages (i.e., service packets) using a communication protocol such as GTP-U can be corresponded to the second priority (IRQ2 task).

[0099] The message priority of communication messages using other communication protocols (recorded as the first type of communication protocols) can be determined as the lowest priority, which can correspond to the above-mentioned first priority. The task level executed by this type of communication messages can be the IRQ1 task.

[0100] In the actual application of the present application, the communication messages (such as each message packet) received by the network port that trigger the hardware interrupt (i.e., the peripheral interrupt) can be written into the message buffer queue to support the fast-in and fast-out of the hardware interrupt. Afterwards, according to the software interrupt processing method pre-configured in the present application, the various communication messages received by the same network port in the message buffer queue can be read, and the message priority to which each communication message belongs can be analyzed and determined according to the method described above. In order to facilitate the subsequent identification of the message priority of each communication message, a priority identifier of the corresponding message priority can be configured, such as a first priority identifier, a second priority identifier, or a third priority identifier. The present application does not restrict the content of each priority identifier, and of course does not restrict the processing method of configuring (i.e., marking) the corresponding priority identifier for each communication message.

[0101] Step S74, based on the first priority of the first communication message, updating the status flag for the network port to a first status value corresponding to the first priority; the status flag indicates whether there is a pending communication message among the communication messages received by the network port, and is configured with different status values ​​corresponding to different message priorities of the pending communication messages;

[0102] In an embodiment of the present application, high-priority communication messages need to be processed preferentially. In order to quickly and accurately determine whether there are pending communication messages among the various communication messages currently received by the network port, and to which message priority the pending communication messages belong, the present application configures a status flag for the network port to determine whether there are pending communication messages among the various communication messages received by the network port. Different status values ​​can be configured for the status flag to indicate different message priorities of the pending communication messages.

[0103] In a possible implementation, the designated bits of the register, such as GICD_SGIR[30:29], that is, the 30th and 29th bits in the register GICD_SGIR, can be used to configure the above-mentioned status flag bits for the network port in a software-defined manner.

[0104] For example, refer to Figure 8b The schematic diagram shown is a diagram representing the meanings of different status values ​​of the status flag bit of the network port of the electronic device. If it is currently determined that the first communication message to be processed received by the network port belongs to the first priority, in order to make the status flag bit indicate this situation, the status value of the status flag bit can be updated to the first status value corresponding to the first priority, such as configuring the 30th bit in the register GICD_SGIR to 1 and the 29th bit to 0, that is, 0b10, so as to determine that there is currently a communication message to be processed with the first priority by reading the first status value.

[0105] Similarly, if the pending communication message received by the network port belongs to the third priority, the state value of the state flag bit can be updated to the third state value corresponding to the third priority, such as configuring the 30th bit in the register GICD_SGIR to 0 and the 29th bit to 0, that is, 0b00, so as to determine that there is currently a pending communication message of the third priority by reading the register GICD_SGIR[30:29] as 0b10. However, it is not limited to the state flag bit configuration method and the content of each state value described in this embodiment, and can be flexibly configured according to actual conditions.

[0106] It should be understood that, in combination with the above description of the status flag, if the status value of the status flag for the network port indicates the highest priority of the respective message priorities among the pending communication messages received by the network port. If the pending communication messages belong to the same message priority, the status value can be configured / updated according to the above example; if multiple pending communication messages belong to different message priorities, the highest message priority among them will be determined. For example, there is currently a network port receiving pending communication messages of the second priority and the first priority, and the second priority is higher than the first priority. The status value of the status flag for the network port can be configured to the second status value, such as Figure 8b The "0b01" shown.

[0107] Step S75, based on the first priority of the first communication message, writing the first communication message into a first interrupt message queue corresponding to the first priority; different message priorities correspond to different interrupt message queues;

[0108] In an embodiment of the present application, one-to-one corresponding interrupt message queues are configured for different message priorities to store each pending communication message of the corresponding message priority. For the above three priorities, a first interrupt message queue corresponding to the first priority, a second interrupt message queue corresponding to the second priority, and a third interrupt message queue corresponding to the third priority can be configured. The present application does not limit the configuration implementation method of each interrupt message queue. In the storage space provided by the electronic device hardware, an independent storage area can be selected for each interrupt message queue to store the message content of the pending communication message of the corresponding priority, waiting to be read and processed at the appropriate time.

[0109] Based on this, after determining that the first communication message to be processed received by the network port belongs to the first priority, the first communication message can be written into the first interrupt message queue for storage, waiting to be processed. It should be understood that for each communication message in the interrupt message queue of the same priority, the first-in-first-out principle is followed. After each communication message to be processed belonging to the priority is written into the interrupt message queue in sequence according to the order of acquisition, when each communication message to be processed in the interrupt message queue needs to be processed later, the communication message to be processed that was written into the interrupt message queue the earliest is read first, and the communication messages to be processed in the interrupt message queue are read and processed in sequence. The control implementation process can refer to the description of the corresponding part of the embodiment below.

[0110] It should be understood that for each communication message written into the message buffer queue in the hardware interrupt processing stage, that is, each communication message received by the network port, after being written into the message buffer queue in the order of receiving time, according to the communication message processing method proposed in this application, the message priority of each communication message will be identified, and the status flag for the network port will be updated accordingly, and the communication message will be written into the interrupt message queue backup corresponding to the message priority to which it belongs. The processing control process for each communication message is similar to the first communication message processing control process described in the above steps, and this application will not give detailed examples one by one.

[0111] Step S76, reading the state value of the state flag bit of the network port as the first state value;

[0112] Step S77, determining that the message priority of the communication message to be processed received by the network port indicated by the first state value is the first priority, and the first priority is lower than the second priority of the second communication message; the second communication message is the communication message currently being processed received by the network port;

[0113] Step S78, after the processing of the second communication message is completed and before the pop operation corresponding to the push operation on the second communication message is executed, based on the first priority indicated by the first state value, obtain the first communication message from the first interrupt message queue corresponding to the first priority for processing;

[0114] Step S79, determining that the processing of the first communication message is completed and the status value of the status flag of the network port is empty, performing a pop operation on the first communication message.

[0115] Following the above analysis, in order to ensure timely processing of high-priority communication messages, this application can detect the actual status value of the status flag of the network port in real time or periodically, and determine the highest priority corresponding to each interrupt message queue storing pending communication messages. If it is not the second priority to which the second communication message currently being processed belongs (it can be a communication message of other priorities, the control process is similar, and this application is only used as an example for illustration), and the highest priority is higher than the second priority, the second communication message can be interrupted and processed in time, and each pending communication message in the interrupt message queue corresponding to the highest priority can be processed preferentially. If the highest priority is lower than the second priority, a software-defined tail-biting interrupt mechanism can be used to implement processing control of communication messages of different priorities, reduce interrupt masking time, and improve communication message processing efficiency.

[0116] Based on this, the status value of the status flag of the network port is read, such as reading the register GICD_SGIR[30:29], and determining that the status value of these two records is the first status value, indicating that the highest priority of the current pending communication message is the first priority; similarly, if the status value is the second status value, it means that the highest priority of the current pending communication message is the second priority. Since the first priority is lower than the second priority, it does not exclude that there are pending communication messages of the first priority; if the status value is the third status value, it means that the highest priority of the current pending communication message is the third priority. Since the third priority is the highest priority among the three pre-configured message priorities, there may also be pending communication messages of the first priority and / or the second priority, depending on the situation. And as the priority of the communication message received by the network port changes, the status flag can be updated in time according to the method described above.

[0117] The embodiment of the present application is explained by taking the current status value of the status flag bit for the network port as the first status value, that is, the scenario in which the message priority of the communication message to be processed is the first priority as an example. If before or during the reception of the communication message to be processed, the electronic device is processing a second communication message of the second priority, and the first priority is lower than the second priority, the processing process of the second communication message will not be interrupted. However, in order to reduce the number of interruptions, a software-defined tail-biting interrupt mechanism (that is, the logic code for implementing the tail-biting interrupt mechanism) can be triggered.

[0118] Reference Figure 6 The interrupt control flow shown in FIG. 1 is due to the second communication message (corresponding to Figure 6Before processing the high-priority communication message (as shown in the figure), a push operation (PUSH operation) will be performed on it first. After the second communication message is processed, there is no need to perform a pop operation (POP operation). In response to the state value of the status flag currently read being the first state value, the earliest stored communication message to be processed is directly read from the first interrupt message queue corresponding to the first priority. This embodiment is explained by taking the scenario in which the first interrupt message queue currently only stores the first communication message to be processed as an example. There is no need to perform a push operation on it, and the first communication message is directly processed. At the end of the processing, if the state value of the status flag for the network port is empty at this time, it means that there are no other communication messages to be processed, and a pop operation is performed on the first communication message, so as to save a pop operation of the second communication message and a push operation of the first communication message between the two in the process of processing the second communication message and the first communication message, thereby shortening the interrupt masking time and improving the communication message processing efficiency.

[0119] Among them, in the above-mentioned communication message processing process, it does not affect the priority identification and storage steps of the new communication message received by the network port. Before the processing of the first communication message is completed, the network port may receive a new communication message of the first priority, and write it into the first interrupt message queue according to the above-mentioned method. At the same time, the state value of the state flag of the network port is maintained at the first state value. In this way, when the processing of the first communication message is completed, the state value of the status flag is read as the first state value, and the pending communication messages stored in the first interrupt message queue are continuously read for processing until there are no pending communication messages in the first interrupt message queue, and then a POP operation is performed after the processing is completed.

[0120] Of course, if before the processing of the first communication message is completed (during the processing process), the network port may receive a new communication message belonging to the second priority or the third priority, that is, a communication message of a higher priority, the processing of the first communication message will be interrupted, a pop operation will be performed on the first communication message, and the earliest stored communication message to be processed in the interrupt message queue corresponding to the higher priority will be read. After the push operation is performed on it, the communication message of the higher priority will be processed (equivalent to the processing process of the second communication message mentioned above), and after the processing of the pending messages in the interrupt message queue is completed, the processing of the first communication message will be resumed.

[0121] In summary, the communication message processing control method described in the above embodiments can timely update the status value of the status flag bit of the network port based on whether each interrupt message queue stores a communication message to be processed during any communication message processing process. The implementation process may include but is not limited to:

[0122] If the first interrupt message queue does not store any pending communication message, and the second interrupt message queue and the third interrupt message queue both store at least one pending communication message, the status value of the status flag can be updated to the third status value corresponding to the third priority, that is, the status value corresponding to the highest priority, so that the status value can be read subsequently, the processed low-priority communication message can be interrupted in time, and the high-priority communication message can be executed.

[0123] If neither the second interrupt message queue nor the third interrupt message queue stores any pending communication message, and the first interrupt message queue stores at least one pending communication message, the state value of the state flag is maintained as the first state value. In combination with the processing scenario described in the above steps, the pending communication message of the first priority level does not trigger an interruption of the currently processed communication message.

[0124] Combined with the above description of the interrupt message queue, the first interrupt message queue is used to store the communication message of the second priority received by the network port; the second interrupt message queue is used to store the communication message of the second priority received by the network port; the third interrupt message queue is used to store the communication message of the third priority received by the network port. The second priority is higher than the first priority, and the third priority is higher than the second priority.

[0125] Reference Fig. 9 , is a flow chart of a communication message processing control method provided in Embodiment 3 of the present application, such as Fig. 9 As shown, the communication message processing control method may include:

[0126] Step S91, obtaining a first communication message received by a network port of the electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers an interrupt of the same type;

[0127] Step S92, analyzing the first communication message, determining that the message priority of the first communication message is the third priority, and writing the first communication message into a third interrupt message queue corresponding to the third priority;

[0128] Step S93: based on the third priority of the first communication message, updating the status flag bit for the network port to a third status value corresponding to the third priority;

[0129] Regarding the method for determining the message priority of each communication message received by the network port, and the method for configuring the status value of the status flag of the network port, reference may be made to the description of the corresponding part of the above embodiment, which will not be described in detail in this embodiment.

[0130] Step S94, determining that the second communication message currently being processed is received by the network port, the third priority of the first communication message is higher than the second priority of the second communication message, and interrupting the processing of the second communication message;

[0131] Step S95, performing a push operation on the first communication message to process the first communication message;

[0132] Step S96, determining that the processing of the first communication message is completed and the third interrupt message queue corresponding to the third priority does not store any communication message to be processed, performing a pop operation on the first communication message, and resuming processing of the second communication message.

[0133] In an embodiment of the present application, during the process of processing the second communication message, the processor determines that the network port has received a first communication message with a higher priority. The present application will trigger the software interrupt mechanism, promptly interrupt the processing of the second communication message, and give priority to processing the first communication message with a higher priority. At this time, the message processing method based on the stack structure can first perform a push operation on the first communication message, enter the processing stage to implement the processing of the first communication message (that is, the earliest written communication message to be processed read from the third interrupt message queue). After the first message processing is completed, it is determined that the third interrupt message queue is empty, and the first communication message can be directly popped. The processing site of the second communication message interrupted by the high-priority first communication message is restored, and the second communication message continues to be processed.

[0134] Preferably, in order to improve the processing efficiency, during the implementation of step S96, if it is determined that the processing of the first communication message is completed and the third interrupt message queue corresponding to the third priority does not store the communication message to be processed, the tail-biting interrupt mechanism can be triggered, and the second communication message is first recovered and processed, and then the pop operation is performed, saving one push and pop operation. When the second communication message is interrupted, it can be used as a communication message to be processed. The status flag bit for the network port can be updated to the second status value corresponding to the second priority to avoid the loss of the second communication message. In this way, after the processing of the first communication message is completed, the second status value is read, and the second communication message interrupted by the high-priority first communication message is directly processed, avoiding the problem of packet loss during the interrupt processing, and ensuring the efficiency and reliability of communication message processing control.

[0135] Reference Fig.10 , is a flow chart of a communication message processing control method provided in Embodiment 4 of the present application, such as Fig.10 As shown, the communication message processing control method may include:

[0136] Step S101, obtaining a first communication message received by a network port of an electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers the same type of interruption;

[0137] Step S102, analyzing the first communication message, and determining that the message priority of the first communication message is the first priority;

[0138] Regarding the implementation process of step S101 and step S102, reference may be made to the description of the corresponding parts of the above embodiment, and this embodiment will not be described in detail here.

[0139] Step S103, reading the message flags corresponding to different message priorities, and determining the message flag corresponding to the first priority as a target identifier; the target identifier indicates that the first interrupt message queue corresponding to the first priority stores a communication message to be processed;

[0140] Different from configuring different status values ​​for the status flag of the network port in the register to indicate the message priority of the communication message to be processed, in the embodiment of the present application, a message flag can be configured for each message priority, such as the first message flag corresponding to the first priority, the second message flag corresponding to the second priority, the third message flag corresponding to the third priority, etc. These three message flags can be different storage locations in the register. When they are in the target identifier (such as the software-defined interrupt number), it indicates that the interrupt message queue corresponding to the corresponding message priority stores the communication message to be processed, that is, the network port receives the communication message to be processed of the corresponding message priority. This application does not limit the position of each message flag and the content of its target identifier.

[0141] For example, Fig.11 As shown, three positions can be selected in the GICD_SGIR register and configured as the first message flag, the second message flag and the third message flag in sequence, and the target identifiers corresponding to the message flags can be 0, 1 and 2 in sequence. Based on this, when a communication message of the first priority is received at the network port, it can be written into the first interrupt message queue, and the first message flag can be configured as the corresponding target identifier, such as Fig.11 0 shown; when a communication message of the second priority is received at the network port, it can be written into the second interrupt message queue, and the second message flag bit is configured as the corresponding target identifier, such as Fig.11 1 shown; when a communication message of the third priority is received at the network port, it can be written into the third interrupt message queue, and the third message flag bit can be configured as the corresponding target identifier, such as Fig.11 2. If there is no pending communication message of a certain priority among the communication messages received by the network port, the second message flag corresponding to the priority is configured as empty. In this way, the present application can read the contents of the first message flag, the second message flag, and the third message flag to determine whether the interrupt message queue corresponding to the corresponding priority stores a communication message.

[0142] Step S104, if the first priority is lower than the second priority of the second communication message received by the network port currently being processed, after the processing of the second communication message is completed, the first communication message is obtained from the first interrupt message queue indicated by the target identifier for processing;

[0143] Step S105, determine that the processing of the first communication message is completed, and the message identification bit corresponding to the second priority or the third priority is the target identification, and perform a pop operation on the first communication message; the pop operation corresponds to the push operation performed before processing the second communication message, and the second priority is lower than the third priority.

[0144] Following the above analysis, in the process of the processor processing the second communication message, by reading the contents of each message flag bit, it is determined that the message flag bit corresponding to the first priority, that is, the first message flag bit is the target identifier, and the other message flag bits are empty, indicating that at this time only the first interrupt message queue stores the first priority communication messages to be processed.

[0145] Since the first priority is lower than the second priority of the second communication message, that is, during the process of processing the second communication message, the processor determines that the network port has received a first communication message with a lower priority, and configures the corresponding message flag as the target identifier of the priority, while not affecting the processing of the second communication message. After the processing of the second communication message is completed, the second communication message is no longer popped out of the stack, and the first communication message is no longer pushed into the stack. Instead, the result after the push operation of the second communication message continues to be used, and the first communication message is directly read from the first interrupt message queue. After the processing of the first communication message is completed, a pop operation is performed on the first communication message.

[0146] It can be seen that after the processing of the second communication message is completed, the SGI (Software-generated Interrupt, i.e., an interrupt caused by software triggering) interrupt number is replaced by writing to the GICD_SGIR register to generate an SGI interrupt, and the processing and control of the first communication message and the second communication message are realized according to the tail-biting interrupt mechanism described above. The implementation process is not described in detail in this application. Referring to the description method of the corresponding part of the above embodiment, during the processing of the low-priority first communication message, it is determined that the network port has received a higher-priority communication message to be processed, and the processing of the low-priority first communication message can be interrupted to ensure that the high-priority communication message is processed first. The implementation process is not described in detail in this application.

[0147] In summary, refer to Fig.12The flowchart shown in the figure writes each communication message (i.e., message) received by the Eth0 network port that triggers the hardware interrupt into the message buffer queue, so that the hardware interrupt is fast in and fast out. After that, each communication message in the message buffer queue can be migrated to the software interrupt processing flow (i.e., the communication message processing control method flow provided by the embodiment of the present application), and the hardware interrupt processing flow is released. In the software interrupt processing flow, the message priority to which each communication message belongs can be analyzed and determined, such as according to the software definition such as Figure 8a The corresponding relationship shown is used to mark the message priority of each communication message, and the status value of the status flag of the network port (that is, the status value corresponding to the highest priority) is configured accordingly, or the message flag corresponding to the message priority is configured as the target identifier, etc., and each communication message is written into the interrupt message queue corresponding to the message priority to which it belongs.

[0148] Afterwards, the interrupt controller of the processor reads the status value of the status flag bit for the network port or the message flag bit corresponding to each message priority, determines the communication message that currently needs to be processed, that is, the communication message to be processed, calls the software-defined interrupt processing mechanism, and determines that the message priority of the communication message that currently needs to be processed is higher than the message priority of the communication message being processed. The software interrupt mechanism can be triggered to give priority to the communication message with the higher priority. If the message priority of the communication message that currently needs to be processed is lower than the message priority of the communication message being processed, the software-defined tail-biting interrupt mechanism can be triggered to realize the tail-biting interrupt under interrupt nesting and improve the processing efficiency. The implementation process can refer to the description of the corresponding part of the above embodiment.

[0149] In addition, it should be understood that if the message priority of the communication message that currently needs to be processed is the same as the message priority of the communication message being processed, such as the first communication message received as mentioned above and the second communication message being processed belong to the same message priority, the first communication message can be written into the interrupt message queue corresponding to the message priority for queueing. During the processing of the second communication message, if no communication message with a higher priority to be processed is received, the communication messages in the interrupt message queue are read sequentially for processing.

[0150] Among them, for each type of communication message that needs to be processed, it can be pushed to the message processing module corresponding to the specified processer interface to implement the processing of this type of communication message. The processing includes but is not limited to forwarding, responding, etc., and the processing method can be determined according to actual communication needs.

[0151] Exemplary, combined Figure 1 and Figure 2In the communication scenario shown, when the network port receives other types of communication messages (i.e., communication messages of the first priority), there is a possibility that an external device (such as a base station or terminal) initiates a 5G signaling message (i.e., a communication message of the third priority) due to a state change. Since the 5G signaling message has the highest priority, the original message transmission and processing process can be interrupted, and the 5G signaling message can be processed first. When processing the 5G signaling message, if a service message transmission request (IRQ2 task, i.e., the network port receives a communication message of the second priority) interrupt demand is generated, in order to ensure that the low-priority interrupt is not lost and reduce the number of interrupt writes, the processing control of communication messages of different priorities can be achieved through a software-defined tail-biting interrupt mechanism. If an interrupt request is generated when a communication message triggers, the status value of the status flag or the corresponding message flag can be updated / configured, and the software-designed tail-biting interrupt operation can be completed by reading the status value of the status flag or the corresponding message flag. The implementation process is not described in detail in this embodiment.

[0152] A communication message processing control method provided in an embodiment of the present application is introduced above, and a device for executing the above communication message processing control method will be introduced below.

[0153] Reference Fig.13 , is a structural diagram of a communication message processing control device proposed in an embodiment of the present application, such as Fig.13 As shown, the communication message processing control device may include:

[0154] The communication message acquisition module 131 is used to acquire a first communication message received by a network port of the electronic device; the network port is used to implement communication between a communication network configured by the electronic device and an external device, and each received communication message triggers an interrupt of the same type;

[0155] a message priority determination module 132, configured to analyze the first communication message and determine that the message priority of the first communication message is a first priority;

[0156] The communication message processing control module 133 is used to determine that the second communication message received by the network port is currently being processed, and the second priority of the second communication message is higher than the first priority of the first communication message, triggering the tail-biting interruption mechanism to realize the processing control of the second communication message and the first communication message.

[0157] In some embodiments, the communication message processing control device may further include:

[0158] A status flag updating module, configured to update the status flag for the network port to a first status value corresponding to the first priority based on the first priority of the first communication message; the status flag indicates whether there is a pending communication message among the communication messages received by the network port, and is configured with different status values ​​corresponding to different message priorities of the pending communication messages;

[0159] The communication message writing module is used to write the first communication message into a first interrupt message queue corresponding to the first priority based on the first priority of the first communication message; different message priorities correspond to different interrupt message queues.

[0160] In a possible implementation, the communication message processing control module 133 may include:

[0161] A first reading unit, configured to read a state value of a state flag bit of the network port as a first state value;

[0162] The first determination unit is used to determine that the message priority of the communication message to be processed received by the network port indicated by the first status value is a first priority, and the first priority is lower than the second priority of the second communication message; the second communication message is the communication message currently being processed and received by the network port.

[0163] a first processing unit, configured to obtain the first communication message from a first interrupt message queue corresponding to the first priority for processing based on the first priority indicated by the first status value after the processing of the second communication message is completed and before a pop operation corresponding to the push operation on the second communication message is executed;

[0164] A first popping unit, configured to determine that the processing of the first communication message is completed and the state value of the state flag is empty, and to perform a popping operation on the first communication message;

[0165] Among them, the message priority of the pending communication message received by the network port indicated by the second status value is the second priority; the message priority of the pending communication message received by the network port indicated by the third status value is the third priority; the third priority is higher than the second priority.

[0166] In the above embodiment, the updating module for updating the status value of the status flag bit of the network port based on whether each of the interrupt message queues stores a communication message to be processed may include:

[0167] A first updating unit, configured to update the state value of the state flag bit to a third state value corresponding to a third priority level if the first interrupt message queue does not store any communication message to be processed, and the second interrupt message queue and the third interrupt message queue both store at least one communication message to be processed;

[0168] A second processing unit, configured to maintain the state value of the state flag bit as a first state value if neither the second interrupt message queue nor the third interrupt message queue stores any communication message to be processed, and the first interrupt message queue stores at least one communication message to be processed;

[0169] Among them, the second interrupt message queue is used to store the communication messages of the second priority received by the network port; the third interrupt message queue is used to store the communication messages of the third priority received by the network port, and the third priority is higher than the second priority.

[0170] In some embodiments, the communication message processing control module 133 may also include:

[0171] A message identification bit reading unit, used to read message identification bits corresponding to different message priorities, and determine that the message identification bit corresponding to the first priority is a target identification; the target identification indicates that a first interrupt message queue corresponding to the first priority stores a communication message to be processed;

[0172] a third processing unit, configured to obtain the first communication message from the first interrupt message queue indicated by the target identifier for processing after the processing of the second communication message is completed if the first priority is lower than the second priority of the second communication message currently being processed and received by the network port;

[0173] A second popping unit is used to determine that the processing of the first communication message is completed and the message identification bit corresponding to the second priority or the third priority is a target identification, and perform a popping operation on the first communication message; the popping operation corresponds to the push operation performed before processing the second communication message, and the second priority is lower than the third priority

[0174] Based on the above description of the embodiment, the message priority determination module 132 may include:

[0175] a message type determining unit, configured to analyze application layer information of the first communication message to determine a message type of the first communication message;

[0176] The message priority determination unit is used to determine the message type of the first communication message corresponding to the first priority according to the pre-configured correspondence between the different message types and the different message priorities.

[0177] The communication message processing control device may further include:

[0178] A first writing unit is configured to, if analyzing the first communication message and determining that the message priority of the first communication message is a third priority, write the first communication message into a third interrupt message queue corresponding to the third priority;

[0179] an interrupt processing unit, configured to determine that a second communication message received by the network port is currently being processed, the third priority of the first communication message is higher than the second priority of the second communication message, and interrupt processing of the second communication message;

[0180] a fourth processing unit, configured to perform a push operation on the first communication message to process the first communication message;

[0181] The fifth processing unit is used to determine that the processing of the first communication message is completed and the third interrupt message queue corresponding to the third priority does not store the communication message to be processed, perform a pop operation on the first communication message, and resume processing the second communication message.

[0182] An embodiment of the present application also provides a computer program product, including computer program instructions. When the computer program instructions are executed on an electronic device, the electronic device implements any communication message processing control method provided in the embodiment of the present application.

[0183] Wherein, when loading and executing computer program instructions on an electronic device, the process or function described in the embodiment of the present application is generated in whole or in part. The electronic device may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer program instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. Available media may be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)), etc.

[0184] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement any communication message processing control method provided in an embodiment of the present application.

[0185] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0186] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. It can be seen that in the above embodiments, all or part of the implementation can be achieved by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product.

[0187] In addition, the various embodiments in this specification are described in a progressive or parallel manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the devices and electronic devices provided in the embodiments, since they correspond to the methods provided in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0188] The above description of the embodiments provided enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features provided herein.

Claims

1. A communication message processing control method, comprising: Acquire a first communication message received by a network port of an electronic device; The network port is used to realize communication between the communication network configured by the electronic device and an external device, and each received communication message triggers the same type of interruption; analyzing the first communication message to determine that the message priority of the first communication message is a first priority; Determine that a second communication message received by the network port is currently being processed, and that a second priority of the second communication message is higher than a first priority of the first communication message, trigger a tail-biting interruption mechanism, and implement processing control of the second communication message and the first communication message.

2. The method according to claim 1, further comprising: Based on the first priority of the first communication message, updating the status flag bit for the network port to a first status value corresponding to the first priority; The status flag indicates whether there is a pending communication message among the communication messages received by the network port, and is configured with different status values ​​corresponding to different message priorities of the pending communication messages; Based on the first priority of the first communication message, the first communication message is written into a first interrupt message queue corresponding to the first priority; different message priorities correspond to different interrupt message queues.

3. The method according to claim 2, wherein determining that the second communication message received by the network port is currently being processed and the second priority of the second communication message is higher than the first priority of the first communication message comprises: Reading a state value of a state flag bit for the network port as a first state value; Determine that the message priority of the unprocessed communication message received by the network port indicated by the first status value is a first priority, and the first priority is lower than the second priority of a second communication message; the second communication message is a communication message currently being processed and received by the network port.

4. The method according to claim 3, wherein the triggering of the tail-biting interruption mechanism to realize the processing control of the second communication message and the first communication message comprises: After the processing of the second communication message is completed and before the pop operation corresponding to the push operation on the second communication message is performed, based on the first priority indicated by the first status value, obtaining the first communication message from the first interrupt message queue corresponding to the first priority for processing; Determining that the processing of the first communication message is completed and the state value of the state flag is empty, performing a pop operation on the first communication message; The message priority of the communication message to be processed received by the network port indicated by the second status value is the second priority; The message priority of the communication message to be processed received by the network port indicated by the third status value is a third priority; the third priority is higher than the second priority.

5. The method according to any one of claims 2 to 4, wherein the state value of the state flag bit of the network port is updated based on whether each of the interrupt message queues stores a communication message to be processed, comprising: If the first interrupt message queue does not store any communication message to be processed, and the second interrupt message queue and the third interrupt message queue both store at least one communication message to be processed, updating the state value of the state flag bit to a third state value corresponding to the third priority level; If neither the second interrupt message queue nor the third interrupt message queue stores any communication message to be processed, and the first interrupt message queue stores at least one communication message to be processed, maintaining the state value of the state flag bit as the first state value; Wherein, the second interrupt message queue is used to store the communication message of the second priority received by the network port; The third interrupt message queue is used to store the communication message of the third priority received by the network port, and the third priority is higher than the second priority.

6. According to the method of claim 1, the determining that the second communication message received by the network port is currently being processed and the second priority of the second communication message is higher than the first priority of the first communication message, triggering the tail-biting interruption mechanism, and realizing the processing control of the second communication message and the first communication message, comprises: Read the message flags corresponding to the different message priorities, and determine the message flag corresponding to the first priority as the target identifier; The target identifier indicates that a first interrupt message queue corresponding to the first priority level stores a communication message to be processed; If the first priority is lower than the second priority of the second communication message received by the network port currently being processed, after the processing of the second communication message is completed, obtaining the first communication message from the first interrupt message queue indicated by the target identifier for processing; Determine that the processing of the first communication message is completed, and the message identification bit corresponding to the second priority or the third priority is the target identification, and perform a pop operation on the first communication message; the pop operation corresponds to the push operation performed before processing the second communication message, and the second priority is lower than the third priority.

7. The method according to any one of claims 1 to 4 or 6, wherein analyzing the first communication message and determining that the message priority of the first communication message is the first priority comprises: Analyze application layer information of the first communication message to determine a message type of the first communication message; According to the pre-configured correspondence between different message types and different message priorities, it is determined that the message type of the first communication message corresponds to the first priority.

8. The method according to any one of claims 1 to 4, further comprising: If analyzing the first communication message, it is determined that the message priority of the first communication message is the third priority, writing the first communication message into a third interrupt message queue corresponding to the third priority; Determine that a second communication message received by the network port is currently being processed, the third priority of the first communication message is higher than the second priority of the second communication message, and interrupt the processing of the second communication message; Performing a push operation on the first communication message to process the first communication message; Determine that the processing of the first communication message is completed and the third interrupt message queue corresponding to the third priority does not store any communication message to be processed, perform a pop operation on the first communication message, and resume processing of the second communication message.

9. A communication message processing control device, comprising: A communication message acquisition module, used to acquire a first communication message received by a network port of an electronic device; The network port is used to realize communication between the communication network configured by the electronic device and an external device, and each received communication message triggers the same type of interruption; a message priority determination module, configured to analyze the first communication message and determine that the message priority of the first communication message is a first priority; A communication message processing control module is used to determine that the second communication message received by the network port is currently being processed, and the second priority of the second communication message is higher than the first priority of the first communication message, triggering a tail-biting interruption mechanism to implement processing control of the second communication message and the first communication message.

10. An electronic device, comprising: A development board, a network port and a processor configured on the development board, wherein: The network port is used to realize communication between an external device and a communication network configured by the electronic device, and to receive communication messages that trigger the same type of interruption; The processor is connected to the network port and is used to execute computer instructions to implement the following steps: Acquire a first communication message received by the network port; analyzing the first communication message to determine that the message priority of the first communication message is a first priority; Determine that a second communication message received by the network port is currently being processed, and that a second priority of the second communication message is higher than a first priority of the first communication message, trigger a tail-biting interruption mechanism, and implement processing control of the second communication message and the first communication message.