CN114079675B - Message processing method, device, terminal equipment and mobile broadband internet surfing equipment - Google Patents

Message processing method, device, terminal equipment and mobile broadband internet surfing equipment Download PDF

Info

Publication number
CN114079675B
CN114079675B CN202010823941.0A CN202010823941A CN114079675B CN 114079675 B CN114079675 B CN 114079675B CN 202010823941 A CN202010823941 A CN 202010823941A CN 114079675 B CN114079675 B CN 114079675B
Authority
CN
China
Prior art keywords
information
message
network
message data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010823941.0A
Other languages
Chinese (zh)
Other versions
CN114079675A (en
Inventor
陈博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010823941.0A priority Critical patent/CN114079675B/en
Publication of CN114079675A publication Critical patent/CN114079675A/en
Application granted granted Critical
Publication of CN114079675B publication Critical patent/CN114079675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The embodiment of the invention discloses a message processing method, a message processing device, terminal equipment and mobile broadband internet surfing equipment, wherein the method comprises the following steps: receiving a first network message, wherein the first network message is a communication network control model transmission module (NTB) packet, and comprises message data and first information, and the first information is used for indicating Internet Protocol (IP) connection information corresponding to the message data; and forwarding the message data in the first network message to a target processor core for processing, wherein the target processor core is determined through the first information. The first information can indicate the IP connection information corresponding to the message data, so that the message data corresponding to different IP connections can be distributed to different processor cores for processing, the effect of parallel processing of the multi-processor cores is realized, the performance of the multi-core processor is fully exerted, the data transmission efficiency is improved, and the data transmission delay and the blocking are reduced.

Description

Message processing method, device, terminal equipment and mobile broadband internet surfing equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a message, a terminal device, and a mobile broadband internet access device.
Background
The mobile broadband internet access device may be connected to the terminal device through a variety of physical interfaces to provide network connection services for the terminal device, with universal serial bus (Universal Serial Bus, USB) being one of the most common physical interfaces. The USB virtual network card based on the USB3.1 protocol can provide network connection service with high performance specification for terminal equipment.
The communication device class (Communication Device Class, CDC) protocol in the USB protocol is the standard protocol for a USB virtual network card. The CDC protocol standardizes the definition of the USB network port, the format of the message and the like. Through CDC protocol, the mobile broadband Internet surfing equipment can provide Internet surfing service for the terminal equipment through the USB port.
In the prior art, when the mobile broadband internet device communicates with the terminal device through the USB protocol, if high-performance data transmission is to be realized, not only the mobile broadband internet device and the USB protocol are required to be supported, but also the terminal device is required to be supported, however, at present, because the terminal device is limited by an operating system of the terminal device, the processing of message data and messages is concentrated in the same processor core for processing, so that the performance of a multi-core processor cannot be exerted, the problems of delay and blockage of the message data transmission are increased, and the data transmission performance between the broadband internet device and the terminal device is affected.
Disclosure of Invention
The application provides a message processing method, a message processing device, terminal equipment and mobile broadband internet surfing equipment, so as to solve the problems that performance of a multi-core processor cannot be exerted, and delay and blockage of message data transmission are increased.
In a first aspect, the present application provides a method for processing a message, including:
receiving a first network message, wherein the first network message is a communication network control model transmission module (NTB) packet, the first network message comprises message data and first information, and the first information is used for indicating Internet Protocol (IP) connection information corresponding to the message data; and forwarding the message data in the first network message to a target processor core for processing, wherein the target processor core is determined through the first information.
In the method, the terminal equipment receives the first network message comprising the message data and the first information, and forwards the message data to the corresponding target processor core for processing according to the first information, and as the first information can indicate the IP connection information corresponding to the message data and the message data among different IP connections are mutually independent, the message data corresponding to the different IP connections are distributed to the corresponding processor core, so that the processing can be normally performed, the problem of disordered messages is not caused, the effect of parallel processing of the multi-processor core is realized, the performance of the multi-core processor is fully exerted, the problem of low efficiency of queuing processing the message data through only one processor core is solved, the data transmission efficiency is improved, the delay and the blockage of data transmission are reduced, and the data transmission performance between the broadband network equipment and the terminal equipment is further improved.
In one possible implementation manner, the first information is compression information of a five-tuple of the IP connection corresponding to the packet data.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
In one possible implementation, the method further includes: and analyzing the first network message according to a preset first network protocol to obtain the message data.
In one possible implementation, the first network protocol is a communication network control model NCM protocol.
In the application, the terminal equipment analyzes the first network message according to the NCM protocol, so that the message data in the first network message can be obtained, and the NCM protocol is a universal USB protocol, so that the terminal equipment can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
In one possible implementation, the method further includes: and analyzing the first network message according to a preset first driving program to obtain the first information.
In one possible implementation manner, the first driver is a USB virtual portal driver of the terminal device.
In the method, the terminal equipment analyzes the first network message according to the USB virtual port driver to obtain first information, namely, the method for determining the first information is recorded in the USB virtual port driver of the terminal equipment. Through a preset first driving program, the compatibility of the method on different terminal equipment can be improved, and the use cost is reduced.
In one possible implementation manner, forwarding the message data in the first network message to a target processor core for processing includes: acquiring a forwarding rule, wherein the forwarding rule is used for determining a forwarding relation between first information and a processor core; and forwarding the message data in the first network message to a target processor core corresponding to the first information in the first network message for processing according to the forwarding rule.
In one possible implementation, the forwarding rule is obtained from the first driver.
In the application, the forwarding relation between the first information and the processor core is determined by acquiring the forwarding rule set in the first driver, and the message data corresponding to the first information is forwarded to the target processor core for processing.
In one possible implementation, the forwarding rules are determined according to the load of the processor core.
In the application, the forwarding rule is determined according to the load of the processor core, and because the processor core is different in the corresponding first information and the corresponding message data under different application scenarios, that is, the forwarding rule is different. Therefore, according to the load condition of the processor cores, the forwarding rule is determined, so that the load among the processor cores can be balanced, the utilization rate of the processor cores is further improved, and the data transmission efficiency is improved.
In one possible implementation, the method further includes: at least one processor core is configured as a non-target processor core that does not process the message data.
In this application, for a multi-core processor, the method is used to process a message, and because a plurality of cores are used to process message data in parallel, the efficiency of data processing can be improved, however, when the processor processes the message, other operations or instructions need to be executed, if all cores of the processor are used for processing the message, all cores of the processor can run under high load, so that other instructions and messages cannot be executed, and the comprehensive performance of the processor is affected, and the data transmission efficiency is reduced. By setting at least one processor core as a non-target processor core, other instructions and messages are processed by using the non-target processor core, the problems of high load of all cores and incapability of processing other instructions and messages caused by the high load of all cores are avoided, and the comprehensive working efficiency of the processor is improved.
In a second aspect, the present application provides a method for processing a message, including:
determining first information according to the message data, wherein the first information is used for indicating IP connection information corresponding to the message data; and sending a first network message containing the message data and the first information to terminal equipment, wherein the first network message is an NTB packet.
In the method, the mobile broadband internet access device determines the first information for indicating the IP connection information corresponding to the message data through the message data, and sends the message data and the first information to the terminal device together, so that the terminal device can send the message data corresponding to different IP connections to different processor cores for processing according to the first information, the data processing capacity and efficiency of the processor are improved, meanwhile, the determination and encapsulation process of the first information are completed by the mobile broadband internet access device, after the terminal device receives the first network message sent by the mobile broadband internet access device, the terminal device can directly analyze according to a standard protocol and a driving program to determine how to transfer the message data to different processor cores, the message data is not required to be further analyzed, the load and processing capacity requirements of the terminal device are reduced, and the data transmission capacity and efficiency between the terminal device and the mobile broadband internet access device are further improved.
In one possible implementation, determining the first information according to the message data includes: acquiring a quintuple of the IP connection corresponding to the message data; and compressing the five-tuple to obtain the first information, wherein the byte length of the first information is smaller than that of the five-tuple.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
In one possible implementation, the method further includes: and according to a preset first network protocol, packaging the message data and the first information into a first network message.
In one possible implementation manner, the first network protocol is an NCM protocol, and encapsulating the packet data and the first information into a first network packet according to a preset first network protocol includes: and according to the NCM protocol, packaging the message data according to an NTB packet structure, and inserting the first information into the NTB packet.
In one possible implementation, inserting the first information into the NTB packet includes: and inserting the first information between a communication network control model transmission header NTH and a communication network control model data pointer NDP.
In the application, the mobile broadband internet access device encapsulates the message data and the corresponding first information into the first network message according to the NCM protocol, and the NCM protocol is a universal USB protocol, so that after receiving the first network message, the terminal device provided with the driver can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
In a third aspect, the present application provides a packet processing device, including:
the device comprises a receiving and transmitting module, a first network message receiving module and a second network message receiving module, wherein the first network message comprises message data and first information, and the first information is used for indicating Internet Protocol (IP) connection information corresponding to the message data;
and the processing module is used for forwarding the message data in the first network message to a target processor core for processing, wherein the target processor core is determined by the first information.
In the method, the terminal equipment receives the first network message comprising the message data and the first information, and forwards the message data to the corresponding target processor core for processing according to the first information, and as the first information can indicate the IP connection information corresponding to the message data and the message data among different IP connections are mutually independent, the message data corresponding to the different IP connections are distributed to the corresponding processor core, so that the processing can be normally performed, the problem of disordered messages is not caused, the effect of parallel processing of the multi-processor core is realized, the performance of the multi-core processor is fully exerted, the problem of low efficiency of queuing processing the message data through only one processor core is solved, the data transmission efficiency is improved, the delay and the blockage of data transmission are reduced, and the data transmission performance between the broadband network equipment and the terminal equipment is further improved.
In one possible implementation manner, the first network packet is an NTB packet of a communication network control model transmission module.
In one possible implementation manner, the first information is compression information of a five-tuple of the IP connection corresponding to the packet data.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
In one possible implementation, the processing module is further configured to: and analyzing the first network message according to a preset first network protocol to obtain the message data.
In one possible implementation, the first network protocol is a communication network control model NCM protocol.
In the application, the terminal equipment analyzes the first network message according to the NCM protocol, so that the message data in the first network message can be obtained, and the NCM protocol is a universal USB protocol, so that the terminal equipment can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
In one possible implementation, the processing module is further configured to: and analyzing the first network message according to a preset first driving program to obtain the first information.
In one possible implementation manner, the first driver is a USB virtual portal driver of the terminal device.
In the method, the terminal equipment analyzes the first network message according to the USB virtual port driver to obtain first information, namely, the method for determining the first information is recorded in the USB virtual port driver of the terminal equipment. Through a preset first driving program, the compatibility of the method on different terminal equipment can be improved, and the use cost is reduced.
In one possible implementation manner, the processing module is specifically configured to, when forwarding the packet data in the first network packet to the target processor core for processing: acquiring a forwarding rule, wherein the forwarding rule is used for determining a forwarding relation between first information and a processor core; and forwarding the message data in the first network message to a target processor core corresponding to the first information in the first network message for processing according to the forwarding rule.
In one possible implementation, the forwarding rule is obtained from the first driver.
In the application, the forwarding relation between the first information and the processor core is determined by acquiring the forwarding rule set in the first driver, and the message data corresponding to the first information is forwarded to the target processor core for processing.
In one possible implementation, the forwarding rules are determined according to the load of the processor core.
In the application, the forwarding rule is determined according to the load of the processor core, and because the processor core is different in the corresponding first information and the corresponding message data under different application scenarios, that is, the forwarding rule is different. Therefore, according to the load condition of the processor cores, the forwarding rule is determined, so that the load among the processor cores can be balanced, the utilization rate of the processor cores is further improved, and the data transmission efficiency is improved.
In one possible implementation, the processing module is further configured to: at least one processor core is configured as a non-target processor core that does not process the message data.
In this application, for a multi-core processor, the method is used to process a message, and because a plurality of cores are used to process message data in parallel, the efficiency of data processing can be improved, however, when the processor processes the message, other operations or instructions need to be executed, if all cores of the processor are used for processing the message, all cores of the processor can run under high load, so that other instructions and messages cannot be executed, and the comprehensive performance of the processor is affected, and the data transmission efficiency is reduced. By setting at least one processor core as a non-target processor core, other instructions and messages are processed by using the non-target processor core, the problems of high load of all cores and incapability of processing other instructions and messages caused by the high load of all cores are avoided, and the comprehensive working efficiency of the processor is improved.
In a fourth aspect, the present application provides a packet processing device, including:
the processing module is used for determining first information according to the message data, wherein the first information is used for indicating IP connection information corresponding to the message data;
And the receiving and transmitting module is used for transmitting a first network message containing the message data and the first information to the terminal equipment.
In the method, the mobile broadband internet access device determines the first information for indicating the IP connection information corresponding to the message data through the message data, and sends the message data and the first information to the terminal device together, so that the terminal device can send the message data corresponding to different IP connections to different processor cores for processing according to the first information, the data processing capacity and efficiency of the processor are improved, meanwhile, the determination and encapsulation process of the first information are completed by the mobile broadband internet access device, after the terminal device receives the first network message sent by the mobile broadband internet access device, the terminal device can directly analyze according to a standard protocol and a driving program to determine how to transfer the message data to different processor cores, the message data is not required to be further analyzed, the load and processing capacity requirements of the terminal device are reduced, and the data transmission capacity and efficiency between the terminal device and the mobile broadband internet access device are further improved.
In one possible implementation, the processing module is specifically configured to: acquiring a quintuple of the IP connection corresponding to the message data; and compressing the five-tuple to obtain the first information, wherein the byte length of the first information is smaller than that of the five-tuple.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
In one possible implementation, the processing module is further configured to: and according to a preset first network protocol, packaging the message data and the first information into a first network message.
In one possible implementation, the first network packet is an NTB packet.
In one possible implementation manner, the first network protocol is an NCM protocol, and the processing module is specifically configured to, when packaging the packet data and the first information into a first network packet according to a preset first network protocol: and according to the NCM protocol, packaging the message data according to an NTB packet structure, and inserting the first information into the NTB packet.
In one possible implementation, the processing module is specifically configured to, when inserting the first information into the NTB packet: and inserting the first information between a communication network control model transmission header NTH and a communication network control model data pointer NDP.
In the application, the mobile broadband internet access device encapsulates the message data and the corresponding first information into the first network message according to the NCM protocol, and the NCM protocol is a universal USB protocol, so that after receiving the first network message, the terminal device provided with the driver can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
In a fifth aspect, embodiments of the present application provide a terminal device, including: a processor, a memory, and a transceiver;
the processor is used for controlling the transceiver to transmit and receive signals; the memory is used for storing a computer program; the processor is further configured to invoke and run a computer program stored in the memory, causing the terminal device to perform the method provided by any implementation of the first aspect above.
In a sixth aspect, embodiments of the present application provide a mobile broadband internet surfing device, including a processor configured to execute a computer program to perform a method provided by any implementation manner of the above second aspect; the mobile broadband internet surfing device further comprises a communication interface; the processor is connected with the communication interface.
In a seventh aspect, embodiments of the present application provide a computer readable storage medium comprising computer code which, when run on a computer, causes the computer to perform the method provided by any implementation of the first aspect above.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium comprising computer code which, when run on a computer, causes the computer to perform the method provided by any implementation of the above second aspect.
In a ninth aspect, embodiments of the present application provide a computer program product comprising program code for performing the method provided by any implementation of the first aspect above, when the computer runs the computer program product.
In a tenth aspect, embodiments of the present application provide a computer program product comprising program code for performing the method provided by any implementation of the second aspect above, when the computer runs the computer program product.
In an eleventh aspect, the present application further provides a chip comprising a processor. The processor is configured to invoke and run a computer program stored in the memory to perform corresponding operations and/or procedures performed by the mobile broadband internet access device in the packet processing method according to the embodiments of the present application. Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface.
In a twelfth aspect, the present application also provides a chip, including a processor. The processor is configured to invoke and run a computer program stored in the memory to perform corresponding operations and/or procedures performed by the terminal device in the message processing method of the embodiment of the present application. Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a process of processing an NTB packet by a terminal device;
fig. 3 is a schematic diagram of another process of processing an NTB packet by a terminal device;
fig. 4 is a flow chart of a message processing method provided in the embodiment of the present application;
FIG. 5 is a schematic diagram illustrating forwarding of message data to a target processor core according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating another message processing method according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of correspondence between message data and first information in an NTB packet according to an embodiment of the present application;
fig. 8 is a flow chart of a message processing method provided in an embodiment of the present application;
fig. 9 is a signaling diagram of a message processing method provided in an embodiment of the present application;
FIG. 10 is a flowchart illustrating another message processing method according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of an NTB packet according to an embodiment of the present disclosure;
FIG. 12 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application;
FIG. 13 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application;
fig. 14 is a schematic block diagram of a structure of a terminal device provided in an embodiment of the present application;
fig. 15 is a schematic block diagram of another structure of a terminal device according to an embodiment of the present application;
fig. 16 is a schematic block diagram of a structure of a mobile broadband internet surfing device according to an embodiment of the present application;
fig. 17 is a schematic block diagram of another mobile broadband internet surfing device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application may be applied to a fifth generation mobile communication network (5 th-generation, 5G) communication system or other systems that may occur in the future, and may also be applied to other communication systems, for example: wireless local area network communication (wireless local area network, WLAN) systems, global system for mobile communication (global system of mobile communication, GSM) systems, code division multiple access (code division multiple access, CDMA) systems, wideband code division multiple access (wideband code division multiple access, WCDMA) systems, general packet radio service (general packet radio service, GPRS), long term evolution (long term evolution, LTE) systems, LTE frequency division duplex (frequency division duplex, FDD) systems, LTE time division duplex (time division duplex, TDD), universal mobile telecommunications system (universal mobile telecommunication system, UMTS), worldwide interoperability for microwave access (worldwide interoperability for microwave access, wiMAX) communication systems, and the like.
Some of the terms in this application are explained below to facilitate understanding by those skilled in the art. It should be noted that, when the solution of the embodiment of the present application is applied to a 5G system, or an existing system, or other systems that may occur in the future, names of the mobile broadband internet surfing device and the terminal device may change, but this does not affect implementation of the solution of the embodiment of the present application.
1) The mobile broadband internet surfing device is a portable device capable of realizing non-fixed broadband connection, and can enable the terminal device to flexibly access a broadband network at different places by being connected with the terminal device, and common mobile broadband internet surfing devices are as follows: a mobile network card, a portable router, etc. The mobile broadband internet surfing device can be connected with the terminal device through various physical interfaces, such as a USB port, a network port, wifi and the like. The USB virtual network card based on the USB3.1 protocol can theoretically provide peak rate of 5-10Gbps, and completely meets the specification requirements of the current fifth Generation mobile communication technology (5 th-Generation, 5G) network equipment.
2) A terminal device, also called a terminal, user device, is a device that provides voice and/or data connectivity to a user, e.g., a handheld device, a vehicle-mounted device, etc., with wireless connectivity; the terminal device may also be a device that detects data, e.g., a sensor or the like; the terminal device may also be an intelligent device, for example, an intelligent home device deployed indoors, a wearable device, etc. Common terminal devices include, for example: air quality monitoring sensor, temperature sensor, smoke sensor, cell phone, tablet, notebook, palmtop, mobile internet device (mobile internet device, MID), wearable device, wherein the wearable device for example comprises: smart watches, smart bracelets, pedometers, etc. The terminal device is a terminal device for wireless communication or a terminal device for limited communication which is possible in the present and future.
3) "plurality" means two or more, and the like. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
4) The "corresponding" may refer to an association or binding relationship, and the correspondence between a and B refers to an association or binding relationship between a and B.
It should be noted that, the terms or terms related to the embodiments of the present application may be referred to each other, and are not repeated.
Fig. 1 is a schematic view of an application scenario provided in the embodiment of the present application, as shown in fig. 1, where a terminal device is connected to a mobile broadband internet surfing device through a USB port, so that the terminal device can access a broadband network to implement mobile internet surfing, and an exemplary terminal device may be a personal computer (Personal Computer, PC), and the mobile broadband internet surfing device may be a USB mobile network card. The mobile broadband internet access device is characterized in that an internet access card provided by a network operator is arranged in the mobile broadband internet access device, connection between the mobile broadband internet access device and the Internet can be realized through the internet access card, and meanwhile, after the mobile broadband internet access device is connected with the terminal device through a USB port, a network message acquired from the Internet is forwarded to the terminal device, so that the terminal device can be accessed to the Internet.
In the prior art, the CDC protocol in the USB protocol is a standard protocol of the USB virtual network card. The CDC protocol standardizes the definition of the USB network port, the format of the message and the like. Through CDC protocol, the mobile broadband Internet surfing equipment can provide Internet surfing service for the terminal equipment through the USB port. In order to provide higher performance services, CDC protocols are also being improved, wherein the highest performance protocol is the communication network control model sub-protocol (Communications Class Network Control Model Subclass, abbreviated as NCM protocol). In the NCM protocol, a sending end of a message is specified, a plurality of data packets are combined together to form a big packet, and all the big packets are sent to a receiving end through one USB transmission, and the combined packet is a communication network control model transmission module (NCM Transfer Block, abbreviated as NTB). By adopting the scheme of transmitting data through the NTB, the bandwidth resource of the USB is fully utilized, and the transmission efficiency is greatly improved.
However, in an actual application scenario, when the mobile broadband internet device communicates with the terminal device through the NCM protocol, in order to achieve high-performance data transmission, support of the mobile broadband internet device and the NCM protocol is required, and support of the terminal device is also required. Fig. 2 is a schematic process diagram of processing an NTB packet by a terminal device, as shown in fig. 2, in which the terminal device receives an NTB packet sent by a mobile broadband internet access device, and the NTB packet includes a plurality of data packets, and because a specific time sequence relationship exists among a plurality of related data packets in the same internet of things protocol (Internet Protocol, IP) connection, if a plurality of data packets corresponding to the same IP connection are sent to a plurality of processor cores for processing, the original time sequence of the data packets may be damaged due to asynchronous message processing speeds of different processor cores, so that messages received by application programs of subsequent terminal devices are disordered, and then the messages are invalid.
Therefore, fig. 3 is a schematic diagram of another process of processing an NTB packet by a terminal device, as shown in fig. 3, in the prior art, in order to avoid a packet failure, even if the terminal device includes multiple processor cores, only one processor core is used to sequentially process a data packet in the NTB packet, so that the terminal device processes both the message data and the message in the same processor core, which results in failing to play the performance of the multi-core processor, increasing the delay and blocking of the message data transmission, and affecting the data transmission performance between the mobile broadband internet access device and the terminal device.
In order to solve the problem that the performance of the multi-core processor of the terminal equipment cannot be exerted and delay and blockage of message data transmission are increased, the embodiment of the application provides a message processing method which is applied to the terminal equipment.
Fig. 4 is a flow chart of a message processing method provided in an embodiment of the present application, as shown in fig. 4, where the method includes:
s101, receiving a first network message, wherein the first network message is an NTB packet, the first network message comprises message data and first information, and the first information is used for indicating IP connection information corresponding to the message data.
The first network packet is an NTB packet sent from the mobile broadband internet access device to the terminal device through the USB port, and includes specific communication content for network communication, i.e., packet data, and first information corresponding to the packet data and used for describing a specific source of the packet data. The first information can indicate IP connection information corresponding to the message data, each IP connection can generate a group of message data correspondingly, and a specific time sequence relationship exists among a plurality of message data corresponding to one IP connection. Each IP connection corresponds to a set of message data that can only be processed by one processor core.
The specific manner of receiving the first network message may be that the terminal device sends a message request to the mobile broadband internet surfing device, and after obtaining a response of the mobile broadband internet surfing device to the request, the mobile broadband internet surfing device receives the first network message, or that the mobile broadband internet surfing device directly sends the first network message to the terminal device, which may be set according to specific needs and specific usage situations, and is not specifically limited herein. Further, before receiving the first network packet, the terminal device may further include steps of establishing a connection with the mobile broadband internet surfing device, performing verification, permission, and the like, which may be set according to specific needs, and will not be described herein again.
S102, forwarding message data in the first network message to a target processor core for processing, wherein the target processor core is determined through first information.
After obtaining the NTB packet, the terminal device may parse the NTB packet according to a preset universal USB protocol and a driver pre-installed in the terminal device, and obtain the message data and the first information in the NTB packet from the NTB packet. Fig. 5 is a schematic diagram of forwarding message data to a target processor core according to the embodiment of the present application, as shown in fig. 5, where the first information can indicate IP connection of the corresponding message data, so that the corresponding processor core, that is, the target processor core, is determined according to the first information, and the message data is forwarded to the processor core for processing, so that the timing sequence of the message data is not affected, that is, a plurality of processor cores can process the message data in the NTB packet in parallel.
The first information is, for example, an identifier indicating an IP connection corresponding to the message data, a configuration table representing a mapping relationship between the identifier and the processor core identifier is preset in the terminal device, and according to the configuration table, identifiers of IP connections corresponding to different message data can be mapped to different processor core identifiers, so as to determine the target processor core. Illustratively, the first information is a decimal identification of four bytes in length, e.g., the first information a is "1021"; the first information b is "1104"; the first information c is "2100". According to a preset configuration table, determining a target processor core according to a first byte in the decimal identification of four bytes, namely, the first information a and the first information b correspond to the processor core 1; the first information c corresponds to the processor core 2.
After determining the target processor core corresponding to the first information, forwarding the message data corresponding to the first information to the target processor core respectively, and then analyzing and processing the message data by each processor core through a network protocol stack of an operating system of the terminal equipment to complete a message forwarding process, which is not repeated here.
In the method, the terminal equipment receives the first network message comprising the message data and the first information, and forwards the message data to the corresponding target processor core for processing according to the first information, and as the first information can indicate the IP connection information corresponding to the message data and the message data among different IP connections are mutually independent, the message data corresponding to the different IP connections are distributed to the corresponding processor core, so that the processing can be normally performed, the problem of disordered messages is not caused, the effect of parallel processing of the multi-processor core is realized, the performance of the multi-core processor is fully exerted, the problem of low efficiency of queuing processing the message data through only one processor core is solved, the data transmission efficiency is improved, the delay and the blockage of data transmission are reduced, and the data transmission performance between the broadband network equipment and the terminal equipment is further improved.
Fig. 6 is a flow chart of another message processing method provided in the embodiment of the present application, as shown in fig. 6, where the message processing method provided in the embodiment of the present application further refines step S102 on the basis of the message processing method provided in the embodiment of fig. 4, and the method includes:
step S201, a first network packet is received, where the first network packet is an NTB packet, and the first network packet includes packet data and first information, where the first information is used to indicate internet protocol IP connection information corresponding to the packet data.
Step S202, according to a preset first network protocol, analyzing the NTB packet to obtain message data.
Illustratively, the first network protocol may be an NCM protocol. The NCM protocol is a universal USB protocol, and can be preset by an operating system or a driver installed in the terminal equipment, after the terminal equipment acquires the first network message, the first network message is analyzed according to the NCM protocol, and a message data field of specific communication content is recorded in the NTB packet, so that the message data is obtained.
Of course, the first network protocol may be other private protocols, and the terminal device analyzes the first network message through the preset first network protocol, determines a field where the message data is located, and obtains the message data. Can be set as required, and detailed description of specific implementation is omitted here.
In the application, the terminal equipment analyzes the first network message according to the NCM protocol, so that the message data in the first network message can be obtained, and the NCM protocol is a universal USB protocol, so that the terminal equipment can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
Step 203, according to a preset first driver, the first network message is parsed to obtain first information.
Specifically, the first driver is a USB virtual portal driver of the terminal device. The mobile broadband internet access device is connected with the terminal device through the USB port and provides a wide network access service for the terminal device, and a driver of the mobile broadband internet access device is required to be installed on one side of the terminal device. Different mobile broadband internet device manufacturers typically provide different device drivers. For example, the mobile broadband internet device is an internet card of a USB port manufactured by manufacturer a, and an internet card driver provided by manufacturer a needs to be installed on the terminal device side, so that the terminal device can normally use the internet card of the USB port.
Further, the first information is also set at a certain fixed field starting position in the first network message, and according to a USB virtual port driver installed on the terminal device, the position and the length of the first information can be obtained, and then the field position where the first information is located is analyzed, so that the first information is obtained.
In the method, the terminal equipment analyzes the first network message according to the USB virtual port driver to obtain first information, namely, the method for determining the first information is recorded in the USB virtual port driver of the terminal equipment. Through a preset first driving program, the compatibility of the method on different terminal equipment can be improved, and the use cost is reduced.
Fig. 7 is a schematic diagram of a correspondence between message data and first information in an NTB packet according to an embodiment of the present application, as shown in fig. 7, in the above step S202 and step S203, a terminal device determines field positions of the message data and the first information in the NTB packet according to a determined NCM protocol and a USB virtual portal driver, where each message data corresponds to one first information. Further, the terminal device can obtain the corresponding message data and the first information from the NTB packet.
Step S204, a forwarding rule is obtained, wherein the forwarding rule is used for determining a forwarding relation between the first information and the processor core.
In one possible implementation, the forwarding rule is obtained from the first driver. Specifically, the forwarding rule is information that the terminal device obtains through the first driver and presets inside the terminal device. The forwarding rule characterizes a fixed mapping relationship between the first information and the processor core. Because the first information is information indicating the IP connection to which the message data corresponds, the forwarding rule also characterizes a mapping relationship between the IP connection and the processor core. I.e. different processor cores are designated to handle data resulting from different IP connections.
For example, table 1 is an illustration of a forwarding rule provided in the embodiment of the present application, and as shown in table 1, the forwarding rule may be a forwarding table, and the content of different first information is mapped with the number of the processor core, so as to achieve the purpose of determining the forwarding relationship between the first information and the processor core.
In the application, the forwarding relation between the first information and the processor core is determined by acquiring the forwarding rule set in the first driver, and the message data corresponding to the first information is forwarded to the target processor core for processing.
TABLE 1
Figure BDA0002635464120000101
Figure BDA0002635464120000111
In another possible implementation, the forwarding rules are determined according to the load of the processor core.
Specifically, the forwarding rule is dynamically adjusted, and the terminal equipment adjusts the processor cores corresponding to different first information by acquiring the load conditions of the processor cores in real time. When the load of a certain processor core is smaller, corresponding the first information corresponding to the IP connection with more data traffic to the processor core; and when the load of a certain processor core is larger, the first information corresponding to the IP connection with less data flow is corresponding to the processor core, so that the load balance of different processor cores is realized finally, and the comprehensive working performance of the multi-core processor is improved.
Step 205, forwarding the message data in the first network message to the target processor core corresponding to the first information in the first network message for processing according to the forwarding rule.
Specifically, each message data in the first network message corresponds to one piece of first information, and according to the forwarding rule, each message data in the first network message can be forwarded to the target processor core correspondingly for processing, so that synchronous processing of the message data in the first network message is realized, and the message processing efficiency is improved.
In one possible implementation, before step S201, the method further includes:
in step S200, at least one processor core is set as a non-target processor core, and the non-target processor core does not process the message data.
For a multi-core processor, the method is used for processing the message, and because a plurality of cores are used for processing the message data in parallel, the efficiency of data processing can be improved, however, the processor needs to execute other operations or instructions while processing the message, if all the cores of the processor are used for processing the message, all the cores of the processor can run under high load, so that other instructions and messages cannot be executed, the comprehensive performance of the processor is affected, and the data transmission efficiency is reduced. By setting at least one processor core as a non-target processor core, other instructions and messages are processed by using the non-target processor core, the problems of high load of all cores and incapability of processing other instructions and messages caused by the high load of all cores are avoided, and the comprehensive working efficiency of the processor is improved.
In this embodiment, the implementation manner of S201 is the same as that of S101 in the embodiment shown in fig. 4 of the present application, and specific implementation manner and technical effects may be added to S101 in the embodiment shown in fig. 4, which are not described in detail herein.
Fig. 8 is a flow chart of a message processing method provided in an embodiment of the present application, which is applied to a mobile broadband internet device, as shown in fig. 8, and the method includes:
step 301, determining first information according to the message data, where the first information is used to indicate IP connection information corresponding to the message data.
The message data may be, for example, a network data packet obtained by the mobile broadband internet access device through a network layer, and is used to carry specific information in network communication. The first information may be determined according to specific content carried in the message data, for example, information such as a source, a destination port, and the like of the message data. The first information can indicate IP connection information corresponding to the message data, each IP connection can generate a group of message data correspondingly, and a specific time sequence relationship exists among a plurality of message data corresponding to one IP connection.
Step S302, a first network message containing message data and first information is sent to a terminal device, wherein the first network message is an NTB packet.
The first network message may be obtained by encapsulating the message data and the corresponding first information by a universal USB protocol, such as NCM protocol, for example. The mobile broadband internet equipment sends the first network message to the terminal equipment, the first network message has a specific message structure, and after the terminal equipment obtains the first network message, the terminal equipment can analyze the first network message through NCM protocol and a driving program to obtain message data and first information in the first network message.
Fig. 9 is a signaling diagram of a message processing method provided in an embodiment of the present application, as shown in fig. 9, where the method includes:
s401, the mobile broadband internet equipment acquires message data.
S402, the mobile broadband internet equipment extracts information related to IP connection in the message data and determines first information.
S403, the mobile broadband internet access equipment encapsulates the message data and the first information to obtain a first network message.
S404, the mobile broadband internet surfing device sends the first network message to the terminal device.
S405, the terminal equipment analyzes the first network message to obtain message data and first information.
S406, the terminal equipment sends the message data to the corresponding target processor core according to the first information.
The NTB packet is used for transmitting data to the terminal equipment, so that the bandwidth resource of the USB is fully utilized, and the transmission efficiency is greatly improved, however, in order to avoid the problem that time sequence errors occur when message data corresponding to the same IP connection is transmitted to a plurality of processor cores for processing in the prior art, the data can only be intensively processed by one core of the processor, thereby causing the low use efficiency of the processor. In the embodiment of the application, the first information is obtained by extracting the information related to the IP connection in the obtained message data, the message data and the first information are packaged into the first network message and sent to the terminal equipment, so that the terminal equipment can forward the message data to different processor cores for processing according to the first information. Meanwhile, the determining and packaging process of the first information is completed by the mobile broadband internet surfing equipment, after the terminal equipment receives the first network message sent by the mobile broadband internet surfing equipment, the terminal equipment can directly analyze according to a standard protocol and a driving program to determine how to forward the message data to different processor cores, the message data does not need to be further analyzed, the load and processing capacity requirements of the terminal equipment are reduced, and the data transmission capacity and efficiency between the terminal equipment and the mobile broadband internet surfing equipment are further improved.
Fig. 10 is a flow chart of another message processing method provided in the embodiment of the present application, as shown in fig. 10, where the message processing method provided in the embodiment of the present application further refines step S301 on the basis of the message processing method provided in the embodiment of fig. 8, and the method includes:
s501, acquiring a quintuple of the IP connection corresponding to the message data.
Specifically, the quintuple of the IP connection corresponding to the text data refers to a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol. The quintuple data is recorded in the message data and can be obtained by reading a specific field in the message data, and the process is not described here.
S502, compressing the quintuple to obtain first information, wherein the byte length of the first information is smaller than that of the quintuple.
Determining the IP connection of the message data requires at least one of a source IP address, a source port, a destination IP address and a destination port in the five-tuple, and according to specific conditions, one or more data can be used for merging and compressing to form first information. For example, using the source IP address, the source port, two messages, one first message is determined. Therefore, the first information may be determined by using one or more of the source IP address, the source port, the destination IP address, and the destination port in the five-tuple according to specific situations, which will not be described herein.
Further, since the length of the byte of the quintuple is longer, when the first information is determined by the quintuple, all the information in the quintuple is not required to be processed, but only a part of the information is required to be processed, so that the purpose of compressing the quintuple can be achieved. For example, the first N bits of the source IP address are used as first information; or only the destination port in the five-tuple is used as the first information, and the like, and the five-tuple is compressed to obtain the first information. Here, the setting may be performed according to a specific use scenario.
In the application, the first information corresponding to the quintuple of the IP connection is obtained by compressing the quintuple of the IP connection corresponding to the message data, and the first information contains the quintuple information, so that the IP connection corresponding to the quintuple can be completely determined according to the first information.
S503, according to a preset first network protocol, the message data is packaged according to an NTB packet structure, and the first information is inserted into the NTB packet.
The first network protocol may be, for example, an NCM protocol. The NCM protocol is a universal USB protocol, and can be preset by an operating system or a driver installed in the terminal equipment, after the terminal equipment acquires the first network message, the first network message is analyzed according to the NCM protocol, and a message data field of specific communication content is recorded in the NTB packet, so that the message data is obtained.
Of course, the first network protocol may be other private protocols, and the terminal device analyzes the first network message through the preset first network protocol, determines a field where the message data is located, and obtains the message data. Can be set as required, and detailed description of specific implementation is omitted here.
Specifically, fig. 11 is a schematic diagram of an NTB packet provided in an embodiment of the present application, as shown in fig. 11, according to the specification in the NCM protocol, an NTB packet is composed of three parts: the communication class network control model transport header (NCM Transfer Headers, NTH), the communication class network control model Data Pointer (NCM Data Pointer, NDP) and the Data (DATA) field. Wherein, the offset position of the NDP is recorded in the NTH, the offset and length of each message DATA in the DATA area are recorded in the NDP, and the DATA area records specific DATA content. The terminal device can accurately unpack the packet by means of the information in the NDP, and extract each message data.
Further, according to the NCM protocol, the message data is encapsulated into an NTB packet according to an NTB packet structure, and the first information is inserted into the NTB packet, where it should be noted that the position where the first information is inserted into the NTB packet may be set as required, for example, between the NTH and the NDP, and of course, may be inserted into another position, which is not limited herein specifically. The specific position of the first information insertion is recorded in a driver of the mobile broadband internet surfing device, and the driver can determine the position of the first information in the NTB packet on the terminal device provided with the driver.
It should be noted that, since the first information is inserted into the NTB packet, the offset position of the NDP recorded in the NTH or the offset position of the message data recorded in the NDP is changed according to the insertion position of the first information and the length of the first information, so that the field position of the message data can be correctly determined and the message data can be extracted. Here, the process will not be described in detail.
In the application, the mobile broadband internet access device encapsulates the message data and the corresponding first information into the first network message according to the NCM protocol, and the NCM protocol is a universal USB protocol, so that after receiving the first network message, the terminal device provided with the driver can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
S504, an NTB packet containing the message data and the first information is sent to the terminal equipment.
In this embodiment, the implementation manner of S504 is the same as that of S302 in the embodiment shown in fig. 8 of the present application, and the specific implementation manner and technical effect may be added to S302 in the embodiment shown in fig. 8, which is not described in detail herein.
The message processing method of the embodiment of the present application is described in detail above, and the message processing apparatus of the embodiment of the present application will be described below.
In one example, fig. 12 is a schematic block diagram of a packet processing apparatus provided in an embodiment of the present application. The message processing apparatus 6 provided in this embodiment of the present application may be a terminal device in the foregoing method embodiment, or may be one or more chips in the terminal device. The message processing means 6 may be adapted to perform part or all of the functions of the terminal device in the above-described method embodiments. The message processing device 6 may comprise the following modules.
The transceiver module 61 is configured to receive a first network packet, where the first network packet includes packet data and first information, and the first information is used to indicate internet protocol IP connection information corresponding to the packet data. The transceiver module 61 may perform step S101 of the method shown in fig. 4; or step S201 of the method shown in fig. 6 may be performed.
The processing module 62 is configured to forward the packet data in the first network packet to the target processor core for processing, where the target processor core is determined by the first information. The processing module 62 may perform step S102 of the method shown in fig. 4.
In the method, the terminal equipment receives the first network message comprising the message data and the first information, and forwards the message data to the corresponding target processor core for processing according to the first information, and as the first information can indicate the IP connection information corresponding to the message data and the message data among different IP connections are mutually independent, the message data corresponding to the different IP connections are distributed to the corresponding processor core, so that the processing can be normally performed, the problem of disordered messages is not caused, the effect of parallel processing of the multi-processor core is realized, the performance of the multi-core processor is fully exerted, the problem of low efficiency of queuing processing the message data through only one processor core is solved, the data transmission efficiency is improved, the delay and the blockage of data transmission are reduced, and the data transmission performance between the broadband network equipment and the terminal equipment is further improved.
Illustratively, the first network packet is a communication network control model transport module NTB packet.
The first information is illustratively compression information of five-tuple of the IP connection corresponding to the message data.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
Illustratively, the processing module 62 is further configured to: and analyzing the first network message according to a preset first network protocol to obtain message data. At this time, the processing module 62 may perform step S202 of the method shown in fig. 6.
Illustratively, the first network protocol is a communication-like network control model NCM protocol.
In the application, the terminal equipment analyzes the first network message according to the NCM protocol, so that the message data in the first network message can be obtained, and the NCM protocol is a universal USB protocol, so that the terminal equipment can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
Illustratively, the processing module 62 is further configured to: and analyzing the first network message according to a preset first driving program to obtain first information. At this time, the processing module 62 may perform step S203 of the method shown in fig. 6.
The first driver is illustratively a USB virtual portal driver of the terminal device.
In the method, the terminal equipment analyzes the first network message according to the USB virtual port driver to obtain first information, namely, the method for determining the first information is recorded in the USB virtual port driver of the terminal equipment. Through a preset first driving program, the compatibility of the method on different terminal equipment can be improved, and the use cost is reduced.
Illustratively, the processing module 62 is specifically configured to, when forwarding the packet data in the first network packet to the target processor core for processing: acquiring a forwarding rule, wherein the forwarding rule is used for determining a forwarding relation between the first information and the processor core; and forwarding the message data in the first network message to a target processor core corresponding to the first information in the first network message for processing according to the forwarding rule. At this time, the processing module 62 may perform steps S204-S205 of the method shown in fig. 6.
Illustratively, the forwarding rule is obtained from the first driver.
In the application, the forwarding relation between the first information and the processor core is determined by acquiring the forwarding rule set in the first driver, and the message data corresponding to the first information is forwarded to the target processor core for processing.
In one possible implementation, the forwarding rules are determined according to the load of the processor core.
In the application, the forwarding rule is determined according to the load of the processor core, and because the processor core is different in the corresponding first information and the corresponding message data under different application scenes, that is, the forwarding rule is different. Therefore, according to the load condition of the processor cores, the forwarding rule is determined, so that the load among the processor cores can be balanced, the utilization rate of the processor cores is further improved, and the data transmission efficiency is improved.
Illustratively, the processing module 62 is further configured to: at least one processor core is configured as a non-target processor core that does not process the message data. At this time, the processing module 62 may perform step S200 of the method shown in fig. 6.
In this application, for a multi-core processor, the method is used to process a message, and because a plurality of cores are used to process message data in parallel, the efficiency of data processing can be improved, however, when the processor processes the message, other operations or instructions need to be executed, if all cores of the processor are used for processing the message, all cores of the processor can run under high load, so that other instructions and messages cannot be executed, and the comprehensive performance of the processor is affected, and the data transmission efficiency is reduced. By setting at least one processor core as a non-target processor core, other instructions and messages are processed by using the non-target processor core, the problems of high load of all cores and incapability of processing other instructions and messages caused by the high load of all cores are avoided, and the comprehensive working efficiency of the processor is improved.
The message processing apparatus of the embodiment shown in fig. 12 may be used to implement the technical solution of the embodiment shown in fig. 4 or fig. 6 in the above method, and its implementation principle and technical effects are similar, and are not repeated here.
In one example, fig. 13 is a schematic block diagram of a packet processing apparatus provided in an embodiment of the present application. The message processing device 7 provided in this embodiment of the present application may be a mobile broadband internet surfing device in the above method embodiment, or may be one or more chips in the mobile broadband internet surfing device. The message processing device 7 may be configured to perform some or all of the functions of the mobile broadband internet surfing device in the above-described method embodiment. The message processing device 7 may comprise the following modules.
The processing module 71 is configured to determine first information according to the message data, where the first information is used to indicate IP connection information corresponding to the message data. The processing module 71 may perform step S301 of the method shown in fig. 8.
The transceiver module 72 is configured to send a first network packet including the packet data and the first information to the terminal device. The transceiver module 72 may perform step S302 of the method shown in fig. 8, or may perform step S504 of the method shown in fig. 10.
In the method, the mobile broadband internet access device determines the first information for indicating the IP connection information corresponding to the message data through the message data, and sends the message data and the first information to the terminal device together, so that the terminal device can send the message data corresponding to different IP connections to different processor cores for processing according to the first information, the data processing capacity and efficiency of the processor are improved, meanwhile, the determination and encapsulation process of the first information are completed by the mobile broadband internet access device, after the terminal device receives the first network message sent by the mobile broadband internet access device, the terminal device can directly analyze according to a standard protocol and a driving program to determine how to transfer the message data to different processor cores, the message data is not required to be further analyzed, the load and processing capacity requirements of the terminal device are reduced, and the data transmission capacity and efficiency between the terminal device and the mobile broadband internet access device are further improved.
In one possible implementation, the processing module 71 is specifically configured to: acquiring a quintuple of the IP connection corresponding to the message data; compressing the quintuple to obtain first information, wherein the byte length of the first information is smaller than that of the quintuple. At this time, the processing module 71 may perform steps S501 to S502 of the method shown in fig. 10.
In this application, the five-tuple of the IP connection is: the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol, the first information corresponding to the quintuple of the IP connection is obtained through compressing the quintuple of the IP connection corresponding to the message data, and the IP connection corresponding to the quintuple can be completely determined according to the first information because the first information contains the quintuple information, and meanwhile, the data length is saved and the data transmission efficiency is improved because the first information is compressed and is shorter than the quintuple byte length.
In one possible implementation, the processing module 71 is further configured to: and according to a preset first network protocol, the message data and the first information are packaged into a first network message. At this time, the processing module 71 may perform step S503 of the method shown in fig. 10.
In one possible implementation, the first network packet is an NTB packet.
In one possible implementation manner, the first network protocol is an NCM protocol, and the processing module is specifically configured to, when packaging the packet data and the first information into the first network packet according to a preset first network protocol: according to NCM protocol, packet data is encapsulated according to NTB packet structure, and first information is inserted into NTB packet. At this time, the processing module 71 may perform step S503 of the method shown in fig. 10.
In one possible implementation, the processing module 71 is specifically configured to, when inserting the first information into the NTB packet: the first information is inserted between a communication network control model transport header (NTH) and a communication network control model data pointer (NDP). At this time, the processing module 71 may perform step S503 of the method shown in fig. 10.
In the application, the mobile broadband internet access device encapsulates the message data and the corresponding first information into the first network message according to the NCM protocol, and the NCM protocol is a universal USB protocol, so that after receiving the first network message, the terminal device provided with the driver can directly use the NCM protocol to realize the analysis of the first network message, does not need additional configuration or additional support of an operating system, and has better compatibility.
The message processing apparatus of the embodiment shown in fig. 13 may be used to implement the technical solution of any one of the embodiments shown in fig. 8 or fig. 10 in the above method, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 14 is a schematic block diagram of a structure of a terminal device according to an embodiment of the present application. As shown in fig. 14, the terminal device 8 includes a processor 81, a memory 82, and a transceiver 83.
The processor 81 is used for controlling the transceiver 83 to transmit and receive signals; the memory 82 is used for storing a computer program; the processor 81 is also arranged to invoke and run a computer program stored in the memory 82 for causing the terminal device 8 to perform the method as provided in the corresponding embodiment of fig. 4 or 6.
Wherein the processor 81, the memory 82 and the transceiver 83 are connected by a bus 84.
The relevant descriptions and effects corresponding to the steps in the embodiments corresponding to fig. 4 to fig. 6 may be understood correspondingly, and are not repeated here.
Fig. 15 is a schematic block diagram of another structure of a terminal device according to an embodiment of the present application. As shown in fig. 15, the terminal device 9 includes a transmitter 91, a receiver 92, and a processor 93.
Wherein the processor 93 is configured to perform the steps of fig. 4, or wherein the processor 93 is configured to perform the steps of fig. 6. The processor 91 is used to implement the modules of fig. 12.
The terminal device 9 of the embodiment shown in fig. 15 may be used to execute the technical solution of the above method embodiment, or the program of each module of the embodiment shown in fig. 12, and the processor 93 invokes the program to execute the operation of the above method embodiment, so as to implement each module shown in fig. 12.
The processor 93 may be a controller, and is shown as "controller/processor 93" in fig. 15. The transmitter 91 and the receiver 92 are used to support the transceiving of information and communication between the terminal device 9 and the mobile broadband internet device in the above embodiment.
Further, the terminal device 9 may also comprise a memory 94, the memory 94 being used for storing program codes and data of the terminal device 9. Further, the terminal device 9 may also comprise a communication interface 95.
The processor 93, e.g., a central processing unit (Central Processing Unit, CPU), may also be one or more integrated circuits configured to implement the above methods, e.g.: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more microprocessors (digital singnal processor, DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), or the like. The memory 94 may be one memory or may be a collective term for a plurality of memory elements.
It should be noted that, in the embodiment of the present application, the transmitter 91 included in the terminal device of fig. 15 may perform a transmitting action, the processor 93 may perform a processing action, and the receiver 92 may perform a receiving action in the foregoing method embodiment. Reference is specifically made to the method embodiments described above.
Fig. 16 is a schematic block diagram of a structure of a mobile broadband internet surfing device according to an embodiment of the present application. As shown in fig. 16, the mobile broadband internet device 10 includes a processor 101, a memory 102, and a transceiver 103.
The processor 101 is configured to control the transceiver 103 to transmit and receive signals; the memory 102 is used for storing a computer program; the processor 101 is further configured to invoke and run a computer program stored in the memory 102, such that the mobile broadband internet device 10 performs the method as provided by the corresponding embodiment of fig. 8 or 10.
Wherein the processor 101, memory 102, and transceiver 103 are coupled by bus 104.
The relevant descriptions and effects corresponding to the steps in the embodiments corresponding to fig. 8 and fig. 10 may be correspondingly understood, and are not repeated herein.
Fig. 17 is a schematic block diagram of another mobile broadband internet surfing device according to an embodiment of the present application. As shown in fig. 17, the mobile broadband internet device 11 includes a transmitter 111, a receiver 112, and a processor 113.
Wherein the processor 113 is configured to perform the steps of fig. 8, or wherein the processor 113 is configured to perform the steps of fig. 10. The processor 113 is used to implement the modules of fig. 13.
The mobile broadband internet device 11 of the embodiment shown in fig. 17 may be used to perform the technical solution of the above method embodiment, or the program of each module of the embodiment shown in fig. 13, and the processor 113 invokes the program to perform the operation of the above method embodiment to implement each module shown in fig. 13.
The processor 113 may be a controller, and is shown as "controller/processor 113" in fig. 17. The transmitter 111 and the receiver 112 are used to support the transceiving and communication between the mobile broadband internet device 11 and the terminal device in the above embodiment and the network device in the network environment.
Further, the mobile broadband internet device 11 may further comprise a memory 114, wherein the memory 114 is configured to store program codes and data of the mobile broadband internet device 11. Further, the mobile broadband internet device 11 may also include a communication interface 115.
The processor 113, e.g., a central processing unit (Central Processing Unit, CPU), may also be one or more integrated circuits configured to implement the above methods, e.g.: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more microprocessors (digital singnal processor, DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), or the like. The memory 114 may be one memory or may be a collective term for a plurality of memory elements.
It should be noted that, in the embodiment of the present application, the transmitter 111 included in the mobile broadband internet device 11 of fig. 17 may perform a transmitting action corresponding to the foregoing method embodiment, the processor 113 performs a processing action, and the receiver 112 may perform a receiving action. Reference is specifically made to the method embodiments described above.
Embodiments of the present application also provide a computer-readable storage medium comprising computer code which, when run on a computer, causes the computer to perform a method as provided by any of the implementations corresponding to fig. 4-7.
Embodiments of the present application also provide a computer-readable storage medium including computer code which, when run on a computer, causes the computer to perform a method as provided by any of the implementations corresponding to fig. 8, 10.
Embodiments of the present application also provide a computer program product comprising program code to perform a method as provided by any of the implementations corresponding to fig. 4-7 when the computer runs the computer program product.
Embodiments of the present application also provide a computer program product comprising program code which, when the computer runs the computer program product, performs the method provided by any of the implementations corresponding to fig. 8 and 10.
The embodiment of the application also provides a chip comprising a processor. The processor is configured to invoke and run a computer program stored in the memory to perform corresponding operations and/or flows performed by the terminal device in the message processing method provided in any of the implementations corresponding to fig. 4-7. Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface. In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
The embodiment of the application also provides a chip comprising a processor. The processor is configured to call and run a computer program stored in the memory, so as to execute corresponding operations and/or flows executed by the mobile broadband internet surfing device in the message processing method provided in any implementation manner corresponding to fig. 8 and fig. 10. Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface. In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.

