CN117424855A - Method, device, storage medium and equipment for generating supplementary traffic - Google Patents
Method, device, storage medium and equipment for generating supplementary traffic Download PDFInfo
- Publication number
- CN117424855A CN117424855A CN202311446251.8A CN202311446251A CN117424855A CN 117424855 A CN117424855 A CN 117424855A CN 202311446251 A CN202311446251 A CN 202311446251A CN 117424855 A CN117424855 A CN 117424855A
- Authority
- CN
- China
- Prior art keywords
- traffic
- supplementary
- data
- flow
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0882—Utilisation of link capacity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/43—Assembling or disassembling of packets, e.g. segmentation and reassembly [SAR]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
本申请提供补充流量生成的方法、装置、存储介质及设备,包括:获取压测流量格式和原始流量数据;将所述原始流量数据按照所述压测流量格式转换为补充流量;将所述补充流量上传至压测平台的预设接口并执行压测任务。根据历史流量数据生成补充流量数据,摒除了人工编写补充流量数据的操作,提高了补充流量生成的数据,并且使压力测试结果更加接近真实状态。
This application provides methods, devices, storage media and equipment for generating supplementary flow, including: obtaining the pressure measurement flow format and original flow data; converting the original flow data into supplementary flow according to the pressure measurement flow format; converting the supplementary flow The traffic is uploaded to the preset interface of the stress testing platform and the stress testing task is performed. Generating supplementary traffic data based on historical traffic data eliminates the manual operation of writing supplementary traffic data, improves the data generated by supplementary traffic, and makes the stress test results closer to the real state.
Description
技术领域Technical field
本发明涉及平台测试领域,具体涉及补充流量生成的方法、装置、存储介质及设备。The invention relates to the field of platform testing, and specifically to methods, devices, storage media and equipment for supplementary traffic generation.
背景技术Background technique
电商系统在商品大促活动期间容易面临急速增长式的流量访问,为了确保电商系统能够在短时间内出现大量流量的情况下访问正常,需要对电商系统进行压力测试。压力测试是指在高并发大流量的情况下进行的测试,测试人员可以通过观察系统在流量峰值负载下的表现,从而找到系统中存在的性能隐患。压力测试是常见的发现系统中存在问题的方式,也是保障系统可用性和稳定性的重要手段。E-commerce systems are prone to face rapid increases in traffic during product promotions. In order to ensure that the e-commerce system can access normally when a large amount of traffic occurs in a short period of time, the e-commerce system needs to be stress tested. Stress testing refers to testing conducted under conditions of high concurrency and large traffic. Testers can observe the performance of the system under peak traffic load to find potential performance risks in the system. Stress testing is a common way to discover problems in the system, and it is also an important means to ensure system availability and stability.
针对压力测试任务,一般通过压测平台抓取流量实现压测,而针对没有抓取到流量或者抓取流量不足以进行压力测试任务的情况,需要执行补充流量的操作。现有的补充流量是通过人工按照补发流量要求填写流量信息上传至压测平台的,导致人工处理数据量较大,效率较低。For stress testing tasks, the stress testing platform generally captures traffic to implement stress testing. If no traffic is captured or the captured traffic is insufficient for the stress testing task, additional traffic needs to be performed. The existing supplementary traffic is uploaded to the stress testing platform by manually filling in the flow information according to the reissue traffic requirements, resulting in a large amount of manual processing data and low efficiency.
发明内容Contents of the invention
基于此,本发明提供补充流量生成的方法、装置、存储介质及设备,自动补充流量数据用于实现压力测试,提高补充流量的效率。Based on this, the present invention provides methods, devices, storage media and equipment for generating supplementary flow, and automatically supplements flow data to implement pressure testing and improve the efficiency of supplementary flow.
第一方面,本发明提供一种补充流量生成的方法,包括:In a first aspect, the present invention provides a method for supplementary traffic generation, including:
获取压测流量格式和原始流量数据;Obtain the pressure test flow format and original flow data;
将所述原始流量数据按照所述压测流量格式转换为补充流量;Convert the original flow data into supplementary flow according to the pressure measurement flow format;
将所述补充流量上传至压测平台的预设接口并执行压测任务。Upload the supplementary traffic to the preset interface of the stress testing platform and perform the stress testing task.
其中,所述获取压测流量格式,包括:Wherein, the format for obtaining pressure measurement flow includes:
拉取压测平台现有的流量信息,根据所述流量信息提取压测流量格式;Pull the existing traffic information of the pressure testing platform, and extract the pressure testing traffic format based on the traffic information;
或根据压测任务所需流量信息属性创建压测流量格式。Or create a stress test traffic format based on the traffic information attributes required by the stress test task.
其中,所述获取原始流量数据,包括:Among them, the acquisition of original traffic data includes:
从数据库中随机拉取若干条历史流量数据作为原始流量数据;Randomly pull several pieces of historical traffic data from the database as original traffic data;
或从商业智能系统中随机拉取若干条历史数据作为原始流量数据。Or randomly pull several pieces of historical data from the business intelligence system as original traffic data.
其中,所述将所述原始流量数据按照所述压测流量格式转换为补充流量,包括:Wherein, converting the original flow data into supplementary flow according to the pressure measurement flow format includes:
根据所述压测流量格式获取流量信息属性;Obtain traffic information attributes according to the pressure measurement traffic format;
根据所述流量信息属性获取所述原始流量数据中的必要信息;Obtain necessary information in the original traffic data according to the traffic information attributes;
将所述必要信息按照压测流量格式排列,得到补充流量。Arrange the necessary information according to the pressure measurement flow format to obtain the supplementary flow rate.
其中,所述根据所述流量信息属性获取所述原始流量数据中的必要信息,包括:Wherein, obtaining the necessary information in the original traffic data according to the traffic information attributes includes:
根据所述流量信息属性设置一个或一个以上的标记符号;Set one or more mark symbols according to the traffic information attribute;
利用所述标记符号对所述原始流量数据进行分割,得到一个或一个以上的必要信息。The original traffic data is segmented using the mark symbols to obtain one or more necessary information.
其中,所述将所述补充流量上传至压测平台的预设接口并执行压测任务,包括:Wherein, uploading the supplementary traffic to a preset interface of the stress testing platform and performing the stress testing task includes:
将所述补充流量上传至压测平台的预设接口;Upload the supplementary traffic to the preset interface of the stress testing platform;
接收压测任务的并发请求,并根据所述并发请求发送设定数量的补充流量。Receive concurrent requests for stress testing tasks, and send a set amount of supplementary traffic based on the concurrent requests.
进一步的,接收压测任务的并发请求之后,还包括:Furthermore, after receiving concurrent requests for stress testing tasks, it also includes:
根据所述并发请求获取验证信息;Obtain verification information according to the concurrent request;
根据所述验证信息在补充流量中设置对应的解码信息;Set corresponding decoding information in the supplementary traffic according to the verification information;
执行压测任务时,根据所述验证信息对补充流量中的解码信息进行验证。When performing a stress test task, the decoding information in the supplementary traffic is verified based on the verification information.
第二方面,本发明还提供一种补充流量生成的装置,包括:In a second aspect, the present invention also provides a device for supplementing traffic generation, including:
数据获取模块,用于获取压测流量格式和原始流量数据;Data acquisition module, used to obtain pressure measurement flow format and original flow data;
流量替换模块,用于将所述原始流量数据按照所述压测流量格式转换为补充流量;A flow replacement module, used to convert the original flow data into supplementary flow according to the pressure test flow format;
流量上传模块,用于将所述补充流量上传至压测平台的预设接口并执行压测任务。The traffic upload module is used to upload the supplementary traffic to the preset interface of the stress testing platform and perform stress testing tasks.
第三方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序备处理器执行时实现第一方面中任一项补充流量生成的方法的步骤。In a third aspect, the present invention provides a computer-readable storage medium on which a computer program is stored, and when executed by a processor, the computer program implements the steps of any one of the supplementary traffic generation methods in the first aspect.
第四方面,本发明提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时,执行第一方面中任一项补充流量生成的方法。In a fourth aspect, the present invention provides a computer device, including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it performs any one of the supplementary traffic generation methods in the first aspect. .
采用上述技术方案的有益效果为:本发明的压力测试中补充流量生成的方法可根据预定的压测流量格式准备补充流量,不需要人工不断编写补充流量数据,提高效率并且使压测效果更加接近实际。The beneficial effects of adopting the above technical solution are: the method for generating supplementary flow in pressure testing of the present invention can prepare supplementary flow according to the predetermined pressure measurement flow format, without the need to manually continuously write supplementary flow data, improve efficiency and make the pressure measurement effect closer actual.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to describe the embodiments or the prior art will be briefly introduced below.
图1为本申请一个实施例中补充流量生成的方法的示意图;Figure 1 is a schematic diagram of a method for generating supplementary traffic in an embodiment of the present application;
图2为本申请一个实施例中补充流量生成的装置的示意图。Figure 2 is a schematic diagram of a device for supplementing traffic generation in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。为了更详细说明本发明,下面结合附图对本发明提供的补充流量生成的方法、装置、存储介质及设备,进行具体的描述。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention. In order to describe the present invention in more detail, the method, device, storage medium and equipment for supplementary traffic generation provided by the present invention will be described in detail below with reference to the accompanying drawings.
本申请实施例提供了补充流量生成的方法的应用场景,该应用场景包括实施例提供的终端设备,所述终端设备包括但不限于智能手机和计算机设备,其中计算机设备可以是台式计算机、便携式计算机、膝上型计算机、大型计算机、平板电脑等设备中的至少一种。用户对所述终端设备进行操作,得到攻击信息的分类,具体过程请参见补充流量生成的方法实施例。Embodiments of the present application provide an application scenario for the method of supplementing traffic generation. The application scenario includes the terminal device provided by the embodiment. The terminal device includes but is not limited to a smart phone and a computer device. The computer device may be a desktop computer or a portable computer. , at least one of a laptop computer, a mainframe computer, a tablet computer, and other devices. The user operates the terminal device to obtain the classification of the attack information. For the specific process, please refer to the method embodiment of supplementary traffic generation.
压力测试是为了测试电商系统在大量流量增长的情况下出现的性能问题,在系统新功能上线或者特定促销活动之前避免该性能问题。压力测试需要搭建与正式环境功能相同的测试环境,并且导入或者生成一批测试流量数据。由于压力测试需要大量的测试流量输入电商系统,而压测平台在没有抓取到流量或者抓取流量不足的情况下,需要补充流量。Stress testing is to test the performance problems of the e-commerce system when a large amount of traffic increases, and to avoid performance problems before new system functions are launched or specific promotions are launched. Stress testing requires setting up a test environment with the same functions as the formal environment, and importing or generating a batch of test traffic data. Since the stress test requires a large amount of test traffic to be input into the e-commerce system, the stress testing platform needs to supplement the traffic if it does not capture the traffic or does not capture enough traffic.
为了确保压力测试效果接近实际效果,避免搭建的测试环境与正式环境的差异,压力测试选择的流量多为现有的线上数据和现有的线上环境。In order to ensure that the stress test effect is close to the actual effect and avoid the difference between the built test environment and the formal environment, the traffic selected for the stress test is mostly existing online data and existing online environment.
基于此,本发明实施例提供了一种补充流量生成的方法,以该方法应用于终端设备为例进行说明,结合附图1示出的补充流量生成的方法的示意图。Based on this, embodiments of the present invention provide a method for generating supplementary traffic, which is explained by taking the method as applied to a terminal device as an example, with reference to the schematic diagram of the method for generating supplementary traffic shown in FIG. 1 .
步骤S101:获取压测流量格式和原始流量数据。Step S101: Obtain the pressure measurement flow format and original flow data.
对于压力测试中补充流量的生成,首先需要明确该压力测试需要具有哪些数据属性的流量数据,因此需要获取压测流量格式;其次,由于为了使压测环境及数据更加接近正式环境或真实环境,选择该系统的历史流量数据或根据其他相似系统的历史流量数据改编,可使补充流量更加真实,提高测试的可靠性。For the generation of supplementary traffic in a stress test, it is first necessary to clarify what data attributes the traffic data needs for the stress test, so the stress test traffic format needs to be obtained; secondly, in order to make the stress test environment and data closer to the formal environment or real environment, Selecting the historical traffic data of this system or adapting it from the historical traffic data of other similar systems can make the supplementary traffic more realistic and improve the reliability of the test.
首先,所述获取压测流量格式在不同情景下存在两种方式,分别为:First of all, there are two ways to obtain the pressure measurement traffic format in different scenarios, namely:
当针对现有系统的现有功能执行压力测试任务时,拉取压测平台现有的流量信息,根据所述流量信息提取压测流量格式。When performing a stress test task for the existing functions of the existing system, the existing flow information of the stress testing platform is pulled, and the stress testing flow format is extracted based on the flow information.
当针对现有系统的新功能或者新系统的功能执行压力测试任务时,根据压测任务所需流量信息属性创建压测流量格式。When performing a stress test task for new functions of an existing system or functions of a new system, create a stress test flow format based on the flow information attributes required by the stress test task.
其中,在本申请实施例中,压测流量格式为标准且内部嵌套的JSON格式。Among them, in the embodiment of this application, the pressure measurement traffic format is a standard and internally nested JSON format.
其次,所述获取原始流量数据根据获取流量数据不同的数据来源存在两种方式,分别为:Secondly, there are two ways to obtain original traffic data based on different data sources for obtaining traffic data, which are:
从数据库中随机拉取若干条历史流量数据作为原始流量数据。Randomly pull several pieces of historical traffic data from the database as original traffic data.
现有系统的历史流量数据或相近系统的历史流量数据定期存放在数据库中,根据压力测试任务拉取符合要求的若干条历史流量数据作为原始流量数据。拉取历史流量数据的数量根据压力测试任务的要求设置。The historical traffic data of the existing system or the historical traffic data of similar systems are regularly stored in the database. According to the stress test task, several pieces of historical traffic data that meet the requirements are pulled as the original traffic data. The amount of historical traffic data pulled is set according to the requirements of the stress test task.
或者,从商业智能系统中随机拉取若干条历史数据作为原始流量数据。Or, randomly pull several pieces of historical data from the business intelligence system as original traffic data.
现有系统的用户访问信息以数据表的形式存储在商业智能系统中,根据压力测试任务拉取对应的若干条历史数据,也就是用户访问信息,作为原始流量数据。拉取用户访问信息的数量根据压力测试任务的要求设置。The user access information of the existing system is stored in the business intelligence system in the form of a data table. According to the stress test task, several corresponding pieces of historical data, that is, the user access information, are pulled as the original traffic data. The amount of user access information pulled is set according to the requirements of the stress test task.
步骤S102:将所述原始流量数据按照所述压测流量格式转换为补充流量。Step S102: Convert the original flow data into supplementary flow according to the pressure test flow format.
由于原始流量数据从多个不同的数据库或商业智能系统中拉取,存在拉取的原始流量数据之间格式不相同或者原始流量数据与压测任务需要的补充流量格式不兼容的可能性,为了使拉取的原始流量数据与压测任务需要的补充流量格式相匹配,需要对原始流量数据进行格式的转换。Since the raw traffic data is pulled from multiple different databases or business intelligence systems, there is a possibility that the formats of the pulled raw traffic data are different or that the raw traffic data is incompatible with the supplementary traffic format required by the stress testing task. In order to To match the pulled raw traffic data with the supplementary traffic format required by the stress testing task, the format of the raw traffic data needs to be converted.
具体的,步骤S102所述将所述原始流量数据按照所述压测流量格式转换为补充流量,包括:Specifically, step S102 describes converting the original flow data into supplementary flow according to the pressure test flow format, including:
步骤S201:根据所述压测流量格式获取流量信息属性。Step S201: Obtain traffic information attributes according to the pressure measurement traffic format.
根据压测流量格式,可以确定需要生成的补充流量包含的流量信息属性,例如针对用户登录的功能对应的补充流量包含用户的身份证明。According to the stress test traffic format, the traffic information attributes contained in the supplementary traffic to be generated can be determined. For example, the supplementary traffic corresponding to the user login function contains the user's identity certificate.
步骤S202:根据所述流量信息属性获取所述原始流量数据中的必要信息。Step S202: Obtain necessary information in the original traffic data according to the traffic information attributes.
由于原始流量数据可能存在生成补充流量无关的信息数据或不需要进行替换的信息数据,对此,只需要根据流量信息属性从原始流量数据中提取必要信息。Since the original traffic data may contain information data that is irrelevant to the generation of supplementary traffic or information data that does not need to be replaced, in this regard, it is only necessary to extract the necessary information from the original traffic data according to the traffic information attributes.
为了更好地处理该必要信息,本申请实施例还可将提取的必要信息,按照集合的形式存放,更方便后续转换成JSON格式的补充流量。In order to better process the necessary information, embodiments of the present application can also store the extracted necessary information in the form of a collection, making it easier to subsequently convert it into supplementary traffic in JSON format.
步骤S203:将所述必要信息按照压测流量格式排列,得到补充流量。Step S203: Arrange the necessary information according to the pressure test flow format to obtain the supplementary flow rate.
从必要信息的集合中逐条信息提取出来,按照压测流量格式排列,生成补充流量。在本实施例中,具体为从集合中逐条提取出必要信息,一行一行的写入JSON格式,得到需要的补充流量。Extract information one by one from the collection of necessary information, arrange it according to the stress test traffic format, and generate supplementary traffic. In this embodiment, the necessary information is extracted one by one from the collection and written in JSON format line by line to obtain the required supplementary traffic.
其中,上述步骤S202所述根据所述流量信息属性获取所述原始流量数据中的必要信息,包括:Among them, obtaining the necessary information in the original traffic data according to the traffic information attributes in the above-mentioned step S202 includes:
步骤S301:根据所述流量信息属性设置一个或一个以上的标记符号。Step S301: Set one or more mark symbols according to the traffic information attributes.
具体的,原始流量数据中包含一个或一个以上的流量信息属性,利用标记符号将不同属性的信息分隔开,所述标记符号可为逗号、空格或\r、\n的形式。Specifically, the original traffic data contains one or more traffic information attributes, and mark symbols are used to separate the information of different attributes. The mark symbols may be in the form of commas, spaces, or \r or \n.
步骤S302:利用所述标记符号对所述原始流量数据进行分割,得到一个或一个以上的必要信息。Step S302: Use the mark symbols to segment the original traffic data to obtain one or more necessary information.
步骤S103:将所述补充流量上传至压测平台的预设接口并执行压测任务。Step S103: Upload the supplementary traffic to the preset interface of the stress testing platform and perform the stress testing task.
具体的,步骤S103所述将所述补充流量上传至压测平台的预设接口并执行压测任务,包括:Specifically, in step S103, the supplementary traffic is uploaded to the preset interface of the stress testing platform and the stress testing task is performed, including:
步骤S401:将所述补充流量上传至压测平台的预设接口。Step S401: Upload the supplementary traffic to the preset interface of the stress testing platform.
步骤S402:接收压测任务的并发请求,并根据所述并发请求通过所述预设接口发送设定数量的补充流量。Step S402: Receive a concurrent request for a stress testing task, and send a set amount of supplementary traffic through the preset interface according to the concurrent request.
其中,由于压力测试过程的补充流量一般情况下是大批量数据,并且压力测试任务的并发请求对测试的流量数量存在限定,在接收到并发请求的时候,根据并发请求的设定数量对补充流量进行拆分,按照设定的批次逐次通过接口发送补充流量。Among them, since the supplementary traffic during the stress test process is generally a large amount of data, and the concurrent requests of the stress test task limit the amount of test traffic, when receiving concurrent requests, the supplementary traffic will be calculated based on the set number of concurrent requests. Split it and send supplementary traffic through the interface one by one according to the set batches.
进一步的,对于根据补充流量执行压测任务的情况,可借助对应的监控系统检查流量请求情况和数据并发情况,判断压力测试任务是否正常执行。Furthermore, when the stress test task is executed based on the supplementary traffic, the corresponding monitoring system can be used to check the traffic request situation and data concurrency to determine whether the stress test task is executed normally.
另外,上述补充流量生成的方法中,步骤S402在接收压测任务的并发请求之后,还包括:In addition, in the above supplementary traffic generation method, after receiving the concurrent request of the stress testing task, step S402 also includes:
根据所述并发请求获取验证信息;Obtain verification information according to the concurrent request;
根据所述验证信息在补充流量中设置对应的解码信息;Set corresponding decoding information in the supplementary traffic according to the verification information;
执行压测任务时,根据所述验证信息对补充流量中的解码信息进行验证。When performing a stress test task, the decoding information in the supplementary traffic is verified based on the verification information.
补充流量的发送需要调用部分接口,为提高接口调用过程的安全性,可增加第一验证信息和第二验证信息的核对,提高安全性。Sending supplementary traffic requires calling some interfaces. In order to improve the security of the interface calling process, the verification of the first verification information and the second verification information can be added to improve security.
另外,针对上传至预设接口的补充流量,还可设置转义格式检查和异常检查,分别对需要转义标记的数据检查是否符合转义处理、对补充流量执行压力测试任务存在异常或错误进行提醒或日志记录。In addition, for the supplementary traffic uploaded to the preset interface, you can also set up escape format check and exception check, respectively to check whether the data that needs to be escaped marked conforms to the escape processing, and to perform the stress test task on the supplementary traffic if there are exceptions or errors. Reminders or logging.
通过上述方法,可根据线上的历史流量信息自动生成相应的补充流量,用于执行压力测试任务,不需要更多额外的配置,并且补充流量生成的效率更高,压力测试的结果也更加接近于真实数据。Through the above method, corresponding supplementary traffic can be automatically generated based on online historical traffic information to perform stress testing tasks. No more additional configuration is required, and supplementary traffic generation is more efficient and the results of the stress test are closer. on real data.
应该理解的是,虽然附图1的流程图中各个步骤按照箭头额定指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以按其他的顺序执行。而且附图1中的至少一部分步骤可以包括多个子步骤或者子阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow chart of FIG. 1 are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are performed and these steps can be performed in any other order. Moreover, at least some of the steps in Figure 1 may include multiple sub-steps or sub-stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is It does not necessarily have to be performed sequentially, but can be performed in turn or alternately with other steps or sub-steps of other steps or at least part of the stages.
上述本发明公开的实施例中详细描述了补充流量生成的方法,对于本发明公开的上述方法可以采用多种形式的设备实现,因此本发明还公开了对应上述方法的补充流量生成的装置,结合附图2,下面给出具体的实施例进行详细说明。The above-mentioned embodiments disclosed by the present invention describe in detail the method of generating supplementary traffic. The above-mentioned method disclosed by the present invention can be implemented by various forms of equipment. Therefore, the present invention also discloses a device for generating supplementary flow corresponding to the above-mentioned method. In combination with Figure 2, specific embodiments are given below for detailed description.
数据获取模块501,用于获取压测流量格式和原始流量数据。The data acquisition module 501 is used to obtain the pressure test flow format and original flow data.
流量替换模块502,用于将所述原始流量数据按照所述压测流量格式转换为补充流量。The flow replacement module 502 is used to convert the original flow data into supplementary flow according to the pressure test flow format.
流量上传模块503,用于将所述补充流量上传至压测平台的预设接口并执行压测任务。The traffic upload module 503 is used to upload the supplementary traffic to the preset interface of the stress testing platform and perform stress testing tasks.
关于补充流量生成的装置具体限定可全部参见上文中对于方法的限定,在此不再赘述。上述装置中的各个模块可全部或者部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或者独立于终端设备的处理器中,也可以以软件形式存储于终端设备的存储器中,以便处理器调用执行以上各个模块对应的操作。Regarding the specific limitations on the device for generating supplementary flow, please refer to the limitations on the method above, and will not be repeated here. Each module in the above device can be implemented in whole or in part by software, hardware and combinations thereof. Each of the above modules can be embedded in or independent of the processor of the terminal device in the form of hardware, or can be stored in the memory of the terminal device in the form of software so that the processor can call and execute operations corresponding to each of the above modules.
在一个实施例中,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述补充流量生成的方法的步骤。In one embodiment, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for supplementary traffic generation are implemented.
所述计算机可读存储介质可以是诸如闪存、EEPROM(电可擦除可编只读程存储器)、EPROM(可擦除可编只读程存储器)、硬盘或者ROM之类的电子存储器。可选的,计算机可读存储介质包括非瞬时性计算机可读介质(non-transitory computer-readable storagemedium)。计算机可读存储介质具有执行上述方法中的任何方法步骤的程序代码的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入这一个或者多个计算机程序产品中,所述程序代码可以以适当形式进行压缩。The computer-readable storage medium may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), hard disk, or ROM. Optionally, the computer-readable storage medium includes non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium has storage space for program codes that perform any method steps in the above methods. These program codes can be read from or written into one or more computer program products, and the program codes can be compressed in an appropriate form.
在一个实施例中,本发明提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时执行上述补充流量生成的方法。In one embodiment, the present invention provides a computer device including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the above-mentioned method for generating supplementary traffic is performed.
所述计算机设备包括存储器、处理器以及一个或多个计算机程序,其中一个或多个计算机程序可以被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个应用程序配置用于执行上述补充流量生成的方法。The computer device includes a memory, a processor, and one or more computer programs, wherein the one or more computer programs may be stored in the memory and configured to be executed by the one or more processors, and the one or more application programs may be configured Methods for performing supplemental traffic generation described above.
处理器可以包括一个或多个处理核。处理器利用各种接口和线路连接整个计算机设备内的各个部分,通过运行或执行存储在存储器内的指令、程序、代码集或指令集,以及调用存储在存储器内的数据,执行计算机设备的各种功能和处理数据。可选地,处理器可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器可集成中央处理器(Central Processing Unit,CPU)、埋点数据的上报验证器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器中,单独通过一块通信芯片进行实现。A processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. functions and process data. Optionally, the processor can use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form. The processor may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a point data reporting verifier (Graphics Processing Unit, GPU), a modem, etc. Among them, the CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the display content; and the modem is used to handle wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor and may be implemented solely through a communication chip.
存储器可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器可用于存储指令、程序、代码、代码集或指令集。存储器可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等。存储数据区还可以存储终端设备在使用中所创建的数据等。The memory may include random access memory (RAM) or read-only memory (Read-Only Memory). Memory may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions, etc. used to implement each of the above method embodiments. The storage data area can also store data created by the terminal device during use.
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions of the foregoing embodiments. The recorded technical solutions may be modified, or some of the technical features thereof may be equivalently replaced; however, these modifications or substitutions shall not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311446251.8A CN117424855A (en) | 2023-11-01 | 2023-11-01 | Method, device, storage medium and equipment for generating supplementary traffic |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311446251.8A CN117424855A (en) | 2023-11-01 | 2023-11-01 | Method, device, storage medium and equipment for generating supplementary traffic |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117424855A true CN117424855A (en) | 2024-01-19 |
Family
ID=89528110
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311446251.8A Pending CN117424855A (en) | 2023-11-01 | 2023-11-01 | Method, device, storage medium and equipment for generating supplementary traffic |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117424855A (en) |
-
2023
- 2023-11-01 CN CN202311446251.8A patent/CN117424855A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542399B (en) | Software development method and device, terminal equipment and computer readable storage medium | |
US20170060713A1 (en) | Systems and methods for device compatibility testing and reporting | |
US10191838B2 (en) | Method and device for checking influence of deleting cache file, and mobile terminal | |
CN107436844A (en) | A kind of generation method and device of interface use-case intersection | |
US20230185702A1 (en) | Method and Apparatus for Generating and Applying Deep Learning Model based on Deep Learning Framework | |
CN112035355A (en) | Data processing method, apparatus, computer equipment and storage medium | |
CN112996020A (en) | Bluetooth-based automatic testing method and device and Bluetooth testing terminal | |
WO2024001594A1 (en) | Operator development method and apparatus, operator processing method and apparatus, and electronic device, system and storage medium | |
WO2021087662A1 (en) | Memory allocation method and apparatus, terminal, and computer readable storage medium | |
CN117424855A (en) | Method, device, storage medium and equipment for generating supplementary traffic | |
CN112115060A (en) | Audio test method and system based on terminal | |
CN115941712B (en) | Method and device for processing report data, computer equipment and storage medium | |
CN115291963B (en) | Method for configuring hardware resources, electronic device and storage medium | |
CN117331956A (en) | Task processing method, device, computer equipment and storage medium | |
CN114218191B (en) | System function migration method, device, computer equipment and storage medium | |
CN117057935A (en) | Data processing method, device, equipment and storage medium based on field design | |
CN110532186B (en) | Method, device, electronic device and storage medium for testing using verification code | |
CN103761247B (en) | A kind of processing method and processing device of error file | |
CN110262856B (en) | Application program data acquisition method, device, terminal and storage medium | |
CN115729530B (en) | Cross-system logic statement generation method, device, storage medium and equipment | |
CN105302835B (en) | A kind of document handling method and equipment | |
CN117541192A (en) | Data acceptance methods, devices, computer equipment and storage media | |
CN119484652A (en) | Data processing method, device, computer equipment and storage medium | |
CN119003262A (en) | Address translation method and device, electronic equipment and storage medium | |
CN117234904A (en) | Test case acquisition methods and electronic equipment |
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 |