[go: up one dir, main page]

CN118301222A - Network quality acquisition method, device, equipment and storage medium - Google Patents

Network quality acquisition method, device, equipment and storage medium Download PDF

Info

Publication number
CN118301222A
CN118301222A CN202410397581.0A CN202410397581A CN118301222A CN 118301222 A CN118301222 A CN 118301222A CN 202410397581 A CN202410397581 A CN 202410397581A CN 118301222 A CN118301222 A CN 118301222A
Authority
CN
China
Prior art keywords
message
target
network quality
thread
session list
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.)
Pending
Application number
CN202410397581.0A
Other languages
Chinese (zh)
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.)
Shenzhen Sundray Technologies Co ltd
Original Assignee
Shenzhen Sundray 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 Shenzhen Sundray Technologies Co ltd filed Critical Shenzhen Sundray Technologies Co ltd
Priority to CN202410397581.0A priority Critical patent/CN118301222A/en
Publication of CN118301222A publication Critical patent/CN118301222A/en
Pending legal-status Critical Current

Links

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/12Protocol engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • 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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network quality acquisition method, a device, equipment and a storage medium, which relate to the technical field of computers and comprise the following steps: triggering a packet receiving interrupt to send a first message to a network protocol stack when the first message is received; copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors; and processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message. In summary, the application solves the problem of low forwarding performance of the network protocol stack in the traditional acquisition scheme, and improves the efficiency and the safety of network quality acquisition.

Description

