Traffic data processing method and device, computer equipment and storage medium
By obtaining and aggregating traffic data from the traffic pool and playing it back in the second operating environment, the problem of difficult traffic multiplexing between different isolated environments in traditional methods is solved, and the efficiency of testing and development is improved.
Patent Information
- Application Number
- CN202411578661.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional methods are difficult to achieve traffic multiplexing between different isolated environments in software development and network system management, resulting in inefficient testing and development.
By obtaining the traffic multiplexing request, obtaining the corresponding traffic data set from the traffic pool according to the interface request parameters, and aggregating it with the feature dictionary to generate new traffic data, and playing it back in the second operating environment to realize traffic multiplexing between different isolated environments.
It improves the utilization rate of traffic data and realizes the reuse of traffic data, thereby improving the efficiency of testing and development.
Smart Images

Figure CN119597643A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a flow data processing method, apparatus, computer equipment and storage medium. Background Art
[0002] In software development and network system management, effectively managing and utilizing network traffic data is the key to improving system performance and resource utilization. Traditional methods usually involve manual processing and analysis of traffic data and are unable to achieve traffic multiplexing, which is not only time-consuming but also inefficient. Summary of the invention
[0003] Based on this, it is necessary to provide a traffic data processing method, device, computer equipment and storage medium that can realize traffic multiplexing in different isolation environments and improve the efficiency of testing and development in response to the above technical problems.
[0004] A flow data processing method, the method comprising:
[0005] Obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter;
[0006] Acquire a corresponding traffic data set from the traffic pool according to the first interface request parameter, where the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments;
[0007] Acquire a corresponding feature dictionary according to the first operating environment parameter;
[0008] Aggregate the traffic data set with the feature dictionary to obtain new traffic data;
[0009] Replay the new traffic data in the second operating environment.
[0010] In one embodiment, the steps of establishing the flow pool include:
[0011] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0012] Parse each gateway layer request log to obtain the corresponding second interface request parameters and flow request parameters;
[0013] The second operating environment parameters, the second interface request parameters and the traffic request parameters are associated and bound, and stored in the traffic pool.
[0014] In one embodiment, the process of establishing the feature dictionary includes:
[0015] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0016] Parse each gateway layer request log and extract the data feature set corresponding to each second operating environment parameter;
[0017] Each data feature set is screened to obtain a feature dictionary corresponding to each second operating environment parameter.
[0018] In one embodiment, the traffic data set is aggregated with the feature dictionary to obtain new traffic data, including:
[0019] Obtain an intermediate traffic dataset from the traffic dataset that has the same fields as the feature dictionary;
[0020] Filtering the target flow data from the intermediate flow data set, the operating environment parameter corresponding to the target flow data is different from the first operating environment parameter;
[0021] Replace the field value corresponding to the same field in the feature dictionary with the position specified by the target traffic data to obtain new traffic data.
[0022] In one embodiment, replaying new traffic data in the second operating environment includes:
[0023] Determine a second operating environment corresponding to the new traffic data;
[0024] Perform regression testing on the new traffic data in the second operating environment.
[0025] In one embodiment, after determining the second operating environment corresponding to the new traffic data, the method further includes:
[0026] Obtaining environment authentication information corresponding to the second operating environment;
[0027] Reorganize environmental authentication information into new flow data.
[0028] In one embodiment, reorganizing the environment authentication information into new traffic data includes:
[0029] Obtain the traffic authentication information corresponding to the new traffic data;
[0030] The flow authentication information is changed to the environment authentication information to obtain the changed new flow data.
[0031] A flow data processing device, comprising:
[0032] A first acquisition module, used to obtain a traffic multiplexing request, the request carrying a first interface request parameter and a first operating environment parameter;
[0033] A second acquisition module is used to acquire a corresponding traffic data set from the traffic pool according to the first interface request parameter, where the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments;
[0034] A third acquisition module, used to acquire a corresponding feature dictionary according to the first operating environment parameter;
[0035] Aggregation module, used to aggregate the traffic data set with the feature dictionary to obtain new traffic data;
[0036] The playback module is used to play back new traffic data in the second operating environment.
[0037] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0038] Obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter;
[0039] Acquire a corresponding traffic data set from the traffic pool according to the first interface request parameter, where the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments;
[0040] Acquire a corresponding feature dictionary according to the first operating environment parameter;
[0041] Aggregate the traffic data set with the feature dictionary to obtain new traffic data;
[0042] Replay the new traffic data in the second operating environment.
[0043] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0044] Obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter;
[0045] Acquire a corresponding traffic data set from the traffic pool according to the first interface request parameter, where the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments;
[0046] Acquire a corresponding feature dictionary according to the first operating environment parameter;
[0047] Aggregate the traffic data set with the feature dictionary to obtain new traffic data;
[0048] Replay the new traffic data in the second operating environment.
[0049] The above-mentioned traffic data processing method, device, computer equipment and storage medium obtain a traffic multiplexing request, the request carries a first interface request parameter and a first operating environment parameter, obtains a corresponding traffic data set from a traffic pool according to the first interface request parameter, the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments, obtains a corresponding feature dictionary according to the first operating environment parameter, aggregates the traffic data set with the feature dictionary to obtain new traffic data, and replays the new traffic data in the second operating environment. Therefore, based on the feature dictionary, the traffic data is processed and reorganized to achieve traffic multiplexing between different isolated environments, improve the utilization rate of traffic data, and reuse traffic data, thereby improving the efficiency of testing and development. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 An application environment diagram of a flow data processing method in an embodiment;
[0051] Figure 2 A flow chart of a method for processing flow data in one embodiment;
[0052] Figure 3 A schematic diagram of a flow chart of steps for establishing a flow pool in one embodiment;
[0053] Figure 4 is a flowchart of a process for establishing a feature dictionary in one embodiment;
[0054] Figure 5 is a schematic flow diagram of a polymerization step in one embodiment;
[0055] Figure 6 A schematic diagram of a playback process in an embodiment;
[0056] Figure 7 A schematic diagram of a process for obtaining environmental authentication information in an embodiment;
[0057] Figure 8 A flowchart of the steps of adding environment authentication information in one embodiment;
[0058] Fig. 9 is a structural block diagram of a flow data processing device in one embodiment;
[0059] Fig.10 is an internal structure diagram of a computer device in one embodiment;
[0060] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] The flow data processing method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0063] Specifically, the terminal 102 obtains a traffic multiplexing request, the request carries a first interface request parameter and a first operating environment parameter, and sends it to the server 104. The server 104 obtains a corresponding traffic data set from the traffic pool according to the first interface request parameter. The traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments. The corresponding feature dictionary is obtained according to the first operating environment parameter, the traffic data set is aggregated with the feature dictionary to obtain new traffic data, and the new traffic data is played back in the second operating environment.
[0064] In another embodiment, the terminal 102 obtains a traffic multiplexing request, the request carries a first interface request parameter and a first operating environment parameter, obtains a corresponding traffic data set from a traffic pool according to the first interface request parameter, the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments, obtains a corresponding feature dictionary according to the first operating environment parameter, aggregates the traffic data set and the feature dictionary to obtain new traffic data, and plays back the new traffic data in the second operating environment.
[0065] In one embodiment, Figure 2 As shown, a flow data processing method is provided, and the method is applied to Figure 1 The terminal or server in the example is used to illustrate, including the following steps:
[0066] Step 202: Obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter.
[0067] Among them, the traffic multiplexing request indicates traffic multiplexing between different operating environments. Traffic multiplexing refers to the technology of reusing existing network traffic data in different network or system environments. Multiple operating environments are isolated, physically or logically separated operating environments, in which system components, applications or services run independently without affecting other environments. The operating environment can be a production environment, a test environment, a grayscale environment, etc.
[0068] Among them, the first interface request parameter is the interface request parameter carried in the traffic multiplexing request and is the interface information that needs to be replayed. The parameter related to the interface can be the interface identifier, and the first operating environment parameter is the parameter related to the current execution environment in the traffic multiplexing request, which can be the operating environment identifier.
[0069] Step 204: Obtain a corresponding traffic data set from the traffic pool according to the first interface request parameter. The traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments.
[0070] The traffic pool is a collection of traffic data, which includes the traffic data corresponding to the interface in different operating environments corresponding to each interface request parameter, and the traffic pool can be established in advance. Specifically, after obtaining the traffic multiplexing request, all corresponding traffic data are obtained according to the first interface request parameter carried by the traffic multiplexing request to form a traffic data set, which includes the traffic data corresponding to the interface in different operating environments.
[0071] Step 206: Obtain a corresponding feature dictionary according to the first operating environment parameter.
[0072] Among them, different operating environments correspond to different feature dictionaries, and the feature dictionary is composed of key field features corresponding to the operating environment, and the so-called key field is a necessary field required by the business under the operating environment. Specifically, after obtaining the traffic multiplexing request, the corresponding feature dictionary is obtained according to the first operating environment parameter carried by the traffic multiplexing request.
[0073] Step 208: Aggregate the traffic data set and the feature dictionary to obtain new traffic data.
[0074] Aggregation is to filter out data from different operating environments that match the feature dictionary in the traffic data set to obtain new traffic data. This enables traffic data between different operating environments to be reused and traffic reuse in different isolation environments to be achieved. The new traffic data can be used in a specified operating environment.
[0075] Specifically, first, the traffic data in the traffic data set that has the same fields as the feature dictionary is filtered, and then it is determined whether the filtered traffic data and the feature dictionary are in the same operating environment. The traffic data of different operating environments are filtered out, and the field values in the feature dictionary are replaced with the field values in the filtered traffic data to obtain new traffic data.
[0076] Step 210: replay the new traffic data in the second operating environment.
[0077] Among them, the second operating environment and the first operating environment corresponding to the first operating environment parameters belong to different operating environments, the first operating environment may be a production environment, the second operating environment may be a test environment or a grayscale environment, and the second operating environment may be a designated operating environment.
[0078] Specifically, after obtaining the new traffic data, the second operating environment is determined, and the new traffic data is played back in the second operating environment. The new traffic data corresponds to an operating environment, and after obtaining the new traffic data, the second operating environment is determined, and the new traffic data is executed in the second operating environment, so as to realize traffic reuse in different isolated environments.
[0079] In the above-mentioned traffic data processing method, a traffic reuse request is obtained, the request carries a first interface request parameter and a first operating environment parameter, and a corresponding traffic data set is obtained from a traffic pool according to the first interface request parameter, the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments, and a corresponding feature dictionary is obtained according to the first operating environment parameter, and the traffic data set is aggregated with the feature dictionary to obtain new traffic data, and the new traffic data is played back in the second operating environment. Therefore, based on the feature dictionary, the traffic data is processed and reorganized to realize traffic reuse between different isolated environments, improve the utilization rate of traffic data, and reuse traffic data, thereby improving the efficiency of testing and development.
[0080] In one embodiment, Figure 3 As shown, the steps for establishing a traffic pool include:
[0081] Step 302: Collect gateway layer request logs corresponding to multiple operating environments, where the operating environment is associated with a second operating environment parameter.
[0082] Step 304: parse each gateway layer request log to obtain corresponding second interface request parameters and flow request parameters.
[0083] Step 306: associate and bind the second operating environment parameters, the second interface request parameters, and the traffic request parameters, and store them in the traffic pool.
[0084] Among them, the gateway layer request log records all traffic-related request information in the operating environment, collects gateway layer request logs corresponding to multiple different operating environments, and each operating environment is associated with an operating environment parameter.
[0085] Specifically, multiple channels are collected for gateway layer request logs corresponding to different operating environments, and each gateway layer request log is parsed. The parsing includes denoising, processing, and filtering duplicate requests for the data recorded in the gateway layer request log. The second interface request parameters and traffic request parameters corresponding to each operating environment are obtained through the parsing. The traffic request parameters here are parameters related to traffic data, and the corresponding traffic data can be called through the traffic request parameters.
[0086] Furthermore, the relationship between each second operating environment parameter, the second interface request parameter and the corresponding traffic request parameter is bound to form a traffic pool. That is to say, the traffic pool includes the relationship between the operating environment parameters, the interface request parameters and the traffic request parameters. The corresponding traffic request parameters can be obtained from the traffic pool through the interface dimension, and the traffic request parameters are associated with the corresponding operating environment parameters.
[0087] In one embodiment, Figure 4 As shown in the figure, the process of establishing the feature dictionary includes:
[0088] Step 402: Collect gateway layer request logs corresponding to a plurality of operating environments, where the operating environment is associated with a second operating environment parameter.
[0089] Step 404: parse each gateway layer request log and extract the data feature set corresponding to each second operating environment parameter.
[0090] Step 406: Screen each data feature set to obtain a feature dictionary corresponding to each second operating environment parameter.
[0091] Among them, different operating environments correspond to different feature dictionaries, and the corresponding feature dictionaries can be established through the gateway layer request logs of the operating environment. Specifically, the gateway layer request logs corresponding to multiple operating environments are collected, and each operating environment is associated with a corresponding operating environment parameter, that is, a second operating environment parameter, which is a parameter related to the operating environment and can be an operating environment identifier.
[0092] Furthermore, the gateway layer request log corresponding to each operating environment is parsed, for example, all the traffic data of the gateway layer corresponding to each operating environment is obtained from the logStore data source, and the request parameters are extracted from the traffic data to obtain the data feature set corresponding to each operating environment parameter. Then, according to the keyword configuration corresponding to each operating environment parameter, each data feature set is screened, and the data features that meet the requirements are stored in the feature dictionary, where the feature dictionary includes the relationship between the operating environment parameters and the data features.
[0093] In one embodiment, Figure 5 As shown in the figure, the traffic data set is aggregated with the feature dictionary to obtain new traffic data, including:
[0094] Step 502: Acquire an intermediate traffic data set having the same fields as the feature dictionary from the traffic data set.
[0095] Step 504: Filter and obtain target flow data from the intermediate flow data set. The operating environment parameter corresponding to the target flow data is different from the first operating environment parameter.
[0096] Step 506: Replace the field value corresponding to the same field in the feature dictionary into the position specified by the target traffic data to obtain new traffic data.
[0097] Among them, all traffic data in the traffic data set are processed and reorganized based on the feature dictionary, so that traffic reuse in different isolated environments can be achieved. Specifically, based on the feature dictionary, traffic data with the same fields as those in the traffic set are screened to obtain an intermediate traffic data set.
[0098] Among them, since the traffic data are all associated with corresponding operating environment parameters, after obtaining the intermediate traffic data set, the traffic data in the intermediate traffic data set that are different from the first operating environment parameters are screened out to obtain the target traffic data. That is, the operating environment parameters corresponding to the target traffic data are different from the first operating environment parameters, so as to achieve isolation of the operating environment. For example, if the first operating environment parameters identify the production environment, then the operating environment parameters corresponding to the target traffic data may be test operating environment parameters or grayscale operating environment parameters.
[0099] Furthermore, after obtaining the target traffic data, the field value corresponding to the same field in the feature dictionary is replaced with the position specified by the target traffic data to obtain new traffic data. At this time, the new traffic data can be played back in the specified operating environment. In this way, traffic reuse in different isolated environments can be achieved without being limited by the operating environment, so that traffic reuse can be achieved and the utilization rate of traffic data can be improved.
[0100] In one embodiment, Figure 6 As shown, the new traffic data is played back in the second operating environment, including:
[0101] Step 602: Determine the second operating environment corresponding to the new traffic data.
[0102] Step 604: Perform a regression test on the new traffic data in the second operating environment.
[0103] The playback of the new traffic data in the second operating environment may specifically include determining the second operating parameters corresponding to the new traffic data, each traffic data is associated with a corresponding operating environment parameter, and the corresponding operating environment is determined by the operating environment parameter. Therefore, the second operating environment is determined by the operating environment parameter associated with the new traffic data.
[0104] Furthermore, after determining the second operating environment, a regression test of the new traffic data is performed in the second operating environment. The so-called regression test is to repeat all or part of the same test before, that is, the new traffic data repeats the same test before in the second operating environment.
[0105] In one embodiment, Figure 7 As shown, after determining the second operating environment corresponding to the new traffic data, the method further includes:
[0106] Step 702, obtaining environment authentication information corresponding to the second operating environment;
[0107] Step 704, reorganize the environmental authentication information into new traffic data.
[0108] Among them, the environment authentication information is mainly used for user identity identification. Through the environment authentication information, the new traffic data can be guaranteed to run in the second operating environment. Specifically, the environment authentication information corresponding to the second operating environment can be obtained, and the relationship between the operating environment parameters and the corresponding environment authentication information can be established in advance, and the environment authentication information corresponding to the second operating environment can be obtained according to the relationship. Further, the environment authentication information is added to the new traffic data, so that the new traffic data can be replayed or regression tested in the second operating environment.
[0109] In one embodiment, Figure 8 As shown, the environment authentication information is reorganized into new traffic data, including:
[0110] Step 802, obtaining the flow authentication information corresponding to the new flow data.
[0111] Step 804, changing the flow authentication information to the environment authentication information to obtain the changed new flow data.
[0112] The environment authentication information is reorganized into the new traffic data, specifically, the traffic authentication information corresponding to the new traffic data is changed to the environment authentication information, and the changed new traffic data can be run in the second operating environment. Specifically, the traffic authentication information corresponding to the new traffic data is obtained, the environment authentication information replaces the traffic authentication information with the second operating environment authentication, and finally the traffic data is replayed or regression tested in the second operating environment.
[0113] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0114] In one embodiment, Fig. 9 As shown, a flow data processing device 900 is provided, comprising: a first acquisition module 902, a second acquisition module 904, a third acquisition module 906, an aggregation module 908 and a playback module 910, wherein:
[0115] The first acquisition module 902 is used to obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter.
[0116] The second acquisition module 904 is used to acquire a corresponding traffic data set from the traffic pool according to the first interface request parameter, where the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments.
[0117] The third acquisition module 906 is used to acquire a corresponding feature dictionary according to the first operating environment parameter.
[0118] Aggregation module 908 is used to aggregate the traffic data set with the feature dictionary to obtain new traffic data.
[0119] The playback module 910 is used to play back new traffic data in the second operating environment.
[0120] In one embodiment, the traffic data processing device 900 collects gateway layer request logs corresponding to multiple operating environments, each operating environment is associated with a second operating environment parameter, parses each gateway layer request log, obtains the corresponding second interface request parameter and traffic request parameter, associates and binds each second operating environment parameter, second interface request parameter and traffic request parameter, and stores them in a traffic pool.
[0121] In one embodiment, the traffic data processing device 900 collects gateway layer request logs corresponding to multiple operating environments, each operating environment is associated with a second operating environment parameter, parses each gateway layer request log, extracts a data feature set corresponding to each second operating environment parameter, and filters each data feature set to obtain a feature dictionary corresponding to each second operating environment parameter.
[0122] In one embodiment, the aggregation module 908 obtains an intermediate traffic data set that has the same fields as the feature dictionary from the traffic data set, filters the target traffic data from the intermediate traffic data set, and the operating environment parameters corresponding to the target traffic data are different from the first operating environment parameters. The field value corresponding to the same field in the feature dictionary is replaced with the position specified by the target traffic data to obtain new traffic data.
[0123] In one embodiment, the playback module 910 determines a second operating environment corresponding to the new traffic data, and performs a regression test on the new traffic data in the second operating environment.
[0124] In one embodiment, the playback module 910 obtains the environment authentication information corresponding to the second operating environment, and reorganizes the environment authentication information into new traffic data.
[0125] In one embodiment, the playback module 910 obtains the traffic authentication information corresponding to the new traffic data, changes the traffic authentication information to the environment authentication information, and obtains the changed new traffic data.
[0126] For the specific definition of the flow data processing device, please refer to the definition of the flow data processing method above, which will not be repeated here. Each module in the above-mentioned flow data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0127] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store traffic data sets. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a traffic data processing method is implemented.
[0128] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a flow data processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0129] Those skilled in the art will understand that Fig.10 or Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0130] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining a traffic multiplexing request, the request carrying a first interface request parameter and a first operating environment parameter; obtaining a corresponding traffic data set from a traffic pool according to the first interface request parameter, the traffic data set including traffic data corresponding to an interface corresponding to the first interface request parameter in different operating environments; obtaining a corresponding feature dictionary according to the first operating environment parameter; aggregating the traffic data set and the feature dictionary to obtain new traffic data; and replaying the new traffic data in a second operating environment.
[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0132] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0133] Parse each gateway layer request log to obtain the corresponding second interface request parameters and flow request parameters;
[0134] The second operating environment parameters, the second interface request parameters and the traffic request parameters are associated and bound, and stored in the traffic pool.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0137] Parse each gateway layer request log and extract the data feature set corresponding to each second operating environment parameter;
[0138] Each data feature set is screened to obtain a feature dictionary corresponding to each second operating environment parameter.
[0139] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0140] Obtain an intermediate traffic dataset from the traffic dataset that has the same fields as the feature dictionary;
[0141] Filtering the target flow data from the intermediate flow data set, the operating environment parameter corresponding to the target flow data is different from the first operating environment parameter;
[0142] Replace the field value corresponding to the same field in the feature dictionary with the position specified by the target traffic data to obtain new traffic data.
[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0144] Determine a second operating environment corresponding to the new traffic data;
[0145] Perform regression testing on the new traffic data in the second operating environment.
[0146] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0147] Obtaining environment authentication information corresponding to the second operating environment;
[0148] Reorganize environmental authentication information into new flow data.
[0149] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0150] Obtain the traffic authentication information corresponding to the new traffic data;
[0151] The flow authentication information is changed to the environment authentication information to obtain the changed new flow data.
[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a traffic multiplexing request, the request carrying a first interface request parameter and a first operating environment parameter; obtaining a corresponding traffic data set from a traffic pool according to the first interface request parameter, the traffic data set including traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments; obtaining a corresponding feature dictionary according to the first operating environment parameter; aggregating the traffic data set and the feature dictionary to obtain new traffic data; and replaying the new traffic data in a second operating environment.
[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0154] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0155] Parse each gateway layer request log to obtain the corresponding second interface request parameters and flow request parameters;
[0156] The second operating environment parameters, the second interface request parameters and the traffic request parameters are associated and bound, and stored in the traffic pool.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environment is associated with a second operating environment parameter;
[0159] Parse each gateway layer request log and extract the data feature set corresponding to each second operating environment parameter;
[0160] Each data feature set is screened to obtain a feature dictionary corresponding to each second operating environment parameter.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] Obtain an intermediate traffic dataset from the traffic dataset that has the same fields as the feature dictionary;
[0163] Filtering the target flow data from the intermediate flow data set, the operating environment parameter corresponding to the target flow data is different from the first operating environment parameter;
[0164] Replace the field value corresponding to the same field in the feature dictionary with the position specified by the target traffic data to obtain new traffic data.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] Determine a second operating environment corresponding to the new traffic data;
[0167] Perform regression testing on the new traffic data in the second operating environment.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Obtaining environment authentication information corresponding to the second operating environment;
[0170] Reorganize environmental authentication information into new flow data.
[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0172] Obtain the traffic authentication information corresponding to the new traffic data;
[0173] The flow authentication information is changed to the environment authentication information to obtain the changed new flow data.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0176] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A flow data processing method, the method comprising: Obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter; Acquire a corresponding traffic data set from a traffic pool according to the first interface request parameter, wherein the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments; Acquire a corresponding feature dictionary according to the first operating environment parameter; Aggregating the traffic data set with the feature dictionary to obtain new traffic data; The new traffic data is played back in the second operating environment.
2. The method according to claim 1, characterized in that The steps of establishing the flow pool include: Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environments are associated with second operating environment parameters; Parsing each of the gateway layer request logs to obtain corresponding second interface request parameters and flow request parameters; The second operating environment parameters, the second interface request parameters and the traffic request parameters are associated and bound, and stored in a traffic pool.
3. The method according to claim 1, characterized in that The process of establishing the feature dictionary includes: Collecting gateway layer request logs corresponding to a plurality of operating environments, wherein the operating environments are associated with second operating environment parameters; Parsing each of the gateway layer request logs, and extracting a data feature set corresponding to each of the second operating environment parameters; Each of the data feature sets is screened to obtain a feature dictionary corresponding to each of the second operating environment parameters.
4. The method according to claim 1, characterized in that: The aggregating the traffic data set with the feature dictionary to obtain new traffic data includes: Acquire an intermediate traffic data set having the same fields as the feature dictionary from the traffic data set; Filtering the target flow data from the intermediate flow data set to obtain the target flow data, wherein the operating environment parameter corresponding to the target flow data is different from the first operating environment parameter; The field value corresponding to the same field in the feature dictionary is replaced into the position specified by the target flow data to obtain new flow data.
5. The method according to claim 1, characterized in that The replaying of the new traffic data in the second operating environment includes: Determining a second operating environment corresponding to the new traffic data; A regression test of the new traffic data is performed in the second operating environment.
6. The method according to claim 5, characterized in that After determining the second operating environment corresponding to the new traffic data, the method further includes: Obtaining environment authentication information corresponding to the second operating environment; The environmental authentication information is reorganized into the new traffic data.
7. The method according to claim 6, characterized in that The step of reorganizing the environment authentication information into the new flow data includes: Obtaining flow authentication information corresponding to the new flow data; The flow authentication information is changed into the environment authentication information to obtain new flow data after the change.
8. A flow data processing device, characterized in that: The device comprises: A first acquisition module, used to obtain a traffic multiplexing request, where the request carries a first interface request parameter and a first operating environment parameter; A second acquisition module, configured to acquire a corresponding traffic data set from a traffic pool according to the first interface request parameter, wherein the traffic data set includes traffic data corresponding to the interface corresponding to the first interface request parameter in different operating environments; A third acquisition module, used to acquire a corresponding feature dictionary according to the first operating environment parameter; an aggregation module, used for aggregating the traffic data set with the feature dictionary to obtain new traffic data; The playback module is used to play back the new traffic data in the second operating environment.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.