Claims (21)

1. A message processing method applied to a terminal device, the method comprising:
receiving a first network message, wherein the first network message is a communication network control model transmission module (NTB) packet, the first network message comprises message data and first information, and the first information is used for indicating an identifier of an Internet Protocol (IP) connection corresponding to the message data;
and forwarding the message data in the first network message to a target processor core for processing, wherein a configuration table is preset in the terminal equipment, the configuration table is used for representing the mapping relation between the identification of the IP connection and the identification of the processor core, and the target processor core is determined by the identification of the IP connection indicated by the first information and the configuration table.
2. The method of claim 1, wherein the first information is compression information of a five-tuple of the IP connection corresponding to the message data, the five-tuple including a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
3. The method according to any one of claims 1-2, further comprising:
and analyzing the first network message according to a preset first network protocol to obtain the message data.
4. A method according to claim 3, wherein the first network protocol is a communication network control model, NCM, protocol.
5. The method according to any one of claims 1-2, 4, further comprising:
and analyzing the first network message according to a preset first driving program to obtain the first information.
6. The method of claim 5, wherein the first driver is a universal serial bus USB virtual portal driver of a terminal device.
7. The method of claim 5, wherein forwarding the message data in the first network message to a target processor core for processing comprises:
Acquiring a forwarding rule, wherein the forwarding rule is used for determining a forwarding relation between first information and a processor core;
and forwarding the message data in the first network message to a target processor core corresponding to the first information in the first network message for processing according to the forwarding rule.
8. The method of claim 7, wherein the forwarding rule is obtained from the first driver.
9. The method of claim 7, wherein the forwarding rules are determined based on a load of the processor core.
10. The method of any one of claims 1-2, 4, 6-9, wherein the method further comprises:
at least one processor core is configured as a non-target processor core that does not process the message data.
11. The message processing method is applied to mobile broadband internet equipment and is characterized by comprising the following steps:
determining first information according to the message data, wherein the first information is used for indicating IP connection information corresponding to the message data;
and sending a first network message containing the message data and the first information to terminal equipment, wherein the first network message is an NTB packet.
12. The method of claim 11, wherein determining the first information based on the message data comprises:
acquiring a quintuple of the IP connection corresponding to the message data, wherein the quintuple comprises a source IP address, a source port, a destination IP address, a destination port and a transport layer protocol;
and compressing the five-tuple to obtain the first information, wherein the byte length of the first information is smaller than that of the five-tuple.
13. The method according to claim 11 or 12, characterized in that the method further comprises:
and according to a preset first network protocol, packaging the message data and the first information into a first network message.
14. The method of claim 13, wherein the first network protocol is an NCM protocol, and encapsulating the packet data and the first information into a first network packet according to a preset first network protocol includes:
and according to the NCM protocol, packaging the message data according to an NTB packet structure, and inserting the first information into the NTB packet.
15. The method of claim 14, wherein inserting the first information into the NTB packet comprises:
And inserting the first information between a communication network control model transmission header NTH and a communication network control model data pointer NDP.
16. A message processing apparatus, applied to a terminal device, the apparatus comprising:
the network control module comprises a receiving and transmitting module and a receiving module, wherein the receiving and transmitting module is used for receiving a first network message, the first network message is a communication network control model transmission module (NTB) packet, the first network message comprises message data and first information, and the first information is used for indicating Internet Protocol (IP) connection information corresponding to the message data;
and the processing module is used for forwarding the message data in the first network message to a target processor core for processing, wherein the target processor core is determined by the first information.
17. A message processing apparatus for use in a mobile broadband internet access device, the apparatus comprising:
the processing module is used for determining first information according to the message data, wherein the first information is used for indicating IP connection information corresponding to the message data;
and the receiving and transmitting module is used for transmitting a first network message containing the message data and the first information to the terminal equipment, wherein the first network message is an NTB packet.
18. A terminal device, comprising: a processor, a memory, and a transceiver;
the processor is used for controlling the transceiver to transmit and receive signals;
the memory is used for storing a computer program;
the processor is further configured to invoke and run the computer program stored in the memory, causing the mobile broadband internet device to perform the method of any of the claims 1 to 10.
19. A mobile broadband internet access device, comprising: a processor, a memory, and a transceiver;
the processor is used for controlling the transceiver to transmit and receive signals;
the memory is used for storing a computer program;
the processor is further configured to invoke and run the computer program stored in the memory, causing the mobile broadband internet device to perform the method of any of the claims 11 to 15.
20. A computer readable storage medium comprising computer code which, when run on a computer, causes the computer to perform the method of any of claims 1 to 10.
21. A computer readable storage medium comprising computer code which, when run on a computer, causes the computer to perform the method of any of claims 11 to 15.
CN202010823941.0A 2020-08-17 2020-08-17 Message processing method, device, terminal equipment and mobile broadband internet surfing equipment Active CN114079675B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010823941.0A CN114079675B (en) 2020-08-17 2020-08-17 Message processing method, device, terminal equipment and mobile broadband internet surfing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010823941.0A CN114079675B (en) 2020-08-17 2020-08-17 Message processing method, device, terminal equipment and mobile broadband internet surfing equipment

