Router performance detection method and device, electronic equipment and storage medium
By automatically acquiring and calculating the power consumption of test data packets sent by site devices to the router, the problem of low accuracy in manually detecting the router's target wake-up time function is solved, achieving more accurate performance testing and cost savings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-09-27
- Publication Date
- 2026-06-23
AI Technical Summary
Manual testing of the power consumption performance of the router's target wake-up time function is prone to errors, resulting in low testing accuracy.
By automatically acquiring test data packets sent by site devices to routers with and without Target Wake-up Time (TDOT) enabled, and calculating the corresponding power consumption, the performance of the router with TDOT enabled can be determined.
This achieves more accurate detection of the router's target wake-up time function, avoiding manual labor and saving labor costs.
Smart Images

Figure CN115550993B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a router performance testing method and apparatus, electronic equipment, and computer-readable storage medium. Background Technology
[0002] With the rapid development of the internet, routers are playing an increasingly important role in network connectivity. Simultaneously, the number of smart devices requiring connection to routers to access the network is growing, and most of these devices are constantly powered on, leading to increased power consumption and impacting their lifespan. Wi-Fi (Wireless-Fidelity) 6 routers support Target Wake-up Time (TFUT) functionality, which can reduce power consumption in smart devices. However, when testing the power consumption performance of TFUT functionality, manual control of smart devices and manual calculation of power consumption data introduce certain errors. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this application provide a router performance testing method and apparatus, electronic device, and computer-readable storage medium, aiming to solve the technical problem of low accuracy in manually testing router power consumption performance.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to one aspect of the embodiments of this application, a router performance detection method is provided, including:
[0006] Acquire test data generated when the site device sends test data packets to a router with the target wake-up time function enabled, and acquire real-time data generated when the site device sends test data packets to a router without the target wake-up time function enabled;
[0007] The first power consumption of the site equipment is calculated based on the test data, and the second power consumption of the site equipment is calculated based on the real-time data.
[0008] Based on the relationship between the first power consumption and the second power consumption, the performance of the target wake-up time function enabled by the router is detected.
[0009] According to one aspect of the embodiments of this application, a router performance testing device is provided, comprising:
[0010] The acquisition module is configured to acquire test data generated by the site device sending test data packets to a router with the target wake-up time function enabled, and to acquire real-time data generated by the site device sending test data packets to a router without the target wake-up time function enabled.
[0011] The calculation module is configured to calculate the first power consumption of the site device based on test data, and to calculate the second power consumption of the site device based on real-time data.
[0012] The detection module is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption.
[0013] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the router performance detection method as described above.
[0014] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the router performance detection method as described above.
[0015] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the router performance detection method provided in the various alternative embodiments described above.
[0016] In the technical solution provided in the embodiments of this application, test data generated by the site device sending test data packets to the router with the target wake-up time function enabled, and real-time data generated by the site device sending test data packets to the router without the target wake-up time function enabled are automatically obtained; then the corresponding power consumption is automatically calculated to determine the performance of the router with the target wake-up time function enabled. In this way, there is no need to manually test the performance of the router with the target wake-up time function enabled, which can more accurately detect the performance of the router with the target wake-up time function enabled, and avoids the manpower consumption caused by manual testing, thus saving a certain amount of labor costs.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0019] Figure 1 This is a schematic diagram of one implementation environment involved in this application;
[0020] Figure 2 This is a flowchart of a router performance testing method involved in this application;
[0021] Figure 3 This is a flowchart of a router performance testing method involved in this application;
[0022] Figure 4 This is a flowchart of step S310 in one embodiment of this application;
[0023] Figure 5 This is a flowchart of step S410 in one embodiment of this application;
[0024] Figure 6 This is a flowchart of another router performance testing method involved in this application;
[0025] Figure 7 This is a flowchart of another router performance testing method involved in this application;
[0026] Figure 8 This is a flowchart of step S330 in one embodiment of this application;
[0027] Figure 9 This is a flowchart of step S330 in one embodiment of this application;
[0028] Figure 10 This is a block diagram of a router performance testing device related to this application;
[0029] Figure 11 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0032] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0033] It should also be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0034] Please see Figure 1 , Figure 1 This is a schematic diagram of an implementation environment involved in this application. The implementation environment includes a router 110 and a router performance testing system 120. The router performance testing system 120 includes a data processing server and a site device emulator. The data processing server is equipped with a wake-up statistics module, a power consumption statistics module, and a service data statistics module. The site device emulator is equipped with a target wake-up time request management module, a power consumption recording module, a service data control module, and multiple site devices. The router and the router performance testing system communicate with each other via a wireless network.
[0035] A station (STA) is any terminal connected to a wireless network, such as a laptop, tablet, smartphone, or other internet-connected user device. A station device emulator includes multiple different types of station devices to more realistically simulate connections between different station devices and the router during subsequent router performance testing, thus improving the accuracy of the testing.
[0036] The router in this embodiment is a router with a Target Wakeup Time (TWT) function. After the Target Wakeup Time function is enabled, a connection will only be established when a transmission command is received. During other time periods, the site device will be in a sleep state to reduce power consumption and achieve the purpose of longer battery life and more energy saving.
[0037] The specific details of each module configured in the Router Performance Testing System 120 are as follows:
[0038] The Target Wake-up Time Request Management module is used to manage the time information of a single site device initiating a Target Wake-up Time Request to the router;
[0039] The power consumption recording module is used to record the real-time power of a single site device and the total power consumption during the test cycle;
[0040] The business data control module is used to support customized business scenarios and control the sending or receiving of data packets by each site device;
[0041] The wake-up statistics module is used to count the number of times and the duration that each site device wakes up from sleep mode.
[0042] The power consumption statistics module is used to calculate the real-time total power consumption and average power consumption of each site device during the detection period;
[0043] The business data statistics module is used to count the throughput and latency of all site devices sending or receiving data.
[0044] Figure 2 This is a flowchart illustrating a router performance testing method according to an exemplary embodiment. The method can be applied to... Figure 1 The implementation environment shown, and by Figure 1 The router performance testing system 120 in the illustrated embodiment environment is specifically implemented.
[0045] like Figure 2 As shown, in an exemplary embodiment, the router performance detection method may include steps S210 to S270, which are described in detail below:
[0046] In step S210, a beacon frame sent by a router with the target wake-up time function enabled is received, and the service data control module controls multiple site devices to access the router.
[0047] In this embodiment, after enabling the target wake-up time function, the router is placed in a system shielded box, powered on, and connected to the data processing server via a network cable. Upon receiving a beacon frame from the router, the service data control module controls multiple site devices to access the router via Wi-Fi, facilitating subsequent data transmission and reception between the router and the site devices.
[0048] In step S220, the target wake-up time request management module sends a target wake-up time request to the router. After receiving the router's response to the target wake-up time request, it sets the wake-up time and sleep time for each site device.
[0049] In this embodiment of the application, the target wake-up time request management module initiates a target wake-up time request to the router. After receiving the target wake-up time request, the router responds and negotiates the corresponding wake-up time and sleep time with the site device.
[0050] In step S230, each site device sends its corresponding wake-up time and sleep time to the wake-up statistics module. Each site device wakes up according to its corresponding wake-up time and sends the corresponding test data packet to the router until it reaches its corresponding sleep time and goes into sleep mode. Each site device sends the test data representing network indicators generated during the sending of the corresponding test data packet to the service data statistics module. The test data representing network indicators includes at least one of throughput, latency, or packet loss rate.
[0051] In this embodiment of the application, the site device sends the negotiated wake-up time and sleep time to the wake-up statistics module so that the wake-up statistics module can count the number of wake-ups and the wake-up duration of each site device.
[0052] Each site device is woken up at its designated wake-up time. Each site device is pre-configured with test data packets for different services. After waking up, each site device sends the pre-configured test data packets to the router for data interaction. Simultaneously, each site device sends the test data generated during the test data packet transmission process to the service data statistics module.
[0053] In step S240, the power consumption recording module records the real-time power consumption of each site device during the corresponding transmission of test data packets, and sends the recorded real-time power consumption to the power consumption statistics module.
[0054] In this embodiment of the application, the power consumption recording module records the real-time power consumption of each site device during the corresponding transmission of test data packets, and sends the recorded real-time power consumption to the power consumption statistics module.
[0055] In step S250, the wake-up statistics module receives the corresponding wake-up time and sleep time sent by each site device, and counts the number of wake-ups and wake-up duration of each site device based on the wake-up time and sleep time.
[0056] In this embodiment, the wake-up statistics module counts the number of wake-ups and the wake-up duration based on the received wake-up time and sleep time, so as to facilitate subsequent evaluation of the router's performance.
[0057] In step S260, the business data statistics module receives test data representing network metrics sent by each site device and performs statistics based on the received test data representing network metrics.
[0058] In this embodiment of the application, the business data statistics module calculates the throughput, latency, or packet loss rate of the test data packets transmitted by each site device based on the received test data.
[0059] In step S270, the power consumption statistics module receives the real-time power consumption of each site device sent by the power consumption recording module, calculates the total power consumption based on the real-time power consumption of each site device, and detects the performance of the target wake-up time function enabled by the router based on the real-time power consumption and the total power consumption.
[0060] In this embodiment of the application, the power consumption statistics module receives the real-time power consumption W of each site device. n W n Characterize the real-time power consumption of site device n, and calculate the total power consumption W based on the real-time power consumption of each site device. all =W1+W2+...+W n The router's performance is assessed based on real-time and total power consumption. Specifically, using the same site equipment, the same test data packets are sent to a router without Target Wake-up Time (TDOT) enabled using the same sending strategy. The power consumption statistics module also calculates the corresponding total power consumption and the real-time power consumption of each device. The current real-time power consumption is compared with the corresponding pre-calculated real-time power consumption, and the current total power consumption is compared with the pre-calculated total power consumption. When the current real-time power consumption is less than the corresponding pre-calculated real-time power consumption, and the current total power consumption is less than the pre-calculated total power consumption, it indicates that the router with TDOT enabled performs better.
[0061] In this embodiment of the application, the above steps S240 to S270 are not restricted in order during execution; they can be executed simultaneously or in any order.
[0062] Figure 3 This is a flowchart illustrating a router performance testing method according to an exemplary embodiment. The method can be applied to... Figure 1The implementation environment shown, and by Figure 1 The router performance testing system 120 in the illustrated embodiment environment is specifically implemented.
[0063] like Figure 3 As shown, in an exemplary embodiment, the router performance detection method may include steps S310 to S330, which are described in detail below:
[0064] Step S310: Obtain test data generated by the site device sending test data packets to a router with the target wake-up time function enabled, and obtain real-time data generated by the site device sending test data packets to a router without the target wake-up time function enabled.
[0065] In this embodiment, after the router enables the Target Wake-up Time (TDOT) function, the site device sends test data packets to the router that has enabled TDOT to perform corresponding data interaction. After completion, the site device enters a sleep state and acquires the test data generated during the transmission of the test data packets. Simultaneously, it acquires the real-time data generated during the transmission of test data packets to routers that have not enabled TDOT. The test data and real-time data correspond to each other, differing only in whether the router has enabled TDOT.
[0066] In one exemplary embodiment of this application, please refer to Figure 4 In step S310, test data generated by the site device sending test data packets to the router with the target wake-up time function enabled is obtained, including steps S410 and S420, which are described in detail below:
[0067] Step S410: Control the site device to send a test data packet to the router with the target wake-up time function enabled at a specified time.
[0068] In this embodiment, a timetable is established between the router and the site devices. This timetable is agreed upon by the router and the site devices and records the wake-up time and sleep time corresponding to the site devices. When the wake-up time negotiated between the site devices and the router arrives, the site devices wake up and wait for a trigger frame sent by the router before performing the corresponding data interaction. After this data interaction is completed, the site devices enter sleep mode at the sleep time. Each site device and the router independently negotiate their respective wake-up time and sleep time. In this embodiment, the wake-up time corresponding to the device is used as its designated time. The site devices are woken up at the designated time, and the site devices are controlled to send test data packets to the router that has enabled the target wake-up time function.
[0069] Step S420: Obtain the interaction data between the site device and the router with the target wake-up time function enabled during the test based on the test data packet, and use the interaction data as test data.
[0070] In this embodiment of the application, the site device sends a test data packet to the router, that is, enters the test process. During the test process, the site device and the router interact with each other and generate a series of interaction data, which is used as test data.
[0071] In one exemplary embodiment of this application, please refer to Figure 5 The site device is in a sleep state; in step S410, the site device is controlled to send a test data packet to the router with the target wake-up time function enabled at a specified time, including steps S510 to S530, which are described in detail below:
[0072] Step S510: Check whether the current time has reached the specified time.
[0073] In this embodiment of the application, the site equipment is in a sleep state and detects in real time whether the current time has reached the specified time.
[0074] Step S520: If the current time reaches the specified time, switch the site device from sleep state to wake-up state.
[0075] In this embodiment of the application, if the current time is detected to have reached a specified time, the site device is woken up, the hibernation state is ended, and the device enters the wake-up state.
[0076] Step S530: Control the site device in the wake-up state to send test data packets to the router with the target wake-up time function enabled, until the current time reaches the site device's sleep time and the sending stops.
[0077] In this embodiment of the application, after the site device is woken up, a test data packet is sent to the router with the target wake-up time function enabled. At the same time, it is detected in real time whether the current time has reached the sleep time of the site device. When it is detected that the current time has reached the sleep time of the site device, the data interaction between the site device and the router is stopped.
[0078] Step S320: Calculate the first power consumption of the site device based on the test data, and calculate the second power consumption of the site device based on the real-time data.
[0079] In this embodiment, a first power consumption of the site device is calculated based on test data, and a second power consumption of the site device is calculated based on real-time data. Both the first and second power consumptions characterize the amount of energy consumed by the site device during the transmission of test data packets. Specifically, the test data includes power consumption data of the site device during the transmission of test data packets. The first power consumption is calculated based on the power consumption data in the test data, and the second power consumption is calculated based on the power consumption data in the real-time data.
[0080] In one exemplary embodiment of this application, please refer to Figure 6 The test data includes test data for multiple services, and the real-time data includes test data for multiple services; in step S320, the first power consumption of the site equipment is calculated based on the test data, and the second power consumption of the site equipment is calculated based on the real-time data, including step S610, which is described in detail below:
[0081] Step S610: Calculate the first power consumption of the site equipment for each service based on the test data of each service, and calculate the second power consumption of the site equipment for each service based on the real-time data of each service.
[0082] In this embodiment, test data packets for multiple services are pre-established, such as game services and video services. Each service has corresponding service data packets as test data packets during execution. For example, the game service's service data packet simulates a random duration of 0-60 seconds and transmits 1Mbps (Million bits per second) of TCP (Transmission Control Protocol), which is 128 bytes of data. The video service's service data packet simulates a random duration of 0-60 seconds and transmits 1Mbps (User Datagram Protocol), which is 1470 bytes of data. In other embodiments, other services can be customized, and their corresponding durations and data volumes can also be customized.
[0083] Specifically, in one embodiment, a single site device may be configured. This site device has multiple corresponding wake-up times and sleep times, with different wake-up times corresponding to different services. Upon arrival of each wake-up time, test data packets for the corresponding service are transmitted. In another embodiment, multiple site devices may be configured, each corresponding to one service. Each site device has corresponding wake-up times and sleep times. When the wake-up time for a site device arrives, the corresponding site device transmits the corresponding service data packets. Furthermore, multiple site devices may have the same wake-up times and sleep times. When the wake-up time arrives, all site devices are controlled to transmit the corresponding service data packets to the router.
[0084] In step S330, based on the relationship between the first power consumption and the second power consumption, the performance of the target wake-up time function enabled by the router is detected, including step S620, which is described in detail below:
[0085] Step S620: Based on the relationship between the first power consumption and the second power consumption corresponding to each service, detect the performance of the target wake-up time function enabled by the router.
[0086] In this embodiment of the application, by comparing the first power consumption and the second power consumption corresponding to each service, the first power consumption generated after the router enables the target wake-up time function should be less than the second power consumption generated when the target wake-up time function is not enabled. The performance of the router when the target wake-up time function is enabled can be detected based on the relationship between the first power consumption and the second power consumption corresponding to each service.
[0087] In an exemplary embodiment of this application, in step S620, the performance of the target wake-up time function enabled by the router is detected based on the relationship between the first power consumption and the second power consumption corresponding to each service. Details are as follows:
[0088] The relationship between the first power consumption and the second power consumption corresponding to each service is detected to obtain multiple first target detection results;
[0089] Among multiple first target detection results, the first target detection result represents the number of first targets whose first power consumption is less than the second power consumption;
[0090] Obtain a first preset quantity threshold, match the first target quantity with the first preset quantity threshold, and obtain a first matching result;
[0091] If the first matching result indicates that the number of first targets is greater than or equal to the first preset number threshold, then it is determined that the target wake-up time function enabled by the router belongs to the first type of performance.
[0092] If the first matching result indicates that the number of first targets is less than the first preset number threshold, then the target wake-up time function enabled by the router is determined to belong to the second type of performance; wherein, the first type of performance is better than the second type of performance.
[0093] In this embodiment of the application, the first power consumption and the second power consumption corresponding to each service are compared, and a first target detection result is obtained for each service. Among the multiple first target detection results, the number of first target detection results in which the first power consumption is less than the second power consumption is determined, and this number is used as the first target quantity. A first preset quantity threshold is preset. The setting of the first preset data threshold is related to the number of services opened during this performance test. The first preset quantity threshold accounts for a preset percentage of the number of services opened. The preset percentage is greater than 50% and less than or equal to 100%. For example, if the number of services opened is 10 and the preset percentage is 60%, then the corresponding first preset quantity threshold is 6.
[0094] The first target quantity is matched with the first preset quantity threshold to obtain the corresponding first matching result. When the first matching result indicates that the first target quantity is greater than or equal to the first preset quantity threshold, it means that the router's target wake-up time function has achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the first type of performance. If the first matching result indicates that the target data is less than or equal to the first preset quantity threshold, it means that the router's target wake-up time function has not achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the second type of performance.
[0095] In this embodiment, multiple services are configured. Test data is obtained from the test data packets of these services, and the corresponding power consumption is calculated based on this data. This determines the performance of the router when the target wake-up time function is enabled, making the test scenario easily reproducible and ensuring consistency. Furthermore, the test data from multiple services better simulates different services, making the test environment more realistic and resulting in more accurate router performance testing.
[0096] In one exemplary embodiment of this application, please refer to Figure 7 There are multiple site devices; in step S220, the first power consumption of the site devices is calculated based on test data, and the second power consumption of the site devices is calculated based on real-time data, including step S710, which is described in detail below:
[0097] Step S710: Calculate the first power consumption of each site device based on the test data of each site device, and calculate the second power consumption of each site device based on the real-time data of each site device.
[0098] In this embodiment, multiple site devices are configured, and the types of each site device may be different. A first power consumption for each site device is calculated based on test data, and a second power consumption is calculated based on real-time data for each site device. In other embodiments, corresponding test data packets can be pre-sent to a router without the target wake-up time function enabled through multiple identical site devices to obtain corresponding real-time data.
[0099] In step S330, based on the relationship between the first power consumption and the second power consumption, the performance of the target wake-up time function enabled by the router is detected, including step S720, which is described in detail below:
[0100] Step S720: Based on the relationship between the first power consumption and the second power consumption of each site device, detect the performance of the target wake-up time function enabled by the router.
[0101] In this embodiment, the performance of the target wake-up time function enabled by the router is detected based on the relationship between the first power consumption and the second power consumption of each site device.
[0102] In an exemplary embodiment of this application, in step S720, the performance of the target wake-up time function enabled by the router is detected based on the relationship between the first power consumption and the second power consumption of each site device, as detailed below:
[0103] The relationship between the first power consumption and the second power consumption of each site device is detected to obtain multiple second target detection results;
[0104] Among multiple second target detection results, the second target detection result represents the number of second targets whose first power consumption is less than the second power consumption;
[0105] Obtain a second preset quantity threshold, match the second target quantity with the second preset quantity threshold, and obtain a second matching result;
[0106] If the second matching result indicates that the number of second targets is greater than or equal to the second preset number threshold, then it is determined that the target wake-up time function enabled by the router belongs to the first type of performance.
[0107] If the second matching result indicates that the number of second targets is less than the second preset number threshold, then the target wake-up time function enabled by the router is determined to belong to the second type of performance; wherein, the first type of performance is better than the second type of performance.
[0108] In this embodiment, the first power consumption and the second power consumption of each site device are compared, and each site device obtains a second target detection result. Among the multiple second target detection results, the number of second target detection results in which the first power consumption is less than the second power consumption is determined, and this number is used as the second target quantity. A second preset quantity threshold is preset. The setting of the second preset data threshold is related to the number of site devices set in this performance test. The second preset quantity threshold accounts for a second preset percentage of the number of site devices set. Similarly, the second preset percentage is greater than 50% and less than or equal to 100%. For example, if the number of site devices set is 10 and the preset percentage is 70%, then the corresponding second preset quantity threshold is 7.
[0109] The second target quantity is matched with the second preset quantity threshold to obtain the corresponding second matching result. When the second matching result indicates that the first target quantity is greater than or equal to the first preset quantity threshold, it means that the router's target wake-up time function has achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the first type of performance. If the second matching result indicates that the target data is less than or equal to the first preset quantity threshold, it means that the router's target wake-up time function has not achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the second type of performance.
[0110] In this embodiment, multiple site devices are configured. Test data is obtained based on the test data packets of the multiple site devices. Then, the corresponding power consumption is calculated based on the test data of the multiple site devices to determine the performance of the router when the target wake-up time function is enabled. This allows the router's performance to be tested based on multiple site devices in the test scenario, making the test environment more realistic and the router performance test more accurate.
[0111] Step S330: Based on the relationship between the first power consumption and the second power consumption, detect the performance of the target wake-up time function enabled by the router.
[0112] In this embodiment, the first power consumption characterizes the power consumption performance between the site device and the router after the target wake-up time function is enabled, and the second power consumption characterizes the power consumption performance between the site device and the router after the target wake-up time function is not enabled. By the relationship between the first power consumption and the second power consumption, the performance corresponding to the target wake-up time function enabled by the router can be accurately determined, and it can be determined whether enabling the target wake-up time function has achieved the purpose of reducing power consumption, extending battery life, and saving more power.
[0113] In one embodiment, multiple site devices are configured. The first power consumption of all site devices is summed to obtain a first total power consumption. At the same time, the second power consumption of all site devices is summed to obtain a second total power consumption. The first total power consumption is compared with the second total power consumption. If the first total power consumption is less than the second total power consumption, it indicates that the router's target wake-up time function has achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the first type of performance. If the first total power consumption is greater than or equal to the second total power consumption, it indicates that the router's target wake-up time function has not achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the second type of performance.
[0114] In this embodiment, test data generated by the site device sending test data packets to a router with the target wake-up time function enabled, and real-time data generated by the site device sending test data packets to a router without the target wake-up time function enabled are automatically acquired; then the corresponding power consumption is automatically calculated to determine the performance of the router with the target wake-up time function enabled, without the need to manually test the performance of the router with the target wake-up time function enabled.
[0115] In one exemplary embodiment of this application, please refer to Figure 8 In step S330, based on the relationship between the first power consumption and the second power consumption, the performance of the target wake-up time function enabled by the router is detected, including steps S810 to S830, which are described in detail below:
[0116] Step S810: Detect the relationship between the first power consumption and the second power consumption to obtain the detection result.
[0117] In this embodiment of the application, the relationship between the first power consumption and the second power consumption is detected, that is, the first power consumption and the second power consumption are compared to obtain the corresponding detection result.
[0118] Step S820: If the detection result indicates that the first power consumption is less than the second power consumption, then it is determined that the target wake-up time function enabled by the router belongs to the first type of performance.
[0119] In this embodiment of the application, when the first power consumption is less than the second power consumption, it indicates that the router's target wake-up time function has achieved the purpose of reducing power consumption, extending battery life, and saving power, which belongs to the first type of performance.
[0120] Step S830: If the detection result indicates that the first power consumption is greater than or equal to the second power consumption, then it is determined that the target wake-up time function enabled by the router belongs to the second type of performance; wherein, the first type of performance is better than the second type of performance.
[0121] In this embodiment of the application, if the first power consumption is greater than or equal to the second power consumption, it indicates that the router's target wake-up time function has not achieved the purpose of reducing power consumption, extending battery life, and saving power, and belongs to the second type of performance.
[0122] In an exemplary embodiment of this application, step S330 detects the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption, including steps S910 and S920, which are described in detail below:
[0123] Step S910: Obtain a first value representing a network metric generated by the site device sending test data packets to a router with the target wake-up time function enabled, and obtain a second value representing a network metric generated by the site device sending test data packets to a router without the target wake-up time function enabled; wherein, the network metric includes at least one of throughput, packet loss rate and latency.
[0124] In this embodiment, throughput refers to the number of data successfully transmitted by a site device to a router per unit time, specifically measured in bits, bytes, packets, etc. Packet loss rate (or packet loss rate) refers to the ratio of lost test packets to the total number of transmitted test packets; the packet loss rate is related to packet length and transmission frequency. Latency refers to the time interval required for test packets to travel from the site device to the router; latency is related to the length of the test packets. During the process of sending test packets to the router, the site device calculates at least one of throughput, packet loss rate, and latency.
[0125] Step S920: Based on the relationship between the first power consumption and the second power consumption, and the relationship between the first value and the second value, detect the performance of the target wake-up time function enabled by the router.
[0126] In this embodiment, the performance of the target wake-up time function enabled by the router is evaluated based on both power consumption and network metrics. Specifically, the performance of the target wake-up time function is detected based on the relationship between the first power consumption and the second power consumption, as well as the relationship between the first value and the second value. If the first power consumption is less than the second power consumption and the first value is less than the second value, then the target wake-up time function enabled by the router is determined to belong to the first type of performance; otherwise, it belongs to the second type of performance.
[0127] In one exemplary embodiment of this application, please refer to Figure 10 , Figure 10 A router performance testing device is shown according to an exemplary embodiment, comprising:
[0128] The acquisition module 1010 is configured to acquire test data generated by the site device sending test data packets to a router with the target wake-up time function enabled, and to acquire real-time data generated by the site device sending test data packets to a router without the target wake-up time function enabled.
[0129] The calculation module 1020 is configured to calculate the first power consumption of the site device based on test data, and to calculate the second power consumption of the site device based on real-time data.
[0130] The detection module 1030 is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption.
[0131] In one exemplary embodiment of this application, the detection module 1030 includes:
[0132] The first detection submodule is configured to detect the relationship between the first power consumption and the second power consumption, and obtain the detection result.
[0133] The first determining submodule is configured to determine that if the detection result indicates that the first power consumption is less than the second power consumption, the target wake-up time function enabled by the router belongs to the first type of performance.
[0134] The second determining submodule is configured to determine that if the detection result indicates that the first power consumption is greater than or equal to the second power consumption, the target wake-up time function enabled by the router belongs to the second type of performance; wherein, the first type of performance is superior to the second type of performance.
[0135] In one exemplary embodiment of this application, the test data includes test data for multiple services, and the real-time data includes test data for multiple services; the calculation module 1020 includes:
[0136] The first calculation submodule is configured to calculate the first power consumption of the site equipment for each service based on the test data of each service, and to calculate the second power consumption of the site equipment for each service based on the real-time data of each service.
[0137] Detection module 1030 includes:
[0138] The second detection submodule is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption corresponding to each service.
[0139] In one exemplary embodiment of this application, the second detection submodule includes:
[0140] The first detection unit is configured to detect the relationship between the first power consumption and the second power consumption corresponding to each service, and obtain multiple first target detection results;
[0141] The first determining unit is configured to determine, among a plurality of first target detection results, the number of first targets whose first power consumption is less than the second power consumption;
[0142] The first matching unit is configured to obtain a first preset quantity threshold, match the first target quantity with the first preset quantity threshold, and obtain a first matching result;
[0143] The second determining unit is configured to determine that the target wake-up time function enabled by the router belongs to the first type of performance if the first matching result indicates that the number of first targets is greater than or equal to the first preset number threshold.
[0144] The third determining unit is configured to determine that the target wake-up time function enabled by the router belongs to the second type of performance if the first matching result indicates that the number of first targets is less than the first preset number threshold; wherein, the first type of performance is better than the second type of performance.
[0145] In one exemplary embodiment of this application, there are multiple site devices; the computing module 1020 includes:
[0146] The second calculation submodule is configured to calculate the first power consumption of each site device based on the test data of each site device, and to calculate the second power consumption of each site device based on the real-time data of each site device.
[0147] Detection module 1030 includes:
[0148] The third detection submodule is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption of each site device.
[0149] In one exemplary embodiment of this application, the third detection submodule includes:
[0150] The second detection unit is configured to detect the relationship between the first power consumption and the second power consumption of each site device, and obtain multiple second target detection results;
[0151] The fourth determining unit is configured to determine the number of second targets among multiple second target detection results, where the second target detection result represents the number of second targets whose first power consumption is less than the second power consumption;
[0152] The second matching unit is configured to obtain a second preset quantity threshold, match the second target quantity with the second preset quantity threshold, and obtain a second matching result;
[0153] The fifth determining unit is configured to determine that the target wake-up time function enabled by the router belongs to the first type of performance if the second matching result indicates that the number of second targets is greater than or equal to the second preset number threshold.
[0154] The sixth determining unit is configured to determine that the target wake-up time function enabled by the router belongs to the second type of performance if the second matching result indicates that the number of second targets is less than the second preset number threshold; wherein, the first type of performance is better than the second type of performance.
[0155] In one exemplary embodiment of this application, the acquisition module 1010 includes:
[0156] The control submodule is configured to control the site device to send test data packets to the router with the target wake-up time function enabled at a specified time.
[0157] The first acquisition submodule is configured to acquire the interaction data between the site device and the router with the target wake-up time function enabled during the test based on the test data packet, and use the interaction data as test data.
[0158] In one exemplary embodiment of this application, the site device is in a sleep state; the control submodule includes:
[0159] The third detection unit is configured to detect whether the current time has reached a specified time.
[0160] The switching unit is configured to switch the site device from sleep mode to wake-up mode if the current time reaches a specified time.
[0161] The control unit is configured to control the site device in the wake-up state to send test data packets to the router with the target wake-up time function enabled, until the current time reaches the site device's sleep time and the sending stops.
[0162] In one exemplary embodiment of this application, the detection module 1030 includes:
[0163] The second acquisition submodule is configured to acquire a first value representing a network indicator generated by the site device sending test data packets to a router with the target wake-up time function enabled, and to acquire a second value representing the network indicator generated by the site device sending test data packets to a router without the target wake-up time function enabled; wherein the network indicator includes at least one of throughput, packet loss rate and latency;
[0164] The fourth detection submodule is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption, and the relationship between the first value and the second value.
[0165] It should be noted that the router performance testing device provided in the above embodiments and the router performance testing method provided in the above embodiments belong to the same concept. The specific ways in which each module, sub-module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here.
[0166] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the router performance detection method provided in the above embodiments.
[0167] Figure 11 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0168] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0169] like Figure 11 As shown, the computer system 1100 includes a Central Processing Unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1102 or programs loaded from storage portion 1108 into Random Access Memory (RAM) 1103, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1103. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. An Input / Output (I / O) interface 1105 is also connected to bus 1104.
[0170] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.
[0171] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit (CPU) 1101, it performs various functions defined in the system of this application.
[0172] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0174] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0175] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0176] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various embodiments described above.
[0177] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
Claims
1. A method for testing router performance, characterized in that, include: Acquire test data generated when the site device sends test data packets to a router with the target wake-up time function enabled, and acquire real-time data generated when the site device sends the test data packets to a router with the target wake-up time function disabled; The first power consumption of the site device is calculated based on the test data, and the second power consumption of the site device is calculated based on the real-time data. Both the first power consumption and the second power consumption represent the amount of energy consumed by the site device during the transmission of the test data packet. Based on the relationship between the first power consumption and the second power consumption, the performance of the target wake-up time function enabled by the router is detected. The step of detecting the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption includes: The system acquires a first value representing a network metric generated when a site device sends test data packets to a router with Target Wake-up Time (TDOT) enabled, and acquires a second value representing the network metric generated when a site device sends test data packets to a router without TDOT enabled; wherein the network metric includes at least one of throughput, packet loss rate, and latency. Based on the relationship between the first power consumption and the second power consumption, and the relationship between the first value and the second value, the performance of the target wake-up time function enabled by the router is detected.
2. The method as described in claim 1, characterized in that, The test data includes test data for multiple services, and the real-time data includes test data for the multiple services; the calculation of the first power consumption of the site device based on the test data, and the calculation of the second power consumption of the site device based on the real-time data, include: The first power consumption of the site device for each service is calculated based on the test data of each service, and the second power consumption of the site device for each service is calculated based on the real-time data of each service. The step of detecting the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption includes: Based on the relationship between the first power consumption and the second power consumption corresponding to each service, the performance of the target wake-up time function enabled by the router is detected.
3. The method as described in claim 1, characterized in that, The site devices are multiple; the calculation of the first power consumption of the site devices based on the test data, and the calculation of the second power consumption of the site devices based on the real-time data, include: The first power consumption of each site device is calculated based on the test data of each site device, and the second power consumption of each site device is calculated based on the real-time data of each site device. The step of detecting the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption includes: Based on the relationship between the first power consumption and the second power consumption of each site device, the performance of the target wake-up time function enabled by the router is detected.
4. The method according to any one of claims 1 to 3, characterized in that, The test data generated by the acquisition site device sending test data packets to a router with the target wake-up time function enabled includes: The site device is controlled to send a test data packet to the router with the target wake-up time function enabled at a specified time. The interaction data between the site device and the router with the target wake-up time function enabled during the test is obtained based on the test data packet, and the interaction data is used as the test data.
5. The method as described in claim 4, characterized in that, The site device is in a sleep state; controlling the site device to send a test data packet to the router with the target wake-up time function enabled at a specified time includes: Detect whether the current time has reached the specified time; If the current time reaches the specified time, the site device will be switched from the sleep state to the wake-up state; The station device in the wake-up state is controlled to send the test data packet to the router with the target wake-up time function enabled, until the current time reaches the sleep time of the station device and then the sending stops.
6. A router performance testing device, characterized in that, include: The acquisition module is configured to acquire test data generated by the site device sending test data packets to a router with the target wake-up time function enabled, and to acquire real-time data generated by the site device sending the test data packets to a router without the target wake-up time function enabled. The calculation module is configured to calculate a first power consumption of the site device based on the test data, and a second power consumption of the site device based on the real-time data, wherein both the first power consumption and the second power consumption represent the amount of energy consumed by the site device during the transmission of the test data packet; The detection module is configured to detect the performance of the target wake-up time function enabled by the router based on the relationship between the first power consumption and the second power consumption. The detection module is further configured to: acquire a first value representing a network indicator generated by the site device sending test data packets to a router with the target wake-up time function enabled, and acquire a second value representing the network indicator generated by the site device sending test data packets to a router without the target wake-up time function enabled; wherein the network indicator includes at least one of throughput, packet loss rate and latency; as well as Based on the relationship between the first power consumption and the second power consumption, and the relationship between the first value and the second value, the performance of the target wake-up time function enabled by the router is detected.
7. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the router performance detection method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores computer-readable instructions, which, when executed by the computer's processor, cause the computer to perform the router performance detection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
WLAN station capable of optimizing power saving operation
US20190349851A1