Network quality acquisition method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for network quality acquisition.
Background
The existing network quality acquisition process is carried out in a packet receiving soft interrupt of a linux kernel. Specifically, after the message enters the network equipment, triggering packet receiving interruption, and then analyzing the message by the network protocol stack and calculating the corresponding network quality.
In the first aspect, the network protocol stack needs to collect network quality of the message before continuing the normal forwarding flow of the service, so that the forwarding performance of the network protocol stack becomes low; in the second aspect, the packet receiving interrupt interrupts the current processing, and as mutual exclusion exists between the resources, a mutual exclusion lock needs to be added to ensure the safety of the resources, so that the processing performance is further reduced; in the third aspect, resource mutual exclusion among multiple cores can cause unknown tampering or deadlock of resources, and further cause system breakdown, so that the security is lowered; in the fourth aspect, the prior art has higher requirements on related knowledge of the developer kernel, and has higher development and maintenance difficulties.
Accordingly, the above technical problems are to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and storage medium for collecting network quality, which can solve the problem of low forwarding performance of a network protocol stack in the conventional collection scheme, and improve efficiency and security of network quality collection. The specific scheme is as follows:
The first aspect of the present application provides a network quality acquisition method, including:
triggering a packet receiving interrupt to send a first message to a network protocol stack when the first message is received;
Copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors;
And processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
Optionally, the sending the second message to a target central processor among a preset plurality of central processors includes:
Cutting the redundant data part of the second message to obtain a cut second message;
And sending the cut second message to the target central processor in the preset plurality of central processors according to the media access control address of the cut second message.
Optionally, the sending the second message to a target central processor among a preset plurality of central processors includes:
sending the second message to a message buffer queue of the target central processor in the preset plurality of central processors, and waking up a target thread of the target central processor;
And acquiring the second message from the message buffer queue by using the target thread, and sending the second message to a pipeline workstation of the target central processing unit.
Optionally, the pipeline workstation comprises a plurality of threads, and the plurality of threads is a pipeline design mode.
Optionally, the processing the second message in the buffer queue by using the pipeline workstation of the target central processing unit to obtain the network quality of the second message includes:
analyzing the second message in the buffer queue by using a first thread of the pipeline workstation to obtain an analysis result;
updating a session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list;
and calculating the network quality of the second message by using the third thread of the pipeline workstation and the target session list.
Optionally, the analyzing the second message by using the first thread of the pipeline workstation to obtain an analysis result includes:
analyzing the second message by using the first thread of the pipeline workstation to obtain five-element information;
Calculating to obtain a hash value through the five-element information;
Correspondingly, the updating the session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list includes:
And updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list.
Optionally, the updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list includes:
if the target session corresponding to the hash value is not found from the session list by the second thread of the pipeline workstation, creating the target session in the session list to obtain the target session list;
And if the target session corresponding to the hash value is found from the session list by using the second thread of the pipeline workstation, updating the searching hit time of the target session in the session list to obtain the target session list.
A second aspect of the present application provides a network quality acquisition device, comprising:
the first sending module is used for triggering packet receiving interruption to send the first message to a network protocol stack when the first message is received;
The second sending module is used for copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors;
and the network quality acquisition module is used for processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
A third aspect of the application provides an electronic device comprising a processor and a memory; wherein the memory is configured to store a computer program that is loaded and executed by the processor to implement the aforementioned network quality acquisition method.
A fourth aspect of the present application provides a computer readable storage medium having stored therein computer executable instructions which, when loaded and executed by a processor, implement the aforementioned network quality acquisition method.
In the application, when a first message is received, triggering a packet receiving interrupt so as to send the first message to a network protocol stack; copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors; and processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message. In summary, in the first aspect, compared with the traditional technology that the network quality is acquired through the packet receiving soft interrupt, the pipeline workstation of the target central processing unit replaces the network protocol stack in the packet receiving soft interrupt to complete the acquisition of the network quality, so that the network protocol stack can continue the original normal forwarding flow without waiting for the acquisition of the network quality, and the original normal forwarding flow can be immediately started after the message is sent to the target central processing unit in the preset plurality of central processing units, thereby greatly improving the processing performance of the network protocol stack. In a second aspect, the present application proposes a single-core processing mechanism, and performs network quality acquisition by presetting a plurality of central processing units, so as to reduce the problems of low performance caused by mutual exclusion lock and unstable system caused by deadlock, and improve security. In the third aspect, the preset multiple central processing units support concurrent batch processing of the messages, so that the performance of network quality acquisition is greatly improved. In the fourth aspect, the application is simpler to develop and maintain, and reduces the maintenance difficulty of developers.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a network quality acquisition method provided by the present application;
Fig. 2 is a flowchart of a specific network quality acquisition method provided in the present application;
Fig. 3 is a schematic structural diagram of a network quality acquisition device according to the present application;
Fig. 4 is a block diagram of a network quality acquisition electronic device according to the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the prior art, a network protocol stack can continue a normal service forwarding flow after network quality acquisition is performed on a message, so that forwarding performance of the network protocol stack is low; the packet receiving interruption interrupts the current processing, and as mutual exclusion exists among the resources, a mutual exclusion lock needs to be added to ensure the safety of the resources, so that the processing performance is further reduced; the mutual exclusion of the resources among the multiple cores can cause the unknown tampering or deadlock of the resources, thereby causing system breakdown and lowering the security; the requirements on the related knowledge of the developer kernel are higher, and the development and maintenance difficulties are higher.
Fig. 1 is a network quality acquisition flowchart provided in an embodiment of the present application. Referring to fig. 1, the method comprises:
s11: and triggering a packet receiving interrupt when receiving the first message so as to send the first message to a network protocol stack.
Referring to fig. 2, in this embodiment, when a first packet is received, a packet receiving interrupt is triggered to send the first packet to a network protocol stack. It should be noted that the first message includes, but is not limited to, ARP (Address Resolution Protocol ) message, DNS (Domain NAME SYSTEM, domain name system) message, DHCP (Dynamic Host Configuration Protocol ) message, TCP (Transmission Control Protocol, transmission control protocol) message, UDP (user datagram protocol ) message, ICMP (Internet Control Message Protocol, network control message protocol) message, and the like.
S12: and copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors.
In this embodiment, the first message is copied through the network protocol stack to obtain a second message, and a redundant data portion of the second message is cut to obtain a cut second message, and then the cut second message is sent to the target central processor in the preset multiple central processors according to a media access Control address (MEDIA ACCESS Control or Medium Access Control, MAC) of the cut second message.
In a specific embodiment, the second message after clipping is sent to a message buffer queue of the target central Processor in the preset multiple central processors, and a target thread of the target central Processor is woken up, where the target thread is a CPU (central Processor) worker in fig. 2, as shown in fig. 2, the target thread in the first target central Processor is a CPU 1 worker, the target thread in the second target central Processor is a CPU 2 worker, and further, after the target thread is woken up, the second message after clipping is obtained from the message buffer queue, and the second message after clipping is sent to a pipeline workstation of the target central Processor.
It can be understood that after the network protocol stack sends the cut second message to the corresponding target central processing unit, the original message forwarding or discarding process can be immediately continued without waiting for the quality acquisition process of the target central processing unit, so that the processing performance of the network protocol stack is greatly improved.
S13: and processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
In this embodiment, the pipeline workstation includes a plurality of threads, and the plurality of threads are in a pipeline design mode. Referring to fig. 2, the first thread is an parsing message thread in a pipeline workstation, the second thread is a session searching thread in the pipeline workstation, and the third thread is a quality acquisition thread in the pipeline workstation. In this way, the processing the second message by using the target central processing unit to obtain the network quality of the second message includes: analyzing the second message in the buffer queue by using a first thread of the pipeline workstation to obtain an analysis result; updating a session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list; and calculating the network quality of the second message by using the third thread of the pipeline workstation and the target session list.
In a specific embodiment, the parsing the second message in the buffer queue by using the first thread of the pipeline workstation to obtain a parsing result includes: analyzing the second message by using the first thread of the pipeline workstation to obtain five-element information, and calculating the hash value by the five-element information; correspondingly, the updating the session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list includes: and updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list. It is understood that five-membered information includes source ip (Internet Protocol, protocol interconnected between networks), destination ip, source port, destination port, and protocol.
In a specific embodiment, updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list includes: if the target session corresponding to the hash value is not found from the session list by the second thread of the pipeline workstation, creating the target session in the session list to obtain the target session list; and if the target session corresponding to the hash value is found from the session list by using the second thread of the pipeline workstation, updating the searching hit time of the target session in the session list to obtain the target session list. As can be seen from the foregoing, in this embodiment, if a target session corresponding to the hash value is not found in the session list, the target session is created in the session list according to the hash value, and if a target session corresponding to the hash value can be found in the session list, the hit time of the target session in the session list is updated, so as to obtain the target session list.
In this embodiment, the search hit time threshold may be set, for example, the search hit time threshold is set to 5 minutes, so that if a certain session is not hit by the search for more than 5 minutes, the session is deleted, so that the resource utilization rate of the session list is improved.
In this embodiment, because the sessions in the session list may be regarded as upstream and downstream of the same piece of data, the difference is that the data is unpacked and unpacked, so in this embodiment, the network quality may be calculated according to the target session list, and in a specific embodiment, if a piece of data only has unpacked and not unpacked, it is determined that the network quality of the piece of data is poor.
In summary, the application provides a single-core processing mechanism, and network quality acquisition is respectively carried out by presetting a plurality of central processing units, so that the problems of low performance caused by mutual exclusion locking and system instability caused by deadlock are reduced, and the safety is improved. In addition, each central processing unit corresponds to one pipeline workstation, and each pipeline workstation can process messages in batches at the same time to finish quality acquisition work, so that network quality acquisition performance is greatly improved. It should be noted that the network quality acquisition method of the present application can be applied to a switch network quality analysis system, a network equipment inspection system, a network monitoring system, a server analysis system, a shunt service system (such as specific user message analysis, keyword desensitization) and the like in large, medium and small scale network networking in parks, schools, governments, commercial squares and the like.
In the application, when a first message is received, triggering a packet receiving interrupt so as to send the first message to a network protocol stack; copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors; and processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message. In summary, in the first aspect, compared with the traditional technology that the network quality is acquired through the packet receiving soft interrupt, the pipeline workstation of the target central processing unit replaces the network protocol stack in the packet receiving soft interrupt to complete the acquisition of the network quality, so that the network protocol stack can continue the original normal forwarding flow without waiting for the acquisition of the network quality, and the original normal forwarding flow can be immediately started after the message is sent to the target central processing unit in the preset plurality of central processing units, thereby greatly improving the processing performance of the network protocol stack. In a second aspect, the present application proposes a single-core processing mechanism, and performs network quality acquisition by presetting a plurality of central processing units, so as to reduce the problems of low performance caused by mutual exclusion lock and unstable system caused by deadlock, and improve security. In the third aspect, the preset multiple central processing units support concurrent batch processing of the messages, so that the performance of network quality acquisition is greatly improved. In the fourth aspect, the application is simpler to develop and maintain, and reduces the maintenance difficulty of developers.
Referring to fig. 3, the embodiment of the application also correspondingly discloses a network quality acquisition device, which comprises:
The first sending module 11 is configured to trigger a packet receiving interrupt to send a first packet to a network protocol stack when the first packet is received;
The second sending module 12 is configured to copy the first packet through the network protocol stack to obtain a second packet, and send the second packet to a target central processor among a preset plurality of central processors;
and the network quality acquisition module 13 is used for processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
In the application, when a first message is received, triggering a packet receiving interrupt so as to send the first message to a network protocol stack; copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors; and processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message. In summary, in the first aspect, compared with the traditional technology that the network quality is acquired through the packet receiving soft interrupt, the pipeline workstation of the target central processing unit replaces the network protocol stack in the packet receiving soft interrupt to complete the acquisition of the network quality, so that the network protocol stack can continue the original normal forwarding flow without waiting for the acquisition of the network quality, and the original normal forwarding flow can be immediately started after the message is sent to the target central processing unit in the preset plurality of central processing units, thereby greatly improving the processing performance of the network protocol stack. In a second aspect, the present application proposes a single-core processing mechanism, and performs network quality acquisition by presetting a plurality of central processing units, so as to reduce the problems of low performance caused by mutual exclusion lock and unstable system caused by deadlock, and improve security. In the third aspect, the preset multiple central processing units support concurrent batch processing of the messages, so that the performance of network quality acquisition is greatly improved. In the fourth aspect, the application is simpler to develop and maintain, and reduces the maintenance difficulty of developers.
In some specific embodiments, the second sending module 12 may specifically include:
The clipping unit is used for clipping the redundant data part of the second message to obtain a clipped second message;
And the first sending unit is used for sending the cut second message to the target central processor in the preset plurality of central processors according to the media access control address of the cut second message.
In some specific embodiments, the second sending module 12 may specifically include:
a wake-up unit, configured to send the second packet to a packet buffer queue of the target central processor in the preset plurality of central processors, and wake up a target thread of the target central processor;
And the second sending unit is used for acquiring the second message from the message buffer queue by utilizing the target thread and sending the second message to a pipeline workstation of the target central processing unit.
In some particular embodiments, the pipeline workstation includes a plurality of threads, and the plurality of threads are in a pipeline design mode.
In some specific embodiments, the network quality acquisition module 13 may specifically include:
the analyzing unit is used for analyzing the second message in the buffer queue by utilizing the first thread of the pipeline workstation to obtain an analysis result;
A session list updating unit, configured to update a session list by using the second thread of the pipeline workstation and the analysis result, to obtain a target session list;
and the network quality acquisition unit is used for calculating the network quality of the second message by utilizing the third thread of the pipeline workstation and the target session list.
In some embodiments, the parsing unit is specifically configured to:
analyzing the second message by using the first thread of the pipeline workstation to obtain five-element information;
Calculating to obtain a hash value through the five-element information;
Correspondingly, the session list updating unit is specifically configured to:
And updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list.
In some specific embodiments, the session list updating unit is specifically configured to:
if the target session corresponding to the hash value is not found from the session list by the second thread of the pipeline workstation, creating the target session in the session list to obtain the target session list;
And if the target session corresponding to the hash value is found from the session list by using the second thread of the pipeline workstation, updating the searching hit time of the target session in the session list to obtain the target session list.
Further, the embodiment of the application also provides electronic equipment. Fig. 4 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 4 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, which is loaded and executed by the processor 21 to implement relevant steps in the network quality acquisition method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, data 223, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further comprise a computer program capable of performing other specific tasks in addition to the computer program capable of performing the network quality acquisition method performed by the electronic device 20 as disclosed in any of the previous embodiments. The data 223 may include image quality regulation policies or the like collected by the electronic device 20.
Further, the embodiment of the application also discloses a storage medium, wherein the storage medium stores a computer program, and when the computer program is loaded and executed by a processor, the steps of the network quality acquisition method disclosed in any embodiment are realized.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The network quality acquisition method, device, equipment and storage medium provided by the invention are described in detail, and specific examples are applied to illustrate the principle and implementation of the invention, and the description of the above examples is only used for helping to understand the method and core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The network quality acquisition method is characterized by comprising the following steps of:
triggering a packet receiving interrupt to send a first message to a network protocol stack when the first message is received;
Copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors;
And processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
2. The network quality acquisition method according to claim 1, wherein the sending the second message to a target central processor among a preset plurality of central processors includes:
Cutting the redundant data part of the second message to obtain a cut second message;
And sending the cut second message to the target central processor in the preset plurality of central processors according to the media access control address of the cut second message.
3. The network quality acquisition method according to claim 1, wherein the sending the second message to a target central processor among a preset plurality of central processors includes:
sending the second message to a message buffer queue of the target central processor in the preset plurality of central processors, and waking up a target thread of the target central processor;
And acquiring the second message from the message buffer queue by using the target thread, and sending the second message to a pipeline workstation of the target central processing unit.
4. The network quality acquisition method of claim 3 wherein the pipeline workstation comprises a plurality of threads and the plurality of threads are in a pipeline design mode.
5. The network quality acquisition method according to claim 4, wherein the processing the second message in the buffer queue by using the pipeline workstation of the target central processing unit to obtain the network quality of the second message includes:
analyzing the second message in the buffer queue by using a first thread of the pipeline workstation to obtain an analysis result;
updating a session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list;
and calculating the network quality of the second message by using the third thread of the pipeline workstation and the target session list.
6. The network quality acquisition method according to claim 5, wherein the parsing the second message by the first thread of the pipeline workstation to obtain a parsing result includes:
analyzing the second message by using the first thread of the pipeline workstation to obtain five-element information;
Calculating to obtain a hash value through the five-element information;
Correspondingly, the updating the session list by using the second thread of the pipeline workstation and the analysis result to obtain a target session list includes:
And updating the session list by using the second thread of the pipeline workstation and the hash value to obtain the target session list.
7. The network quality acquisition method of claim 6, wherein updating the session list with the second thread and the hash value of the pipeline workstation to obtain the target session list comprises:
if the target session corresponding to the hash value is not found from the session list by the second thread of the pipeline workstation, creating the target session in the session list to obtain the target session list;
And if the target session corresponding to the hash value is found from the session list by using the second thread of the pipeline workstation, updating the searching hit time of the target session in the session list to obtain the target session list.
8. A network quality acquisition device, comprising:
the first sending module is used for triggering packet receiving interruption to send the first message to a network protocol stack when the first message is received;
The second sending module is used for copying the first message through the network protocol stack to obtain a second message, and sending the second message to a target central processor in a preset plurality of central processors;
and the network quality acquisition module is used for processing the second message in the buffer queue by utilizing the pipeline workstation of the target central processing unit to obtain the network quality of the second message.
9. An electronic device comprising a processor and a memory, wherein:
the memory is used for storing a computer program;
The computer program is loaded and executed by the processor to implement the network quality acquisition method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer executable instructions which, when loaded and executed by a processor, implement the network quality acquisition method of any one of claims 1 to 7.
CN202410397581.0A 2024-04-02 2024-04-02 Network quality acquisition method, device, equipment and storage medium Pending CN118301222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410397581.0A CN118301222A (en) 2024-04-02 2024-04-02 Network quality acquisition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410397581.0A CN118301222A (en) 2024-04-02 2024-04-02 Network quality acquisition method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118301222A true CN118301222A (en) 2024-07-05

