WO2020173366A1 - Pressure testing method and apparatus, and device and storage medium - Google Patents

Pressure testing method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2020173366A1
WO2020173366A1 PCT/CN2020/075948 CN2020075948W WO2020173366A1 WO 2020173366 A1 WO2020173366 A1 WO 2020173366A1 CN 2020075948 W CN2020075948 W CN 2020075948W WO 2020173366 A1 WO2020173366 A1 WO 2020173366A1
Authority
WO
WIPO (PCT)
Prior art keywords
stress test
server
stress
internet
test
Prior art date
Application number
PCT/CN2020/075948
Other languages
French (fr)
Chinese (zh)
Inventor
刘禹轩
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020173366A1 publication Critical patent/WO2020173366A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • This application relates to the field of computer technology, and in particular to a pressure test method and device, an electronic device, and a storage medium. Background technique
  • the stress test can simulate the actual application software and hardware environment and the system load of the user's use process, and run the test software for a long time or under a large load to test the performance, reliability, and stability of the tested system.
  • the usual stress test system consists of a stress test server and a pressure machine that specializes in performing stress tests. As shown in Figure 1, the stress test server issues test tasks to the press, and then the press performs stress tests on services that require pressure testing, such as Perform stress tests on servers, user equipment, etc.
  • the stress test server can manage the stress test. Therefore, the stress test server needs to manage the number of presses and use the presses to perform the stress test. The stress test is limited to the stress test server. Once the stress test server fails, the stress test cannot be performed normally. Summary of the invention
  • the embodiment of the present application provides a stress test method to improve the stability of the stress test.
  • the embodiments of the present application also provide a pressure test device, an electronic device, and a storage medium to ensure the implementation and application of the foregoing system.
  • an embodiment of the present application discloses a stress test method, which is applied to an Internet of Things system.
  • the Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device.
  • the stress test device includes an Internet of Things device.
  • the method includes: determining a stress test device that subscribes to the subscription relationship of the stress test server; receiving a stress test message issued by the stress test server, and scheduling a stress test task corresponding to the stress test message; according to the stress The test task calls the pressure test equipment so that each pressure test equipment performs the corresponding pressure test.
  • the scheduling of the stress test task corresponding to the stress test message includes: from the stress test The stress test parameters are obtained from the message, and the corresponding stress test tasks are arranged according to the stress test parameters.
  • the arranging the corresponding stress test task according to the stress test parameter includes: determining a stress test script according to the stress test parameter, and determining execution time information according to the stress test parameter, and generating the corresponding stress test task .
  • the invoking a stress test device according to the stress test task includes: determining a stress test device corresponding to the stress test task; and sending the stress test script to the stress test device to be based on the The execution time information executes the stress test.
  • the determining the stress test device for subscribing to the subscription relationship of the stress test server includes: subscribing to the subscription relationship of the stress test server for the Internet of Things device according to a subscription request of the Internet of Things device; IoT devices are used as stress test equipment.
  • the embodiment of the present application also discloses a stress test device, which is applied to an IoT server of an IoT system, the IoT system further includes a stress test server and a stress test device, the stress test device includes an IoT device, and the The device includes: a subscription module, which is used to determine the stress test equipment for subscribing to the subscription relationship of the stress test server; a message receiving module, which is used to receive stress test messages issued by the stress test server; and a task scheduling module, which is used to schedule the The stress test task corresponding to the stress test message; the test scheduling module is used to call the stress test device according to the stress test task, so that each stress test device executes a corresponding stress test.
  • a subscription module which is used to determine the stress test equipment for subscribing to the subscription relationship of the stress test server
  • a message receiving module which is used to receive stress test messages issued by the stress test server
  • a task scheduling module which is used to schedule the The stress test task corresponding to the stress test message
  • the task scheduling module is configured to obtain stress test parameters from the stress test message, and schedule corresponding stress test tasks according to the stress test parameters.
  • the task orchestration module is configured to determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate corresponding stress test tasks.
  • the test scheduling module is configured to determine a stress test device corresponding to the stress test task; and deliver the stress test script to the stress test device to execute the stress test according to the execution time information.
  • the subscription module is configured to subscribe to the subscription relationship of the stress test server for the IoT device according to a subscription request of the IoT device; and use the IoT device as a stress test device.
  • the embodiment of the present application also discloses an electronic device, including: a processor; and a memory on which executable code is stored, and when the executable code is executed, the processor is made to execute as in the embodiment of the present application One or more of the described stress testing methods.
  • the embodiment of the present application also discloses one or more machine-readable media, on which executable code is stored, and when the executable code is executed, the processor is caused to execute as described in one or more of the embodiments of the present application.
  • Stress testing method Compared with the prior art, the embodiments of the present application include the following advantages:
  • a stress test is performed based on an Internet of Things system.
  • the Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device.
  • the stress test device includes an Internet of Things device, so that the stress test server can be located on the Internet of Things server.
  • the stress test device can subscribe to the subscription relationship, so that after the Internet of Things server receives the stress test message published by the stress test server, the stress test can be scheduled for execution, where the stress test task corresponding to the stress test message can be scheduled Then, the stress test equipment is called according to the stress test task, so that each stress test equipment executes the corresponding stress test.
  • the IoT server can schedule the execution of the stress test, and is no longer limited to the stress test server. The stability of the stress test. Description of the drawings
  • Figure 1 is a schematic diagram of a stress testing system in the background art
  • FIG. 2 is a schematic structural diagram of an embodiment of the Internet of Things system of the present application.
  • FIG. 3 is a flowchart of steps of an embodiment of a stress testing method of the present application.
  • Figure 4 is a flowchart of the steps of another embodiment of the stress testing method of the present application.
  • FIG. 5 is a schematic diagram of interaction of a stress test according to an embodiment of the present application.
  • Fig. 6 is a structural block diagram of another embodiment of a pressure testing device of the present application.
  • Fig. 7 is a schematic structural diagram of a device provided by an embodiment of the present application. DETAILED DESCRIPTION
  • the Internet of Things is the Internet connected by things.
  • the Internet of Things system includes various servers, Internet of Things devices, etc., and the server can communicate with the Internet of Things devices and provide required services.
  • FIG. 2 a schematic structural diagram of an embodiment of the Internet of Things system of the present application is shown.
  • the IoT system of the embodiment of the present application can perform stress testing.
  • the IoT system includes an IoT server 202, a stress testing server 204, and a stress testing device 206, as well as a device 208 that needs to be tested.
  • the Internet of Things server refers to the unified management server of the Internet of Things system, including access servers, servers that provide edge services, etc.;
  • the stress test server refers to the server corresponding to the stress test, which can publish stress test messages, etc., so as to pass the thing
  • the network server is scheduled to perform stress testing;
  • the stress testing equipment refers to the equipment that performs the stress testing, and the stress testing
  • the device can put pressure on services that require stress testing.
  • the stress test equipment includes the Internet of Things device 2062 and the Internet of Things device refers to the user equipment connected to the Internet of Things server, such as mobile terminals, computers and other terminal devices.
  • the Internet of Things system may not be configured to perform The device for stress testing, and the IoT device connected through the IoT server as the stress testing device can support the stress test based on the edge service of the IoT.
  • the pressure test device may also include a press 2064, which refers to a device specifically for performing a pressure test, so that the press and the Internet of Things device can perform the pressure test together.
  • FIG. 3 a flowchart of the steps of an embodiment of a stress testing method of the present application is shown.
  • Step 302 Determine the stress test equipment that subscribes to the subscription relationship of the stress test server.
  • the device has the authority to subscribe to resources.
  • the authority to subscribe to resources includes: subscription authority and publishing authority.
  • the subscription authority means that the terminal device has the authority to subscribe to the specified resource path
  • the publishing authority means that the terminal device has the authority to publish the message of the specified resource path. permission.
  • the stress test server publishes the subscription relationship on the IoT server based on the publishing authority.
  • the subscription relationship refers to the relationship of subscribing to the message of the stress test server.
  • IoT devices such as mobile devices can subscribe to the subscription relationship based on the subscription authority, so that the IoT server A device that subscribes to the subscription relationship of the stress test server can be used as a stress test device.
  • the determining the stress test device that subscribes to the subscription relationship of the stress test server includes: subscribing to the subscription of the stress test server for the IoT device according to a subscription request of the IoT device Relationship; Use the IoT device as a stress test device.
  • An IoT device with subscription authority can send a subscription request for requesting to subscribe to a specified subscription relationship, so that after the IoT server receives the subscription request, the IoT device can subscribe to the subscription of the stress test server
  • the relationship is to establish a subscription relationship between the Internet of Things device and the stress test server, so that the Internet of Things device can obtain messages from the stress test server, etc., and the subscribed Internet of Things device can be used as a stress test device so as to be based on the pressure
  • the message of the test server performs a stress test operation.
  • the stress test server may also have a press as a stress test device, and these stress test devices can be connected to the IoT server, and then subscribe to the subscription relationship of the stress test server, so that it can be used by the IoT server. Unified management of servers for stress testing.
  • Step 304 Receive a stress test message issued by the stress test server, and arrange a stress test task corresponding to the stress test message.
  • the stress test server When the stress test server needs to perform a stress test, it can generate a stress test message.
  • the stress test message can carry parameters corresponding to the stress test, such as time parameters, device parameters, script parameters, and other stress test parameters. Used to indicate the execution of the stress test, which can then be published to the IoT server News.
  • the IoT server can schedule corresponding stress test tasks based on the stress test parameters in the stress test message, such as task execution time, required scripts, and required stress test equipment.
  • the stress test task refers to the work of the stress test that needs to be performed.
  • the scheduling of the stress test task corresponding to the stress test message includes: acquiring the stress test parameter from the stress test message, and scheduling the corresponding stress test task according to the stress test parameter.
  • the pressure test parameters can be obtained from the pressure test message, and then according to the pressure test parameters, the time, equipment, scripts, etc. required for the pressure test are arranged to obtain the pressure test task.
  • the scheduling of corresponding stress test tasks according to the stress test parameters includes: determining a stress test script according to the stress test parameters, and determining execution time information according to the stress test parameters, and generating corresponding Stress test task.
  • the stress test script can be determined according to the script parameters corresponding to the stress test parameters, where the stress test script is a script for executing the stress test, and the stress test script can be stored in advance in the IoT server, such as stored in a server that provides edge services, or According to the script parameters, the stress test script is adjusted adaptively, such as determining the specific parameters, attributes, and so on.
  • the server of the edge service can execute the stress test according to the stress test task scheduling, without the parameters of the stress test server, so that even if the stress test server fails, it will not affect the execution of the stress test.
  • Step 306 Invoke the pressure test equipment according to the pressure test task, so that each pressure test equipment performs a corresponding pressure test.
  • Servers that provide edge services can perform scheduling based on the stress test task, call the required stress test equipment to perform the stress test, so that each stress test device can call the corresponding stress test script to perform the stress test, and put pressure on the equipment that needs the stress test, etc. .
  • the invoking a stress test device according to the stress test task includes: determining a stress test device corresponding to the stress test task; sending the stress test script to the stress test device, The stress test is executed according to the execution time information.
  • the stress test equipment to be performed can be determined, such as calling a corresponding number of stress test equipment, etc., and then the stress test script can be issued to each stress test equipment, and the stress test can be executed according to the execution time information.
  • the stress test is performed based on the Internet of Things system, which includes the Internet of Things server and the stress test A server and a stress test device
  • the stress test device includes an Internet of Things device, so that the stress test server can publish a subscription relationship on the Internet of Things server, and the stress test device can subscribe to the subscription relationship, so as to receive the data published by the stress test server on the Internet of Things server
  • the stress test can be scheduled to execute, where the stress test task corresponding to the stress test message can be scheduled, and then the stress test device can be invoked according to the stress test task, so that each stress test device performs the corresponding stress test
  • the IoT server can schedule the execution of the stress test, and is no longer limited to the stress test server, improving the stability of the stress test.
  • the embodiment of the present application also provides a stress test method, which can perform a stress test based on an Internet of Things system and improve the stability of the stress test.
  • FIG. 4 there is shown a flow chart of the steps of another embodiment of the stress testing method of the present application.
  • Step 402 Receive a subscription request of the Internet of Things device.
  • Step 404 According to the subscription request of the Internet of Things device, subscribe to the subscription relationship of the stress test server for the Internet of Things device; use the Internet of Things device as the stress test device.
  • Step 406 Receive a stress test message issued by the stress test server.
  • Step 408 Acquire stress test parameters from the stress test message.
  • Step 410 Determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate a corresponding stress test task.
  • Step 412 Determine the stress test equipment corresponding to the stress test task.
  • Step 414 Send the stress test script to the stress test device to execute the stress test according to the execution time information.
  • the stress test server publishes the stress test message, it can be arranged and scheduled by the IoT server to perform the stress test.
  • the number of stress test devices is not limited, as long as the subscription is
  • the message of the stress test server can be used as a stress test device, so that the execution of the stress test will not be restricted due to the number of stress test devices, and the stress test server will not affect the execution of the stress test after the message is released, thereby effectively improving the stress test The stability.
  • the stress test based on the IoT system can be coordinated by multiple devices.
  • the stress test is implemented based on edge services, edge computing, and various devices based on the IoT system.
  • FIG. 5 an interaction schematic diagram of a stress test in an embodiment of the present application is shown.
  • the stress test server publishes the subscription relationship to the Internet of Things server, and the corresponding Internet of Things server may feedback the publishing result, such as successful publishing.
  • Step 504 The stress test device subscribes to the subscription relationship, and the corresponding IoT server may feed back the subscription result, such as The subscription is successful and so on.
  • Step 506 The stress test server sends a stress test message to the Internet of Things server.
  • Step 508 The Internet of Things server arranges the stress test task according to the stress test message. Among them, it is possible to determine the number and requirements of the stress test equipment that needs to perform the stress test, the execution time of the stress test, the stress test script, and so on.
  • Step 510 The Internet of Things server determines a stress test device that needs to perform the stress test, and issues a stress test script to the stress test device.
  • the stress test equipment applies pressure to the equipment where the service that needs the stress test is located according to the execution time information, and executes the corresponding stress test. For example, based on the execution time information to determine when to start applying pressure, when or in what state to end applying pressure, etc.
  • the stress test After the stress test is completed and the result of the stress test is obtained, it can also be sent to the stress test server through the IoT server.
  • the stress test server does not act as a central node, and achieves the characteristics of decentralization. Therefore, after the stress test server sends the stress test message, the IoT server can schedule the execution of the stress test, and the stress test will not Affected by the failure of the stress test server.
  • the device connected in the Internet of Things is used as the stress test device, and customer resources can also be used to improve the resource utilization rate of the Internet of Things. Further, paid and charged stress tests can be performed, such as the stress test in the stress test equipment. Internet of Things devices pay a certain fee, etc. to optimize the ecological development of the Internet of Things.
  • this embodiment also provides a stress test device, which is applied to the IoT server of the IoT system, and the IoT system further includes a stress test server and a stress test device.
  • the stress test device Including IoT devices. Referring to FIG. 6, there is shown a structural block diagram of an embodiment of a driving behavior-based processing device of the present application, which may specifically include the following modules:
  • the subscription module 602 is used to determine the stress test equipment subscribing to the subscription relationship of the stress test server.
  • the message receiving module 604 is configured to receive the stress test message issued by the stress test server.
  • the task scheduling module 606 is used to schedule the stress test task corresponding to the stress test message.
  • the test scheduling module 608 is configured to call the stress test equipment according to the stress test task, so that each stress test equipment executes a corresponding stress test.
  • the task orchestration module 606 is configured to obtain stress test parameters from the stress test message, and schedule corresponding stress test tasks according to the stress test parameters.
  • the task orchestration module 606 is configured to determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate corresponding stress test tasks.
  • the test scheduling module 608 is configured to determine the stress test device corresponding to the stress test task; and issue the stress test script to the stress test device to execute the stress test according to the execution time information.
  • the subscription module 602 is configured to subscribe to the subscription relationship of the stress test server for the Internet of Things device according to a subscription request of the Internet of Things device; and use the Internet of Things device as a stress test device.
  • the stress test is performed based on the Internet of Things system.
  • the Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device.
  • the stress test device includes an Internet of Things device, so that the stress test server can publish and subscribe on the Internet of Things server.
  • the stress test device can subscribe to the subscription relationship, so that after the IoT server receives the stress test message issued by the stress test server, the stress test can be scheduled to execute the stress test, where the stress test task corresponding to the stress test message can be scheduled, and then the stress test
  • the stress test task calls the stress test equipment so that each stress test equipment executes the corresponding stress test.
  • the IoT server can schedule the execution of the stress test. It is no longer limited to the stress test server and improves the performance of the stress test. stability.
  • the stress test server does not act as a central node, and achieves the characteristics of decentralization.
  • the stress test server sends the stress test message, the execution of the stress test can be scheduled by the IoT server, and the stress test will not be stressed. Test the impact of server failure.
  • the device connected in the Internet of Things is used as the stress test device, and it is also possible to use customer data
  • customer data To improve the resource utilization rate of the Internet of Things, it is also possible to conduct paid and charged stress tests, such as paying a certain fee for the Internet of Things equipment in the stress test equipment, so as to optimize the ecological development of the Internet of Things.
  • the embodiment of the present application also provides a non-volatile readable storage medium, the storage medium stores one or more modules (programs), when the one or more modules are applied to a device, the device can execute Instructions for each method step in the embodiment of this application.
  • the embodiments of the present application provide one or more machine-readable media with instructions stored thereon, which when executed by one or more processors, cause an electronic device to execute the methods described in one or more of the foregoing embodiments.
  • the electronic device includes server devices such as an Internet of Things server and a stress test server, as well as Internet of Things devices, stress test equipment, user equipment, and the like.
  • the embodiments of the present disclosure can be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform a desired configuration.
  • the device can include server (cluster) devices such as an Internet of Things server, a stress test server, etc.
  • Electronic equipment such as Internet of Things equipment, stress testing equipment, and user equipment.
  • Figure 7 schematically shows an exemplary apparatus 700 that can be used to implement the various embodiments described in this application.
  • FIG. 7 shows an exemplary apparatus 700 that has one or more processors 702, and a control module (chipset) 704 coupled to at least one of the processor(s) 702 , A memory 706 coupled to the control module 704, a non-volatile memory (NVM)/storage device 708 coupled to the control module 704, one or more input/output devices 710 coupled to the control module 704, and The network interface 712 is coupled to the control module 704.
  • processors 702 and a control module (chipset) 704 coupled to at least one of the processor(s) 702
  • a memory 706 coupled to the control module 704
  • NVM non-volatile memory
  • storage device 708 coupled to the control module 704
  • input/output devices 710 coupled to the control module 704
  • the network interface 712 is coupled to the control module 704.
  • the processor 702 may include one or more single-core or multi-core processors, and the processor 702 may include any combination of a general-purpose processor or a special-purpose processor (for example, a graphics processor, an application processor, a baseband processor, etc.).
  • the apparatus 700 can be used as an electronic device such as a vehicle-mounted device described in the embodiments of the present application.
  • the apparatus 700 may include one or more computer-readable media (for example, the memory 706 or the NVM/storage device 708) having instructions 714, and is configured to be combined with the one or more computer-readable media
  • One or more processors 702 that execute instructions 714 to implement modules to perform the actions described in this disclosure.
  • control module 704 may include any suitable interface controller to provide any suitable interface controller to at least one of the processor(s) 702 and/or any suitable device or component in communication with the control module 704 Interface.
  • the control module 704 may include a memory controller module to provide an interface to the memory 706.
  • the memory controller module can be a hardware module, a software module, and/or a firmware module.
  • the memory 706 may be used to load and store data and/or instructions 714 for the device 700, for example.
  • the memory 706 may include any suitable volatile memory, for example, a suitable DRAM.
  • the memory 706 may include a double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
  • control module 704 may include one or more input/output controllers to provide interfaces to the NVM/storage device 708 and the input/output device(s) 710.
  • NVM/storage device 708 can be used to store data and/or instructions 714.
  • the NVM/storage device 708 may include any suitable non-volatile memory (for example, flash memory) and/or may include any suitable non-volatile storage device(s) (for example, one or more hard disk drives (HDD), one or more compact disc (CD) drives and/or one or more digital versatile disc (DVD) drives).
  • suitable non-volatile memory for example, flash memory
  • suitable non-volatile storage device(s) for example, one or more hard disk drives (HDD), one or more compact disc (CD) drives and/or one or more digital versatile disc (DVD) drives).
  • HDD hard disk drives
  • CD compact disc
  • DVD digital versatile disc
  • the NVM/storage device 708 may include storage resources that are physically part of the device on which the device 700 is installed, or it may be accessible by the device without being a part of the device.
  • the NVM/storage device 708 can be accessed via the input/output device(s) 710 via the network.
  • the input/output device(s) 710 may provide an interface for the device 700 to communicate with any other appropriate devices.
  • the input/output device 710 may include communication components, audio components, sensor components, and the like.
  • the network interface 712 may provide an interface for the device 700 to communicate through one or more networks, and the device 700 may communicate with one or more wireless networks according to any of the one or more wireless network standards and/or protocols.
  • the components perform wireless communication, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, etc., or a combination thereof for wireless communication.
  • At least one of the processor(s) 702 may be packaged with the logic of one or more controllers (for example, a memory controller module) of the control module 704.
  • at least one of the processor(s) 702 may be packaged with the logic of one or more controllers of the control module 704 to form a system in package (SiP).
  • at least one of the processor(s) 702 may be integrated with the logic of one or more controllers of the control module 704 on the same mold.
  • at least one of the processor(s) 702 may be integrated with the logic of one or more controllers of the control module 704 on the same mold to form a system on chip (SoC).
  • SoC system on chip
  • the apparatus 700 may be, but is not limited to: a terminal device such as a vehicle-mounted device, a server, a desktop computing device, or a mobile computing device (for example, a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.).
  • the device 700 may have more or fewer components and/or different architectures.
  • the device 700 includes one or more cameras, keyboards, liquid crystal display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, and application-specific integrated circuits ( ASIC) and speakers.
  • LCD liquid crystal display
  • ASIC application-specific integrated circuits
  • An embodiment of the present application provides an electronic device, including: one or more processors; and, one or more machine-readable media on which instructions are stored, when executed by the one or more processors, The electronic device is caused to execute the driving behavior-based processing method as described in one or more of the embodiments of the present application.
  • the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including the instruction device.
  • the instruction device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A pressure testing method and apparatus, and a device and a storage medium, for use in improving the stability of pressure testing. The method comprises: determining a pressure testing device subscribing a subscription relationship of a pressure testing server (302); receiving a pressure testing message published by the pressure testing server, and arranging a pressure testing task corresponding to the pressure testing message (304); calling the pressure testing device according to the pressure testing task, so that each pressure testing device executes corresponding pressure testing (306). Pressure testing can be executed by an Internet of Things server in a schedulable manner after the pressure testing message is received, and is no longer limited by the pressure testing server, thereby improving the stability of pressure testing.

