A network security situation auditory method

By converting network packet data into Midi music, the network security situation is audible, solving the problems of cumbersome management methods and waste of resources, and improving monitoring and emergency response capabilities.

CN115514673BActive Publication Date: 2024-09-20XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211156846.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2024-09-20
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

The existing network security situation management methods are cumbersome, resulting in a waste of human resources and inability to effectively monitor and respond to emergencies.

Method used

By using network packet analysis software to capture network packets, generate Pcap files, and use Python tools to parse the data frame length, convert it into the pitch and length of Midi music, generate Midi music for playback, and realize the audibility of the network security situation.

Benefits of technology

It simplifies server management, saves human resources, reflects network status in real time through music, and improves monitoring and emergency response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514673B
    Figure CN115514673B
Patent Text Reader

Abstract

The present invention discloses a method for audible network security situation, which is implemented according to the following steps: Step 1, using network packet analysis software to capture current network packets, capture network data packets without screening or capture specified network protocol packets; Step 2, using Python tools to parse the captured Pcap file and obtain the data frame length in the Pcap file; Step 3, storing the acquired data frame length in a custom list and performing Byte data to int data conversion and interval mapping processing, and completing the conversion between data frame and pitch when composing music; Step 4, creating a new custom data list so that the mapping to the pitch length is completed when composing music, and setting the default music speed and instrument; Step 5, passing the data frame length and the custom pitch length into the composition method to generate Midi music and play it. The captured network packets are used to form a Pcap file, and the data in the Pcap file is extracted and processed to generate a piece of Midi music.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security situation and server management, and in particular to a method for audibly analyzing network security situation. Background Art

[0002] With the continuous development of the Internet era, network security issues have become increasingly prominent. Although many network security-related protective measures have been taken, a single security protection measure does not comprehensively consider the correlation between various protection measures. In order to improve the network's monitoring capabilities and emergency response capabilities, network security situation came into being. Then, how to conduct network security situation more effectively is of great significance at the moment. The auditory nature of network security situation is an upgrade of traditional methods.

[0003] As a node in the network, the server stores and processes 80% of the data and information on the network, so it is also called the soul of the network. With the advancement of information technology, the role of the network is becoming more and more obvious, and the requirements for the data processing capabilities and security of its own information systems are becoming higher and higher. It requires powerful information processing functions, while also preventing all external network attacks as much as possible. If you are not careful, you will lose critical data information, so the management of the server must also be more convenient and quick.

[0004] However, current research generally requires manual management of servers, which requires checking the servers at intervals, or there will be corresponding alarms when there are abnormalities. However, this not only wastes human resources but also increases the workload of managers. In order to make server management faster and simpler, it is very meaningful to eventually replace these tedious operations with beautiful music. Summary of the invention

[0005] The network security situation sonification technology is roughly as follows: using network packet analysis software to capture the required network packets and store them as Pcap files. This step is to obtain the current network status, and then use Python tools to open and process the Pcap file, obtain the data frame length and convert it into a number that can be recognized by the Mido library as the pitch of the music, and finally add key elements such as the speed and length of the sound to form a Midi music and play it. The purpose of the present invention is to provide a method for sonification of network security situation, which solves the problems of cumbersome server management and waste of human resources in traditional network security situation visualization.

[0006] To achieve the above purpose, the present invention provides the following technical solution: a method for audible network security situation, which is specifically implemented according to the following steps:

[0007] Step 1, use network packet analysis software to capture the current network packets, capture network data packets without screening or capture specified network protocol packets, and generate a Pcap file after capturing network data packets and network protocol packets;

[0008] Step 2: The format of the Pcap file mainly consists of three parts: file header data, data packet header, and data frame. Use Python tools to parse the captured Pcap file and obtain the data frame length in the Pcap file;

[0009] Step 3, storing the acquired data frame length in a custom list and performing Byte data to int data conversion and interval mapping processing, completing the conversion between data frame and pitch when composing music;

[0010] Step 4, create a new custom data list to complete the mapping to the note length when composing music, and set the default music speed and instrument;

[0011] Step 5, pass the data frame length and custom sound length into the composition method to generate Midi music and play it.

[0012] Preferably, step 1 is specifically implemented according to the following steps:

[0013] Step 1.1, open the network packet analysis software, and choose to capture Ethernet network packets or WLAN network packets;

[0014] Step 1.2, the network packet analysis software will provide a filter, select the required IP, specific port, and protocol to filter;

[0015] Step 1.3, after setting up the required network and filters, start capturing Ethernet network packets. A list of Ethernet network packets will be displayed on the page. Check the detailed information of Ethernet network packets in the network packet analysis software as needed. The detailed information includes the source address, destination address and the protocol used.

[0016] Step 1.4: After capturing 10 seconds of Ethernet network packets, stop capturing packets and save them as a Pcap file.

[0017] Preferably, step 2 is implemented specifically according to the following steps:

[0018] Step 2.1, first you need to understand the composition of Pcap files. Pcap files are composed of hexadecimal data. Each Pcap file has a file header, which occupies 24 bytes, and one byte is represented by 2 hexadecimals.

[0019] Step 2.2, after the file header data is the data packet header, and after each data packet header is the data packet. The data packet headers are: timestamp-seconds, timestamp-microseconds, captured packet length, and actual length, each occupying 4 bytes;

[0020] Step 2.3, locate the position of the data frame length, extract features of each captured network packet in the code, and thus obtain the position of the next data frame.

[0021] Preferably, step 3 is implemented specifically according to the following steps:

[0022] Step 3.1, store the data frame in each Ethernet network packet into a list, and convert the length of the data frame into integer data;

[0023] Step 3.2, since the Mido library is used when making Midi music, and the Mido library can only recognize data between 0-127, but the length of the captured data frame mostly exceeds this range, the captured data needs to be evenly mapped in the interval of 0-127 and the data frame length should be rounded off to serve as pitch data.

[0024] Preferably, step 4 is implemented specifically according to the following steps:

[0025] Step 4.1, since the key attributes of Midi music are pitch and duration, the duration of the notes is uniformly set to 40, or 1 / 12 beats;

[0026] Step 4.2, set the tempo to 1 beat per 4 seconds, so that there are 12 notes to play within 4 seconds;

[0027] Step 4.3, the default Midi music is played by a single-track piano.

[0028] Preferably, step 5 is specifically implemented according to the following steps:

[0029] Step 5.1, most of the music exists in the form of chords, and most of the chords are triads. A triad consists of three notes, namely, the root note, the third note, and the fifth note. In order to be more inclined to chords, the pitch data is processed into groups of three to generate a music composed of three notes, which can also highlight the concept of the time axis;

[0030] Step 5.2, pass the pitch converted from the sound length and data frame into the composition method to generate a Midi music and play it.

[0031] Preferably, the step 2.3 is specifically implemented according to the following steps:

[0032] Step (1), since Pcap files are all represented in hexadecimal, it is necessary to set the rb type when reading the Pcap file, and read the file in binary form to process the C structure data;

[0033] Step (2), create a String_data to store the hexadecimal data in the Pcap file;

[0034] Step (3), accurately locate the location where the data frame length is stored in String_data, specifically caplen=string_data[i+8:i+12];

[0035] Step (4), converting the acquired data frame length into Python structured type data, and converting the data frame length into decimal to facilitate subsequent composition processing;

[0036] Step (5), using the struct.unpack() function, specifically packet_len = struct.unpack('I', caplen)[0];

[0037] Step (6), after obtaining the first data, store the data frame length in list, and then use i=i+packet_len+16 to locate the next data frame length and obtain the value;

[0038] Step (7), loop step (6) until all data are read.

[0039] Preferably, the network packet analysis software captures multiple network packets and generates a Pcap file, which is passed into the code to generate a Midi music. When using the network packet analysis software, you can choose whether to use a filter as needed.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention is a method for audibly listening to network security situations, which aims to utilize the captured network packets to extract the data in the Pcap file and then generate a piece of Midi music after processing. As the common language of all mankind, music can not only make people feel happy but also is a way of expressing emotions. Therefore, the audibility of network security situations is to convey this signal to people. When the network situation fluctuates, the music tone rises and becomes rapid. When the network situation is stable and has no fluctuations, the music tone is moderate and smooth. Whether professional or not, one only needs to use hearing to know whether the network situation is stable at this time. This is a further upgrade of the visualization of network situations and also saves human resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the structure of the Pcap file of the present invention;

[0043] Figure 2 It is a flow chart of data frame extraction in a network security situation audible method of the present invention;

[0044] Figure 3 It is a flow chart of a method for data type conversion after obtaining a data frame in a network security situation audibility method of the present invention;

[0045] Figure 4 It is a flow chart of a composition method in a network security situation auditory method of the present invention;

[0046] Figure 5 It is a Midi music picture under stable network conditions in a method for audibly realizing network security situation of the present invention;

[0047] Figure 6 The invention discloses a Midi music chart for network situation fluctuations in a network security situation auditory method. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings of the present invention in the embodiments of the present invention to clearly and completely describe the technical solutions of the present invention in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] like Figure 1-6 As shown, the network security situation audiovisualization method of the present invention is implemented in the following steps:

[0050] Step 1, use network packet analysis software to capture the current network packets, capture network data packets without screening or capture specified network protocol packets, such as HTTP, TCP, UDP, etc., and generate a Pcap file after capturing the network data packets;

[0051] Step 2: The format of the Pcap file mainly consists of three parts: file header data, data packet header, and data frame. Use Python tools to parse the captured Pcap file and obtain the data frame length in the Pcap file;

[0052] Step 3, storing the acquired data frame length in a list and performing a series of processing to complete the mapping with the pitch when composing music;

[0053] Step 4, create a new list of custom data to complete the mapping to the note length when composing music, and set the default music speed and instrument;

[0054] Step 5, pass the data frame length and custom sound length into the composition method to generate Midi music and play it.

[0055] Furthermore, the step 1 is specifically implemented according to the following steps:

[0056] Step 1.1, open the network packet analysis software, and choose to capture Ethernet network packets or WLAN network packets;

[0057] Step 1.2, the network packet analysis software will provide a filter, select the required IP, specific port, and protocol to filter;

[0058] Step 1.3, after setting up the required network and filters, start capturing Ethernet network packets. A list of Ethernet network packets will be displayed on the page. Check the detailed information of Ethernet network packets in the network packet analysis software as needed. The detailed information includes the source address, destination address and the protocol used.

[0059] Step 1.4: After capturing 10 seconds of Ethernet network packets, stop capturing packets and save them as a Pcap file.

[0060] Furthermore, step 2 is specifically implemented according to the following steps:

[0061] Step 2.1, first you need to understand the composition of Pcap files. Pcap files are composed of hexadecimal data. Each Pcap file has a file header, which occupies 24 bytes, and one byte is represented by 2 hexadecimals.

[0062] Step 2.2, after the file header data is the data packet header, and after each data packet header is the data packet. The data packet headers are: timestamp-seconds, timestamp-microseconds, captured packet length, and actual length, each occupying 4 bytes;

[0063] Step 2.3, locate the position of the data frame length, extract features of each captured network packet in the code, and thus obtain the position of the next data frame.

[0064] Furthermore, the step 3 is specifically implemented according to the following steps:

[0065] Step 3.1, store the data frame in each Ethernet network packet into a list, and convert the length of the data frame into integer data;

[0066] Step 3.2, since the Mido library is used when making Midi music and the Mido library can only recognize data between 0-127, but the length of the captured data frame mostly exceeds this range, the captured data needs to be evenly mapped in the interval of 0-127 and the data frame length should be rounded off to serve as pitch data.

[0067] Furthermore, step 4 is specifically implemented according to the following steps:

[0068] Step 4.1, since the key attributes of Midi music are pitch and duration, the duration of the notes is uniformly set to 40, or 1 / 12 beats;

[0069] Step 4.2, set the tempo to 1 beat per 4 seconds, so that there are 12 notes to play within 4 seconds;

[0070] Step 4.3, the default Midi music is played by a single-track piano.

[0071] Furthermore, step 5 is specifically implemented according to the following steps:

[0072] Step 5.1, most of the music exists in the form of chords, and most of the chords are triads. A triad consists of three notes, namely, the root note, the third note, and the fifth note. In order to be more inclined to chords, the pitch data is processed into groups of three to generate a music composed of three notes, which can also highlight the concept of the time axis;

[0073] Step 5.2, pass the pitch converted from the sound length and data frame into the composition method to generate a Midi music and play it.

[0074] Furthermore, the step 2.3 is specifically implemented according to the following steps:

[0075] Step (1), since Pcap files are all represented in hexadecimal, it is necessary to set the rb type when reading the Pcap file, and read the file in binary form to process the C structure data;

[0076] Step (2), create a String_data to store the hexadecimal data in the Pcap file;

[0077] Step (3), accurately locate the location where the data frame length is stored in String_data, specifically caplen=string_data[i+8:i+12];

[0078] Step (4), converting the acquired data frame length into Python structured type data, and converting the data frame length into decimal to facilitate subsequent composition processing;

[0079] Step (5), using the struct.unpack() function, specifically packet_len = struct.unpack('I', caplen)[0];

[0080] Step (6), after obtaining the first data, store the data frame length in list, and then use i=i+packet_len+16 to locate the next data frame length and obtain the value;

[0081] Step (7), loop step (6) until all data are read.

[0082] Example

[0083] First, corresponding to step 1, use WireShark to capture the current network packets. You can choose whether to use filters to filter out the required data. After capturing the network data packets, generate a Pcap file.

[0084] Secondly, corresponding to step 2, read the Pcap file in binary mode and get the corresponding data frame size through the Struct.unpack() function, then store the corresponding data frame in each network packet in a one-dimensional list and convert each data into an Integer type.

[0085] Again, corresponding to step 3, in order to make it more inclined to the chord part in the music, a method of taking three data as a group is adopted to convert it into a two-dimensional list, in which each group of data acts as the pitch part when composing music.

[0086] Then, corresponding to step 4, because its key attributes in music are mainly pitch, duration, and tempo, these elements must be supplemented when generating Midi music here. In the previous step, the data frame has been obtained as the pitch part. Here, the duration of each note is assumed to be consistent and a one-dimensional list is generated to correspond to each other. The default tempo is 0.4 seconds per beat, and the default instrument is piano.

[0087] Finally, corresponding to step 5, the two-dimensional pitch list in step 3 and the one-dimensional note length list in step 4 are passed into the composition method to generate Midi music and play it. When the network condition fluctuates, the music tone is high and rapid. When the network condition is stable and without fluctuations, the music tone is moderate and smooth.

[0088] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A network security situation audio method, It is characterized in that Follow the steps below to implement it: Step 1, use network packet analysis software to capture the current network packets, capture network data packets without screening or capture specified network protocol packets, and generate a Pcap file after capturing network data packets and network protocol packets; Step 2: The format of the Pcap file mainly consists of three parts: file header data, data packet header, and data frame. Use Python tools to parse the captured Pcap file and obtain the data frame length in the Pcap file; Step 3, storing the acquired data frame length in a custom list and performing Byte data to int data conversion and interval mapping processing, completing the conversion between data frame and pitch when composing music; Step 4, create a new custom data list to complete the mapping to the note length when composing music, and set the default music speed and instrument; Step 5, pass the data frame length and custom sound length into the composition method to generate Midi music and play it; The step 3 is specifically implemented according to the following steps: Step 3.1, store the data frame in each Ethernet network packet into a list, and convert the length of the data frame into integer data; Step 3.2, because the Mido library is used when making Midi music, and the Mido library can only recognize data between 0-127, but the length of the captured data frame mostly exceeds this range, so the captured data needs to be evenly mapped in the interval of 0-127 and the length of the data frame can be used as pitch data after rounding; The step 4 is specifically implemented according to the following steps: Step 4.1, since the key attributes of Midi music are pitch and duration, the duration of the notes is uniformly set to 1 / 12 beat; Step 4.2, set the tempo to 1 beat per 4 seconds, so that there are 12 notes to play within 4 seconds; Step 4.3, the default Midi music is played by a single-track piano.

2. A network security situation audible method according to claim 1, It is characterized in that The step 1 is specifically implemented according to the following steps: Step 1.1, open the network packet analysis software, and choose to capture Ethernet network packets or WLAN network packets; Step 1.2, the network packet analysis software will provide a filter, select the required IP, specific port, and protocol to filter; Step 1.3, after setting up the required network and filters, start capturing Ethernet network packets. A list of Ethernet network packets will be displayed on the page. Check the detailed information of Ethernet network packets in the network packet analysis software as needed. The detailed information includes the source address, destination address and the protocol used. Step 1.4: After capturing 10 seconds of Ethernet network packets, stop capturing packets and save them as a Pcap file.

3. A network security situation audible method according to claim 1, It is characterized in that The step 2 is specifically implemented according to the following steps: Step 2.1, first you need to understand the composition of Pcap files. Pcap files are composed of hexadecimal data. Each Pcap file has a file header, which occupies 24 bytes, and one byte is represented by 2 hexadecimals. Step 2.2, after the file header data is the data packet header, and after each data packet header is the data packet. The data packet headers are: timestamp-seconds, timestamp-microseconds, captured packet length, and actual length, each occupying 4 bytes; Step 2.3, locate the position of the data frame length, extract features of each captured network packet in the code, and thus obtain the position of the next data frame.

4. A network security situation audible method according to claim 1, It is characterized in that The step 5 is specifically implemented according to the following steps: Step 5.1, most of the music exists in the form of chords, and most of the chords are triads. A triad consists of three notes, namely, the root note, the third note, and the fifth note. In order to be more inclined to chords, the pitch data is processed into groups of three to generate a music composed of three notes, which can also highlight the concept of the time axis; Step 5.2, pass the pitch converted from the sound length and data frame into the composition method to generate a Midi music and play it.

5. A network security situation audible method according to claim 3, It is characterized in that The step 2.3 is specifically implemented according to the following steps: Step (1), since Pcap files are all represented in hexadecimal, it is necessary to set the rb type when reading the Pcap file, and read the file in binary form to process the C structure data; Step (2), create a String_data to store the hexadecimal data in the Pcap file; Step (3), accurately locate the location where the data frame length is stored in String_data, specifically caplen=string_data[i+8:i+12]; Step (4), converting the acquired data frame length into Python structured type data, and converting the data frame length into decimal to facilitate subsequent composition processing; Step (5), using the struct.unpack() function, specifically packet_len = struct.unpack('I', caplen)[0]; Step (6), after obtaining the first data, store the data frame length in list, and then use i=i+packet_len+16 to locate the next data frame length and obtain the value; Step (7), loop step (6) until all data are read.

6. A network security situation audible method according to claim 1, It is characterized in that The network packet analysis software captures multiple network packets and generates a Pcap file, which is passed into the code to generate a Midi music. When using the network packet analysis software, you can choose whether to use a filter as needed.