Publications (2)

Publication Number Publication Date
CN114079675A CN114079675A (en) 2022-02-22
CN114079675B true CN114079675B (en) 2023-06-06

Family

ID=80281182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010823941.0A Active CN114079675B (en) 2020-08-17 2020-08-17 Message processing method, device, terminal equipment and mobile broadband internet surfing equipment

Country Status (1)

Country Link
CN (1) CN114079675B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013181200A1 (en) * 2012-05-29 2013-12-05 Mcci Corporation Enabling legacy applications to achieve end-to-end communication with corresponding legacy device services
WO2015194534A1 (en) * 2014-06-17 2015-12-23 日本電気株式会社 Switching device, computer system, method, and program
CN107534616A (en) * 2015-05-20 2018-01-02 英特尔Ip公司 The service quality of USB
CN109962832A (en) * 2017-12-26 2019-07-02 华为技术有限公司 The method and apparatus of Message processing
CN111049910A (en) * 2019-12-16 2020-04-21 瑞斯康达科技发展股份有限公司 Method, device, equipment and medium for processing message
CN111083792A (en) * 2018-10-22 2020-04-28 华为技术有限公司 Data transmission method, device and equipment in WiFi network
CN111092898A (en) * 2019-12-24 2020-05-01 华为终端有限公司 Message transmission method and related equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013181200A1 (en) * 2012-05-29 2013-12-05 Mcci Corporation Enabling legacy applications to achieve end-to-end communication with corresponding legacy device services
WO2015194534A1 (en) * 2014-06-17 2015-12-23 日本電気株式会社 Switching device, computer system, method, and program
CN107534616A (en) * 2015-05-20 2018-01-02 英特尔Ip公司 The service quality of USB
CN109962832A (en) * 2017-12-26 2019-07-02 华为技术有限公司 The method and apparatus of Message processing
CN111083792A (en) * 2018-10-22 2020-04-28 华为技术有限公司 Data transmission method, device and equipment in WiFi network
CN111049910A (en) * 2019-12-16 2020-04-21 瑞斯康达科技发展股份有限公司 Method, device, equipment and medium for processing message
CN111092898A (en) * 2019-12-24 2020-05-01 华为终端有限公司 Message transmission method and related equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"MPIOV: Scaling hardware-based I/O virtualization for mixed-criticality embedded real-time systems using non transparent bridges to (Multi-Core) multi-processor systems";Daniel Münch; Michael Paulitsch; Oliver Hanka; Andreas Herkersdo;《2015 Design, Automation & Test in Europe Conference & Exhibition (DATE)》;20150423;全文 *
"高通量I/O通信协议栈功能验证的研究及实现";张良;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;20160430;全文 *