Description

一种压力测试方法、 装置、 设备和存储介质 本申请要求 2019年 02月 28日递交的申请号为 201910152594.0、发明名称为“一种 压力测试方法、 装置、 设备和存储介质” 中国专利申请的优先权, 其全部内容通过引用 结合在本申请中。 技术领域 A stress test method, device, equipment and storage medium. This application requires that the application number submitted on February 28, 2019 is 201910152594.0 and the title of the invention is "a stress test method, device, equipment and storage medium". The priority of the Chinese patent application Right, its entire content is incorporated into this application by reference. Technical field
本申请涉及计算机技术领域, 特别是涉及一种压力测试方法和装置、 一种电子设备 和一种存储介质。 背景技术 This application relates to the field of computer technology, and in particular to a pressure test method and device, an electronic device, and a storage medium. Background technique
压力测试可模拟实际应用的软硬件环境及用户使用过程的系统负荷, 长时间或超大 负荷地运行测试软件, 来测试被测系统的性能、 可靠性、 稳定性等。 The stress test can simulate the actual application software and hardware environment and the system load of the user's use process, and run the test software for a long time or under a large load to test the performance, reliability, and stability of the tested system.
通常的压力测试系统由压力测试服务器和专门执行压力测试的压力机构成, 如图 1 所示, 压力测试服务器给压力机下发测试任务, 然后压力机对需要压测的服务进行压力 测试, 如对服务器、 用户设备等进行压力测试。 The usual stress test system consists of a stress test server and a pressure machine that specializes in performing stress tests. As shown in Figure 1, the stress test server issues test tasks to the press, and then the press performs stress tests on services that require pressure testing, such as Perform stress tests on servers, user equipment, etc.
压力测试服务器可管理压力测试, 因此压力测试服务器需要管理压力机的数量, 调 用压力机进行压力测试, 使得压力测试受限于压力测试服务器, 一旦压力测试服务器出 现故障, 压力测试就无法正常执行。 发明内容 The stress test server can manage the stress test. Therefore, the stress test server needs to manage the number of presses and use the presses to perform the stress test. The stress test is limited to the stress test server. Once the stress test server fails, the stress test cannot be performed normally. Summary of the invention
本申请实施例提供了一种压力测试方法, 以提高压力测试的稳定性。 The embodiment of the present application provides a stress test method to improve the stability of the stress test.
相应的, 本申请实施例还提供了一种压力测试装置、一种电子设备和一种存储介质, 用以保证上述系统的实现及应用。 Correspondingly, the embodiments of the present application also provide a pressure test device, an electronic device, and a storage medium to ensure the implementation and application of the foregoing system.
为了解决上述问题, 本申请实施例公开了一种压力测试方法, 应用于物联网系统, 所述物联网系统包括物联网服务器、 压力测试服务器和压力测试设备, 所述压力测试设 备包括物联网设备, 所述的方法包括: 确定订阅所述压力测试服务器的订阅关系的压力 测试设备; 接收所述压力测试服务器发布的压力测试消息, 编排所述压力测试消息对应 的压力测试任务; 依据所述压力测试任务调用压力测试设备, 以使各压力测试设备执行 相应的压力测试。 In order to solve the above-mentioned problem, an embodiment of the present application discloses a stress test method, which is applied to an Internet of Things system. The Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device. The stress test device includes an Internet of Things device. The method includes: determining a stress test device that subscribes to the subscription relationship of the stress test server; receiving a stress test message issued by the stress test server, and scheduling a stress test task corresponding to the stress test message; according to the stress The test task calls the pressure test equipment so that each pressure test equipment performs the corresponding pressure test.
可选的, 所述编排所述压力测试消息对应的压力测试任务, 包括: 从所述压力测试 消息中获取压力测试参数, 依据所述压力测试参数编排对应的压力测试任务。 Optionally, the scheduling of the stress test task corresponding to the stress test message includes: from the stress test The stress test parameters are obtained from the message, and the corresponding stress test tasks are arranged according to the stress test parameters.
可选的, 所述依据所述压力测试参数编排对应的压力测试任务, 包括: 依据所述压 力测试参数确定压力测试脚本, 并依据所述压力测试参数确定执行时间信息, 生成对应 的压力测试任务。 Optionally, the arranging the corresponding stress test task according to the stress test parameter includes: determining a stress test script according to the stress test parameter, and determining execution time information according to the stress test parameter, and generating the corresponding stress test task .
可选的, 所述依据所述压力测试任务调用压力测试设备, 包括: 确定所述压力测试 任务对应的压力测试设备; 将所述压力测试脚本下发给所述压力测试设备, 以依据所述 执行时间信息执行压力测试。 Optionally, the invoking a stress test device according to the stress test task includes: determining a stress test device corresponding to the stress test task; and sending the stress test script to the stress test device to be based on the The execution time information executes the stress test.
可选的, 所述确定订阅所述压力测试服务器的订阅关系的压力测试设备, 包括: 依 据物联网设备的订阅请求, 为所述物联网设备订阅所述压力测试服务器的订阅关系; 将 所述物联网设备作为压力测试设备。 Optionally, the determining the stress test device for subscribing to the subscription relationship of the stress test server includes: subscribing to the subscription relationship of the stress test server for the Internet of Things device according to a subscription request of the Internet of Things device; IoT devices are used as stress test equipment.
本申请实施例还公开了一种压力测试装置, 应用于物联网系统的物联网服务器, 所 述物联网系统还包括压力测试服务器和压力测试设备, 所述压力测试设备包括物联网设 备, 所述装置包括: 订阅模块, 用于确定订阅所述压力测试服务器的订阅关系的压力测 试设备; 消息接收模块, 用于接收所述压力测试服务器发布的压力测试消息; 任务编排 模块, 用于编排所述压力测试消息对应的压力测试任务; 测试调度模块, 用于依据所述 压力测试任务调用压力测试设备, 以使各压力测试设备执行相应的压力测试。 The embodiment of the present application also discloses a stress test device, which is applied to an IoT server of an IoT system, the IoT system further includes a stress test server and a stress test device, the stress test device includes an IoT device, and the The device includes: a subscription module, which is used to determine the stress test equipment for subscribing to the subscription relationship of the stress test server; a message receiving module, which is used to receive stress test messages issued by the stress test server; and a task scheduling module, which is used to schedule the The stress test task corresponding to the stress test message; the test scheduling module is used to call the stress test device according to the stress test task, so that each stress test device executes a corresponding stress test.
可选的, 所述任务编排模块, 用于从所述压力测试消息中获取压力测试参数, 依据 所述压力测试参数编排对应的压力测试任务。 Optionally, the task scheduling module is configured to obtain stress test parameters from the stress test message, and schedule corresponding stress test tasks according to the stress test parameters.
可选的, 所述任务编排模块, 用于依据所述压力测试参数确定压力测试脚本, 并依 据所述压力测试参数确定执行时间信息, 生成对应的压力测试任务。 Optionally, the task orchestration module is configured to determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate corresponding stress test tasks.
可选的, 所述测试调度模块, 用于确定所述压力测试任务对应的压力测试设备; 将 所述压力测试脚本下发给所述压力测试设备, 以依据所述执行时间信息执行压力测试。 Optionally, the test scheduling module is configured to determine a stress test device corresponding to the stress test task; and deliver the stress test script to the stress test device to execute the stress test according to the execution time information.
可选的, 所述订阅模块, 用于依据物联网设备的订阅请求, 为所述物联网设备订阅 所述压力测试服务器的订阅关系; 将所述物联网设备作为压力测试设备。 Optionally, the subscription module is configured to subscribe to the subscription relationship of the stress test server for the IoT device according to a subscription request of the IoT device; and use the IoT device as a stress test device.
本申请实施例还公开了一种电子设备, 包括: 处理器; 和存储器, 其上存储有可执 行代码, 当所述可执行代码被执行时, 使得所述处理器执行如本申请实施例中一个或多 个所述的压力测试方法。 The embodiment of the present application also discloses an electronic device, including: a processor; and a memory on which executable code is stored, and when the executable code is executed, the processor is made to execute as in the embodiment of the present application One or more of the described stress testing methods.
本申请实施例还公开了一个或多个机器可读介质, 其上存储有可执行代码, 当所述 可执行代码被执行时,使得处理器执行如本申请实施例中一个或多个所述压力测试方法。 与现有技术相比, 本申请实施例包括以下优点: The embodiment of the present application also discloses one or more machine-readable media, on which executable code is stored, and when the executable code is executed, the processor is caused to execute as described in one or more of the embodiments of the present application. Stress testing method. Compared with the prior art, the embodiments of the present application include the following advantages:
在本申请实施例, 基于物联网系统进行压力测试, 该物联网系统包括物联网服务器、 压力测试服务器和压力测试设备, 所述压力测试设备包括物联网设备, 从而压力测试服 务器可在物联网服务器上发布订阅关系, 压力测试设备可订阅该订阅关系, 从而在物联 网服务器接收压力测试服务器发布的压力测试消息后, 可调度执行压力测试, 其中, 可 编排所述压力测试消息对应的压力测试任务, 然后依据所述压力测试任务调用压力测试 设备, 以使各压力测试设备执行相应的压力测试, 接收到压力测试消息后物联网服务器 可调度执行压力测试, 不再受限于压力测试服务器, 提高压力测试的稳定性。 附图说明 In the embodiment of the present application, a stress test is performed based on an Internet of Things system. The Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device. The stress test device includes an Internet of Things device, so that the stress test server can be located on the Internet of Things server. The stress test device can subscribe to the subscription relationship, so that after the Internet of Things server receives the stress test message published by the stress test server, the stress test can be scheduled for execution, where the stress test task corresponding to the stress test message can be scheduled Then, the stress test equipment is called according to the stress test task, so that each stress test equipment executes the corresponding stress test. After receiving the stress test message, the IoT server can schedule the execution of the stress test, and is no longer limited to the stress test server. The stability of the stress test. Description of the drawings
图 1是背景技术的一种压力测试系统的示意图; Figure 1 is a schematic diagram of a stress testing system in the background art;
图 2是本申请的一种物联网系统实施例的结构示意图; FIG. 2 is a schematic structural diagram of an embodiment of the Internet of Things system of the present application;
图 3是本申请的一种压力测试方法实施例的步骤流程图; FIG. 3 is a flowchart of steps of an embodiment of a stress testing method of the present application;
图 4是本申请的另一种压力测试方法实施例的步骤流程图; Figure 4 is a flowchart of the steps of another embodiment of the stress testing method of the present application;
图 5是本申请实施例的一种压力测试的交互示意图; FIG. 5 is a schematic diagram of interaction of a stress test according to an embodiment of the present application;
图 6是本申请另一种压力测试装置实施例的结构框图; Fig. 6 is a structural block diagram of another embodiment of a pressure testing device of the present application;
图 7是本申请一实施例提供的装置的结构示意图。 具体实施方式 为使本申请的上述目的、 特征和优点能够更加明显易懂, 下面结合附图和具体实施 方式对本申请作进一步详细的说明。 Fig. 7 is a schematic structural diagram of a device provided by an embodiment of the present application. DETAILED DESCRIPTION In order to make the above objectives, features, and advantages of the application more obvious and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific implementations.
物联网就是物物相连的互联网, 物联网系统包括各种服务器、 物联网设备等, 并且 服务器可与物联网设备进行通信以及提供所需的服务。 The Internet of Things is the Internet connected by things. The Internet of Things system includes various servers, Internet of Things devices, etc., and the server can communicate with the Internet of Things devices and provide required services.
参照图 2, 示出了本申请的一种物联网系统实施例的结构示意图。 Referring to FIG. 2, a schematic structural diagram of an embodiment of the Internet of Things system of the present application is shown.
本申请实施例的物联网系统可执行压力测试, 该物联网系统包括物联网服务器 202、 压力测试服务器 204和压力测试设备 206, 还包括需要测试的设备 208。物联网服务器指 的是物联网系统的统一管理服务器, 包括接入服务器、 提供边缘服务的服务器等; 压力 测试服务器指的是压力测试对应的服务器, 可发布压力测试的消息等, 从而通过该物联 网服务器的调度进行压力测试; 压力测试设备指的是执行压力测试的设备, 该压力测试 设备可给需要压力测试的服务施加压力。所述压力测试设备包括物联网设备 2062和, 所 述物联网设备指的是物联网服务器上连接的用户设备, 如移动终端、 电脑等其他终端设 备, 在该物联网系统中可以不设置专门执行压力测试的设备, 而通过物联网服务器已连 接的物联网设备作为压力测试设备, 可基于物联网的边缘服务支持压力测试。 当然, 在 另外一些实施例中, 压力测试设备也可包括压力机 2064, 压力机指的是专门进行压力测 试的设备, 从而使得压力机和物联网设备能够共同执行压力测试。 The IoT system of the embodiment of the present application can perform stress testing. The IoT system includes an IoT server 202, a stress testing server 204, and a stress testing device 206, as well as a device 208 that needs to be tested. The Internet of Things server refers to the unified management server of the Internet of Things system, including access servers, servers that provide edge services, etc.; the stress test server refers to the server corresponding to the stress test, which can publish stress test messages, etc., so as to pass the thing The network server is scheduled to perform stress testing; the stress testing equipment refers to the equipment that performs the stress testing, and the stress testing The device can put pressure on services that require stress testing. The stress test equipment includes the Internet of Things device 2062 and the Internet of Things device refers to the user equipment connected to the Internet of Things server, such as mobile terminals, computers and other terminal devices. The Internet of Things system may not be configured to perform The device for stress testing, and the IoT device connected through the IoT server as the stress testing device can support the stress test based on the edge service of the IoT. Of course, in some other embodiments, the pressure test device may also include a press 2064, which refers to a device specifically for performing a pressure test, so that the press and the Internet of Things device can perform the pressure test together.
参照图 3, 示出了本申请的一种压力测试方法实施例的步骤流程图。 Referring to FIG. 3, a flowchart of the steps of an embodiment of a stress testing method of the present application is shown.
步骤 302, 确定订阅所述压力测试服务器的订阅关系的压力测试设备。 Step 302: Determine the stress test equipment that subscribes to the subscription relationship of the stress test server.
在物联网系统中, 设备具有资源订阅的权限, 资源订阅的权限包括: 订阅权限和发 布权限, 订阅权限为终端设备具有订阅指定资源路径的权限, 发布权限为终端设备具有 发布指定资源路径的消息的权限。 压力测试服务器基于发布权限在物联网服务器上发布 订阅关系, 该订阅关系指的是订阅该压力测试服务器的消息的关系, 移动设备等物联网 设备可基于订阅权限订阅该订阅关系, 从而物联网服务器可将订阅压力测试服务器的订 阅关系的设备作为压力测试设备。 In the Internet of Things system, the device has the authority to subscribe to resources. The authority to subscribe to resources includes: subscription authority and publishing authority. The subscription authority means that the terminal device has the authority to subscribe to the specified resource path, and the publishing authority means that the terminal device has the authority to publish the message of the specified resource path. permission. The stress test server publishes the subscription relationship on the IoT server based on the publishing authority. The subscription relationship refers to the relationship of subscribing to the message of the stress test server. IoT devices such as mobile devices can subscribe to the subscription relationship based on the subscription authority, so that the IoT server A device that subscribes to the subscription relationship of the stress test server can be used as a stress test device.
本申请一个可选实施例中, 所述确定订阅所述压力测试服务器的订阅关系的压力测 试设备, 包括: 依据物联网设备的订阅请求, 为所述物联网设备订阅所述压力测试服务 器的订阅关系; 将所述物联网设备作为压力测试设备。 具有订阅权限的物联网设备可发 送订阅请求, 该订阅请求用于请求订阅指定的订阅关系, 从而在物联网服务器接收到该 订阅请求后, 可为该物联网设备订阅所述压力测试服务器的订阅关系, 也就是建立该物 联网设备和压力测试服务器的订阅关系, 使得该物联网设备可获取压力测试服务器的消 息等, 并且可将该订阅的物联网设备作为压力测试设备, 以便于基于该压力测试服务器 的消息执行压力测试操作。 In an optional embodiment of the present application, the determining the stress test device that subscribes to the subscription relationship of the stress test server includes: subscribing to the subscription of the stress test server for the IoT device according to a subscription request of the IoT device Relationship; Use the IoT device as a stress test device. An IoT device with subscription authority can send a subscription request for requesting to subscribe to a specified subscription relationship, so that after the IoT server receives the subscription request, the IoT device can subscribe to the subscription of the stress test server The relationship is to establish a subscription relationship between the Internet of Things device and the stress test server, so that the Internet of Things device can obtain messages from the stress test server, etc., and the subscribed Internet of Things device can be used as a stress test device so as to be based on the pressure The message of the test server performs a stress test operation.
在另外一些实施例中, 该压力测试服务器也可具有压力机作为压力测试设备, 可将 这些压力测试设备接入到物联网服务器上, 然后订阅该压力测试服务器的订阅关系, 从 而能够由物联网服务器统一管理, 以进行压力测试。 In some other embodiments, the stress test server may also have a press as a stress test device, and these stress test devices can be connected to the IoT server, and then subscribe to the subscription relationship of the stress test server, so that it can be used by the IoT server. Unified management of servers for stress testing.
步骤 304, 接收所述压力测试服务器发布的压力测试消息, 编排所述压力测试消息 对应的压力测试任务。 Step 304: Receive a stress test message issued by the stress test server, and arrange a stress test task corresponding to the stress test message.
压力测试服务器需要执行压力测试的情况下, 可生成压力测试消息, 该压力测试消 息中可携带压力测试对应的参数, 如时间参数、 设备参数、 脚本参数等各种压力测试参 数, 该压力测试参数用于指示压力测试的执行, 然后可向物联网服务器发布该压力测试 消息。 When the stress test server needs to perform a stress test, it can generate a stress test message. The stress test message can carry parameters corresponding to the stress test, such as time parameters, device parameters, script parameters, and other stress test parameters. Used to indicate the execution of the stress test, which can then be published to the IoT server News.
物联网服务器接收到压力测试服务器发布的压力测试消息后, 可基于压力测试消息 中的压力测试参数, 编排对应的压力测试任务, 如任务执行的时间、 需要的脚本, 需要 的压力测试设备等。 其中, 压力测试任务指的是所需执行的压力测试的工作。 在一个可 选实施例中, 所述编排所述压力测试消息对应的压力测试任务, 包括: 从所述压力测试 消息中获取压力测试参数, 依据所述压力测试参数编排对应的压力测试任务。 可以从压 力测试消息中获取压力测试参数, 然后依据该压力测试参数, 编排压力测试所需的时间、 设备、 脚本等工作, 得到压力测试任务。 After receiving the stress test message issued by the stress test server, the IoT server can schedule corresponding stress test tasks based on the stress test parameters in the stress test message, such as task execution time, required scripts, and required stress test equipment. Among them, the stress test task refers to the work of the stress test that needs to be performed. In an optional embodiment, the scheduling of the stress test task corresponding to the stress test message includes: acquiring the stress test parameter from the stress test message, and scheduling the corresponding stress test task according to the stress test parameter. The pressure test parameters can be obtained from the pressure test message, and then according to the pressure test parameters, the time, equipment, scripts, etc. required for the pressure test are arranged to obtain the pressure test task.
进一步的可选实施例中, 所述依据所述压力测试参数编排对应的压力测试任务, 包 括: 依据所述压力测试参数确定压力测试脚本, 并依据所述压力测试参数确定执行时间 信息, 生成对应的压力测试任务。 可以依据压力测试参数对应的脚本参数确定压力测试 脚本, 其中, 压力测试脚本为执行压力测试的脚本, 压力测试脚本可预先存储在物联网 服务器中, 如存储在提供边缘服务的服务器内, 还可依据该脚本参数对压力测试脚本进 行适应性的调整, 如确定其中的具体参数、 属性等内容。 也可基于压力测试参数中的时 间参数, 设置该压力测试的执行时间信息, 如开始时间、 结束时间等, 还可基于压力测 试参数中的设备参数设置压力测试设备的数量, 以及选取指定的压力测试设备等, 从而 生成该压力测试的压力测试任务。 此后边缘服务的服务器可依据压力测试任务调度执行 压力测试, 无需压力测试服务器的参数, 从而即使压力测试服务器出现故障, 也不影响 压力测试的执行。 In a further optional embodiment, the scheduling of corresponding stress test tasks according to the stress test parameters includes: determining a stress test script according to the stress test parameters, and determining execution time information according to the stress test parameters, and generating corresponding Stress test task. The stress test script can be determined according to the script parameters corresponding to the stress test parameters, where the stress test script is a script for executing the stress test, and the stress test script can be stored in advance in the IoT server, such as stored in a server that provides edge services, or According to the script parameters, the stress test script is adjusted adaptively, such as determining the specific parameters, attributes, and so on. You can also set the execution time information of the pressure test based on the time parameter in the pressure test parameters, such as start time, end time, etc., you can also set the number of pressure test equipment based on the equipment parameters in the pressure test parameter, and select the specified pressure Test equipment, etc., thereby generating the stress test task of the stress test. After that, the server of the edge service can execute the stress test according to the stress test task scheduling, without the parameters of the stress test server, so that even if the stress test server fails, it will not affect the execution of the stress test.
步骤 306, 依据所述压力测试任务调用压力测试设备, 以使各压力测试设备执行相 应的压力测试。 Step 306: Invoke the pressure test equipment according to the pressure test task, so that each pressure test equipment performs a corresponding pressure test.
提供边缘服务的服务器可基于该压力测试任务执行调度, 调用所需的压力测试设备 执行压力测试, 使得各压力测试设备可调用相应的压力测试脚本执行压力测试, 给需要 压力测试的设备等施加压力。 Servers that provide edge services can perform scheduling based on the stress test task, call the required stress test equipment to perform the stress test, so that each stress test device can call the corresponding stress test script to perform the stress test, and put pressure on the equipment that needs the stress test, etc. .
在一个可选实施例中, 所述依据所述压力测试任务调用压力测试设备, 包括: 确定 所述压力测试任务对应的压力测试设备;将所述压力测试脚本下发给所述压力测试设备, 以依据所述执行时间信息执行压力测试。 依据该压力测试任务可确定要执行压力测试的 压力测试设备, 如调用对应数量的压力测试设备等, 然后可给各压力测试设备下发压力 测试脚本, 依据执行时间信息执行压力测试。 In an optional embodiment, the invoking a stress test device according to the stress test task includes: determining a stress test device corresponding to the stress test task; sending the stress test script to the stress test device, The stress test is executed according to the execution time information. According to the stress test task, the stress test equipment to be performed can be determined, such as calling a corresponding number of stress test equipment, etc., and then the stress test script can be issued to each stress test equipment, and the stress test can be executed according to the execution time information.
综上, 基于物联网系统进行压力测试, 该物联网系统包括物联网服务器、 压力测试 服务器和压力测试设备, 所述压力测试设备包括物联网设备, 从而压力测试服务器可在 物联网服务器上发布订阅关系, 压力测试设备可订阅该订阅关系, 从而在物联网服务器 接收压力测试服务器发布的压力测试消息后, 可调度执行压力测试, 其中, 可编排所述 压力测试消息对应的压力测试任务, 然后依据所述压力测试任务调用压力测试设备, 以 使各压力测试设备执行相应的压力测试, 接收到压力测试消息后物联网服务器可调度执 行压力测试, 不再受限于压力测试服务器, 提高压力测试的稳定性。 In summary, the stress test is performed based on the Internet of Things system, which includes the Internet of Things server and the stress test A server and a stress test device, the stress test device includes an Internet of Things device, so that the stress test server can publish a subscription relationship on the Internet of Things server, and the stress test device can subscribe to the subscription relationship, so as to receive the data published by the stress test server on the Internet of Things server After the stress test message, the stress test can be scheduled to execute, where the stress test task corresponding to the stress test message can be scheduled, and then the stress test device can be invoked according to the stress test task, so that each stress test device performs the corresponding stress test, After receiving the stress test message, the IoT server can schedule the execution of the stress test, and is no longer limited to the stress test server, improving the stability of the stress test.
在上述实施例的基础上, 本申请实施例还提供了一种压力测试方法, 可基于物联网 系统执行压力测试, 提高压力测试的稳定性。 On the basis of the foregoing embodiment, the embodiment of the present application also provides a stress test method, which can perform a stress test based on an Internet of Things system and improve the stability of the stress test.
参照图 4, 示出了本申请的另一种压力测试方法实施例的步骤流程图。 Referring to FIG. 4, there is shown a flow chart of the steps of another embodiment of the stress testing method of the present application.
步骤 402, 接收物联网设备的订阅请求。 Step 402: Receive a subscription request of the Internet of Things device.
步骤 404, 依据物联网设备的订阅请求, 为所述物联网设备订阅所述压力测试服务 器的订阅关系; 将所述物联网设备作为压力测试设备。 Step 404: According to the subscription request of the Internet of Things device, subscribe to the subscription relationship of the stress test server for the Internet of Things device; use the Internet of Things device as the stress test device.
步骤 406, 接收所述压力测试服务器发布的压力测试消息。 Step 406: Receive a stress test message issued by the stress test server.
步骤 408, 从所述压力测试消息中获取压力测试参数。 Step 408: Acquire stress test parameters from the stress test message.
步骤 410, 依据所述压力测试参数确定压力测试脚本, 并依据所述压力测试参数确 定执行时间信息, 生成对应的压力测试任务。 Step 410: Determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate a corresponding stress test task.
步骤 412, 确定所述压力测试任务对应的压力测试设备。 Step 412: Determine the stress test equipment corresponding to the stress test task.
步骤 414, 将所述压力测试脚本下发给所述压力测试设备, 以依据所述执行时间信 息执行压力测试。 Step 414: Send the stress test script to the stress test device to execute the stress test according to the execution time information.
从而基于物联网系统的订阅关系, 在压力测试服务器发布压力测试消息后, 可由物 联网服务器编排、 调度, 从而执行压力测试, 在该物联网服务器中, 压力测试设备的数 量不收限制, 只要订阅了压力测试服务器的消息, 即可作为压力测试设备, 从而不会由 于压力测试设备的数量限制压力测试的执行, 并且发布消息后压力测试服务器也不影响 压力测试的执行, 从而能够有效提高压力测试的稳定性。 Therefore, based on the subscription relationship of the IoT system, after the stress test server publishes the stress test message, it can be arranged and scheduled by the IoT server to perform the stress test. In the IoT server, the number of stress test devices is not limited, as long as the subscription is The message of the stress test server can be used as a stress test device, so that the execution of the stress test will not be restricted due to the number of stress test devices, and the stress test server will not affect the execution of the stress test after the message is released, thereby effectively improving the stress test The stability.
在上述实施例的基础上, 基于物联网系统的压力测试可由多个设备协调实现, 在物 联网系统架构下, 基于物联网的边缘服务、 边缘计算以及各种设备实现压力测试。 On the basis of the foregoing embodiments, the stress test based on the IoT system can be coordinated by multiple devices. Under the IoT system architecture, the stress test is implemented based on edge services, edge computing, and various devices based on the IoT system.
参照图 5, 示出了本申请实施例的一种压力测试的交互示意图。 Referring to FIG. 5, an interaction schematic diagram of a stress test in an embodiment of the present application is shown.
步骤 502, 压力测试服务器给物联网服务器发布订阅关系, 相应物联网服务器可反 馈发布结果, 如发布成功等。 In step 502, the stress test server publishes the subscription relationship to the Internet of Things server, and the corresponding Internet of Things server may feedback the publishing result, such as successful publishing.
步骤 504, 压力测试设备订阅该订阅关系, 相应物联网服务器可反馈订阅结果, 如 订阅成功等。 Step 504: The stress test device subscribes to the subscription relationship, and the corresponding IoT server may feed back the subscription result, such as The subscription is successful and so on.
步骤 506, 压力测试服务器发送压力测试消息给物联网服务器。 Step 506: The stress test server sends a stress test message to the Internet of Things server.
步骤 508, 物联网服务器依据该压力测试消息, 编排压力测试任务。 其中, 可确定 需要执行压力测试的压力测试设备的数量和要求, 压力测试的执行时间、 压力测试脚本 等。 Step 508: The Internet of Things server arranges the stress test task according to the stress test message. Among them, it is possible to determine the number and requirements of the stress test equipment that needs to perform the stress test, the execution time of the stress test, the stress test script, and so on.
步骤 510, 物联网服务器确定需要执行压力测试的压力测试设备, 给压力测试设备 下发压力测试脚本。 Step 510: The Internet of Things server determines a stress test device that needs to perform the stress test, and issues a stress test script to the stress test device.
步骤 512, 压力测试设备依据执行时间信息, 向需要压力测试的服务所在的设备施 加压力, 执行相应的压力测试。 如依据执行时间信息确定何时开始施加压力, 何时或何 种状态下结束施加压力等。 In step 512, the stress test equipment applies pressure to the equipment where the service that needs the stress test is located according to the execution time information, and executes the corresponding stress test. For example, based on the execution time information to determine when to start applying pressure, when or in what state to end applying pressure, etc.
在压力测试完成, 得到压力测试的结果后, 也可通过物联网服务器发送给压力测试 服务器。 After the stress test is completed and the result of the stress test is obtained, it can also be sent to the stress test server through the IoT server.
可见, 基于物联网的压力测试, 压力测试服务器不作为中心节点, 实现了去中心化 的特点, 从而在压力测试服务器发送压力测试消息后, 可由物联网服务器调度压力测试 的执行, 压力测试不会受到压力测试服务器故障的影响。 It can be seen that, based on the stress test of the Internet of Things, the stress test server does not act as a central node, and achieves the characteristics of decentralization. Therefore, after the stress test server sends the stress test message, the IoT server can schedule the execution of the stress test, and the stress test will not Affected by the failure of the stress test server.
基于物联网系统进行压力测试, 物联网中接入的各种设备订阅了压力测试服务器的 消息, 就可作为压力测试设备, 从而不会由于压力测试设备的数量限制压力测试的执行, 并且发布消息后压力测试服务器也不影响压力测试的执行, 从而能够有效提高压力测试 的稳定性。 Perform stress testing based on the Internet of Things system. Various devices connected to the Internet of Things can be used as stress test equipment after subscribing to the message of the stress test server, so that the number of stress test devices will not limit the execution of the stress test and publish messages The post-stress test server does not affect the execution of the stress test, which can effectively improve the stability of the stress test.
本申请实施例中, 采用物联网中接入的设备作为压力测试设备, 还能够利用客户资 源, 提高物联网的资源利用率, 进一步还可以进行付费、 收费的压力测试, 如压力测试 设备中的物联网设备支付一定的费用等, 优化物联网的生态发展。 In the embodiment of the present application, the device connected in the Internet of Things is used as the stress test device, and customer resources can also be used to improve the resource utilization rate of the Internet of Things. Further, paid and charged stress tests can be performed, such as the stress test in the stress test equipment. Internet of Things devices pay a certain fee, etc. to optimize the ecological development of the Internet of Things.
需要说明的是, 对于方法实施例, 为了简单描述, 故将其都表述为一系列的动作组 合, 但是本领域技术人员应该知悉, 本申请实施例并不受所描述的动作顺序的限制, 因 为依据本申请实施例, 某些步骤可以采用其他顺序或者同时进行。 其次, 本领域技术人 员也应该知悉, 说明书中所描述的实施例均属于优选实施例, 所涉及的动作并不一定是 本申请实施例所必须的。 It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the described sequence of actions, because According to the embodiment of the present application, certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
在上述实施例的基础上, 本实施例还提供了一种压力测试装置, 应用于物联网系统 的物联网服务器, 所述物联网系统还包括压力测试服务器和压力测试设备, 所述压力测 试设备包括物联网设备。 参照图 6, 示出了本申请一种基于驾驶行为的处理装置实施例的结构框图, 具体可 以包括如下模块: On the basis of the above-mentioned embodiment, this embodiment also provides a stress test device, which is applied to the IoT server of the IoT system, and the IoT system further includes a stress test server and a stress test device. The stress test device Including IoT devices. Referring to FIG. 6, there is shown a structural block diagram of an embodiment of a driving behavior-based processing device of the present application, which may specifically include the following modules:
订阅模块 602, 用于确定订阅所述压力测试服务器的订阅关系的压力测试设备。 消息接收模块 604, 用于接收所述压力测试服务器发布的压力测试消息。 The subscription module 602 is used to determine the stress test equipment subscribing to the subscription relationship of the stress test server. The message receiving module 604 is configured to receive the stress test message issued by the stress test server.
任务编排模块 606, 用于编排所述压力测试消息对应的压力测试任务。 The task scheduling module 606 is used to schedule the stress test task corresponding to the stress test message.
测试调度模块 608, 用于依据所述压力测试任务调用压力测试设备, 以使各压力测 试设备执行相应的压力测试。 The test scheduling module 608 is configured to call the stress test equipment according to the stress test task, so that each stress test equipment executes a corresponding stress test.
其中, 所述任务编排模块 606, 用于从所述压力测试消息中获取压力测试参数, 依 据所述压力测试参数编排对应的压力测试任务。 Wherein, the task orchestration module 606 is configured to obtain stress test parameters from the stress test message, and schedule corresponding stress test tasks according to the stress test parameters.
所述任务编排模块 606 , 用于依据所述压力测试参数确定压力测试脚本, 并依据所 述压力测试参数确定执行时间信息, 生成对应的压力测试任务。 The task orchestration module 606 is configured to determine a stress test script according to the stress test parameters, determine execution time information according to the stress test parameters, and generate corresponding stress test tasks.
所述测试调度模块 608 , 用于确定所述压力测试任务对应的压力测试设备; 将所述 压力测试脚本下发给所述压力测试设备, 以依据所述执行时间信息执行压力测试。 The test scheduling module 608 is configured to determine the stress test device corresponding to the stress test task; and issue the stress test script to the stress test device to execute the stress test according to the execution time information.
所述订阅模块 602, 用于依据物联网设备的订阅请求, 为所述物联网设备订阅所述 压力测试服务器的订阅关系; 将所述物联网设备作为压力测试设备。 The subscription module 602 is configured to subscribe to the subscription relationship of the stress test server for the Internet of Things device according to a subscription request of the Internet of Things device; and use the Internet of Things device as a stress test device.
综上, 基于物联网系统进行压力测试, 该物联网系统包括物联网服务器、 压力测试 服务器和压力测试设备, 所述压力测试设备包括物联网设备, 从而压力测试服务器可在 物联网服务器上发布订阅关系, 压力测试设备可订阅该订阅关系, 从而在物联网服务器 接收压力测试服务器发布的压力测试消息后, 可调度执行压力测试, 其中, 可编排所述 压力测试消息对应的压力测试任务, 然后依据所述压力测试任务调用压力测试设备, 以 使各压力测试设备执行相应的压力测试, 接收到压力测试消息后物联网服务器可调度执 行压力测试, 不再受限于压力测试服务器, 提高压力测试的稳定性。 In summary, the stress test is performed based on the Internet of Things system. The Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device. The stress test device includes an Internet of Things device, so that the stress test server can publish and subscribe on the Internet of Things server. The stress test device can subscribe to the subscription relationship, so that after the IoT server receives the stress test message issued by the stress test server, the stress test can be scheduled to execute the stress test, where the stress test task corresponding to the stress test message can be scheduled, and then the stress test The stress test task calls the stress test equipment so that each stress test equipment executes the corresponding stress test. After receiving the stress test message, the IoT server can schedule the execution of the stress test. It is no longer limited to the stress test server and improves the performance of the stress test. stability.
基于物联网的压力测试, 压力测试服务器不作为中心节点, 实现了去中心化的特点, 从而在压力测试服务器发送压力测试消息后, 可由物联网服务器调度压力测试的执行, 压力测试不会受到压力测试服务器故障的影响。 Based on the stress test of the Internet of Things, the stress test server does not act as a central node, and achieves the characteristics of decentralization. Thus, after the stress test server sends the stress test message, the execution of the stress test can be scheduled by the IoT server, and the stress test will not be stressed. Test the impact of server failure.
基于物联网系统进行压力测试, 物联网中接入的各种设备订阅了压力测试服务器的 消息, 就可作为压力测试设备, 从而不会由于压力测试设备的数量限制压力测试的执行, 并且发布消息后压力测试服务器也不影响压力测试的执行, 从而能够有效提高压力测试 的稳定性。 Perform stress testing based on the Internet of Things system. Various devices connected to the Internet of Things can be used as stress test equipment after subscribing to the message of the stress test server, so that the number of stress test devices will not limit the execution of the stress test and publish messages The post-stress test server does not affect the execution of the stress test, which can effectively improve the stability of the stress test.
本申请实施例中, 采用物联网中接入的设备作为压力测试设备, 还能够利用客户资 源, 提高物联网的资源利用率, 进一步还可以进行付费、 收费的压力测试, 如压力测试 设备中的物联网设备支付一定的费用等, 优化物联网的生态发展。 In the embodiment of the present application, the device connected in the Internet of Things is used as the stress test device, and it is also possible to use customer data To improve the resource utilization rate of the Internet of Things, it is also possible to conduct paid and charged stress tests, such as paying a certain fee for the Internet of Things equipment in the stress test equipment, so as to optimize the ecological development of the Internet of Things.
本申请实施例还提供了一种非易失性可读存储介质, 该存储介质中存储有一个或多 个模块 (programs) , 该一个或多个模块被应用在设备时, 可以使得该设备执行本申请 实施例中各方法步骤的指令 (instructions) 。 The embodiment of the present application also provides a non-volatile readable storage medium, the storage medium stores one or more modules (programs), when the one or more modules are applied to a device, the device can execute Instructions for each method step in the embodiment of this application.
本申请实施例提供了一个或多个机器可读介质, 其上存储有指令, 当由一个或多个 处理器执行时, 使得电子设备执行如上述实施例中一个或多个所述的方法。 本申请实施 例中, 所述电子设备包括物联网服务器、 压力测试服务器等服务器设备, 以及物联网设 备、 压力测试设备、 用户设备等。 The embodiments of the present application provide one or more machine-readable media with instructions stored thereon, which when executed by one or more processors, cause an electronic device to execute the methods described in one or more of the foregoing embodiments. In the embodiment of the present application, the electronic device includes server devices such as an Internet of Things server and a stress test server, as well as Internet of Things devices, stress test equipment, user equipment, and the like.
本公开的实施例可被实现为使用任意适当的硬件, 固件, 软件, 或及其任意组合进 行想要的配置的装置, 该装置可包括物联网服务器、 压力测试服务器等服务器 (集群) 设备、 物联网设备、 压力测试设备、 用户设备等电子设备。 图 7示意性地示出了可被用 于实现本申请中所述的各个实施例的示例性装置 700 。 The embodiments of the present disclosure can be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform a desired configuration. The device can include server (cluster) devices such as an Internet of Things server, a stress test server, etc. Electronic equipment such as Internet of Things equipment, stress testing equipment, and user equipment. Figure 7 schematically shows an exemplary apparatus 700 that can be used to implement the various embodiments described in this application.
对于一个实施例, 图 7示出了示例性装置 700, 该装置具有一个或多个处理器 702、 被耦合到(一个或多个)处理器 702中的至少一个的控制模块(芯片组) 704、 被耦合到控 制模块 704的存储器 706、被耦合到控制模块 704的非易失性存储器(NVM) /存储设备 708、 被耦合到控制模块 704的一个或多个输入 /输出设备 710, 以及被耦合到控制模块 704的 网络接口 712。 For one embodiment, FIG. 7 shows an exemplary apparatus 700 that has one or more processors 702, and a control module (chipset) 704 coupled to at least one of the processor(s) 702 , A memory 706 coupled to the control module 704, a non-volatile memory (NVM)/storage device 708 coupled to the control module 704, one or more input/output devices 710 coupled to the control module 704, and The network interface 712 is coupled to the control module 704.
处理器 702可包括一个或多个单核或多核处理器, 处理器 702可包括通用处理器或 专用处理器 (例如图形处理器、 应用处理器、 基频处理器等) 的任意组合。 在一些实施 例中, 装置 700 能够作为本申请实施例中所述的车载设备等电子设备。 The processor 702 may include one or more single-core or multi-core processors, and the processor 702 may include any combination of a general-purpose processor or a special-purpose processor (for example, a graphics processor, an application processor, a baseband processor, etc.). In some embodiments, the apparatus 700 can be used as an electronic device such as a vehicle-mounted device described in the embodiments of the present application.
在一些实施例中, 装置 700 可包括具有指令 714的一个或多个计算机可读介质(例 如, 存储器 706或 NVM/存储设备 708) 以及与该一个或多个计算机可读介质相合并被配 置为执行指令 714以实现模块从而执行本公开中所述的动作的一个或多个处理器 702。 In some embodiments, the apparatus 700 may include one or more computer-readable media (for example, the memory 706 or the NVM/storage device 708) having instructions 714, and is configured to be combined with the one or more computer-readable media One or more processors 702 that execute instructions 714 to implement modules to perform the actions described in this disclosure.
对于一个实施例, 控制模块 704可包括任意适当的接口控制器, 以向(一个或多个) 处理器 702中的至少一个和 /或与控制模块 704通信的任意适当的设备或组件提供任意适 当的接口。 For an embodiment, the control module 704 may include any suitable interface controller to provide any suitable interface controller to at least one of the processor(s) 702 and/or any suitable device or component in communication with the control module 704 Interface.
控制模块 704可包括存储器控制器模块, 以向存储器 706提供接口。 存储器控制器 模块可以是硬件模块、 软件模块和 /或固件模块。 The control module 704 may include a memory controller module to provide an interface to the memory 706. The memory controller module can be a hardware module, a software module, and/or a firmware module.
存储器 706可被用于例如为装置 700加载和存储数据和 /或指令 714。 对于一个实施 例, 存储器 706可包括任意适当的易失性存储器, 例如, 适当的 DRAM。在一些实施例中, 存储器 706可包括双倍数据速率类型四同步动态随机存取存储器(DDR4SDRAM) 。 The memory 706 may be used to load and store data and/or instructions 714 for the device 700, for example. For an implementation For example, the memory 706 may include any suitable volatile memory, for example, a suitable DRAM. In some embodiments, the memory 706 may include a double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
对于一个实施例, 控制模块 704可包括一个或多个输入 /输出控制器, 以向 NVM/存 储设备 708及(一个或多个)输入 /输出设备 710 提供接口。 For one embodiment, the control module 704 may include one or more input/output controllers to provide interfaces to the NVM/storage device 708 and the input/output device(s) 710.
例如, NVM/存储设备 708可被用于存储数据和 /或指令 714。 NVM/存储设备 708可包 括任意适当的非易失性存储器(例如,闪存)和 /或可包括任意适当的(一个或多个)非易失 性存储设备(例如, 一个或多个硬盘驱动器(HDD) 、 一个或多个光盘(⑶) 驱动器和 /或一 个或多个数字通用光盘(DVD) 驱动器)。 For example, NVM/storage device 708 can be used to store data and/or instructions 714. The NVM/storage device 708 may include any suitable non-volatile memory (for example, flash memory) and/or may include any suitable non-volatile storage device(s) (for example, one or more hard disk drives ( HDD), one or more compact disc (CD) drives and/or one or more digital versatile disc (DVD) drives).
NVM/存储设备 708可包括在物理上作为装置 700被安装在其上的设备的一部分的存 储资源, 或者其可被该设备访问可不必作为该设备的一部分。 例如, NVM/存储设备 708 可通过网络经由(一个或多个)输入 /输出设备 710 进行访问。 The NVM/storage device 708 may include storage resources that are physically part of the device on which the device 700 is installed, or it may be accessible by the device without being a part of the device. For example, the NVM/storage device 708 can be accessed via the input/output device(s) 710 via the network.
(一个或多个)输入 /输出设备 710可为装置 700提供接口以与任意其他适当的设备 通信, 输入 /输出设备 710可以包括通信组件、 音频组件、 传感器组件等。 网络接口 712 可为装置 700提供接口以通过一个或多个网络通信, 装置 700可根据一个或多个无线网 络标准和 /或协议中的任意标准和 /或协议来与无线网络的一个或多个组件进行无线通 信, 例如接入基于通信标准的无线网络, 如 WiFi、 2G、 3G、 4G等, 或它们的组合进行无 线通信。 The input/output device(s) 710 may provide an interface for the device 700 to communicate with any other appropriate devices. The input/output device 710 may include communication components, audio components, sensor components, and the like. The network interface 712 may provide an interface for the device 700 to communicate through one or more networks, and the device 700 may communicate with one or more wireless networks according to any of the one or more wireless network standards and/or protocols. The components perform wireless communication, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, etc., or a combination thereof for wireless communication.
对于一个实施例, (一个或多个)处理器 702中的至少一个可与控制模块 704的一个 或多个控制器(例如, 存储器控制器模块) 的逻辑封装在一起。 对于一个实施例, (一个 或多个)处理器 702中的至少一个可与控制模块 704的一个或多个控制器的逻辑封装在一 起以形成系统级封装(SiP) 。 对于一个实施例, (一个或多个)处理器 702中的至少一个 可与控制模块 704的一个或多个控制器的逻辑集成在同一模具上。对于一个实施例, (一 个或多个)处理器 702中的至少一个可与控制模块 704的一个或多个控制器的逻辑集成在 同一模具上以形成片上系统(SoC) 。 For one embodiment, at least one of the processor(s) 702 may be packaged with the logic of one or more controllers (for example, a memory controller module) of the control module 704. For one embodiment, at least one of the processor(s) 702 may be packaged with the logic of one or more controllers of the control module 704 to form a system in package (SiP). For one embodiment, at least one of the processor(s) 702 may be integrated with the logic of one or more controllers of the control module 704 on the same mold. For one embodiment, at least one of the processor(s) 702 may be integrated with the logic of one or more controllers of the control module 704 on the same mold to form a system on chip (SoC).
在各个实施例中, 装置 700可以但不限于是: 车载设备、 服务器、 台式计算设备或 移动计算设备(例如, 膝上型计算设备、 手持计算设备、 平板电脑、 上网本等)等终端设 备。 在各个实施例中, 装置 700 可具有更多或更少的组件和 /或不同的架构。 例如, 在 一些实施例中, 装置 700包括一个或多个摄像机、 键盘、 液晶显示器(IXD)屏幕(包括触 屏显示器)、 非易失性存储器端口、 多个天线、 图形芯片、 专用集成电路(ASIC) 和扬声 器。 本申请实施例提供了一种电子设备, 包括: 一个或多个处理器; 和, 其上存储有指 令的一个或多个机器可读介质, 当由所述一个或多个处理器执行时, 使得所述电子设备 执行如本申请实施例中一个或多个所述的基于驾驶行为的处理方法。 In various embodiments, the apparatus 700 may be, but is not limited to: a terminal device such as a vehicle-mounted device, a server, a desktop computing device, or a mobile computing device (for example, a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 700 may have more or fewer components and/or different architectures. For example, in some embodiments, the device 700 includes one or more cameras, keyboards, liquid crystal display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, and application-specific integrated circuits ( ASIC) and speakers. An embodiment of the present application provides an electronic device, including: one or more processors; and, one or more machine-readable media on which instructions are stored, when executed by the one or more processors, The electronic device is caused to execute the driving behavior-based processing method as described in one or more of the embodiments of the present application.
对于装置实施例而言, 由于其与方法实施例基本相似, 所以描述的比较简单, 相关 之处参见方法实施例的部分说明即可。 As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述, 每个实施例重点说明的都是与其 他实施例的不同之处, 各个实施例之间相同相似的部分互相参见即可。 The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
本申请实施例是参照根据本申请实施例的方法、 终端设备(系统)、 和计算机程序产 品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框 图中的每一流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可 提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据 处理终端设备的处理器以产生一个机器, 使得通过计算机或其他可编程数据处理终端设 备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和 /或方框图一个方 框或多个方框中指定的功能的装置。 The embodiments of this application are described with reference to the flowcharts and/or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special computers, embedded processors, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing terminal devices A device for realizing the functions specified in one flow or multiple flows in the flowchart and/or one block or multiple blocks in the block diagram is generated.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特 定方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括 指令装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方 框或多个方框中指定的功能。 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including the instruction device. The instruction device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上, 使得在 计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理, 从而在 计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程 和 /或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded on a computer or other programmable data processing terminal equipment, so that a series of operation steps are executed on the computer or other programmable terminal equipment to produce computer-implemented processing, so that the computer or other programmable terminal equipment The instructions executed above provide steps for implementing functions specified in one or more processes in the flowchart and/or one or more blocks in the block diagram.
尽管已描述了本申请实施例的优选实施例, 但本领域内的技术人员一旦得知了基本 创造性概念, 则可对这些实施例做出另外的变更和修改。 所以, 所附权利要求意欲解释 为包括优选实施例以及落入本申请实施例范围的所有变更和修改。 Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
最后, 还需要说明的是, 在本文中, 诸如第一和第二等之类的关系术语仅仅用来将 一个实体或者操作与另一个实体或操作区分开来, 而不一定要求或者暗示这些实体或操 作之间存在任何这种实际的关系或者顺序。 而且, 术语“包括” 、 “包含”或者其任何 其他变体意在涵盖非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者 终端设备不仅包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这 种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下, 由语句“包 括一个 ” 限定的要素, 并不排除在包括所述要素的过程、 方法、 物品或者终端设备 中还存在另外的相同要素。 Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. Or there is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes those elements that are not explicitly listed. Other elements, or are also included for this The inherent elements of a process, method, item, or terminal device. If there are no more restrictions, the element defined by the sentence "includes one" does not exclude the existence of another same element in the process, method, article, or terminal device that includes the element.
以上对本申请所提供的一种压力测试方法、 一种压力测试装置、 一种电子设备和一 种存储介质, 进行了详细介绍, 本文中应用了具体个例对本申请的原理及实施方式进行 了阐述, 以上实施例的说明只是用于帮助理解本申请的方法及其核心思想; 同时, 对于 本领域的一般技术人员, 依据本申请的思想, 在具体实施方式及应用范围上均会有改变 之处, 综上所述, 本说明书内容不应理解为对本申请的限制。 The above describes in detail a stress testing method, a stress testing device, an electronic device, and a storage medium provided by the present application, and specific examples are used in this article to illustrate the principles and implementations of the present application. The description of the above embodiments is only used to help understand the methods and core ideas of the application; meanwhile, for those of ordinary skill in the art, based on the ideas of the application, there will be changes in the specific implementation and the scope of application In summary, the content of this specification should not be construed as a limitation to this application.

Claims

权利要求书 Claims
1 . 一种压力测试方法, 其特征在于, 应用于物联网系统, 所述物联网系统包括物 联网服务器、 压力测试服务器和压力测试设备, 所述压力测试设备包括物联网设备, 所 述的方法包括: 1. A stress test method, characterized in that it is applied to an Internet of Things system, the Internet of Things system includes an Internet of Things server, a stress test server, and a stress test device, the stress test device includes an Internet of Things device, and the method Include:
确定订阅所述压力测试服务器的订阅关系的压力测试设备; Determine the stress test equipment that subscribes to the subscription relationship of the stress test server;
接收所述压力测试服务器发布的压力测试消息,编排所述压力测试消息对应的压力 测试任务; Receiving a stress test message issued by the stress test server, and orchestrate a stress test task corresponding to the stress test message;
依据所述压力测试任务调用压力测试设备, 以使各压力测试设备执行相应的压力测 试。 According to the stress test task, the stress test equipment is called, so that each stress test equipment executes the corresponding pressure test.
2. 根据权利要求 1所述的方法, 其特征在于, 所述编排所述压力测试消息对应的 压力测试任务, 包括: 2. The method according to claim 1, wherein the orchestrating the stress test task corresponding to the stress test message comprises:
从所述压力测试消息中获取压力测试参数, 依据所述压力测试参数编排对应的压力 测试任务。 Acquire stress test parameters from the stress test message, and arrange corresponding stress test tasks according to the stress test parameters.
3. 根据权利要求 2所述的方法, 其特征在于, 所述依据所述压力测试参数编排对 应的压力测试任务, 包括: 3. The method according to claim 2, wherein the arranging the corresponding stress test tasks according to the stress test parameters comprises:
依据所述压力测试参数确定压力测试脚本, 并依据所述压力测试参数确定执行时间 信息, 生成对应的压力测试任务。 The stress test script is determined according to the stress test parameters, and the execution time information is determined according to the stress test parameters to generate the corresponding stress test task.
4. 根据权利要求 3所述的方法, 其特征在于, 所述依据所述压力测试任务调用压 力测试设备, 包括: 4. The method according to claim 3, wherein the invoking a pressure test device according to the pressure test task comprises:
确定所述压力测试任务对应的压力测试设备; Determine the stress test equipment corresponding to the stress test task;
将所述压力测试脚本下发给所述压力测试设备, 以依据所述执行时间信息执行压力 测试。 The stress test script is issued to the stress test device to execute the stress test according to the execution time information.
5. 根据权利要求 1所述的方法, 其特征在于, 所述确定订阅所述压力测试服务器 的订阅关系的压力测试设备, 包括: 5. The method according to claim 1, wherein the determining the stress test device subscribing to the subscription relationship of the stress test server comprises:
依据物联网设备的订阅请求, 为所述物联网设备订阅所述压力测试服务器的订阅关 系; Subscribe to the subscription relationship of the stress test server for the Internet of Things device according to the subscription request of the Internet of Things device;
将所述物联网设备作为压力测试设备。 The IoT device is used as a stress test device.
6. 一种压力测试装置, 其特征在于, 应用于物联网系统的物联网服务器, 所述物 联网系统还包括压力测试服务器和压力测试设备, 所述压力测试设备包括物联网设备, 所述装置包括: 订阅模块, 用于确定订阅所述压力测试服务器的订阅关系的压力测试设备; 消息接收模块, 用于接收所述压力测试服务器发布的压力测试消息; 6. A stress test device, characterized in that it is applied to an Internet of Things server of an Internet of Things system, the Internet of Things system further includes a stress test server and a stress test device, the stress test device includes an Internet of Things device, and the device include: A subscription module, which is used to determine the stress test equipment that subscribes to the subscription relationship of the stress test server; a message receiving module, which is used to receive stress test messages issued by the stress test server;
任务编排模块, 用于编排所述压力测试消息对应的压力测试任务; A task orchestration module, which is used to orchestrate a stress test task corresponding to the stress test message;
测试调度模块, 用于依据所述压力测试任务调用压力测试设备, 以使各压力测试设 备执行相应的压力测试。 The test scheduling module is used to call the stress test equipment according to the stress test task, so that each stress test equipment executes the corresponding stress test.
7. 根据权利要求 6所述的装置, 其特征在于, 7. The device according to claim 6, characterized in that:
所述任务编排模块, 用于从所述压力测试消息中获取压力测试参数, 依据所述压力 测试参数编排对应的压力测试任务。 The task scheduling module is configured to obtain stress test parameters from the stress test message, and schedule corresponding stress test tasks according to the stress test parameters.
8. 根据权利要求 7所述的装置, 其特征在于, 8. The device according to claim 7, characterized in that:
所述任务编排模块, 用于依据所述压力测试参数确定压力测试脚本, 并依据所述压 力测试参数确定执行时间信息, 生成对应的压力测试任务。 The task scheduling module is configured to determine a pressure test script according to the pressure test parameters, determine execution time information according to the pressure test parameters, and generate a corresponding pressure test task.
9. 根据权利要求 8所述的装置, 其特征在于, 9. The device according to claim 8, wherein:
所述测试调度模块, 用于确定所述压力测试任务对应的压力测试设备; 将所述压力 测试脚本下发给所述压力测试设备, 以依据所述执行时间信息执行压力测试。 The test scheduling module is configured to determine a stress test device corresponding to the stress test task; and issue the stress test script to the stress test device to execute the stress test according to the execution time information.
10. 根据权利要求 6所述的装置, 其特征在于, 10. The device according to claim 6, characterized in that:
所述订阅模块, 用于依据物联网设备的订阅请求, 为所述物联网设备订阅所述压力 测试服务器的订阅关系; 将所述物联网设备作为压力测试设备。 The subscription module is configured to subscribe to the subscription relationship of the stress test server for the IoT device according to a subscription request of the IoT device; and use the IoT device as a stress test device.
11 . 一种电子设备, 其特征在于, 包括: 11. An electronic device, characterized in that it comprises:
处理器; 和 Processor; and
存储器, 其上存储有可执行代码, 当所述可执行代码被执行时, 使得所述处理器执 行如权利要求 1-5中一个或多个所述的压力测试方法。 The memory has executable code stored thereon, and when the executable code is executed, the processor is caused to execute the stress test method according to one or more of claims 1-5.
12. 一个或多个机器可读介质, 其上存储有可执行代码, 当所述可执行代码被执行 时, 使得处理器执行如权利要求 1-5中一个或多个所述压力测试方法。 12. One or more machine-readable media having executable code stored thereon, and when the executable code is executed, cause the processor to execute one or more of the stress testing methods in claims 1-5.
PCT/CN2020/075948 2019-02-28 2020-02-20 Pressure testing method and apparatus, and device and storage medium WO2020173366A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910152594.0 2019-02-28
CN201910152594.0A CN111625443B (en) 2019-02-28 2019-02-28 Pressure testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020173366A1 true WO2020173366A1 (en) 2020-09-03

Family

ID=72238364

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075948 WO2020173366A1 (en) 2019-02-28 2020-02-20 Pressure testing method and apparatus, and device and storage medium

Country Status (3)

Country Link
CN (1) CN111625443B (en)
TW (1) TW202034164A (en)
WO (1) WO2020173366A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037594B (en) * 2021-03-24 2022-09-16 北京百度网讯科技有限公司 Pressure testing method and device based on cloud service
CN113507601B (en) * 2021-04-22 2024-03-29 广东睿住智能科技有限公司 Pressure testing method and system for intelligent screen
CN114490356A (en) * 2022-01-10 2022-05-13 阿里巴巴(中国)有限公司 Pressure testing method, system, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946616A (en) * 2012-11-21 2013-02-27 山东中创软件商用中间件股份有限公司 Internet of things middleware performance testing system and testing method
CN103812905A (en) * 2012-11-14 2014-05-21 中兴通讯股份有限公司 Internet of things terminal application integrated generation system and method
CN105516250A (en) * 2015-11-25 2016-04-20 北京邮电大学 Internet-of-things service invoking platform and system
US20170168885A1 (en) * 2015-12-09 2017-06-15 Hcl Technologies Limited System and Method for Testing Internet of Things Network
US20180081730A1 (en) * 2016-09-20 2018-03-22 Tata Consultancy Services Limited SYSTEMS AND METHODS FOR PREDICTING PERFORMANCE OF APPLICATIONS ON AN INTERNET OF THINGS (IoT) PLATFORM
CN108733545A (en) * 2017-04-25 2018-11-02 北京微影时代科技有限公司 A kind of method for testing pressure and device
CN108809747A (en) * 2018-03-22 2018-11-13 苏州德姆斯信息技术有限公司 A kind of the analogue data test system and its test method of system platform

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8978011B2 (en) * 2005-05-09 2015-03-10 International Business Machines Corporation Managing test results in a data center
CN103686794B (en) * 2013-12-23 2017-06-09 工业和信息化部电子第五研究所 Sensor network node load pressure test system and method
US20150331784A1 (en) * 2014-05-19 2015-11-19 Unisys Corporation System and method for controlling test script execution by smartphone
CN106815142A (en) * 2015-12-02 2017-06-09 北京奇虎科技有限公司 A kind of method for testing software and system
CN106101178A (en) * 2016-05-30 2016-11-09 海尔优家智能科技(北京)有限公司 A kind of subscription message distribution, method of reseptance, device and related system
US20190258805A1 (en) * 2016-11-04 2019-08-22 Singapore University Of Technology And Design Computer-implemented method and data processing system for testing device security
CN108932193A (en) * 2018-06-01 2018-12-04 四川斐讯全智信息技术有限公司 A kind of MQTT server interface test method and system
CN109359033A (en) * 2018-09-05 2019-02-19 广州神马移动信息科技有限公司 Method for testing pressure, testing service device, management server and system
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812905A (en) * 2012-11-14 2014-05-21 中兴通讯股份有限公司 Internet of things terminal application integrated generation system and method
CN102946616A (en) * 2012-11-21 2013-02-27 山东中创软件商用中间件股份有限公司 Internet of things middleware performance testing system and testing method
CN105516250A (en) * 2015-11-25 2016-04-20 北京邮电大学 Internet-of-things service invoking platform and system
US20170168885A1 (en) * 2015-12-09 2017-06-15 Hcl Technologies Limited System and Method for Testing Internet of Things Network
US20180081730A1 (en) * 2016-09-20 2018-03-22 Tata Consultancy Services Limited SYSTEMS AND METHODS FOR PREDICTING PERFORMANCE OF APPLICATIONS ON AN INTERNET OF THINGS (IoT) PLATFORM
CN108733545A (en) * 2017-04-25 2018-11-02 北京微影时代科技有限公司 A kind of method for testing pressure and device
CN108809747A (en) * 2018-03-22 2018-11-13 苏州德姆斯信息技术有限公司 A kind of the analogue data test system and its test method of system platform

Also Published As

Publication number Publication date
TW202034164A (en) 2020-09-16
CN111625443A (en) 2020-09-04
CN111625443B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
WO2020173366A1 (en) Pressure testing method and apparatus, and device and storage medium
TW201824012A (en) Service processing method and apparatus
CN108512715B (en) Load pressure test method of service link and related device
US10031837B1 (en) Dynamic service debugging in a virtual environment
TW201732657A (en) Service execution method and device
CN110933075B (en) Service calling method and device, electronic equipment and storage medium
CN110543428B (en) Application system testing method and device
WO2021120612A1 (en) Method and device for presenting message notification
CN110413395A (en) Service call pre-heating mean, device, equipment and storage medium
WO2016070690A1 (en) Method, device and system for realizing communication between application and webpage on terminal device
US20130325960A1 (en) Client-side sharing of event information
CN112468574B (en) Processing method, device and system for application service publishing and subscribing mechanism
WO2023169272A1 (en) Cloud application-based processing method, electronic device, and storage medium
US11249760B2 (en) Parameter management between programs
CN111427630A (en) Cold start optimization method and device, electronic equipment and storage medium
WO2023092316A1 (en) Third-party service login method and apparatus, terminal device, and storage medium
CN113434384B (en) Pressure testing method and device
CN113535590A (en) Program testing method and device
CN112506781A (en) Test monitoring method, test monitoring device, electronic device, storage medium, and program product
WO2016155525A1 (en) Page module loading method and device
CN114153512A (en) Resource loading method and device, electronic equipment and storage medium
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface
US20230156690A1 (en) Data processing method and apparatus, device, and storage medium
WO2022237826A1 (en) User interface testing method and system, cluster, medium, and program product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20762442

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20762442

Country of ref document: EP

Kind code of ref document: A1