CN112787880B - Playback data acquisition and flow playback method, device and storage medium - Google Patents

Playback data acquisition and flow playback method, device and storage medium Download PDF

Info

Publication number
CN112787880B
CN112787880B CN201911090116.8A CN201911090116A CN112787880B CN 112787880 B CN112787880 B CN 112787880B CN 201911090116 A CN201911090116 A CN 201911090116A CN 112787880 B CN112787880 B CN 112787880B
Authority
CN
China
Prior art keywords
data
packet
network data
playback
key
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
CN201911090116.8A
Other languages
Chinese (zh)
Other versions
CN112787880A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201911090116.8A priority Critical patent/CN112787880B/en
Publication of CN112787880A publication Critical patent/CN112787880A/en
Application granted granted Critical
Publication of CN112787880B publication Critical patent/CN112787880B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • 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
    • H04L43/026Capturing of monitoring data using flow identification
    • 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
    • H04L43/028Capturing of monitoring data by filtering

Landscapes

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

Abstract

The embodiment of the application provides a playback data acquisition and flow playback method, equipment and a storage medium. In the embodiment of the application, network data in an actual network environment is used as a basis to obtain data types required by flow playback and information sets required to be covered by various data types, playback data which can participate in the flow playback under each data type is obtained according to the information sets required to be covered by various data types, and the flow playback is performed based on the playback data; the playback data is acquired based on the information set which needs to be covered by each data category, so that not only can the information coverage of the playback data be ensured, but also the redundancy among the playback data can be reduced, the quantity of the playback data is reduced, the coverage of the flow playback based on the playback data can be ensured, and the playback speed is improved.

Description

Playback data acquisition and flow playback method, device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a playback data acquisition and flow playback method, apparatus, and storage medium.
Background
At any time, the continuous development of internet technology is realized, the functions and performances of the network equipment need to be adaptively updated, and the test during the period is a key link for guaranteeing the reliability and stability of the network equipment. Flow playback is a more common and important test method.
The flow playback method can capture the network data in the actual network environment, restore the network data into the test environment, and reproduce the actual network environment, thereby achieving the purpose of testing the functions and performances of the tested network equipment in the actual network environment. However, in order to ensure test coverage, the existing traffic playback needs to capture a large amount of network data, and the network data required for playback is too redundant and the playback speed is slow.
Disclosure of Invention
Aspects of the present application provide a playback data acquisition and flow playback method, apparatus, and storage medium, for acquiring playback data that satisfies a coverage requirement and has low redundancy, and improving playback speed.
The embodiment of the application provides a playback data acquisition method, which comprises the following steps: acquiring a plurality of network data from an actual network environment; classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback; obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in the at least one packet; and acquiring playback data which can participate in flow playback under the at least one data category according to the information set which is required to be covered by the at least one data category.
The embodiment of the application also provides a flow playback method, which comprises the following steps: acquiring an information set which is required to be covered according to at least one data category obtained from information contained in a plurality of network data in an actual network environment; acquiring playback data which can participate in flow playback under the at least one data category according to the information set which needs to be covered by the at least one data category; and performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
The embodiment of the application also provides a computing device, which comprises: a memory and a processor; the memory is used for storing a computer program; the processor, coupled to the memory, is configured to execute the computer program for: acquiring a plurality of network data from an actual network environment; classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback; obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in the at least one packet; and acquiring playback data which can participate in flow playback under the at least one data category according to the information set which is required to be covered by the at least one data category.
The embodiment of the application also provides a flow playback device, which comprises: a memory and a processor; the memory is used for storing a computer program; the processor, coupled to the memory, is configured to execute the computer program for: acquiring an information set which is required to be covered according to at least one data category obtained from information contained in a plurality of network data in an actual network environment; acquiring playback data which can participate in flow playback under the at least one data category according to the information set which needs to be covered by the at least one data category; and performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which when executed by a processor, causes the processor to implement the steps in the playback data acquisition method provided by the embodiment of the present application.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, which when executed by a processor causes the processor to implement the steps in the method for playback of a stream provided by the embodiments of the present application.
In the embodiment of the application, based on network data in an actual network environment, data types required by flow playback and information sets required to be covered by various data types are obtained, and further playback data which can participate in the flow playback under each data type is obtained according to the information sets required to be covered by various data types, and the flow playback is performed based on the playback data; the playback data is acquired based on the information set which needs to be covered by the data category, so that not only can the information coverage of the playback data be ensured, but also the redundancy among the playback data can be reduced, the quantity of the playback data is reduced, the coverage of the flow playback based on the playback data can be ensured, and the playback speed is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
Fig. 1 is a flowchart of a playback data acquisition method according to an exemplary embodiment of the present application;
fig. 2 is a flow chart of a flow playback method according to an exemplary embodiment of the present application;
fig. 3 is a flowchart of an information obtaining method according to an exemplary embodiment of the present application;
fig. 4 is a flowchart of another method for playback of a stream according to an exemplary embodiment of the present application;
Fig. 5 is a schematic diagram of a flow playback process in a DNS resolution scenario provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a computing device according to an exemplary embodiment of the present application;
fig. 7 is a schematic structural diagram of a flow playback device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the existing flow playback process, in order to ensure test coverage, a large amount of network data needs to be grabbed from an actual network environment, the grabbed network data is directly utilized for flow playback, the used network data is too redundant, and the playback speed is low.
Aiming at the technical problems of the existing flow playback, in some embodiments of the application, based on network data in an actual network environment, data types required by the flow playback and information sets required to be covered by various data types are obtained, playback data which can participate in the flow playback under each data type is obtained according to the information sets required to be covered by various data types, and the flow playback is performed based on the obtained playback data; the playback data is acquired based on the information set which needs to be covered by each data category, so that not only can the information coverage of the playback data be ensured, but also the redundancy among the playback data can be reduced, the quantity of the playback data is reduced, the coverage of the flow playback based on the playback data can be ensured, and the playback speed is improved.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flowchart of a playback data acquisition method according to an exemplary embodiment of the present application.
As shown in fig. 1, the method includes:
101. a plurality of network data is acquired from an actual network environment.
102. The plurality of network data is classified into at least one packet based on information contained in the plurality of network data, each packet representing a class of data required for playback of the traffic.
103. And obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in at least one packet.
104. And acquiring playback data which can participate in flow playback under at least one data category according to the information set which is required to be covered by the at least one data category.
The method provided by the embodiment is mainly used for providing the needed data for the flow playback, and is called playback data for short. The method of the present embodiment is applicable to a computing device, and the computing device may be any computer device having a certain computing capability as an execution subject of the method of the present embodiment. For example, the computing device may be a terminal device such as a desktop computer, a notebook computer, a smart phone, or a tablet computer, or may be a server device such as a conventional server, a cloud host, a virtual center, or a server array.
In this embodiment, playback data required for traffic playback is acquired based on network data in an actual network environment as data. The actual network environment refers to a network environment in actual use, and is a concept opposite to the test environment. The actual network environment is a network environment which interconnects a plurality of physical devices such as computers, servers or gateways and the like distributed in different places in actual use, and enables the plurality of physical devices to communicate with each other according to a certain protocol, thereby realizing software, hardware and network culture sharing thereof. The actual network environment of the present embodiment includes not only physical resources such as physical devices and physical links between physical devices, but also non-physical resources such as attribute information of the physical devices, various software running on the physical devices, applications, and network data transmitted between the physical devices.
In this embodiment, focusing on network data in an actual network environment, a plurality of network data are acquired from the actual network environment, and return visit data is provided for a flow return visit associated with the actual network environment based on the network data. In this embodiment, the number of network data is not limited, and the required number of network data may be adaptively acquired according to the requirement of the test coverage. In addition, the present embodiment is not limited to the manner of acquiring the network data from the actual network environment, and for example, various crawler software or data capturing tools may be used to capture the network data from the actual network environment, or the network data may be acquired through log data in the actual network environment, and so on.
It is worth to be noted that different application scenarios correspond to different actual network environments, and network data transmitted in the different actual network environments are different; in addition, different streaming playback requirements require different network data.
For example, for a game scenario, its corresponding actual network environment includes, but is not limited to: physical form infrastructures such as game terminals, game servers, home gateways, base stations and physical links, game software, operating systems, drivers and the like running on corresponding devices, and non-physical form resources such as network data interacted between the game terminals and the game servers. If the game software is upgraded, network data of interaction between the game terminal and the game server can be obtained from an actual network environment corresponding to the game scene, playback data required by flow playback is obtained based on the network data, and then flow playback test is carried out on the upgraded game software based on the playback data. In a game scenario, network data for interactions between a game terminal and a game server include, but are not limited to: a login request, a request to purchase props, a payment request, a game screen provided by a game server, characters, props, etc.
For another example, for an e-commerce scenario, its corresponding actual network environment includes, but is not limited to: physical forms of infrastructure such as user terminals, various servers (e.g., commodity management server, order server and payment server), home gateway, base station, core network device and physical link, and non-physical forms of information such as shopping software or software such as APP, operating system, driver and the like running on the corresponding devices, and network data interacted between the user terminals and various servers. If shopping software or APP is updated, network data interacted between the user terminal and the corresponding server can be obtained from an actual network environment corresponding to the e-commerce scene, playback data required by flow playback is obtained based on the network data, and then flow playback test is carried out on the updated shopping software or APP based on the playback data. In an e-commerce scenario, network data for interactions between a user terminal and various servers includes, but is not limited to: a login request, a request to add a shopping cart, a browse request, an item detail page, a comment, an order request, an order processing result, a payment request, a payment result, and the like.
In the embodiments of the present application, application scenarios, actual network environments, traffic playback requirements, and acquired network data are not limited. In any application scenario, and without limiting any flow playback requirement, the method provided by the embodiment can be adopted to acquire network data from the corresponding actual network environment and provide the required playback data for flow playback based on the network data.
After a plurality of network data are acquired from an actual network environment, the present embodiment does not directly utilize the acquired network data for traffic playback, but classifies the plurality of network data into at least one packet according to information contained in the plurality of network data. In the present embodiment, the number of packets is not limited, and is determined by the classification result of network data in an actual network environment. Each packet contains at least one network data, and the network data in the same packet has a certain commonality, belongs to a class of data, and represents a class of data required for traffic playback. Then, the information contained in the network data in each packet may be analyzed to obtain a set of information to be covered by the data class represented by each packet.
It should be noted that, according to different application scenarios, the traffic playback requirements may be different, and the network data obtained from the actual network environment may be different, and accordingly, the types of data types required for traffic playback and the information in the information set that needs to be covered by each data type may be different, which is not limited in this embodiment. Alternatively, for each packet, the main information included in the network data in the packet may be counted to form an information set, or all the information included in the network data in the packet may be counted to form an information set, or the like.
After obtaining the information set that needs to be covered by at least one data category, playback data that can participate in the flow playback under each data category can be obtained based on the information set that needs to be covered by each data category. The playback data is acquired based on the information set which needs to be covered by the data category, so that not only can the information coverage of the playback data be ensured, but also the redundancy among the playback data can be reduced, the quantity of the playback data is reduced, the coverage of the flow playback based on the playback data can be ensured, and the playback speed is improved.
In the embodiments of the present application, after network data is acquired from an actual network environment, the network data may be classified according to information included in the network data, and the information according to which the network data is classified is not limited in the embodiments of the present application. For example, the network data may be classified according to all information included in the network data, or may be classified according to part of information included in the network data. The classification of the network data depending on which information the network data contains can be adaptively set according to factors such as application scenarios and traffic playback requirements.
In an alternative embodiment, key fields, which are required for the playback of the traffic, may be set in advance according to the application scenario and the traffic playback requirement, etc. The key fields may also be different from application scenario to application scenario. For example, taking a domain name resolution (DNS) scenario as an example, fields such as an operator, a region, a city, and a domain name may be preset as key fields. For another example, taking a payment scenario as an example, fields such as a merchant ID, an order amount, a payment currency, a payment channel, and a commodity category may be preset as key fields.
In this alternative embodiment, the key field and the value of the key field included in each network data may be identified according to a preset key field. It should be noted that the number of key fields included in each network data may be one or more. In addition, the key fields contained in different network data may or may not be identical. For the same key field, if the key field appears in different network data, the values of the key field in different network data may be the same or different.
In this alternative embodiment, each key field and its value are used as a key information. For a key field, if the key field has multiple values, the key field and different values are combined to form different key information.
The key information contained in each network data can be obtained by identifying the key field contained in each network data and the value of the key field. The amount of key information contained in each network data may be one or more. And clustering the plurality of network data according to the key information contained in each of the plurality of network data to obtain at least one group. Clustering is a classification method used in the present embodiment, but is not limited to clustering. The grouping obtained by adopting the clustering mode can also be called a cluster, and the term of grouping is adopted in each embodiment of the application.
The clustering of the plurality of network data mainly refers to a process of adding the network data with higher similarity of the key information into the same packet according to the key information contained in each network data. The processing mode of each network data in the clustering process is the same or similar no matter what clustering mode is adopted. In this embodiment, the clustering process is described by taking the first network data as an example, where the first network data is any network data of the plurality of network data.
For the first network data, the similarity between the first network data and each existing packet can be calculated according to the key information contained in the first network data and the key information contained in the network data in each existing packet; then, judging whether a packet with the similarity with the first network data being larger than a set similarity threshold exists or not; if the judging result is that the network data exists, the first network data is added into one group of which the similarity is larger than the set similarity threshold value. If the judgment result is that the network data is not similar to the network data in the existing packets, the first network data can be added into a new packet.
Alternatively, the similarity between the first network data and the existing packets may be calculated in a variety of ways.
The following list a few:
Mode b1: for each of the existing packets, calculating the similarity between the key information contained in the first network data and the key information contained in the network data in the packet, and taking the sum of all the similarities as the similarity between the first network data and the packet.
Mode b2: for each packet in the existing packets, calculating the similarity between the key information contained in the first network data and the key information contained in the network data in the packet, and taking the maximum similarity as the similarity between the first network data and the packet.
Mode b3: for each of the existing packets, calculating the similarity between the key information contained in the first network data and the key information contained in each of the network data in the packet, and taking the average value of all the similarities as the similarity between the first network data and the packet.
Mode b4: determining a key information set corresponding to each existing packet according to key information contained in network data in each existing packet; and calculating the similarity between the key information contained in the first network data and the key information set corresponding to each existing packet as the similarity between the first network data and each existing packet.
Optionally, determining the set of key information corresponding to each existing packet according to the key information included in the network data in each existing packet may adopt, but is not limited to, the following ways:
mode b41: for each of the existing packets, according to the quantity of key information contained in each network data in the packet, selecting a group of key information with the largest quantity from the key information contained in each network data as a key information set corresponding to the packet.
Mode b42: for each of the existing packets, a group of key information including a specified key field is selected from the key information included in the network data as a set of key information corresponding to the packet, based on the key information included in the network data in the packet.
Mode b43: for each of the existing packets, a group of key information containing a specified key field value is selected as a set of key information corresponding to the packet from the key information contained in each network data in the packet according to the key information contained in each network data in the packet.
In the above-described modes b41 to b43, the key information included in each network data is regarded as a set of key information, and each set of key information includes one or more key information. In the mode b41, selecting a group of key information with the largest quantity as a key information set corresponding to the corresponding group; in the mode b42, selecting a group of key information containing a designated key field as a key information set corresponding to the corresponding packet; in the mode b43, a set of key information including a specified key field value is selected as the set of key information corresponding to the corresponding packet.
Optionally, calculating the similarity between the key information contained in the first network data and the key information set corresponding to each existing packet includes: and calculating Jaccard similarity coefficients between the key information contained in the first network data and the key information sets corresponding to the existing packets. The Jaccard similarity coefficient is a ratio of a size of an intersection of the key information included in the first network data and the key information set to a size of a union of the key information included in the first network data and the key information set, i.e., j= (| keyset n groupset |)/(| keyset n groupset |). Wherein keyset represents key information contained in the first network data; groupset denotes a key information set corresponding to any packet. For example, assuming keyset = { UNICOM, north China, beijing, www.alibaba.com } of the first network data, groupset = { Mobile, north China, qingdao, www.alibaba.com } of a certain packet, then J=2/6=0.33.
The number of packets having a similarity with the first network data greater than the set similarity threshold may be one or more. If the number of packets having a similarity with the first network data greater than the set similarity threshold is a plurality, one target packet may be selected from the plurality of packets, and the first network data may be added to the target packet. The selection modes of the target packet include but are not limited to the following:
mode a1: one packet is randomly selected from among a plurality of packets as a target packet.
Mode a2: one packet having the greatest similarity with the first network data is selected as a target packet from among the plurality of packets.
Mode a3: one packet having a similarity with the first network data within a set similarity range is selected as a target packet from among the plurality of packets.
Mode a4: from among the plurality of packets, one packet having the smallest amount of network data included is selected as a target packet.
Mode a5: from the plurality of packets, one packet having the largest amount of network data included is selected as a target packet.
It should be noted that, in the above-described process of clustering the first network data, it is assumed that at least one packet (i.e., each packet already exists) has been clustered, and the above-described process is applicable to other network data than the first network data. If the first network data is the first network data, a packet is directly newly created and added to the packet if there is no packet before classifying the first network data. For the clustering process of the 2 nd and subsequent other network data, reference may be made to the clustering process of the first network data described above.
Further, after classifying the plurality of network data into at least one packet according to the key information contained in the plurality of network data, an information set to be covered by at least one data category may be obtained according to the information contained in the network data in the at least one packet. The process of obtaining the information set that needs to be covered by each data class is the same or similar, and in this embodiment, the process of obtaining the first information set is described by taking the first packet as an example. The first packet is any one of at least one packet, and for convenience of description and distinction, a data category represented by the first packet is denoted as a first data category, and an information set that needs to be covered by the first data category is denoted as a first information set.
Optionally, for the first packet, a union of key fields included in each network data in the first packet and a value of each key field in the union may be obtained as the first information set according to key information included in each network data in the first packet.
For example, the union of the key fields included in each network data in the first packet may be directly calculated, and then, according to a certain policy, the value of each key field in the union may be selected from the values of the key fields included in each network data in the first packet. Or alternatively
For another example, a set of key information may be set for each packet, and the key information included in each network data is set as one set of key information, and the set of key information corresponding to each packet is the most number of sets of key information among the sets of key information included in the packet. For the first packet, the corresponding set of key information is the set of key information with the largest amount of key information in each set of key information (i.e., key information included in each network data) in the first packet. Based on the above, according to the key fields contained in each network data in the first packet, key fields which are not contained in the key information set corresponding to the first packet are identified, the key fields are marked as missing key fields, and the missing key fields are added into the missing key information set; then, counting the occurrence times of each value of the missing key field according to the value of the key field contained in each network data in the first packet, and adding the value with the largest occurrence times into the missing key information set; and calculating a union set of the key information set corresponding to the first group and the missing key information set to be used as a first information set.
It should be noted that the number of missing key fields may be one or more. For each missing key field, multiple values may appear in each network data in the first packet, so that the occurrence number of each value of the missing key field may be counted, and the value with the largest occurrence number is added to the missing key information set. In the missing key information set, each missing key field and the value thereof form key information.
In the embodiments of the present application, after obtaining an information set that needs to be covered by at least one data category, playback data that can participate in flow playback under the data category may be obtained for each data category according to the information set that needs to be covered by the data category. Taking the first data category as an example, according to the information set that needs to be covered by the first data category, the ways of obtaining the playback data that can participate in the flow playback under the first data category include, but are not limited to, the following ways:
Mode c1: and generating network data containing all information in the first information set according to the first information set which needs to be covered by the first data category, and taking the network data as playback data which can participate in flow playback under the first data category.
Mode c2: and selecting network data containing all information in the first information set from the first packet according to the first information set which needs to be covered by the first data category as playback data which can participate in flow playback under the first data category.
In the foregoing manner c1 or the manner c2, each playback data includes all the information in the first information set, and the information coverage of the playback data is up to standard, so that the number of playback data is not required to be too large, and the flow playback can be performed by using a smaller number of playback data, which is beneficial to improving the playback speed.
Mode c3: according to the first information set which needs to be covered by the first data category, network data containing more than x% of information in the first information set can be selected from the first packet, and all the selected network data can completely cover all the information in the first information set. Where x is a positive integer. Preferably, x% >70%, or x% >80%, but is not limited thereto.
After obtaining playback data that can participate in the streaming playback under the at least one data category, the streaming playback can be performed according to the playback data that can participate in the streaming playback under the at least one data category. As shown in fig. 2, a method for playback of a stream according to an exemplary embodiment of the present application includes the following steps:
201. a plurality of network data is acquired from an actual network environment.
202. The plurality of network data is classified into at least one packet based on information contained in the plurality of network data, each packet representing a class of data required for playback of the traffic.
203. And obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in at least one packet.
204. And acquiring playback data which can participate in flow playback under at least one data category according to the information set which is required to be covered by the at least one data category.
205. And performing the flow playback according to the playback data which can participate in the flow playback under at least one data category.
For the steps 201 to 204, reference is made to the description of the corresponding steps in the foregoing embodiments, and the description is omitted here.
In this embodiment, network data in an actual network environment may be used as a basis to obtain data types required for flow playback and information sets required to be covered by various data types, and playback data capable of participating in flow playback under each data type is obtained according to the information sets required to be covered by various data types, so that flow playback is performed based on the playback data capable of participating in flow playback under each data type.
Optionally, playback data that can participate in the flow playback under each data category may be sent to the network device to be tested, so as to perform performance and/or function testing on the network device to be tested. The playback data are acquired according to the information set which needs to be covered by the data types, the playback data with higher information coverage can be acquired preferentially, redundancy among the playback data is reduced, the number of the playback data is reduced, and then when the flow playback test is carried out according to the playback data, the requirement of the test coverage can be met, and the playback speed is improved.
It should be noted that, in this embodiment, steps 201 to 204 may be performed in advance to obtain playback data (offline), and then step 205 may be performed again (online) when the playback of the traffic is required; or steps 201-205 may be performed in real time, i.e. when the playback of the traffic is required, the playback data is acquired in real time and the playback of the traffic is performed.
In addition, the method provided by the embodiment can be applied to any application scene with the flow playback requirement, provides the required playback data for the flow playback, and performs the flow playback based on the playback data.
Fig. 3 is a flowchart of an information obtaining method according to an exemplary embodiment of the present application. As shown in fig. 3, the method includes:
301. a plurality of network data is acquired from an actual network environment.
302. The plurality of network data is classified into at least one packet based on information contained in the plurality of network data, each packet representing a class of data required for playback of the traffic.
303. And obtaining an information set which is required to be covered by at least one data category required by the flow playback according to the information contained in the network data in at least one packet.
For the description of steps 301-303, reference may be made to the description of the corresponding steps in the foregoing embodiments, and the description is omitted here.
In this embodiment, an information set that needs to be covered by at least one data category required for the playback of the traffic may be obtained in advance, and the information set that needs to be covered by at least one data category is stored, so as to provide a data base for the subsequent playback of the traffic. Of course, in the process of playback of the flow, the information set that needs to be covered by at least one data category obtained in real time according to the information contained in the plurality of network data in the actual network environment may also be obtained.
Based on the above, as shown in fig. 4, another method for playback of a flow according to an exemplary embodiment of the present application includes the following steps:
401. And acquiring an information set which is required to be covered according to at least one data category obtained from information contained in a plurality of network data in an actual network environment.
402. And acquiring playback data which can participate in flow playback under at least one data category according to the information set which is required to be covered by the at least one data category.
403. And performing the flow playback according to the playback data which can participate in the flow playback under at least one data category.
In this embodiment, an information set that needs to be covered by at least one data category required for traffic playback may be obtained according to information included in a plurality of network data in an actual network environment; when the flow playback is required, acquiring an information set which is required to be covered by at least one data category; according to the information set which needs to be covered by at least one data category, acquiring playback data which can participate in flow playback under at least one data category in real time; and then carrying out flow playback according to the playback data which can participate in the flow playback under at least one data category. The information set to be covered by at least one data type may be obtained in advance according to information contained in a plurality of network data in an actual network environment, or may be obtained in real time according to information contained in a plurality of network data in an actual network environment in a process of needing to perform flow playback. Whether obtained in advance or in real time, the detailed process of obtaining the information set that needs to be covered by at least one data category can be referred to the description in the foregoing embodiment, and will not be repeated here.
In this embodiment, based on network data in an actual network environment, a data class required for flow playback and an information set required to be covered by various data classes are obtained; and during flow playback, according to information sets which are required to be covered by various data types, acquiring playback data which can participate in the flow playback under each data type, and further performing flow playback based on the playback data which can participate in the flow playback under each data type. The playback data are acquired according to the information set which needs to be covered by the data types, the playback data with higher information coverage can be acquired preferentially, redundancy among the playback data is reduced, the number of the playback data is reduced, and then when the flow playback test is carried out according to the playback data, the requirement of the test coverage can be met, and the playback speed is improved.
The process of the above embodiment of the present application will be described in detail with reference to the flowchart shown in fig. 5, taking the playback of traffic in the DNS resolution scenario as an example.
And the user sets a plurality of key fields according to the DNS analysis requirement, and adds the key fields into a key field set keyword. For example, keyword= { operator, region, city, domain name }.
Referring to fig. 5, a certain amount of network data may be collected from network traffic of an actual network environment. For example, the network data may be an HTTP request, where the HTTP request carries a URL. Then, according to the key fields set by the user, extracting key information contained in each network data to form a key information set, which is called keyset, keyset = { keyword1, keyword2, keyword3 … … }. Key information set keyset contains the values of key fields contained in the network data. For example, keyset = { UNICOM, north China, beijing, www.alibaba.com } of one network data.
And clustering the network data according to the key information set keyset of each network data to form a plurality of groups. Wherein each packet has a feature set, denoted groupset. The feature set groupset of each packet is the most numerous key information set keyset in that packet. For example, assuming that keyset 1= { UNICOM, north China, beijing, www.alibaba.com }, keyset 2= { UNICOM, north China, www.alibaba.com }, keyset 3= { North China, beijing, www.alibaba.com }, keyset1 is the feature set of the group.
The clustering process of the network data is as follows:
For the first network data, it is added directly to a packet. For the 2 nd and subsequent network data, the jack similarity coefficients of the feature set groupset of each packet and keyset of the network data are calculated, respectively, the jack similarity coefficient being the ratio of the size of the intersection of the two sets to the size of the union of the two sets, i.e., j= (| keyset n groupset |)/(| keyset u groupset |).
If the Jaccard similarity coefficient for a network data to a packet is greater than a similarity coefficient threshold (which may be set by the user), the network data is partitioned into the packet. If the Jaccard similarity coefficient of the network data to the plurality of packets is greater than the similarity coefficient threshold, it is divided into the packet with the greatest similarity coefficient. If the Jaccard similarity coefficient for a network data and all packets is less than the similarity coefficient threshold, the network data is added to a new packet. Until all network data is divided into one packet.
For a packet, whenever new network data is divided into the packet, keyset of the network data newly divided into the packet is compared with the feature set groupset of the packet, and a set with a larger amount of key information is updated to the feature set of the packet, namely groupset _new=max { keyset |, | groupset _old| } and if the amount of key information contained in the two sets is the same, the original feature set is kept unchanged.
After all network data has been clustered, the cardinality of the key fields contained in each packet groupset is compared with the cardinality of the key fields contained in all keyset in that packet. If the same, then feature set groupset is unchanged; if the cardinality of the key fields contained in feature set groupset is less than the cardinality of the key fields contained in all keyset, then groupset the missing key fields are lostword, count the occurrence frequency of the lostword field values, and count the most frequent occurrence value as lostwordvalue, where the feature set of the packet is the union of the original feature set groupset and the missing key fields lostword and their values lostwordvalue, i.e., groupset _new= groupset _old { lostwordvalue }. For example, the key fields set by the user are { region, city, operator, request type }, a certain group includes keyset1 = { north China, UNICOM, add }, keyset2 = { north China, add }, keyset3 = { north China, beijing }, keyset4 = { UNICOM, beijing }, keyset5 = { north China, tianjin }, the cardinality of the key fields contained in groupset _old= keyset1, groupset _old is 3, the cardinality of the key fields contained in less than cardinality 5 of the key fields contained in all key information sets keyset, the missing key field lostword is city, and the number of occurrences of the value of the city field in the group is: beijing 2, tianjin 1, so lostwordvalue = Beijing, groupset _new= { North China, UNICOM, add } { Beijing } = { North China, beijing, UNICOM, add }. For each packet, the final feature set of the packet represents the set of information that the packet represents that the class of network data needs to cover. Through the processing, the information coverage of the feature set can be improved, and the coverage of data playback is further improved.
And finally, network data represented by the feature set groupset of each packet can be selected and sent to the network equipment to be tested for flow playback so as to verify the correctness of the function or performance data of the network equipment to be tested, thereby being beneficial to improving the playback speed.
It should be noted that, the execution subjects of each step of the method provided in the above embodiment may be the same device, or the method may also be executed by different devices. For example, the execution subject of steps 201 to 205 may be device a; for another example, the execution subject of step 201 to step 204 may be device a, and the execution subject of step 205 may be device B; etc.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or performed in parallel, the sequence numbers of the operations such as 201, 202, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Fig. 6 is a schematic structural diagram of a computing device according to an exemplary embodiment of the present application. As shown in fig. 6, the computing device includes: a memory 61 and a processor 62.
Memory 61 is used to store computer programs and may be configured to store various other data to support operations on the computing device. Examples of such data include instructions for any application or method operating on a computing device, contact data, phonebook data, messages, pictures, videos, and the like.
A processor 62 coupled to the memory 61 for executing the computer program in the memory 61 for: acquiring a plurality of network data from an actual network environment; classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback; obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in the at least one packet; and acquiring playback data which can participate in flow playback under the at least one data category according to the information set which is required to be covered by the at least one data category.
In an alternative embodiment, processor 62 is specifically configured to, when classifying the plurality of network data into at least one packet: identifying key fields and values of the key fields contained in each network data according to preset key fields, wherein each key field and the value of each key field are used as key information; and clustering the plurality of network data according to the key information contained in the plurality of network data to obtain at least one packet.
Further optionally, the processor 62 is specifically configured to, when clustering the plurality of network data according to the key information included in the plurality of network data to obtain at least one packet: for the first network data, calculating the similarity between the first network data and each existing packet according to the key information contained in the first network data and the key information contained in the network data in each existing packet; if the packet with the similarity larger than the set similarity threshold exists, adding the first network data into one packet with the similarity larger than the set similarity threshold; wherein the first network data is any one of the plurality of network data.
Further optionally, the processor 62 is further configured to: and if no packet with the similarity to the first network data being greater than the set similarity threshold exists, adding the first network data into a new packet.
Further optionally, the processor 62 is specifically configured to, when calculating the similarity between the first network data and the existing packets: determining a key information set corresponding to each existing packet according to key information contained in network data in each existing packet; and calculating the similarity between the key information contained in the first network data and the key information set corresponding to each existing packet as the similarity between the first network data and each existing packet.
Further optionally, the processor 62 is specifically configured to, when determining that the respective key information sets corresponding to the respective packets already exist: for each existing packet, selecting a group of key information with the largest quantity from key information contained in each network data according to the quantity of key information contained in each network data in the packet as a key information set corresponding to the packet.
Further optionally, the processor 62 is specifically configured to, when obtaining the information set that needs to be covered by at least one data category: acquiring a union of key fields contained in each network data in a first packet and the value of each key field in the union as a first information set according to key information contained in each network data in the first packet; wherein the first packet is any packet of the at least one packet, and the first information set is an information set that needs to be covered by a first data category represented by the first packet.
Further optionally, the processor 62 is specifically configured to, when obtaining the first information set: adding the missing key fields which are not included in the key information set corresponding to the first packet into the missing key information set according to the key fields included in each network data in the first packet; the key information set corresponding to the first packet is a group of key information with the largest quantity of key information contained in each network data in the first packet; counting the occurrence times of the values of the missing key fields according to the values of the key fields contained in each network data in the first packet, and adding the value with the largest occurrence times into the missing key information set; and calculating a union of the key information set corresponding to the first group and the missing key information set to be used as the first information set.
Further optionally, the processor 62 is specifically configured to, when acquiring the playback data: for a first data category, generating network data containing all information in the first information set according to a first information set which needs to be covered by the first data category, or selecting the network data containing all information in the first information set from a first packet to be used as playback data which can participate in flow playback under the first data category; wherein the first data class is any one of the plurality of data classes, and the first packet is a packet representative of the first data class.
Further optionally, the processor 62 is further configured to: after the playback data which can participate in the flow playback under the at least one data category is acquired, the flow playback is performed according to the playback data which can participate in the flow playback under the at least one data category.
Further, as shown in fig. 6, the computing device further includes: communication component 63, display 64, power component 65, audio component 66, and other components. Only some of the components are schematically shown in fig. 6, which does not mean that the computing device only includes the components shown in fig. 6. In addition, depending on the implementation form of the computing device, the components within the dashed box in fig. 6 are optional components, not necessarily components. For example, when the computing device is implemented as a terminal device such as a smart phone, tablet, or desktop, the components within the dashed box in fig. 6 may be included; when the computing device is implemented as a server-side device such as a conventional server, cloud server, data center, or server array, the components within the dashed box in fig. 6 may not be included.
Accordingly, embodiments of the present application also provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the steps in the above-described embodiments of playback data acquisition methods.
Fig. 7 is a schematic structural diagram of a flow playback device according to an exemplary embodiment of the present application. As shown in fig. 7, the apparatus includes: a memory 71 and a processor 72.
Memory 71 for storing computer programs and may be configured to store various other data to support operations on the computing device. Examples of such data include instructions for any application or method operating on a computing device, contact data, phonebook data, messages, pictures, videos, and the like.
A processor 72 coupled to the memory 71 for executing the computer program in the memory 71 for: acquiring an information set which is required to be covered according to at least one data category obtained from information contained in a plurality of network data in an actual network environment; acquiring playback data which can participate in flow playback under the at least one data category according to the information set which needs to be covered by the at least one data category; and performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
The information set to be covered by at least one data type may be obtained in advance according to information contained in a plurality of network data in an actual network environment, or may be obtained in real time according to information contained in a plurality of network data in an actual network environment in a process of needing to perform flow playback.
In an alternative embodiment, the processor 72 is further configured to obtain, from information included in the plurality of network data in the actual network environment, a set of information that needs to be covered by at least one data class.
Further optionally, the processor 72 is specifically configured to, when obtaining the information set that needs to be covered by the at least one data category: acquiring a plurality of network data from an actual network environment; classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback; and obtaining an information set which needs to be covered by at least one data category according to the information contained in the network data in the at least one packet.
In an alternative embodiment, processor 672 is specifically configured to, when classifying the plurality of network data into at least one packet: identifying key fields and values of the key fields contained in each network data according to preset key fields, wherein each key field and the value of each key field are used as key information; and clustering the plurality of network data according to the key information contained in the plurality of network data to obtain at least one packet.
Further optionally, the processor 72 is specifically configured to, when clustering the plurality of network data according to the key information included in the plurality of network data to obtain at least one packet: for the first network data, calculating the similarity between the first network data and each existing packet according to the key information contained in the first network data and the key information contained in the network data in each existing packet; if the packet with the similarity larger than the set similarity threshold exists, adding the first network data into one packet with the similarity larger than the set similarity threshold; wherein the first network data is any one of the plurality of network data.
Further optionally, the processor 72 is further configured to: and if no packet with the similarity to the first network data being greater than the set similarity threshold exists, adding the first network data into a new packet.
Further optionally, the processor 72 is specifically configured to, when calculating the similarity between the first network data and the existing packets: determining a key information set corresponding to each existing packet according to key information contained in network data in each existing packet; and calculating the similarity between the key information contained in the first network data and the key information set corresponding to each existing packet as the similarity between the first network data and each existing packet.
Further optionally, the processor 72 is specifically configured to, when determining that the respective key information sets corresponding to the respective packets already exist: for each existing packet, selecting a group of key information with the largest quantity from key information contained in each network data according to the quantity of key information contained in each network data in the packet as a key information set corresponding to the packet.
Further optionally, the processor 72 is specifically configured to, when obtaining the information set that needs to be covered by the at least one data category: acquiring a union of key fields contained in each network data in a first packet and the value of each key field in the union as a first information set according to key information contained in each network data in the first packet; wherein the first packet is any packet of the at least one packet, and the first information set is an information set that needs to be covered by a first data category represented by the first packet.
Further optionally, the processor 72 is specifically configured to, when obtaining the first information set: adding the missing key fields which are not included in the key information set corresponding to the first packet into the missing key information set according to the key fields included in each network data in the first packet; the key information set corresponding to the first packet is a group of key information with the largest quantity of key information contained in each network data in the first packet; counting the occurrence times of the values of the missing key fields according to the values of the key fields contained in each network data in the first packet, and adding the value with the largest occurrence times into the missing key information set; and calculating a union of the key information set corresponding to the first group and the missing key information set to be used as the first information set.
Further optionally, the processor 72 is specifically configured to, when acquiring the playback data: for a first data category, generating network data containing all information in the first information set according to a first information set which needs to be covered by the first data category, or selecting the network data containing all information in the first information set from a first packet to be used as playback data which can participate in flow playback under the first data category; wherein the first data class is any one of the plurality of data classes, and the first packet is a packet representative of the first data class.
Further, as shown in fig. 7, the flow playback device further includes: communication component 73, display 74, power component 75, audio component 76, and other components. Only some of the components are schematically shown in fig. 7, which does not mean that the flow playback device only comprises the components shown in fig. 7. In addition, depending on the implementation form of the flow playback device, the components within the dashed box in fig. 7 are optional components, not necessarily optional components. For example, when the flow playback device is implemented as a terminal device such as a smart phone, tablet, or desktop, the components within the dashed box in fig. 7 may be included; when the traffic playback device is implemented as a server-side device such as a conventional server, cloud server, data center, or server array, the components within the dashed box in fig. 7 may not be included.
Accordingly, embodiments of the present application also provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the steps of the respective amount playback method embodiments of streams described above.
The communication assembly of fig. 6 and 7 described above is configured to facilitate wired or wireless communication between the device in which the communication assembly is located and other devices. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component may further include a Near Field Communication (NFC) module, radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and the like.
The memory in fig. 6 and 7 described above may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The displays in fig. 6 and 7 described above include screens, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
The power supply assembly of fig. 6 and 7 provides power to the various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
The audio components of fig. 6 and 7 described above may be configured to output and/or input audio signals. For example, the audio component includes a Microphone (MIC) configured to receive external audio signals when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal may be further stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that 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 foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (18)

1. A playback data acquisition method, characterized by comprising:
acquiring a plurality of network data from an actual network environment;
Classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback;
Acquiring a union of key fields contained in each network data in the at least one packet and the value of each key field in the union according to the key information contained in the network data in the at least one packet, and taking the union as an information set to be covered by at least one data type;
and acquiring playback data which can participate in flow playback under the at least one data category according to the information set which is required to be covered by the at least one data category.
2. The method of claim 1, wherein classifying the plurality of network data into at least one packet based on information contained in the plurality of network data comprises:
Identifying key fields and values of the key fields contained in each network data according to preset key fields, wherein each key field and the value of each key field are used as key information;
And clustering the plurality of network data according to the key information contained in the plurality of network data to obtain at least one packet.
3. The method of claim 2, wherein clustering the plurality of network data to obtain at least one packet based on key information contained in the plurality of network data, comprises:
For the first network data, calculating the similarity between the first network data and each existing packet according to the key information contained in the first network data and the key information contained in the network data in each existing packet;
if the packet with the similarity larger than the set similarity threshold exists, adding the first network data into one packet with the similarity larger than the set similarity threshold;
wherein the first network data is any one of the plurality of network data.
4. A method according to claim 3, further comprising:
And if no packet with the similarity to the first network data being greater than the set similarity threshold exists, adding the first network data into a new packet.
5. A method according to claim 3, wherein calculating the similarity between the first network data and the existing packets based on the key information contained in the first network data and the key information contained in the network data in the existing packets comprises:
Determining a key information set corresponding to each existing packet according to key information contained in network data in each existing packet;
And calculating the similarity between the key information contained in the first network data and the key information set corresponding to each existing packet as the similarity between the first network data and each existing packet.
6. The method of claim 5, wherein determining the respective set of critical information for each existing packet based on the critical information contained in the network data in each existing packet comprises:
For each existing packet, selecting a group of key information with the largest quantity from key information contained in each network data according to the quantity of key information contained in each network data in the packet as a key information set corresponding to the packet.
7. The method according to any one of claims 2-6, wherein obtaining, according to the key information included in the network data in the at least one packet, a union of key fields included in each network data in the at least one packet and a value of each key field in the union as an information set to be covered by at least one data category includes:
Acquiring a union of key fields contained in each network data in a first packet and the value of each key field in the union as a first information set according to key information contained in each network data in the first packet;
Wherein the first packet is any packet of the at least one packet, and the first information set is an information set that needs to be covered by a first data category represented by the first packet.
8. The method of claim 7, wherein obtaining a union of key fields included in each network data in the first packet and a value of each key field in the union according to key information included in each network data in the first packet as the first information set includes:
Adding the missing key fields which are not included in the key information set corresponding to the first packet into the missing key information set according to the key fields included in each network data in the first packet; the key information set corresponding to the first packet is a group of key information with the largest quantity of key information contained in each network data in the first packet;
Counting the occurrence times of the values of the missing key fields according to the values of the key fields contained in each network data in the first packet, and adding the value with the largest occurrence times into the missing key information set;
And calculating a union of the key information set corresponding to the first group and the missing key information set to be used as the first information set.
9. The method according to any one of claims 1-6, wherein obtaining playback data for the at least one data category that can participate in the playback of the traffic according to the set of information that the at least one data category needs to cover, comprises:
For a first data category, generating network data containing all information in a first information set according to the first information set which needs to be covered by the first data category;
Wherein the first data category is any one of the at least one data category and the first packet is a packet representative of the first data category.
10. The method of any one of claims 1-6, further comprising:
And performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
11. A method of playback of a stream, comprising:
Acquiring an information set which is required to be covered according to at least one data category obtained from key information contained in a plurality of network data in an actual network environment; the information set to be covered of each data category comprises a union set of key fields contained in each network data in a corresponding packet, and the value of each key field in the union set;
acquiring playback data which can participate in flow playback under the at least one data category according to the information set which needs to be covered by the at least one data category;
And performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
12. The method of claim 11, wherein obtaining the set of information to be covered by the at least one data category based on the key information included in the plurality of network data in the actual network environment comprises:
acquiring a plurality of network data from an actual network environment;
Classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback;
And acquiring a union set of key fields contained in each network data in the at least one packet and the value of each key field in the union set according to the key information contained in the network data in the at least one packet, and taking the union set as an information set to be covered by at least one data type.
13. A computing device, comprising: a memory and a processor;
the memory is used for storing a computer program;
the processor, coupled to the memory, is configured to execute the computer program for:
acquiring a plurality of network data from an actual network environment;
Classifying the plurality of network data into at least one packet according to information contained in the plurality of network data, each packet representing a class of data required for traffic playback;
Acquiring a union of key fields contained in each network data in the at least one packet and the value of each key field in the union according to the key information contained in the network data in the at least one packet, and taking the union as an information set to be covered by at least one data type;
and acquiring playback data which can participate in flow playback under the at least one data category according to the information set which is required to be covered by the at least one data category.
14. The computing device of claim 13, wherein the processor, when classifying the plurality of network data into at least one packet, is specifically configured to:
Identifying key fields and values of the key fields contained in each network data according to preset key fields, wherein each key field and the value of each key field are used as key information;
And clustering the plurality of network data according to the key information contained in the plurality of network data to obtain at least one packet.
15. The computing device of claim 14, wherein the processor is further to:
And performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
16. A flow playback device, comprising: a memory and a processor;
the memory is used for storing a computer program;
the processor, coupled to the memory, is configured to execute the computer program for:
Acquiring an information set which is required to be covered according to at least one data category obtained from key information contained in a plurality of network data in an actual network environment; the information set to be covered of each data category comprises a union set of key fields contained in each network data in a corresponding packet, and the value of each key field in the union set;
acquiring playback data which can participate in flow playback under the at least one data category according to the information set which needs to be covered by the at least one data category;
And performing flow playback according to the playback data which can participate in the flow playback under the at least one data category.
17. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1-10.
18. A computer readable storage medium storing a computer program, which when executed by a processor causes the processor to carry out the steps of the method of claim 11 or 12.
CN201911090116.8A 2019-11-08 2019-11-08 Playback data acquisition and flow playback method, device and storage medium Active CN112787880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911090116.8A CN112787880B (en) 2019-11-08 2019-11-08 Playback data acquisition and flow playback method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911090116.8A CN112787880B (en) 2019-11-08 2019-11-08 Playback data acquisition and flow playback method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112787880A CN112787880A (en) 2021-05-11
CN112787880B true CN112787880B (en) 2024-05-31

Family

ID=75748561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911090116.8A Active CN112787880B (en) 2019-11-08 2019-11-08 Playback data acquisition and flow playback method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112787880B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195877A (en) * 2010-03-18 2011-09-21 马维尔以色列(M.I.S.L.)有限公司 Packet processing optimization
CN105550744A (en) * 2015-12-06 2016-05-04 北京工业大学 Nerve network clustering method based on iteration
US9519710B1 (en) * 2014-03-14 2016-12-13 Imdb.Com, Inc. Dynamic classification of attribute relevance and classification
CN106878108A (en) * 2017-03-01 2017-06-20 广州唯品会信息科技有限公司 Network flow playback method of testing and device
WO2017155592A1 (en) * 2016-03-09 2017-09-14 Symantec Corporation Systems and methods for automated classification of application network activity
US9798820B1 (en) * 2016-10-28 2017-10-24 Searchmetrics Gmbh Classification of keywords
CN107798718A (en) * 2017-10-31 2018-03-13 厦门幻世网络科技有限公司 A kind of animation back method and device
CN109376764A (en) * 2018-09-13 2019-02-22 北京字节跳动网络技术有限公司 Method of data capture, device and computer readable storage medium based on cluster

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195877A (en) * 2010-03-18 2011-09-21 马维尔以色列(M.I.S.L.)有限公司 Packet processing optimization
US9519710B1 (en) * 2014-03-14 2016-12-13 Imdb.Com, Inc. Dynamic classification of attribute relevance and classification
CN105550744A (en) * 2015-12-06 2016-05-04 北京工业大学 Nerve network clustering method based on iteration
WO2017155592A1 (en) * 2016-03-09 2017-09-14 Symantec Corporation Systems and methods for automated classification of application network activity
US9798820B1 (en) * 2016-10-28 2017-10-24 Searchmetrics Gmbh Classification of keywords
CN106878108A (en) * 2017-03-01 2017-06-20 广州唯品会信息科技有限公司 Network flow playback method of testing and device
CN107798718A (en) * 2017-10-31 2018-03-13 厦门幻世网络科技有限公司 A kind of animation back method and device
CN109376764A (en) * 2018-09-13 2019-02-22 北京字节跳动网络技术有限公司 Method of data capture, device and computer readable storage medium based on cluster

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HLA数据回放及其可通用性问题研究;张新宇;陈彬;尹全军;黄柯棣;;国防科技大学学报;20071015(第05期);全文 *

Also Published As

Publication number Publication date
CN112787880A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110874440B (en) Information pushing method and device, model training method and device, and electronic equipment
US9984408B1 (en) Method, medium, and system for live video cooperative shopping
CN104579909B (en) Method and equipment for classifying user information and acquiring user grouping information
JP2021103506A (en) Method and device for generating information
CN110297944B (en) Distributed XML data processing method and system
CN108184170B (en) Data processing method and device
WO2017080167A1 (en) Video pushing method and system for third party
CN109510874A (en) Electronic certificate method for pushing, device and electronic equipment based on LBS
CN110392155A (en) It has been shown that, processing method, device and the equipment of notification message
CN108228432A (en) A kind of distributed link tracking, analysis method and server, global scheduler
CN108600780A (en) Method for pushed information
CN114996134A (en) Containerized deployment method, electronic equipment and storage medium
CN103577426A (en) Method, device and system for providing additional application messages of searching suggestion
CN112506887B (en) Vehicle terminal CAN bus data processing method and device
US20160210335A1 (en) Server and service searching method of the server
CN111782933B (en) Method and device for recommending booklets
CN111641690B (en) Session message processing method and device and electronic equipment
CN106874305B (en) Information transmission method and device
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
CN112787880B (en) Playback data acquisition and flow playback method, device and storage medium
CN109428774B (en) Data processing method of DPI equipment and related DPI equipment
CN110020166A (en) A kind of data analysing method and relevant device
CN103796042B (en) resource information pushing method and device
CN111479140A (en) Data acquisition method, data acquisition device, computer device and storage medium
CN112799863A (en) Method and apparatus for outputting information

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