A test method for wireless performance of smart home in real electromagnetic environment
By constructing and optimizing wireless performance test models, identifying and eliminating interference factors, the accuracy problem of wireless performance testing of smart home devices in real electromagnetic environments is solved, and efficient and automated test results are achieved, which are suitable for a variety of environments and standards.
Patent Information
- Application Number
- CN202410559727.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Existing wireless performance testing methods for smart home devices are difficult to simulate the complexity of the real electromagnetic environment and the coexistence interference of multiple wireless communication technologies, resulting in inaccurate test results.
By acquiring and preprocessing wireless performance data of smart home devices in different electromagnetic environments, calculating correlation and importance, identifying abnormal data, constructing test functions, and using algorithms such as random forests, neural networks, and long-short-term memory networks to build and optimize wireless The performance test model eliminates interference factors and enables accurate testing of smart home devices in real electromagnetic environments.
It improves the accuracy and precision of wireless performance testing of smart home devices in real electromagnetic environments, realizes automated testing, adapts to different standards and environmental requirements, saves resources, and improves work efficiency.
Smart Images

Figure CN118316753B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing, and in particular to a method for testing the wireless performance of a smart home in a real electromagnetic environment. Background Art
[0002] With the rapid development and popularization of smart home technology, more and more home appliances and devices have become intelligent and networked. Most of these smart home devices use wireless communication technologies, such as Wi-Fi, Bluetooth, ZigBee, etc., to achieve interaction with users and remote control. However, in actual applications, the wireless performance of smart home devices in real electromagnetic environments is often interfered and affected by various factors, such as electromagnetic radiation, signal attenuation, multipath interference, etc. Therefore, how to accurately test the wireless performance of smart home devices in real electromagnetic environments is of great significance to ensure their stable operation and user experience.
[0003] At present, most of the wireless performance test methods of smart home devices are based on laboratory environments, which are difficult to simulate the variability and complexity of the real electromagnetic environment. In addition, the existing test methods often only focus on the performance of a single wireless communication technology, while ignoring the coexistence and interference problems of multiple wireless communication technologies that smart home devices may face in actual applications. Therefore, it is of great practical application value to develop a smart home wireless performance test method that can simulate the real electromagnetic environment and comprehensively consider multiple wireless communication technologies. Summary of the invention
[0004] The purpose of the present invention is to provide a method for testing the wireless performance of a smart home in a real electromagnetic environment.
[0005] To achieve the above object, the present invention is implemented according to the following technical solutions:
[0006] The present invention comprises the following steps:
[0007] Acquire wireless performance data and electromagnetic data of smart home in different electromagnetic environments, and preprocess the wireless performance data and the electromagnetic data; the preprocessing includes denoising, deleting missing values, deduplication, and classification;
[0008] The wireless performance data is selected by importance to obtain performance data, and the performance data is identified as abnormal according to the wireless performance standard to obtain abnormal data; including:
[0009] Calculate the relevance of wireless performance data:
[0010]
[0011] The correlation between wireless performance data b and wireless performance data w is The probability of wireless performance data w appearing under the condition of wireless performance data b appearing is k(w|b), the probability of wireless performance data w appearing is k(w), and the number of wireless performance data b is The amount of wireless performance data w is The zth wireless performance data w is w z , the ath wireless performance data b is b a , the standard value of wireless performance data b is b o , the standard value of wireless performance data w is w o , the natural constant is e, and the control factor is
[0012] The wireless performance data with a correlation degree less than 0.341 are eliminated and stored by category according to the correlation degree to obtain the initial screening data;
[0013] Calculate the importance of the initial screening data:
[0014]
[0015] The number of cluster data is The genetic constant is θ, and the value of the i-th type of initial screening data u is L ui , the standard value of the i-th type of initial screening data u is The performance of the i-th type of initial screening data u The contribution of
[0016] The initial screening data is screened according to the importance threshold, the initial performance data is obtained, and the search sub-fitness value is calculated:
[0017]
[0018] The fitness value of the searcher is The initial performance data is ú, the error rate of the initial performance data is RE(ú), the number of classes occupied by the initial performance data in the preliminary screening data is M(ú), the first weight is ρ1, and the second weight is ρ2;
[0019] Compare the fitness values of the searchers, update the global and local optimal solutions, and use adaptive inertia weights to update the searcher positions;
[0020] Adopt the T distribution strategy to search data through the adaptive T distribution mutation strategy until the maximum number of iterations is reached and the performance data is output; otherwise, the fitness value is recalculated;
[0021] Performing an impact analysis on the abnormal data to obtain an interference factor, constructing a test function according to the interference factor, and building a smart home wireless performance test model according to the test function;
[0022] Optimize the smart home wireless performance test model, input the wireless performance data to be tested into the optimized smart home wireless performance test model, and output the test results.
[0023] Furthermore, the method of performing impact analysis on the abnormal data to obtain interference factors includes:
[0024] The abnormal data is input into the impact analysis model for impact analysis, and the objective function of the impact analysis model is given, which is expressed as:
[0025]
[0026] Among them The abnormal data is Abnormal data The actual value of Abnormal data The predicted value is The loss function of the impact analysis model is The first penalty coefficient is λ, the second penalty coefficient is η, the Taylor constants are m1 and m2 respectively, and the abnormal data The model is The control parameter is K, the model complexity is υ, and the L2 norm is ‖·‖ 2 , the offset constant is σ;
[0027] Calculate the importance of outliers:
[0028]
[0029] The importance of abnormal data s is The contribution of abnormal data s is The regulatory factor is ε, The weight of abnormal data is
[0030] The factor set is obtained by cross-validation of the abnormal data, and the factors of the factor set are sorted in descending order according to their importance, and the abnormal data with importance greater than or equal to 0.427 are taken as the candidate set;
[0031] The candidate set is deduplicated, and the deduplicated candidate set data is output as interference factors.
[0032] Furthermore, the method for constructing a test function according to the interference factor includes:
[0033]
[0034] The dth interference factor of smart home f is f d , interference factor f d The standard value is The number of interference factors is n d , the adjustment coefficient of smart home f is g f , the influence weight of the dth interference factor is ξ d , the interference intensity of the dth interference factor is Interference factor f d The actual value of the indicator is Interference factor f d The standard value of the indicator is C o , the test function of smart home f is
[0035] Furthermore, a method for constructing a smart home wireless performance test model according to the test function includes:
[0036] The objective function of the smart home wireless performance test model is constructed based on the test function, and the expression is:
[0037]
[0038]
[0039] The objective function of the smart home f is The loss function of the smart home f is
[0040] Smart home wireless performance test models include random forest algorithm, neural network algorithm, long short-term memory network algorithm, and grid search algorithm;
[0041] The random forest algorithm divides the wireless performance data to be tested into training data and test data in a ratio of 5:2;
[0042] The neural network algorithm captures the complex relationships in the training data through multiple layers of nonlinear transformations to obtain deviation data;
[0043] The LSTM network algorithm learns the key features of the deviation data through the gate control mechanism and uses the important features to obtain the test results according to the objective function;
[0044] The grid search algorithm adjusts the hyperparameters of the LSTM network algorithm based on the test data and the error of the test results.
[0045] Furthermore, the method for optimizing the smart home wireless performance test model includes:
[0046] Calculate the inertia weight and acceleration factor:
[0047]
[0048]
[0049]
[0050] The acceleration factors are μ1 and μ2, and the starting and final values of the acceleration factor μ1 are The starting and final values of the acceleration factor μ2 are h2, The random numbers from 0 to 1 are B1 and B2 respectively, the inertia factor is ζ, and the maximum number of iterations is t max , the inertia factor at the end of the iteration is ζ ed , the inertia factor of the initial iteration is ζ st , the genetic coefficient is β, and the current number of iterations is t;
[0051] Update the particle's velocity and position. The expression is:
[0052]
[0053]
[0054]
[0055] The particle velocity of the c-th dimension of the j-th particle in the t+1-th iteration is The particle velocity of the cth dimension of the jth particle in the tth iteration is The shrinkage factor is The particle position of the cth dimension of the jth particle in the tth iteration is W jc (t), the optimal individual position of the jth particle in the cth dimension at the tth iteration is pt jc (t), the optimal population position of the jth particle in the cth dimension at the tth iteration is gt jc (t), the particle position of the jth particle in the cth dimension at the t+1th iteration is W jc (t+1);
[0056] By adjusting the inertia weight, the optimal value of individual position and the optimal value of population position are updated, and the optimal position is chaotically optimized;
[0057] Randomly replace the position of any particle. Stop the iteration when the maximum number of iterations is reached, otherwise recalculate the inertia weight and acceleration factor.
[0058] In a second aspect, an embodiment of the present application further provides an electronic device, including:
[0059] A processor; and a memory arranged to store computer executable instructions, which when executed cause the processor to perform the method steps described in the first aspect.
[0060] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the method steps described in the first aspect.
[0061] The beneficial effects of the present invention are:
[0062] The present invention is a method for testing the wireless performance of a smart home in a real electromagnetic environment. Compared with the prior art, the present invention has the following technical effects:
[0063] The present invention can improve the accuracy of the test of the wireless performance of the smart home in the real electromagnetic environment through preprocessing, data selection, anomaly identification, impact analysis, construction of test functions, model building and model optimization steps, thereby improving the accuracy of the test of the wireless performance of the smart home in the real electromagnetic environment, and optimizing the test of the wireless performance of the smart home in the real electromagnetic environment, which can greatly save resources and improve work efficiency, and can realize automatic testing of the wireless performance of the smart home in the real electromagnetic environment, and perform impact analysis and model optimization on the test of the wireless performance of the smart home in the real electromagnetic environment in real time, which is of great significance to the test of the wireless performance of the smart home in the real electromagnetic environment, can adapt to the test of the wireless performance of smart homes of different standards in the real electromagnetic environment and the test requirements of the wireless performance of different smart homes in the real electromagnetic environment, and has a certain universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A flowchart of a method for testing wireless performance of a smart home in a real electromagnetic environment according to the present invention;
[0065] Figure 2 It is a schematic diagram of the structure of an electronic device in an embodiment of this specification. DETAILED DESCRIPTION
[0066] The present invention is further described below by means of specific embodiments. The illustrative embodiments and descriptions of the present invention are used to explain the present invention but are not intended to limit the present invention.
[0067] The present invention provides a method for testing the wireless performance of a smart home in a real electromagnetic environment, comprising the following steps:
[0068] like Figure 1 As shown, in this embodiment, the following steps are included:
[0069] Acquire wireless performance data and electromagnetic data of smart home in different electromagnetic environments, and pre-process the wireless performance data and the electromagnetic data;
[0070] In actual evaluation, wireless performance data includes signal strength, signal-to-noise ratio, transmission rate, packet loss rate, delay time, throughput, spectrum occupancy, interference level, network topology, device compatibility and wireless performance data standards; electromagnetic data includes electromagnetic field strength, electromagnetic interference, radio frequency interference, electromagnetic compatibility, density, radiation pattern, frequency range;
[0071] The wireless performance data of smart home product A is signal strength -65dBm, signal-to-noise ratio 30dB, transmission rate 200Mbps, packet loss rate 2%, delay time 25ms, throughput 80Mbps, spectrum occupancy 10MHz, low interference level, network topology point-to-point, low device compatibility and large wireless performance data standard IEEE 802.11b / g; the electromagnetic data is electromagnetic field strength 0.7mW / m 2 , medium electromagnetic interference, severe radio frequency interference, electromagnetic compatibility partially complies with CE standards, density 0.15mW / cm 2 , radiation pattern point-to-point directional, frequency range 2.4GHz and 5GHz;
[0072] The wireless performance data is selected by importance to obtain performance data, and the performance data is identified as abnormal according to the wireless performance standard to obtain abnormal data; including:
[0073] Calculate the relevance of wireless performance data:
[0074]
[0075] The correlation between wireless performance data b and wireless performance data w is The probability of wireless performance data w appearing under the condition of wireless performance data b appearing is k(w|b), the probability of wireless performance data w appearing is k(w), and the number of wireless performance data b is The amount of wireless performance data w is The zth wireless performance data w is w z , the ath wireless performance data b is b a , the standard value of wireless performance data b is b o , the standard value of wireless performance data w is w o , the natural constant is e, and the control factor is
[0076] The wireless performance data with a correlation degree less than 0.341 are eliminated and stored by category according to the correlation degree to obtain the initial screening data;
[0077] Calculate the importance of the initial screening data:
[0078]
[0079] The number of cluster data is The genetic constant is θ, and the value of the i-th type of initial screening data u is L ui , the standard value of the i-th type of initial screening data u is The performance of the i-th type of initial screening data u The contribution of
[0080] The initial screening data is screened according to the importance threshold, the initial performance data is obtained, and the search sub-fitness value is calculated:
[0081]
[0082] The fitness value of the searcher is The initial performance data is ú, the error rate of the initial performance data is RE(ú), the number of classes occupied by the initial performance data in the preliminary screening data is M(ú), the first weight is ρ1, and the second weight is ρ2;
[0083] Compare the fitness values of the searchers, update the global and local optimal solutions, and use adaptive inertia weights to update the searcher positions;
[0084] Adopt the T distribution strategy to search data through the adaptive T distribution mutation strategy until the maximum number of iterations is reached and the performance data is output; otherwise, the fitness value is recalculated;
[0085] In actual evaluation, performance data include signal strength, signal-to-noise ratio, packet loss rate, delay time, transmission rate, throughput, spectrum occupancy, and interference level; abnormal data include signal strength, packet loss rate, delay time, transmission rate, and throughput;
[0086] Performing an impact analysis on the abnormal data to obtain an interference factor, constructing a test function according to the interference factor, and building a smart home wireless performance test model according to the test function;
[0087] In the actual evaluation, the interference factors are signal strength, packet loss rate, delay time, transmission rate, and throughput;
[0088] Optimizing the smart home wireless performance test model, inputting the wireless performance data to be tested into the optimized smart home wireless performance test model, and outputting the test results;
[0089] In the actual evaluation, the wireless performance data to be tested were signal strength -50dBm, signal-to-noise ratio 40dB, transmission rate 450Mbps, packet loss rate 0.5%, delay time 15ms, throughput 150Mbps, spectrum occupancy 40MHz, medium interference level, mesh network topology, medium device compatibility and large wireless performance data standard IEEE 802.11n, and the test result was 0.703, among which the interference level and device compatibility test results were the worst.
[0090] In this embodiment, the method of performing impact analysis on the abnormal data to obtain interference factors includes:
[0091] The abnormal data is input into the impact analysis model for impact analysis, and the objective function of the impact analysis model is given, which is expressed as:
[0092]
[0093] Among them The abnormal data is Abnormal data The actual value of Abnormal data The predicted value is The loss function of the impact analysis model is The first penalty coefficient is λ, the second penalty coefficient is η, the Taylor constants are m1 and m2 respectively, and the abnormal data The model is The control parameter is K, the model complexity is υ, and the L2 norm is ‖·‖ 2 , the offset constant is σ;
[0094] Calculate the importance of outliers:
[0095]
[0096] The importance of abnormal data s is The contribution of abnormal data s is The regulatory factor is ε, The weight of abnormal data is
[0097] The factor set is obtained by cross-validation of the abnormal data, and the factors of the factor set are sorted in descending order according to their importance, and the abnormal data with importance greater than or equal to 0.427 are taken as the candidate set;
[0098] The candidate set is deduplicated, and the deduplicated candidate set data is output as interference factors.
[0099] In this embodiment, the method for constructing a test function according to the interference factor includes:
[0100]
[0101] The dth interference factor of smart home f is f d , interference factor f d The standard value is The number of interference factors is n d , the adjustment coefficient of smart home f is g f , the influence weight of the dth interference factor is ξ d , the interference intensity of the dth interference factor is Interference factor f d The actual value of the indicator is Interference factor f d The standard value of the indicator is C o , the test function of smart home f is
[0102] In this embodiment, the method for constructing a smart home wireless performance test model according to the test function includes:
[0103] The objective function of the smart home wireless performance test model is constructed based on the test function, and the expression is:
[0104]
[0105]
[0106] The objective function of the smart home f is The loss function of the smart home f is
[0107] Smart home wireless performance test models include random forest algorithm, neural network algorithm, long short-term memory network algorithm, and grid search algorithm;
[0108] The random forest algorithm divides the wireless performance data to be tested into training data and test data in a ratio of 5:2;
[0109] The neural network algorithm captures the complex relationships in the training data through multiple layers of nonlinear transformations to obtain deviation data;
[0110] The LSTM network algorithm learns the key features of the deviation data through the gate control mechanism and uses the important features to obtain the test results according to the objective function;
[0111] The grid search algorithm adjusts the hyperparameters of the LSTM network algorithm based on the test data and the error of the test results.
[0112] In this embodiment, the method for optimizing the smart home wireless performance test model includes:
[0113] Calculate the inertia weight and acceleration factor:
[0114]
[0115]
[0116]
[0117] The acceleration factors are μ1 and μ2, and the starting and final values of the acceleration factor μ1 are The starting and final values of the acceleration factor μ2 are h2, The random numbers from 0 to 1 are B1 and B2 respectively, the inertia factor is ζ, and the maximum number of iterations is t max , the inertia factor at the end of the iteration is ζ ed , the inertia factor of the initial iteration is ζ st , the genetic coefficient is β, and the current number of iterations is t;
[0118] Update the particle's velocity and position. The expression is:
[0119]
[0120]
[0121]
[0122] The particle velocity of the c-th dimension of the j-th particle in the t+1-th iteration is The particle velocity of the cth dimension of the jth particle in the tth iteration is The shrinkage factor is The particle position of the cth dimension of the jth particle in the tth iteration is W jc (t), the optimal individual position of the jth particle in the cth dimension at the tth iteration is pt jc (t), the optimal population position of the jth particle in the cth dimension at the tth iteration is gt jc (t), the particle position of the jth particle in the cth dimension at the t+1th iteration is W jc (t+1);
[0123] By adjusting the inertia weight, the optimal value of individual position and the optimal value of population position are updated, and the optimal position is chaotically optimized;
[0124] Randomly replace the position of any particle. Stop the iteration when the maximum number of iterations is reached, otherwise recalculate the inertia weight and acceleration factor.
[0125] Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 2At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0126] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0127] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0128] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a test device for the wireless performance of a smart home in a real electromagnetic environment at the logical level. The processor executes the program stored in the memory and is specifically used to execute any of the aforementioned methods for testing the wireless performance of a smart home in a real electromagnetic environment.
[0129] The above application Figure 1The embodiment shown discloses a method for testing the wireless performance of a smart home in a real electromagnetic environment, which can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0130] The electronic device may also perform Figure 1 A test method for the wireless performance of smart home in a real electromagnetic environment is implemented Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0131] An embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple application programs, any one of the aforementioned methods for testing the wireless performance of a smart home in a real electromagnetic environment is executed.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0136] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0137] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0138] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0139] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0140] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for testing the wireless performance of a smart home in a real electromagnetic environment, characterized in that: The following steps are involved: Acquire wireless performance data and electromagnetic data of smart home in different electromagnetic environments, and pre-process the wireless performance data and the electromagnetic data; The wireless performance data is selected by importance to obtain performance data, and the performance data is identified as abnormal according to the wireless performance standard to obtain abnormal data; including: Calculate the relevance of wireless performance data: The correlation between wireless performance data b and wireless performance data w is The probability of wireless performance data w appearing under the condition of wireless performance data b appearing is k(w|b), the probability of wireless performance data w appearing is k(w), the number of wireless performance data b is n, the number of wireless performance data w is m, and the zth wireless performance data w is w z , the ath wireless performance data b is b a , the standard value of wireless performance data b is b o , the standard value of wireless performance data w is w o , the natural constant is e, and the control factor is The wireless performance data with a correlation degree less than 0.341 are eliminated and stored by category according to the correlation degree to obtain the initial screening data; Calculate the importance of the initial screening data: The number of cluster data is The genetic constant is θ, and the value of the i-th type of initial screening data u is L ui , the standard value of the i-th type of initial screening data u is The performance of the i-th type of initial screening data u The contribution of The initial screening data is screened according to the importance threshold, the initial performance data is obtained, and the searcher fitness value is calculated: The fitness value of the searcher is Initial performance data is The error rate of the initial performance data is The number of categories of initial performance data in the initial screening data is The first weight is ρ1, and the second weight is ρ2; Compare the fitness values of the searchers, update the global and local optimal solutions, and use adaptive inertia weights to update the searcher positions; Adopt the T distribution strategy to search data through the adaptive T distribution mutation strategy until the maximum number of iterations is reached and the performance data is output; otherwise, the fitness value is recalculated; Performing an impact analysis on the abnormal data to obtain an interference factor, constructing a test function according to the interference factor, and building a smart home wireless performance test model according to the test function; Optimize the smart home wireless performance test model, input the wireless performance data to be tested into the optimized smart home wireless performance test model, and output the test results.
2. According to claim 1, a method for testing the wireless performance of a smart home in a real electromagnetic environment is characterized in that: The method of performing impact analysis on the abnormal data to obtain interference factors includes: The abnormal data is input into the impact analysis model for impact analysis, and the objective function of the impact analysis model is given, which is expressed as: Among them The abnormal data is Abnormal data The actual value of Abnormal data The predicted value is The loss function of the impact analysis model is The first penalty coefficient is λ, the second penalty coefficient is η, the Taylor constants are m1 and m2 respectively, and the abnormal data The model is The control parameter is K, the model complexity is υ, and the L2 norm is ‖·‖ 2 , the offset constant is σ; Calculate the importance of outliers: The importance of abnormal data s is The contribution of abnormal data s is The regulatory factor is ε, The weight of abnormal data is The factor set is obtained by cross-validation of the abnormal data, and the factors of the factor set are sorted in descending order according to their importance, and the abnormal data with importance greater than or equal to 0.427 are taken as the candidate set; The candidate set is deduplicated, and the deduplicated candidate set data is output as interference factors.
3. According to claim 1, a method for testing the wireless performance of a smart home in a real electromagnetic environment is characterized in that: The method for constructing a test function according to the interference factor comprises: The dth interference factor of smart home f is f d , interference factor f d The standard value is The number of interference factors is n d , the adjustment coefficient of smart home f is g f , the influence weight of the dth interference factor is ξ d , the interference intensity of the dth interference factor is Interference factor f d The actual value of the indicator is Interference factor f d The standard value of the indicator is C o , the test function of smart home f is 4. According to claim 1, a method for testing the wireless performance of a smart home in a real electromagnetic environment is characterized in that: The method for constructing a smart home wireless performance test model according to the test function includes: The objective function of the smart home wireless performance test model is constructed based on the test function, and the expression is: The objective function of the smart home f is The loss function of the smart home f is Smart home wireless performance test models include random forest algorithm, neural network algorithm, long short-term memory network algorithm, and grid search algorithm; The random forest algorithm divides the wireless performance data to be tested into training data and test data in a ratio of 5:2; The neural network algorithm captures the complex relationships in the training data through multiple layers of nonlinear transformations to obtain deviation data; The LSTM network algorithm learns the key features of the deviation data through the gate control mechanism and uses the important features to obtain the test results according to the objective function; The grid search algorithm adjusts the hyperparameters of the LSTM network algorithm based on the test data and the error of the test results.
5. According to claim 1, a method for testing the wireless performance of a smart home in a real electromagnetic environment is characterized in that: The method for optimizing the smart home wireless performance test model comprises: Calculate the inertia weight and acceleration factor: The acceleration factors are μ1 and μ2, and the starting and final values of the acceleration factor μ1 are The starting and final values of the acceleration factor μ2 are h2, The random numbers from 0 to 1 are B1 and B2 respectively, the inertia factor is ζ, and the maximum number of iterations is t max , the inertia factor at the end of the iteration is ζ ed , the inertia factor of the initial iteration is ζ st , the genetic coefficient is β, and the current number of iterations is t; Update the particle's velocity and position. The expression is: The particle velocity of the c-th dimension of the j-th particle in the t+1-th iteration is The particle velocity of the cth dimension of the jth particle in the tth iteration is The shrinkage factor is The particle position of the cth dimension of the jth particle in the tth iteration is W jc (t), the optimal individual position of the jth particle in the cth dimension at the tth iteration is pt jc (t), the optimal population position of the particle of the cth dimension of the jth particle in the tth iteration is gt jc (t), the particle position of the jth particle in the cth dimension at the t+1th iteration is W jc (t+1); By adjusting the inertia weight, the optimal value of individual position and the optimal value of population position are updated, and the optimal position is chaotically optimized; Randomly replace the position of any particle. Stop the iteration when the maximum number of iterations is reached, otherwise recalculate the inertia weight and acceleration factor.
6. An electronic device comprising: processor; as well as A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 5.
7. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enables the electronic device to execute the method according to any one of claims 1 to 5.