Also Published As

Publication number Publication date
CN114079675A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
EP4142233A1 (en) Packet forwarding method and apparatus, and device and storage medium
CN107483370B (en) Method for transmitting IP and CAN service on FC network
KR101330900B1 (en) Apparatus and method for supporting higher data rates on links with variable frame sizes
US11050665B2 (en) Data transmission method, apparatus, transmitting end, receiving end and system
CN110535812B (en) Message transmission method, communication device and system
KR20210049335A (en) Method of translating ip packet for tethering service and communication system performing the same
WO2016119269A1 (en) Service data stream data packet processing method and device
CN114079675B (en) Message processing method, device, terminal equipment and mobile broadband internet surfing equipment
CN116095197B (en) Data transmission method and related device
CN109951458B (en) RapidIO/FC protocol conversion system and method applied to simulation ICP environment
WO2023173876A1 (en) Data communication method and apparatus, device and medium
WO2022227484A1 (en) Data communication method and apparatus, computer device, and storage medium
CN112039801B (en) Method, system and proxy server for setting IP information
EP4156765A1 (en) Microwave data processing method, apparatus, and device
WO2023097903A1 (en) Message transmission method and apparatus, electronic device, and storage medium
US20240069754A1 (en) Computing system and associated method
CN116801308A (en) Data processing method, data processing device, electronic equipment and storage medium
WO2021152363A2 (en) Layer 2 uplink data inline processing using integrated circuits
CN117615042A (en) Data communication method, device, computer equipment and storage medium
CN111954265A (en) Method for generating packet header, terminal and storage medium
CN115225565A (en) Data packet receiving and sending configuration, receiving and sending method and device and electronic equipment
CN115701063A (en) Message transmission method and communication device
US20080310434A1 (en) Method and apparatus for the creation of TCP segments by simultaneous use of computing device components

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant