NFC test method based on machine learning
By combining machine learning, evolutionary algorithms and electromagnetic field theory, accurate prediction and real-time monitoring of NFC signals in different environments is achieved, which solves the problem that traditional testing methods are difficult to evaluate signal performance in complex environments, and improves the scientificity and efficiency of the test .
Patent Information
- Application Number
- CN202411293979.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional NFC testing methods are difficult to comprehensively and accurately evaluate signal transmission performance in complex and changing environments, and lack cross-domain knowledge fusion, which limits the scientificity and effectiveness of the test.
Using machine learning-based testing methods, combining evolutionary algorithms in biology and electromagnetic field theory in physics, multi-dimensional data collection and pre-processing, automatically optimize test parameters, establish signal propagation models, build machine learning models, and realize signal propagation characteristics Accurate prediction and real-time monitoring.
It improves the scientificity and systematicity of NFC testing, realizes accurate prediction and real-time adjustment of signal transmission performance, enhances the efficiency and adaptability of testing, and provides solid support for the development of NFC technology.
Smart Images

Figure CN119277430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communication testing, and in particular to an NFC testing method based on machine learning. Background Art
[0002] With the rapid development of near-field communication (NFC) technology, its application in smart phones, payment terminals, access control systems and other fields is becoming more and more extensive. NFC technology has become an important part of modern communication technology with its high security, high convenience and good interoperability. However, the transmission performance of NFC signals is easily affected by environmental factors, such as material surface, distance, and electromagnetic interference, which poses severe challenges to the stability and reliability of NFC technology. Therefore, developing an efficient and accurate NFC testing method is of great significance to ensure the reliable operation of NFC technology.
[0003] Traditional NFC testing methods mainly rely on a single technical means, such as relying only on signal strength testing or relying only on electromagnetic field theory for simulation analysis. These methods are powerless when dealing with complex and changeable testing environments, and it is difficult to comprehensively and accurately evaluate the transmission performance of NFC signals. In particular, in terms of cross-domain knowledge fusion testing, traditional methods lack innovative ideas that combine electromagnetic field theory, signal processing technology, and machine learning algorithms. This leads to the inability to fully utilize the knowledge and technical advantages of other fields during the testing process, limiting the further improvement of the scientificity and effectiveness of NFC testing. Through cross-domain knowledge fusion, the introduction of knowledge and technology from other fields, and the combination with machine learning for NFC testing innovation, new testing ideas and methods can be developed, thereby improving the comprehensiveness and accuracy of the test. However, the current research in this field is still insufficient, and a more comprehensive and efficient testing method is urgently needed to meet the needs of NFC technology development.
[0004] Therefore, developing an NFC testing method based on machine learning can comprehensively evaluate the transmission performance of NFC signals in different environments, improve the scientificity and effectiveness of the test, and provide solid technical support for the widespread application of NFC technology. Summary of the invention
[0005] The purpose of the present invention is to make up for the shortcomings of the prior art and provide an NFC testing method based on machine learning. It can achieve the optimal configuration of NFC test parameters and accurate prediction of signal propagation characteristics by integrating evolutionary algorithms in biology, electromagnetic field theory in physics and machine learning technology. The method first performs multi-dimensional data collection and preprocessing to construct an initial test data set, and then uses an evolutionary algorithm to automatically optimize the test parameters to ensure the maximization of the test effect. Then, an NFC signal propagation model is established in combination with electromagnetic field theory, and the model is verified and corrected to reflect the signal characteristics in the real environment. Finally, a machine learning model is constructed and trained based on the preprocessed feature data set to achieve accurate prediction of NFC test performance.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: an NFC testing method based on machine learning, the specific steps of the testing method are:
[0007] S100, data collection and preprocessing: perform basic tests on NFC signals under different environmental conditions, collect data on signal strength, transmission speed, and error rate, and use signal processing technology to clean, denoise, and extract features from the data to build an initial test data set;
[0008] S200, Evolutionary Algorithm Optimization of Test Parameters: Based on the evolutionary algorithm in biology, a parameter optimization model is designed. With the test effect as the optimization goal, the key parameters of the NFC test are automatically adjusted. Through multiple generations of iterative evolution, the optimal and suboptimal test parameter combinations are found;
[0009] S300, electromagnetic field theory-assisted analysis: Combined with electromagnetic field theory in physics, the propagation model of NFC signals in a specific environment is established to predict the attenuation law, reflection and diffraction phenomena of NFC signals under different conditions. At the same time, the theoretical prediction results are compared with the actual test data to verify and modify and improve the model;
[0010] S400, machine learning model construction and training: Based on the preprocessed feature data set, a machine learning algorithm is used to build an NFC test performance prediction model to quickly predict the NFC test performance in a new environment;
[0011] S500, comprehensive testing and evaluation: combines the test parameters optimized by evolutionary algorithms, the prediction results of electromagnetic field theory, and the prediction capabilities of machine learning models to form a comprehensive NFC test solution. In actual tests, the test parameters are automatically adjusted according to environmental characteristics and signal changes are monitored in real time.
[0012] Further, the S100 includes:
[0013] S101, evaluates the characteristics and stability of NFC signals under test conditions of different surface materials, different distances and different electromagnetic interference sources;
[0014] S102, using NFC readers and tags to collect multi-dimensional data on signal strength, transmission speed, error rate, and other related parameters;
[0015] S103, using digital signal processing technology to clean, remove noise and perform time synchronization calibration on the collected data;
[0016] S104, extracting key features from the cleaned data, analyzing the spectrum characteristics of the signal, and extracting frequency domain features;
[0017] S105, organizing the extracted feature data in a unified format, constructing a data set and annotating it.
[0018] Furthermore, the S200 includes:
[0019] S201, define the key parameters of NFC and their value ranges, construct the parameter space, randomly generate the initial population, and design an evaluation function to evaluate the fitness of individuals;
[0020] S202, sort by fitness, retain elite individuals, and then construct the next generation population through the roulette wheel selection mechanism;
[0021] S203, randomly selecting individuals from the selected population for pairing, exchanging some genes through a crossover operation, thereby generating a new parameter combination;
[0022] S204, performing mutation operations on the individuals after crossover and some elite individuals to increase diversity by changing parameter values;
[0023] S205, evaluating the new population to determine whether it meets the iteration termination condition. If not, returning and continuing the iteration;
[0024] S206, selecting the individual with the highest fitness from the final population as the optimal parameter combination and outputting the result.
[0025] Furthermore, the S300 includes:
[0026] S301, clarify the basic equations of electromagnetic field and study the electromagnetic properties of the medium involved in NFC signal propagation;
[0027] S302, establishing a physical model of a signal transmitter and a receiver according to the characteristics of NFC technology;
[0028] S303, constructing a corresponding environmental model according to the specific environment in which the NFC signal propagates, and deriving a propagation equation of the NFC signal in the specific environment by combining electromagnetic field theory and the environmental model;
[0029] S304, setting various parameters in the model according to the actual application scenario, performing simulation calculation on the model, and predicting the propagation characteristics of the NFC signal under different conditions;
[0030] S305, simulating NFC signal propagation experiments under different environmental conditions, comparing and analyzing the experimental test data with the model prediction results, and making necessary corrections and improvements to the model based on the comparison results.
[0031] Furthermore, the construction of the signal emission source model in S302 uses a random forest algorithm, and the calculation formula is: t =I t ×V t , where I t is the emission current, V t For the transmitting voltage, select the coil antenna and calculate the antenna's inductance L and capacitance C. The inductance calculation formula is: L = μ 0 N 2 A / l, where μ 0 is the vacuum magnetic permeability, N is the number of coil turns, A is the coil area, l is the coil length, and the capacitance calculation formula is: C = εA / d, where ε is the dielectric constant, A is the electrode area, and d is the electrode spacing. Determine the resonant frequency f of the antenna r , calculation formula: Select ASK modulation, the modulation index is the ratio of the amplitude change of the modulated signal to the amplitude of the unmodulated signal.
[0032] Furthermore, the construction of the signal receiver model in S302 determines the sensitivity S of the receiver, and the calculation formula is: S = P min / P t , where P min To obtain the minimum power that the receiver can detect, design the matching network between the receiving antenna and the subsequent circuit, and use the impedance matching formula to adjust the parameters of the matching network. The calculation formula is: Among them, Z in is the input impedance, Z source It is the conjugate of the signal source impedance. According to the ASK modulation selected by the transmitter, the signal is demodulated using envelope detection. After the input signal passes through the diode, the capacitor charges the envelope of the signal to restore the original signal. The signal-to-noise ratio (SNR) of the demodulated signal is calculated to evaluate its quality. The signal-to-noise ratio (SNR) calculation formula is: SNR = P s / P n , where P s is the signal power, Pn is the noise power.
[0033] Furthermore, the construction of the S303 environmental model determines the environmental type and characteristics, air environment, relative dielectric constant close to 1, metal surface environment: when the NFC signal is close to the metal surface, an induced current will be generated, resulting in enhanced signal reflection and attenuation. According to electromagnetic theory, for the case of vertical incidence, the reflection coefficient calculation formula is: Among them, η 1 is the wave impedance of air, η 2 is the wave impedance of the metal. For metal, μ is the magnetic permeability, ε is the dielectric constant, and human tissue environment: human tissue has a certain conductivity and relative dielectric constant, and its value varies with tissue type and frequency. In a uniform medium, the propagation of NFC signals is described by the wave equation, and the formula is Where E is the electric field intensity, μ is the magnetic permeability, ε is the dielectric constant, and t is time. For complex environments, the finite element method (FEM) is used to divide the environment into small units. By solving the Maxwell equations on each unit, the field distribution in the entire environment is obtained. The propagation characteristics of NFC signals in different environments are actually measured and compared with the model prediction results to verify the accuracy of the model. According to the experimental results, the model parameters are adjusted and the model structure is optimized.
[0034] Furthermore, the S400 includes:
[0035] S401, dividing the extracted feature data set into a training set, a validation set and a test set for model construction, verification and evaluation;
[0036] S402, according to the requirements of NFC test performance prediction, select a machine learning algorithm to build an NFC test performance prediction model;
[0037] S403, training the model using the training set, adjusting it using the validation set, and judging the training result according to the convergence condition;
[0038] S404, using the test set data to evaluate the model, and optimizing the model according to the test set evaluation result;
[0039] S405, deploying the optimized model in practice, and adjusting and optimizing the model according to the actual application scenario.
[0040] Furthermore, the S402 uses random forest to construct an NFC test performance prediction model to extract features that have a significant impact on the NFC test performance from the initial test data set, and divides the preprocessed data set into a training set, a validation set, and a test set. For each sample in the training set, a portion of features is randomly selected as a candidate feature set. At each node, an optimal feature is selected for splitting according to information gain, and the sample set is divided into two subsets. The calculation formula of the Gini index is: Among them, D is the sample set, K is the number of categories, and p k is the probability that the sample belongs to the kth class. Repeat the above process until the maximum depth of the tree is reached, and build a decision tree. Repeat the construction of multiple decision trees to form a random forest.
[0041] Furthermore, the S500 includes:
[0042] S501, integrating the test parameters optimized by the evolutionary algorithm, the prediction results of the electromagnetic field theory, and the prediction ability of the machine learning model, and designing a test process including automatic adjustment of test parameters and real-time monitoring;
[0043] S502, acquiring environmental characteristic information in real time through sensors, automatically adjusting NFC test parameters according to the environmental characteristic information, and monitoring changes in NFC signals in real time during the test;
[0044] S503, conduct a comprehensive analysis of the real-time monitoring data, evaluate the NFC test performance, make optimization suggestions based on the evaluation results, and feed back to the test parameter optimization, electromagnetic field theory prediction and random forest model steps for iterative optimization.
[0045] Compared with the prior art, this NFC testing method based on machine learning has the following beneficial effects:
[0046] 1. The present invention greatly enriches the dimensions and methods of NFC testing by introducing the deep integration of electromagnetic field theory and machine learning technology. As an important branch of physics, the electromagnetic field theory, with its precise mathematical model and experimental verification method, provides a solid theoretical basis for the propagation characteristics of NFC signals in complex environments. Combined with the powerful data processing and prediction capabilities of machine learning algorithms, it can not only theoretically predict the attenuation, reflection and diffraction phenomena of NFC signals in different media, but also continuously correct and improve the model through actual test data to ensure the accuracy and reliability of the prediction results. This cross-domain knowledge integration not only breaks the limitations of traditional NFC testing methods, but also greatly improves the scientificity and systematicness of the test, providing more solid support for the development and application of NFC technology.
[0047] 2. The present invention automatically optimizes test parameters through evolutionary algorithms, thereby achieving high efficiency and accuracy in the test process. As an optimization algorithm that simulates the biological evolution process, the evolutionary algorithm can automatically find the optimal solution in a huge parameter space, thereby avoiding the subjectivity and inefficiency of manual debugging. In addition, the machine learning model is combined with the evolutionary algorithm and electromagnetic field theory to form a comprehensive NFC test solution, which can automatically adjust the test parameters according to the actual environmental characteristics, monitor signal changes in real time, and quickly predict and evaluate the test performance. This innovative testing method not only improves the test efficiency and accuracy, but also enhances the effectiveness and adaptability of the test, providing strong technical support and guarantee for the application of NFC technology in different scenarios.
[0048] Other advantages, objectives and features of the present invention will be set forth in part in the following description and, in part, will be apparent to those skilled in the art based on an examination of the following or may be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 is a flow chart of an NFC testing method based on machine learning;
[0051] Figure 2 It is a flow chart of NFC test parameters based on evolutionary algorithm;
[0052] Figure 3 Flowchart for NFC electromagnetic field theory-assisted analysis. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Embodiment 1:
[0055] A NFC testing method based on machine learning, the method comprising the following steps: data collection and preprocessing, optimization of test parameters by evolutionary algorithm, auxiliary analysis by electromagnetic field theory, construction and training of machine learning model, and comprehensive testing and evaluation.
[0056] First, enter the data collection and preprocessing stage (S100), set environmental test conditions, different material surfaces: including metal, plastic, glass, wood, different distances: adjust the distance between the NFC reader and the tag, different electromagnetic interference sources: such as mobile phones, microwave ovens, computers, evaluate the characteristics and stability of NFC signals under different conditions, use NFC readers to collect signal strength, transmission speed, error rate and other parameters that may affect NFC communication, use digital signal processing technology, including filtering and denoising, to improve data quality, perform time synchronization calibration to ensure the time consistency of different data sources, extract key features from the cleaned data, such as the time domain and frequency domain characteristics of the signal, analyze the spectral distribution of the signal, extract frequency domain features, organize the extracted feature data in a unified format, build a data set, and annotate it for subsequent model training and verification.
[0057] Next, the test parameter optimization stage (S200) of the evolutionary algorithm is entered, the parameter space and the initial population are constructed, the key parameters in the NFC test and their value ranges are clarified, the parameter space containing all the key parameters is constructed, the initial population is randomly generated, each individual represents a combination of a set of test parameters, an evaluation function is designed to evaluate the fitness of each individual, all individuals are sorted according to fitness, the individuals with the highest fitness are retained as elite individuals, a roulette wheel selection mechanism is adopted, some individuals are randomly selected from the remaining individuals to construct the next generation population, individuals are randomly selected from the selected population for pairing, some genes are exchanged through crossover operation, new parameter combinations are generated to increase the diversity of the population, mutation operations are performed on the individuals after crossover and some elite individuals, the values of some parameters are randomly changed, the fitness of the new population is calculated, and it is evaluated whether the maximum number of iterations is reached. If the termination condition is not met, the above process is returned to continue the iterative process, the individual with the highest fitness is selected from the final population as the optimal parameter combination, and the optimal parameter combination is output for subsequent NFC tests.
[0058] Subsequently, the electromagnetic field theory auxiliary analysis stage (S300) is entered to clarify the basic equations of the electromagnetic field, such as Maxwell's equations, and study the electromagnetic properties of the medium involved in the NFC signal propagation process, including dielectric constant and magnetic permeability. According to the characteristics of NFC technology, it is necessary to establish a physical model of the signal transmitter and receiver, including determining the transmission power and modulation mode of the transmitter and the sensitivity of the receiver. According to the specific environment of NFC signal propagation, such as air, metal surface, and human tissue, a corresponding environmental model is constructed. Combining electromagnetic field theory and environmental model, the propagation equation of NFC signal in a specific environment is derived. According to the actual application scenario, various parameters in the model are set, and the model is simulated and calculated. Through simulation calculation, the propagation characteristics of NFC signals under different conditions, such as attenuation law, reflection and diffraction phenomena, are predicted. The NFC signal propagation experiment under different environmental conditions is simulated, and the experimental test data is compared and analyzed with the model prediction results. According to the comparison results, the model is corrected and improved as necessary.
[0059] Then, enter the machine learning model construction and training stage (S400), divide the extracted feature data set into a training set, a validation set and a test set, the training set is used to build the model, the validation set is used to adjust the model parameters, and the test set is used to evaluate the performance of the model. According to the needs of NFC test performance prediction, the random forest algorithm is selected to build the NFC test performance prediction model because it can process high-dimensional data and has good generalization ability. The model is trained using the training set, the model parameters are adjusted through the validation set, and the training results are judged according to the convergence conditions. The trained model is evaluated using the test set data, and the model is optimized according to the evaluation results, such as adjusting the hyperparameters of the random forest such as the number of trees and the maximum depth to optimize the model performance. At the same time, other machine learning algorithms are used for comparative experiments to select the optimal model, and the optimized model is deployed in practice. The model is adjusted and optimized according to the actual application scenario. During the test process, the changes in the NFC signal are monitored in real time, and the model is iteratively optimized according to the actual situation.
[0060] Finally, enter the comprehensive testing and evaluation stage (S500), integrate the optimization results, use the genetic algorithm after multiple iterations to obtain the optimal test parameter combination, including NFC signal transmission power, antenna resonant frequency, ASK modulation index, take into account the results of electromagnetic field theory prediction, and use the electromagnetic field model to predict the NFC signal propagation characteristics on different material surfaces, at different distances and in electromagnetic interference source environments, and obtain the signal attenuation law, reflection and diffraction phenomenon prediction data. Combined with the prediction ability of random forest, the NFC test performance in the new environment is quickly predicted. During the test, the characteristic information of the current environment is obtained in real time through the sensor, and the real-time acquisition is used to predict the NFC test performance in the new environment. The NFC test parameters are automatically adjusted based on the environmental characteristic information. During the test, the changes in the NFC signal are monitored in real time, and the real-time monitoring data are comprehensively analyzed to evaluate the overall performance of the NFC test. By analyzing the indicators of signal strength fluctuation and error rate change, it is determined whether there are any abnormal conditions in the test process. According to the data analysis results, optimization suggestions are put forward for the test parameters, electromagnetic field theoretical model and machine learning model, and the optimization suggestions are fed back into the steps of test parameter optimization, electromagnetic field theoretical prediction and machine learning model construction for iterative optimization. Through the continuous cycle of the "test-evaluation-optimization" process, the accuracy and efficiency of the NFC test method are continuously improved.
[0061] Through the implementation of the steps of the above embodiment, it is possible to automatically adjust the test parameters under different environmental conditions, monitor signal changes in real time, and comprehensively evaluate and optimize the test performance. Through continuous iteration and optimization in practical applications, this test method can continuously improve the accuracy and reliability of NFC testing.
[0062] Embodiment 2:
[0063] In this embodiment, a NFC testing method based on machine learning particularly emphasizes the use of evolutionary algorithm ideas in biology to optimize NFC testing parameters and utilize electromagnetic field theory in physics to analyze the propagation characteristics of NFC signals in different environments, thereby providing more in-depth theoretical support for testing, and developing new testing ideas and methods through cross-domain knowledge integration to improve the scientificity and effectiveness of NFC testing.
[0064] Environmental test conditions are set for different material surfaces, different distances and different electromagnetic interference sources. NFC readers are used to collect multi-dimensional data on signal strength, transmission speed, error rate and other related parameters. Digital signal processing technology is used to clean the collected data, remove outliers and noise, and perform time synchronization calibration. Key features are extracted from the cleaned data, and the spectral characteristics of the signal are analyzed to extract frequency domain features. The extracted feature data are organized in a unified format, and a data set is constructed and annotated to verify its integrity and consistency.
[0065] Clarify the key NFC parameters and value ranges to construct the parameter space, randomly generate the initial population, design an evaluation function to evaluate the individual fitness, design the fitness function according to the test results, sort by fitness, retain the elite individuals, and then use the roulette selection mechanism to construct part of the next generation population. Randomly select individuals from the selected population for random pairing, perform crossover operations to exchange some genes to generate new parameter combinations, perform mutation operations on the crossover individuals and some elite individuals, change the parameter values with a certain probability to increase diversity, evaluate the new population to check whether it meets the iteration termination conditions, if not, return to continue iteration, if satisfied, select the individual with the highest fitness from the final population as the optimal parameter combination and output the results.
[0066] Clarify the basic equations of the electromagnetic field, such as Maxwell's equations, and study the electromagnetic properties of the media involved in NFC signal propagation, such as dielectric constant, magnetic permeability, and electrical conductivity.
[0067] The signal transmitter model is constructed to determine the transmission power range of the signal transmitter according to the NFC technical standards and actual application requirements. The calculation formula is: P t =I t ×V t , where I t is the emission current, V t For the transmitting voltage, select the coil antenna and calculate the inductance and capacitance of the antenna. The inductance calculation formula is: L = μ 0 N 2 A / l, where μ 0 is the vacuum magnetic permeability, N is the number of coil turns, A is the coil area, l is the coil length, the capacitance calculation formula is: C = εA / d, where ε is the dielectric constant, A is the electrode area, d is the electrode spacing, and the resonant frequency of the antenna is determined by the calculation formula: Select ASK modulation, the modulation index is the ratio of the amplitude change of the modulated signal to the amplitude of the unmodulated signal.
[0068] The signal receiver model is constructed to determine the sensitivity of the receiver, and the calculation formula is: S = P min / P t , where S is the sensitivity, P min To obtain the minimum power that the receiver can detect, design the matching network between the receiving antenna and the subsequent circuit, and use the impedance matching formula to adjust the parameters of the matching network. The calculation formula is: Among them, Z in is the input impedance, Z sourceIt is the conjugate of the signal source impedance. According to the ASK modulation selected by the transmitter, envelope detection is used for signal demodulation. After the input signal passes through the diode, the capacitor charges the envelope of the signal to restore the original signal. The signal-to-noise ratio (SNR) of the demodulated signal is calculated to evaluate its quality. The signal-to-noise ratio (SNR) calculation formula is: SNR = P s / P n , where P s is the signal power, P n is the noise power.
[0069] The construction of the environmental model determines the type and characteristics of the environment. The relative dielectric constant of the air environment is close to 1, and the magnetic permeability is close to the magnetic permeability of the vacuum. In the metal surface environment, when the NFC signal is close to the metal surface, an induced current will be generated, resulting in enhanced signal reflection and attenuation. According to electromagnetic theory, for the case of vertical incidence, the reflection coefficient calculation formula is: Among them, η 1 is the wave impedance of air, η 2 is the wave impedance of the metal. For metal, μ is the magnetic permeability and ε is the dielectric constant. The human tissue environment has a certain conductivity and relative dielectric constant, and its value varies with tissue type and frequency. The construction of the environmental model also needs to consider the air-metal boundary and the air-human tissue boundary. In a uniform medium, the propagation of NFC signals is described by the wave equation, and the formula is: Where E is the electric field intensity, μ is the magnetic permeability, ε is the dielectric constant, and t is time. For complex environments, the finite element method (FEM) is used to divide the environment into small units. The field distribution in the entire environment is obtained by solving the Maxwell equations on each unit. The propagation characteristics of NFC signals in different environments are actually measured and compared with the model prediction results to verify the accuracy of the model. According to the experimental results, the model parameters are adjusted and the model structure is optimized. The propagation equation of NFC signals in a specific environment is derived by combining electromagnetic field theory and environmental models. According to the actual application scenarios, the parameters in the model are set, the model is simulated and calculated, the propagation characteristics of NFC signals under different conditions are predicted, the NFC signal propagation experiments under different environmental conditions are simulated, the experimental test data are compared and analyzed with the model prediction results, and the model is corrected and improved as necessary according to the comparison results.
[0070] The NFC test performance prediction model was constructed using random forests. The features that have a significant impact on the NFC test performance were extracted from the initial test data set. The preprocessed data set was divided into a training set, a validation set, and a test set. For each sample in the training set, a portion of features was randomly selected as a candidate feature set. At each node, an optimal feature was selected for splitting based on information gain, and the sample set was divided into two subsets. The calculation formula for the Gini index is: Among them, D is the sample set, K is the number of categories, and p k is the probability that the sample belongs to the kth class. Repeat the above process until the maximum depth of the tree is reached, build a decision tree, and repeatedly build multiple decision trees to form a random forest. Use the training set to train the random forest, so that each decision tree learns the patterns and rules in the data. By adjusting the hyperparameters of the random forest, the model performance is optimized, and the trained random forest model is evaluated using the test set.
[0071] The test parameters optimized by the evolutionary algorithm, the prediction results of electromagnetic field theory, and the predictive ability of the machine learning model are integrated, and a test process that includes automatic adjustment of test parameters and real-time monitoring is designed. The environmental characteristic information is obtained in real time through sensors, and the NFC test parameters are automatically adjusted according to the environmental characteristic information. During the test, the changes of NFC signals are monitored in real time. The real-time monitored data is comprehensively analyzed to evaluate the NFC test performance. Optimization suggestions are made based on the evaluation results, and the suggestions are fed back to the test parameter optimization, electromagnetic field theory prediction, and random forest model steps for iterative optimization.
[0072] Through the above embodiments, we can use the NFC testing method based on machine learning to comprehensively and accurately evaluate the performance of NFC devices in different environments, and provide strong support for the development and application of NFC technology.
[0073] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A NFC testing method based on machine learning, characterized in that: The specific steps of this test method are: S100, data collection and preprocessing: perform basic tests on NFC signals under different environmental conditions, collect data on signal strength, transmission speed, and error rate, and use signal processing technology to clean, denoise, and extract features from the data to build an initial test data set; S200, Evolutionary Algorithm Optimization of Test Parameters: Based on the evolutionary algorithm in biology, a parameter optimization model is designed. With the test effect as the optimization goal, the key parameters of the NFC test are automatically adjusted. Through multiple generations of iterative evolution, the optimal and suboptimal test parameter combinations are found; S300, electromagnetic field theory-assisted analysis: Combined with electromagnetic field theory in physics, the propagation model of NFC signals in a specific environment is established to predict the attenuation law, reflection and diffraction phenomena of NFC signals under different conditions. At the same time, the theoretical prediction results are compared with the actual test data to verify and modify and improve the model; S400, machine learning model construction and training: Based on the preprocessed feature data set, a machine learning algorithm is used to build an NFC test performance prediction model to quickly predict the NFC test performance in a new environment; S500, comprehensive testing and evaluation: combines the test parameters optimized by evolutionary algorithms, the prediction results of electromagnetic field theory, and the prediction capabilities of machine learning models to form a comprehensive NFC test solution. In actual tests, the test parameters are automatically adjusted according to environmental characteristics and signal changes are monitored in real time.
2. The NFC testing method based on machine learning according to claim 1, characterized in that: The S100 includes: S101, evaluates the characteristics and stability of NFC signals under test conditions of different surface materials, different distances and different electromagnetic interference sources; S102, using NFC readers and tags to collect multi-dimensional data on signal strength, transmission speed, error rate, and other related parameters; S103, using digital signal processing technology to clean, remove noise and perform time synchronization calibration on the collected data; S104, extracting key features from the cleaned data, analyzing the spectrum characteristics of the signal, and extracting frequency domain features; S105, organizing the extracted feature data in a unified format, constructing a data set and annotating it.
3. The NFC testing method based on machine learning according to claim 1, characterized in that: The S200 includes: S201, define the key parameters of NFC and their value ranges, construct the parameter space, randomly generate the initial population, and design an evaluation function to evaluate the fitness of individuals; S202, sort by fitness, retain elite individuals, and then construct the next generation population through the roulette wheel selection mechanism; S203, randomly selecting individuals from the selected population for pairing, exchanging some genes through a crossover operation, thereby generating a new parameter combination; S204, performing mutation operations on the individuals after crossover and some elite individuals to increase diversity by changing parameter values; S205, evaluating the new population to determine whether it meets the iteration termination condition. If not, returning and continuing the iteration; S206, selecting the individual with the highest fitness from the final population as the optimal parameter combination and outputting the result.
4. The NFC testing method based on machine learning according to claim 1, characterized in that: The S300 includes: S301, clarify the basic equations of electromagnetic field and study the electromagnetic properties of the medium involved in NFC signal propagation; S302, establishing a physical model of a signal transmitter and a receiver according to the characteristics of NFC technology; S303, constructing a corresponding environmental model according to the specific environment in which the NFC signal propagates, and deriving a propagation equation of the NFC signal in the specific environment by combining electromagnetic field theory and the environmental model; S304, setting various parameters in the model according to the actual application scenario, performing simulation calculation on the model, and predicting the propagation characteristics of the NFC signal under different conditions; S305, simulating NFC signal propagation experiments under different environmental conditions, comparing and analyzing the experimental test data with the model prediction results, and making necessary corrections and improvements to the model based on the comparison results.
5. The NFC testing method based on machine learning according to claim 4, characterized in that: The construction of the S302 signal emission source model, random forest algorithm, the calculation formula is: P t =I t ×V t , where I t is the emission current, V t For the transmitting voltage, select the coil antenna and calculate the inductance L and capacitance C of the antenna. The inductance calculation formula is: L = μ0N 2 A / l, where μ0 is the vacuum magnetic permeability, N is the number of coil turns, A is the coil area, l is the coil length, capacitance calculation formula: C = εA / d, where ε is the dielectric constant, A is the electrode area, d is the electrode spacing, determine the antenna resonant frequency f r , calculation formula: Select ASK modulation, the modulation index is the ratio of the amplitude change of the modulated signal to the amplitude of the unmodulated signal.
6. The NFC testing method based on machine learning according to claim 4, characterized in that: The construction of the signal receiver model in S302 determines the sensitivity S of the receiver, and the calculation formula is: S = P min / P t , where P min To obtain the minimum power that the receiver can detect, design the matching network between the receiving antenna and the subsequent circuit, and use the impedance matching formula to adjust the parameters of the matching network. The calculation formula is: Among them, Z in is the input impedance, Z source It is the conjugate of the signal source impedance. According to the ASK modulation selected by the transmitter, the signal is demodulated using envelope detection. After the input signal passes through the diode, the capacitor charges the envelope of the signal to restore the original signal. The signal-to-noise ratio (SNR) of the demodulated signal is calculated to evaluate its quality. The signal-to-noise ratio (SNR) calculation formula is: SNR = P s / P n , where P s is the signal power, P n is the noise power.
7. The NFC testing method based on machine learning according to claim 4, characterized in that: The construction of the S303 environmental model determines the environmental type and characteristics, air environment, relative dielectric constant close to 1, metal surface environment: when the NFC signal is close to the metal surface, an induced current will be generated, resulting in enhanced signal reflection and attenuation. According to electromagnetic theory, for the case of vertical incidence, the reflection coefficient calculation formula is: Where η1 is the wave impedance of air, η2 is the wave impedance of metal, for metal, where μ is the magnetic permeability, ε is the dielectric constant, human tissue environment: human tissue has a certain conductivity and relative dielectric constant, and its value varies with tissue type and frequency. In a uniform medium, the propagation of NFC signals is described by the wave equation, and the formula is Where E is the electric field intensity, μ is the magnetic permeability, ε is the dielectric constant, and t is time. For complex environments, the finite element method (FEM) is used to divide the environment into small units. By solving the Maxwell equations on each unit, the field distribution in the entire environment is obtained. The propagation characteristics of NFC signals in different environments are actually measured and compared with the model prediction results to verify the accuracy of the model. According to the experimental results, the model parameters are adjusted and the model structure is optimized.
8. The NFC testing method based on machine learning according to claim 1, characterized in that: The S400 includes: S401, dividing the extracted feature data set into a training set, a validation set and a test set for model construction, verification and evaluation; S402, according to the requirements of NFC test performance prediction, select a machine learning algorithm to build an NFC test performance prediction model; S403, training the model using the training set, adjusting it using the validation set, and judging the training result according to the convergence condition; S404, using the test set data to evaluate the model, and optimizing the model according to the test set evaluation result; S405, deploying the optimized model in practice, and adjusting and optimizing the model according to the actual application scenario.
9. The NFC testing method based on machine learning according to claim 8, characterized in that: The S402 uses random forest to construct an NFC test performance prediction model to extract features that have a significant impact on the NFC test performance from the initial test data set, and divides the preprocessed data set into a training set, a validation set, and a test set. For each sample in the training set, a portion of features is randomly selected as a candidate feature set. At each node, an optimal feature is selected for splitting according to information gain, and the sample set is divided into two subsets. The calculation formula of the Gini index is: Among them, D is the sample set, K is the number of categories, and p k is the probability that the sample belongs to the kth class. Repeat the above process until the maximum depth of the tree is reached, and build a decision tree. Repeat the construction of multiple decision trees to form a random forest.
10. The NFC testing method based on machine learning according to claim 1, characterized in that: The S500 includes: S501, integrating the test parameters optimized by the evolutionary algorithm, the prediction results of the electromagnetic field theory, and the prediction ability of the machine learning model, and designing a test process including automatic adjustment of test parameters and real-time monitoring; S502, acquiring environmental characteristic information in real time through sensors, automatically adjusting NFC test parameters according to the environmental characteristic information, and monitoring changes in NFC signals in real time during the test; S503, conduct a comprehensive analysis of the real-time monitoring data, evaluate the NFC test performance, make optimization suggestions based on the evaluation results, and feed back to the test parameter optimization, electromagnetic field theory prediction and random forest model steps for iterative optimization.
Citation Information
Cited By
Communication method for remotely controlling distribution box
CN120526569A