Family

ID=91687730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410397581.0A Pending CN118301222A (en) 2024-04-02 2024-04-02 Network quality acquisition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118301222A (en)

Similar Documents

Publication Publication Date Title
US8364775B2 (en) High availability management system for stateless components in a distributed master-slave component topology
CN114153566B (en) Cross-processor architecture multi-container cluster service discovery method, device and equipment
US8676914B2 (en) Synchronizing services across network nodes
CN101196912B (en) Method and apparatus for application state synchronization
RU2536350C2 (en) Automatic discovery of alternative mailboxes
US20030041134A1 (en) Network-device management apparatus and method, and recording medium
US20030204578A1 (en) Method and apparatus for restoring the configuration of a network device
US9531597B2 (en) Methods and systems to maintain data coherency
CN103370917A (en) Message processing method and server
US7248563B2 (en) Method, system, and computer program product for restricting access to a network using a network communications device
US8576861B2 (en) Method and apparatus for processing packets
CN113765885B (en) Firewall rule synchronization method and device, electronic equipment and storage medium
US20050005026A1 (en) Method and apparatus for managing a remote data processing system
US8090695B2 (en) Dynamic restoration of message object search indexes
CN114301872B (en) Domain name based access method and device, electronic equipment and storage medium
CN118301222A (en) Network quality acquisition method, device, equipment and storage medium
CN116455616B (en) Methods, systems, equipment and media for network security control policy synchronization for container drift
WO2017000669A1 (en) Centralised management control method, apparatus, and related device for domain name resource record caching
CN115022167A (en) Method and system for controlling home gateway service flow
US20060268851A1 (en) Method and apparatus for address resolution protocol persistent in a network data processing system
CN114201324A (en) A PAAS platform load monitoring method, device, equipment and storage medium
CN111722979A (en) Quality monitoring method, device, server and storage medium
CN115397041B (en) Method, device, equipment and storage medium for automatic reconstruction after changing virtual network group
CN115412561A (en) Node resource information collection method, device, equipment and medium
WO2023092951A1 (en) Remote attestation application method, apparatus, device, and system, and storage medium

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