Fuzzy semantic coding method, device, equipment and medium based on electroencephalogram signal

Through the full monitoring and multi-dimensional evaluation of EEG data, and the optimization strategy is determined in combination with the comprehensive evaluation value, the problems of unstable encoding quality, poor adaptability and insufficient robustness of EEG signal fuzzy semantic coding methods in the existing technology are solved. Achieve more efficient and flexible coding optimization.

CN118964964BActive Publication Date: 2024-12-27XIAOZHOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411449312.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2024-12-27
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The existing fuzzy semantic coding methods for EEG signals have problems such as uneven coding quality, poor adaptability, insufficient robustness and single optimization strategies, which are difficult to meet the application needs of real scenarios.

Method used

By performing preliminary fuzzy semantic encoding of EEG data, the original coded signal is generated, and the primary quality evaluation model, secondary adaptability evaluation model and robustness evaluation model are used for full monitoring and optimization to generate adaptive feature vectors and robustness Parameters, combined with comprehensive evaluation values ​​to determine optimization strategies, realize real-time monitoring and optimization of coding quality.

Benefits of technology

It improves the reliability and stability of encoding, enhances applicability and anti-interference capabilities in complex environments, provides flexible optimization strategies to cope with different performance needs, and improves the quality and robustness of encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964964B_ABST
    Figure CN118964964B_ABST
Patent Text Reader

Abstract

The present application discloses a fuzzy semantic coding method, device, equipment and medium based on electroencephalogram (EEG) signals, which obtain an original coding signal and a corresponding coding quality and input them into a preset primary quality evaluation model, output a primary quality evaluation value and compare it with a preset threshold value, and generate label information corresponding to the original coding signal; determine the original coding signal with label information as a potential compliance as a target coding signal, perform environmental adaptability analysis on the target coding signal, obtain the environmental impact score corresponding to the target coding signal and the corresponding coding quality fusion, generate an adaptability feature vector and input it into a preset secondary adaptability evaluation model, and output a secondary adaptability evaluation value; obtain a robustness evaluation value corresponding to each original coding signal; obtain a comprehensive evaluation value corresponding to each original coding signal according to the primary quality evaluation value, secondary adaptability evaluation value and robustness evaluation value of the original coding signal to determine an optimization strategy for each original coding signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of brain-computer interface technology, and in particular to a fuzzy semantic coding method, device, equipment and medium based on electroencephalogram signals. Background Art

[0002] Brain-Computer Interface (BCI) technology aims to directly convert the physiological signals of the human brain into machine-recognizable commands or instructions, realizing invisible communication and interaction between humans and computers. Due to the complexity and non-stationarity of EEG signals themselves, they contain a lot of noise, artifacts and irrelevant information, which brings great challenges to subsequent signal decoding and command recognition. At present, the method of encoding the rich semantic levels in the human brain through fuzzy semantic coding, so that machines can understand more abstract and advanced consciousness information, has been applied. The key to fuzzy semantic coding is to construct a mapping model between cognitive semantics and EEG features. Through machine learning and domain knowledge, EEG data is mapped to multiple pre-defined fuzzy semantic categories. Each semantic category corresponds to a fuzzy membership vector, which describes the distribution pattern of the semantics in the multidimensional feature space.

[0003] However, the existing fuzzy semantic coding methods still have many shortcomings, mainly reflected in: 1. The coding quality is uneven, greatly affected by noise and environmental factors, and lacks real-time monitoring and evaluation measures for coding quality. 2. The coding adaptability is poor, and it is impossible to effectively evaluate and improve the adaptability of coding in actual complex environments, and it is difficult to meet the application needs of real scenarios. 3. The robustness of coding needs to be strengthened, and it is impossible to quantify and optimize the continuity and robustness of the coded signal in the two dimensions of time and frequency. 4. The coding optimization strategy is relatively single, and it is difficult to take targeted optimization measures according to the grading of system performance, which reduces the flexibility and intelligence level of coding. Therefore, there is an urgent need for a fuzzy semantic coding method based on EEG signals to improve coding quality and robustness. Summary of the invention

[0004] The embodiments of the present application provide a fuzzy semantic coding method, device, equipment and medium based on EEG signals, which can solve the problem that the existing EEG feature extraction methods lack differential modeling of EEG signals in stable state and excited state, and fail to achieve targeted optimization of feature extraction strategies.

[0005] In a first aspect, an embodiment of the present application provides a fuzzy semantic coding method based on EEG signals, comprising:

[0006] Performing preliminary fuzzy semantic coding on the EEG data to be coded, generating an original coding signal, and obtaining the coding quality corresponding to the original coding signal;

[0007] Inputting the coding quality into a preset primary quality evaluation model, outputting a primary quality evaluation value, comparing the primary quality evaluation value with a preset threshold, and generating label information corresponding to the original coding signal; wherein the label information includes any one of potential compliance or non-compliance;

[0008] Determine the original coding signal with label information as a potential match as the target coding signal, perform environmental adaptability analysis on the target coding signal, and obtain the environmental impact score corresponding to the target coding signal;

[0009] The environmental impact score is integrated with the corresponding coding quality to generate an adaptability feature vector, the adaptability feature vector is input into a preset secondary adaptability evaluation model, and a secondary adaptability evaluation value is output;

[0010] Obtaining a robustness parameter corresponding to each original coded signal, inputting the robustness parameter into a preset robustness evaluation model, and obtaining a robustness evaluation value corresponding to each original coded signal;

[0011] According to the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each original coded signal, the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each original coded signal are input into a preset comprehensive evaluation model, and the comprehensive evaluation value corresponding to each original coded signal is output;

[0012] An optimization strategy for each original coded signal is determined according to the comprehensive evaluation value, so as to complete the fuzzy semantic coding of each original coded signal according to the optimization strategy.

[0013] In a second aspect, the present application also provides a fuzzy semantic coding device, comprising:

[0014] A preliminary coding unit, used for performing preliminary fuzzy semantic coding on the EEG data to be coded, generating an original coding signal, and obtaining the coding quality corresponding to the original coding signal;

[0015] A threshold comparison unit, used to input the coding quality into a preset primary quality evaluation model, output a primary quality evaluation value, compare the primary quality evaluation value with a preset threshold, and generate label information corresponding to the original coded signal; wherein the label information includes any one of potential compliance or non-compliance;

[0016] An environmental analysis unit, used to determine the original coded signal with tag information as a potential match as a target coded signal, perform environmental adaptability analysis on the target coded signal, and obtain an environmental impact score corresponding to the target coded signal;

[0017] A secondary evaluation unit is used to fuse the environmental impact score with the corresponding coding quality to generate an adaptability feature vector, input the adaptability feature vector into a preset secondary adaptability evaluation model, and output a secondary adaptability evaluation value;

[0018] An evaluation acquisition unit, used to acquire a robustness parameter corresponding to each original coded signal, input the robustness parameter into a preset robustness evaluation model, and acquire a robustness evaluation value corresponding to each original coded signal;

[0019] A primary evaluation unit, configured to input the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each original coded signal into a preset comprehensive evaluation model, and output a comprehensive evaluation value corresponding to each original coded signal;

[0020] The coding completion unit is used to determine the optimization strategy for each original coded signal according to the comprehensive evaluation value, so as to complete the fuzzy semantic coding of each original coded signal according to the optimization strategy.

[0021] In a third aspect, the present application further provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the fuzzy semantic coding method based on EEG signals as described in the first aspect is implemented.

[0022] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the fuzzy semantic coding method based on EEG signals as described in the first aspect.

[0023] Compared with the prior art, this application has at least the following beneficial effects:

[0024] 1. Monitor the encoding quality throughout the process to improve the reliability and stability of encoding. By calculating evaluation indicators such as encoding deviation, anomaly index, and mean deviation, a primary quality evaluation model is constructed to monitor the current encoding quality in real time. This provides a quantitative basis and real-time feedback for subsequent quality control and optimization adjustments, ensuring the stability and reliability of the encoding output.

[0025] 2. Introduce environmental adaptability evaluation to improve the applicability of coding in complex environments. By analyzing the impact of environmental factors such as noise, vibration, temperature, and electromagnetic interference on coding and integrating them with the quality evaluation results, an environmental adaptability feature vector is generated to lay the foundation for environmental adaptability evaluation modeling. The environmental adaptability of coding will directly affect its usability in practical applications, so this evaluation is particularly important.

[0026] 3. Evaluate the time-frequency robustness and improve the anti-interference ability of the coded signal. By quantitatively analyzing the continuity, confidence, abnormal interruption of the coded signal in the time domain, as well as the energy concentration, anti-noise ability, spectrum stability, etc. in the frequency domain, a robustness evaluation model is constructed to comprehensively evaluate the robustness of the coded signal in both time and frequency dimensions. This evaluation ensures the continuity and spectrum quality of the coded output.

[0027] 4. Based on the evaluation results, the coding strategy is optimized in a hierarchical manner to flexibly respond to different performance requirements. The final comprehensive evaluation score is generated by comprehensively evaluating the quality, adaptability and robustness of the coding. According to the different levels of the score, the corresponding level of coding optimization strategy is adopted, covering various means such as feature reselection, semantic reconstruction, and model retraining. This hierarchical optimization strategy provides intelligent support for efficient tuning of coding.

[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of a flow chart of a fuzzy semantic coding method based on EEG signals according to an embodiment of the present application;

[0030] Figure 2 A schematic diagram of the structure of a fuzzy semantic coding device shown in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] The technical solution of the embodiment of the present application is introduced below.

[0039] Compared with the traditional simple command recognition method, fuzzy semantic coding technology can integrate more levels of consciousness information, achieve richer brain decoding that is closer to human semantic understanding, and lay the foundation for improving the intelligent level of human-computer interaction and control. However, the existing fuzzy semantic coding method still has many shortcomings, mainly reflected in:

[0040] 1. The coding quality varies greatly and is greatly affected by noise and environmental factors. There is a lack of real-time monitoring and evaluation measures for coding quality.

[0041] 2. The coding adaptability is poor, and it is impossible to effectively evaluate and improve the coding's adaptability in actual complex environments, making it difficult to meet the application needs of real scenarios.

[0042] 3. The robustness of coding needs to be strengthened, and it is impossible to quantify and optimize the continuity and robustness of the coded signal in both time and frequency dimensions.

[0043] 4. The coding optimization strategy is relatively simple, and it is difficult to take targeted optimization measures according to the classification of system performance, which reduces the flexibility and intelligence level of coding.

[0044] Please refer to Figure 1 , Figure 1 A flowchart of a fuzzy semantic coding method based on EEG signals provided in an embodiment of the present application. The fuzzy semantic coding method based on EEG signals in an embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the fuzzy semantic coding method based on EEG signals of this embodiment includes steps S101 to S107, which are described in detail as follows:

[0045] Step S101, performing preliminary fuzzy semantic coding on the EEG data to be coded, generating an original coded signal, and obtaining the coding quality corresponding to the original coded signal.

[0046] Specifically, the EEG data to be encoded is preliminarily processed and fuzzy semantically analyzed, and a specific algorithm is used to generate the original encoded signal. The quality of the generated original encoded signal is evaluated, and the encoding quality index is obtained using the quality measurement standard. By providing a preliminary encoding result, basic data is provided for subsequent analysis and optimization. Ensure that the initially generated signal has a certain degree of usability and measurability.

[0047] Step S102, input the coding quality into a preset primary quality evaluation model, output a primary quality evaluation value, compare the primary quality evaluation value with a preset threshold, and generate label information corresponding to the original coded signal; wherein the label information includes any item of potential compliance or non-compliance.

[0048] Specifically, the coding quality is used as input and imported into the preset primary quality evaluation model for evaluation. The primary quality evaluation value is output and compared with the preset threshold. The label corresponding to the original coded signal is generated according to the comparison result, and the label includes "potential compliance" or "potential non-compliance". The original coded signal with higher quality is quickly identified and screened for subsequent processing. Through the label information, the signal that needs further processing can be effectively distinguished.

[0049] Step S103: determine the original coded signal with label information as potentially compliant as the target coded signal, perform environmental adaptability analysis on the target coded signal, and obtain the environmental impact score corresponding to the target coded signal.

[0050] Specifically, the original coded signals labeled as "potentially compliant" are analyzed in depth, especially their performance in different environments. The environmental impact score of each signal under specific environmental conditions is obtained. This ensures that the target coded signal can perform well in a variety of environments, improving the practicality and adaptability of the model.

[0051] Step S104, the environmental impact score is integrated with the corresponding coding quality to generate an adaptability feature vector, the adaptability feature vector is input into a preset secondary adaptability evaluation model, and a secondary adaptability evaluation value is output.

[0052] Specifically, the environmental impact score is integrated with the corresponding coding quality to generate an adaptability feature vector. The adaptability feature vector is input into a preset secondary adaptability evaluation model to output a secondary adaptability evaluation value. Taking environmental factors into consideration, a more adaptable coding signal is generated to improve the stability and reliability of the coding result in practical applications.

[0053] Step S105 , obtaining robustness parameters corresponding to each original coded signal, inputting the robustness parameters into a preset robustness evaluation model, and obtaining a robustness evaluation value corresponding to each original coded signal.

[0054] Get the robustness parameters of each original coded signal, including the performance of the signal under different noise levels. Input the robustness parameters into the preset robustness evaluation model to calculate the robustness evaluation value of each signal. Ensure that the generated coded signal has high robustness and can work stably under noise interference conditions. Improve the anti-interference ability of the coding method in complex environments.

[0055] Step S106, inputting the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each original coded signal into a preset comprehensive evaluation model, and outputting a comprehensive evaluation value corresponding to each original coded signal.

[0056] The primary quality evaluation value, secondary adaptability evaluation value and robustness evaluation value are input into the comprehensive evaluation model. The comprehensive evaluation value of each original coded signal is output according to the comprehensive evaluation model. Through multi-dimensional comprehensive evaluation, a full range of signal quality evaluation is provided to improve the accuracy of signal selection. Supporting multi-factor evaluation helps to select the best coded signal more scientifically.

[0057] Step S107, determining an optimization strategy for each original coded signal according to the comprehensive evaluation value, so as to complete fuzzy semantic coding for each original coded signal according to the optimization strategy.

[0058] According to the comprehensive evaluation value of each original coded signal, the corresponding optimization strategy is determined. According to the optimization strategy, the fuzzy semantic coding of each original coded signal is re-optimized to ensure the best quality of the final output coded signal. The performance and quality of the final coded signal are improved to ensure the effectiveness and practicality of the coding method. Through the application of optimization strategies, the coding process is continuously improved to make it more efficient and accurate. Each of the above steps is closely combined to form a comprehensive and systematic fuzzy semantic coding method for EEG signals, which effectively improves the coding efficiency and quality.

[0059] In some embodiments, preliminary fuzzy semantic encoding is performed on the EEG data to be encoded to generate an original encoded signal, including: preprocessing the EEG data; the preprocessing includes one or more of baseline correction, bandpass filtering, independent component analysis, re-referencing and standardization; feature extraction is performed on the preprocessed EEG signal to obtain feature information related to cognitive activities and intentions, and a feature space is constructed according to the feature information; the feature space is input into a pre-trained fuzzy semantic encoder model to map the feature space to the semantic space, and a fuzzy semantic vector is output, and the fuzzy semantic vector constitutes the original encoded signal.

[0060] By preprocessing the EEG data: including one or more of baseline correction, bandpass filtering, independent component analysis, re-referencing and standardization. Extract feature information from the preprocessed EEG signal, which is related to cognitive activities and intentions. Construct a feature space based on the feature information. Input the feature space into the pre-trained fuzzy semantic encoder model, map it to the semantic space, and output fuzzy semantic vectors, which constitute the original coded signal. Efficiently remove interference and noise in the EEG data and improve the accuracy of subsequent coding. Using feature information and pre-trained models, fuzzy semantic coding that reflects brain activity can be generated quickly and efficiently, providing a stable coding basis.

[0061] In some embodiments, the coding quality includes multiple coding quality parameters, and the coding quality parameters include at least coding deviation, anomaly index and mean deviation; obtaining the coding quality corresponding to the original coding signal includes: obtaining an expected coding signal corresponding to the original coding signal, and calculating the coding deviation between the original coding signal and the expected coding signal; detecting the abnormal information of the original coding signal based on a density-based anomaly detection method, and constructing an anomaly index based on the abnormal information; the abnormal information includes mutation points or abnormal points; obtaining the mean vector corresponding to the original coding signal, and calculating the mean deviation between the mean vector corresponding to the expected coding signal and the mean vector corresponding to the original coding signal.

[0062] The coding quality includes parameters such as coding deviation, anomaly index and mean deviation. Obtain the expected coding signal and calculate the coding deviation between the expected coding signal and the original coding signal. Use the density-based anomaly detection method to detect the anomaly information of the original coding signal and form an anomaly index. The anomaly information includes mutation points or anomaly points. Obtain the mean vector of the original coding signal and calculate the mean deviation with the mean vector of the expected coding signal.

[0063] By evaluating the quality of the encoded signal in detail from multiple aspects, it provides rich parameter support for subsequent optimization. Through anomaly detection and mean deviation calculation, it accurately identifies signal anomalies and ensures the reliability and accuracy of encoding.

[0064] In some embodiments, before the coding quality is input into a preset primary quality evaluation model, it also includes: determining key parameters in the coding quality parameters corresponding to the coding quality, and constructing a quality feature vector based on the key parameters; obtaining a fuzzy membership function corresponding to the quality feature vector; constructing a fuzzy rule base based on the fuzzy membership function to generate a primary quality evaluation model, and the primary quality evaluation model is used to output a primary quality assessment value corresponding to the quality feature vector.

[0065] By determining the key parameters in the encoding quality parameters, a quality feature vector is formed. The fuzzy membership function corresponding to the quality feature vector is obtained. A fuzzy rule base is constructed to generate a primary quality evaluation model, which is used to output the primary quality evaluation value of the quality feature vector. The accuracy of quality evaluation is improved through key parameters and fuzzy membership functions. The fuzzy rule base can flexibly adapt to a variety of quality features and improve the generalization ability of the model.

[0066] Exemplarily, the coding quality parameters corresponding to the coding quality include the coding deviation mean, the coding deviation variance, the coding deviation kurtosis, the anomaly index and the mean deviation; the environmental impact score includes at least the noise impact score, the temperature impact score, the vibration impact score and the electromagnetic interference impact score; the environmental impact score is integrated with the corresponding coding quality to generate an adaptive feature vector, including: splicing the key parameters with the environmental impact score to obtain an initial feature vector; normalizing the initial feature vector, and constructing second-order interaction terms in the normalized initial feature vector according to the coding deviation mean and each environmental impact score; splicing multiple second-order interaction terms with the initial feature vector to obtain an adaptive feature vector.

[0067] The coding quality parameters include the mean, variance, kurtosis, anomaly index and mean deviation of the coding deviation. The environmental impact score includes the noise, temperature, vibration and electromagnetic interference impact score. The key parameters are spliced ​​with the environmental impact score to form the initial feature vector. The initial feature vector is normalized, the second-order interaction term is constructed, and the adaptability feature vector is generated. Multiple environmental factors and coding quality are integrated to comprehensively consider the adaptability of the signal under different conditions. Through normalization and second-order interaction terms, the mutual influence between features is accurately reflected, and the accuracy of adaptability evaluation is improved.

[0068] In some embodiments, obtaining robustness parameters corresponding to each original coded signal includes: obtaining duration information and abnormal interruption information of each original coded signal within a predefined semantic duration interval; constructing a time domain robustness feature vector based on the duration information and the abnormal interruption information; performing time-frequency analysis on each original coded signal to obtain a coded spectrum corresponding to each original coded signal; obtaining anti-interference information of the coded spectrum to preset noise; constructing a frequency domain robustness feature vector based on the anti-interference information and the coded spectrum; and constructing robustness parameters based on the time domain robustness feature vector and the frequency domain robustness feature vector.

[0069] By obtaining the duration information and abnormal interruption information of the signal in the semantic persistence interval, the time domain robustness feature vector is constructed. Time-frequency analysis is performed to obtain the coded spectrum and anti-interference information, and the frequency domain robustness feature vector is constructed. The robustness parameters are constructed by integrating the time domain and frequency domain features. The robustness of the signal in the time domain and frequency domain is comprehensively evaluated to improve the stability of the signal under various interference and unstable conditions. Detailed robustness parameters are provided to provide a basis for subsequent optimization strategies.

[0070] In some embodiments, an optimization strategy for each original coded signal is determined based on a comprehensive evaluation value, including: if the comprehensive evaluation value is less than a first evaluation value, replacing the encoder corresponding to the preliminary fuzzy semantic coding of the EEG data, re-performing feature extraction and replacing the feature extraction algorithm corresponding to the coding quality; if the comprehensive evaluation value is greater than or equal to the first evaluation value and less than the second evaluation value, optimizing the encoder and the feature extraction algorithm; if the comprehensive evaluation value is greater than or equal to the second evaluation value and less than the third evaluation value, adjusting the parameters corresponding to the feature extraction algorithm and optimizing the training hyperparameters of the encoder; if the comprehensive evaluation value is greater than or equal to the third evaluation value, directly outputting the original coded signal; wherein, the first evaluation value is less than the second evaluation value, and the second evaluation value is less than the third evaluation value.

[0071] Determine the optimization strategy based on the comprehensive evaluation value: Less than the first evaluation value: Replace the encoder and feature extraction algorithm and re-encode. Between the first and second evaluation values: Optimize the encoder and feature extraction algorithm. Between the second and third evaluation values: Adjust the feature extraction algorithm parameters and encoder training hyperparameters. Higher than the third evaluation value: Directly output the original encoded signal. Dynamically adjust the encoding strategy based on the comprehensive evaluation value to improve the efficiency and accuracy of encoding. The phased optimization strategy ensures that signals of different qualities can receive the most appropriate processing method, maximizing the performance and quality of the final encoded signal.

[0072] To facilitate understanding of the specific implementation of the method provided in this application, a complete example is now used to illustrate the specific application of the method provided in this application:

[0073] 1. EEG fuzzy semantic coding: Perform preliminary fuzzy semantic coding on brain activities to generate original coding signals.

[0074] High-resolution electroencephalogram (EEG) equipment is used to collect EEG data during various cognitive activities of the human body. EEG can reflect the electrical activity of the neuron group in the cerebral cortex and is an important means to peek into human cognitive processes and intentions. Different electrode layouts (such as the international 10-20 system or high-density electrode array) and sampling rates (usually 256~1000Hz) can be used according to the application scenario. After amplification, analog-to-digital conversion and other steps, a digital EEG data sequence is obtained. Due to the presence of various physiological and non-physiological artifacts in EEG data, preprocessing is required to remove these noises and artifacts and improve signal quality. Commonly used preprocessing methods include baseline correction (eliminating DC components), bandpass filtering (removing extremely low-frequency surges and high-frequency noise, retaining the frequency band of interest such as 8-30Hz), independent component analysis (ICA, using statistical methods to decompose EEG data and remove artifact components such as electrooculography and electromyography), re-referencing (replacing with a reasonable reference such as the overall average reference), standardization (unifying the data scale), etc. After preprocessing, relatively "clean" EEG data can be obtained.

[0075] Next, feature extraction is performed on the preprocessed EEG data, with the goal of extracting valuable features related to cognitive activities and intentions from the original time series and constructing a feature space. Commonly used EEG features include time domain features (such as peak-to-peak value, square root amplitude, etc., reflecting the amplitude and energy characteristics of the potential waveform), frequency domain features (through Fourier transform or wavelet transform to analyze the power spectral density or wavelet coefficient energy of frequency bands such as δ, θ, α, β, and γ), time-frequency domain features (such as wavelet packet analysis, combining information from both time and frequency domains), connectivity features (using indicators such as coherence and phase synchronization to characterize the functional connection patterns between different brain regions), nonlinear features (such as nonlinear dynamic quantities such as ApEn and SampEn, reflecting the complexity of the EEG system), etc. Different cognitive tasks and brain states often show different EEG feature patterns. Therefore, it is necessary to specially design algorithms to automatically mine discriminative features related to the semantics of a given task from the feature space to form a feature subset. This feature selection process can be based on supervised or unsupervised machine learning technology, combined with manually designed heuristic strategies to gradually optimize the feature set and eliminate redundant features to improve encoding accuracy and robustness.

[0076] For each cognitive activity or intention, a corresponding fuzzy semantic model is constructed. Based on prior knowledge and experimental data analysis, a set of EEG features related to the semantics of the activity is determined, and a fuzzy membership value is assigned to each feature to represent its importance in the semantics. All features and memberships constitute a fuzzy semantic vector, which describes the "distribution pattern" of the semantics in the feature space. For example, the semantic-related features of "performing computational tasks" and their fuzzy memberships may be prefrontal theta wave power (0.7), parietal alpha wave suppression (0.8), enhanced frontoparietal connectivity (0.6), etc. The semantics of "motor imagery" is related to features such as motor cortex μ suppression and sensorimotor area activation. By analyzing a large amount of experimental data and domain knowledge, a fuzzy semantic model library covering a wide range of semantic activities is constructed. The feature extraction and semantic modeling are combined to realize the encoding process of EEG signals to fuzzy semantics. First, the fuzzy semantic encoder model is trained using machine learning algorithms (such as artificial neural networks, support vector machines, etc.) to map the feature space to the semantic space. Given the real-time EEG data, the feature vector is obtained according to the feature extraction steps and input into the trained encoder model to obtain the corresponding fuzzy semantic vector output as the preliminary fuzzy semantic coding signal for this time period.

[0077] 2. Real-time monitoring of coding quality: Monitor the coding quality of step 1 in real time, calculate the coding deviation, anomaly index and mean, and prepare for the subsequent primary coding quality evaluation.

[0078] The key to real-time monitoring of coding quality lies in calculating evaluation indicators such as coding deviation, anomaly index and mean, which requires continuous real-time processing of the coding vector sequence. The coding deviation calculation process is as follows: Let the actual coding vector sequence be {vec_real_1, vec_real_2,..., vec_real_n}, and the expected coding vector sequence be {vec_expect_1, vec_expect_2,..., vec_expect_n}, where n is the sequence length, vec_real_i and vec_expect_i are both d-dimensional vectors, representing the actual and expected coding vectors at the i-th moment. Coding deviation is used to measure the degree of deviation between the actual coding vector and the expected coding vector, which can be measured by vector norm or similar indicators. The larger the norm, the larger the deviation and the worse the coding quality. Commonly used norms include Euclidean norm (L2 norm), Manhattan norm (L1 norm), etc. The Euclidean norm formula is as follows: ||x||=sqrt(sum(x_i^2))(i=1,2,...,d) where x is a d-dimensional vector. Then the coding deviation at the i-th moment can be defined as: deviation_i=||vec_real_i-vec_expect_i||. The deviation reflects the absolute distance between the coding vector and the expected vector at that moment. The smaller the deviation, the higher the coding quality. In order to continuously monitor the coding deviation in real time, it is necessary to traverse and calculate the entire sequence to obtain the deviation sequence {deviation_1, deviation_2,..., deviation_n}. Next, the mean mean(deviation) and other statistics such as variance var(deviation), kurtosis(deviation) can be calculated for the deviation sequence. These statistics can be used as a comprehensive description of the coding deviation. You can also set a threshold to determine the proportion of points in the deviation sequence that exceed the threshold as a basis for evaluating the coding quality.

[0079] The calculation of anomaly index aims to detect mutation points or anomalies in the coding sequence. Density-based anomaly detection methods such as kernel density estimation can be used. The specific approach is to first define the kernel function K(x). Commonly used kernel functions include normal kernel, Epanechnikov kernel, etc. Here, the normal kernel is taken as an example: K(x)=1 / (sqrt(2π))*exp(-x^2 / 2) For the actual coding vector sequence {vec_real_1,vec_real_2,...,vec_real_n}, kernel density estimation is applied to obtain the probability density value of each coding vector. The formula is: p(vec_real_i)=(1 / n)*sum(K(||vec_real_i-vec_real_j|| / h))(j=1,2,...,n) where h is the bandwidth parameter, which controls the smoothness of the kernel function. The value range is (0,+∞). The larger the value, the smoother the kernel function. For each vec_real_i, calculate its probability density p(vec_real_i). If it is less than the given threshold, vec_real_i is determined to be an outlier. By traversing the entire sequence, the number of outliers is counted. The outlier index can be defined as the number of outliers divided by the sequence length n: outlier index = number of outliers / n. The higher the outlier index, the more outliers or mutations there are in the coding sequence, the worse the coding quality, and the more unstable the process. The selection of the kernel bandwidth parameter h and the outlier threshold on which the outlier index depends will directly affect the outlier detection effect, so it needs to be optimized for specific applications.

[0080] The mean calculation is to take the mean of the coding vector sequence to obtain the mean vector. The formula is: vec_mean=sum(vec_real_i) / n(i=1,2,...,n) where vec_mean is a d-dimensional vector, representing the mean coding vector of the entire sequence. By comparing the mean vector vec_mean with the expected coding mean vec_expect_mean, the mean deviation index can be defined: mean deviation=||vec_mean-vec_expect_mean|| A large mean deviation indicates that the actual coding mean deviates greatly from the expected coding mode, which also indicates that the coding quality is poor. In addition to the Euclidean norm, other distance metrics can also be used to calculate the mean deviation. The smaller the mean deviation, the closer the average level of the actual coding is to the expected mode, and the higher the coding quality. By traversing the coding vector sequence in real time, the coding deviation sequence, anomaly index and mean can be continuously calculated, and based on these indicators, it can be judged whether the current coding quality meets the requirements.

[0081] 3. Primary coding quality evaluation: Input the coding quality parameters of step 2 into the primary quality evaluation model to generate a primary quality assessment value, compare it with the threshold, and mark it as "potentially compliant" or "non-compliant" coding.

[0082] For the primary coding quality evaluation step, the present application uses an evaluation model based on fuzzy logic for detailed description. The fuzzy logic system can well integrate human expert knowledge and empirical rules, and at the same time has strong interpretability and explainability, and is very suitable for evaluating complex coding quality problems. The specific implementation steps are as follows: First, key features need to be selected from the coding quality parameters obtained in step 2 to construct the quality feature vector Quality_Features. Typical features include the mean of coding deviation mean(Deviation), the variance of coding deviation var(Deviation), the kurtosis of coding deviation kurtosis(Deviation), the anomaly index, and the mean deviation, etc.

[0083] For each quality feature, a fuzzy membership function needs to be designed for it to map continuous feature values to several discrete semantic membership levels. For example, the membership levels of the coding deviation mean feature can be set to three levels: "low", "medium", and "high". Common forms of membership functions include triangular membership functions, trapezoidal membership functions, Gaussian membership functions, etc. When designing, the parameters of the function need to be determined, such as the (a, b, c) parameters of the triangular membership function. For example, for the coding deviation mean feature, the triangular membership function can be defined as follows: μ_low(x) = max(min((b - x) / (b - a), 1), (x - a) / (b - a)); for x c, μ_low(x) = 0 μ_medium(x) = max(min((x - a) / (b - a), (c - x) / (c - b)), 0) for x c, μ_medium(x) = 0; μ_high(x) = max(min((x - b) / (c - b), 1), 0) for x < b, μ_high(x) = 0. Among them, (a, b, c) are the parameters of the triangular membership function and need to be determined based on training data or domain knowledge. Through the membership function, the continuous coding deviation mean x can be mapped to three membership values of "low", "medium", and "high", indicating the degree to which x belongs to these three semantic levels. This fuzzification process based on the fuzzy membership function converts continuous numerical features into discrete semantic values, which is closer to the human cognitive mode. Similarly, corresponding fuzzy membership functions can also be designed for other quality features such as the variance of coding deviation and the anomaly index.

[0084] Next, we need to build a fuzzy rule base to define the comprehensive evaluation rules between each quality feature. We can use conditional rules in the form of "if...then...", such as: "If the mean level of coding deviation is low and the abnormal index level is low and the mean deviation level is low, then the coding quality level is high" "If the mean level of coding deviation is medium and the abnormal index level is medium and the mean deviation level is medium, then the coding quality level is medium" "If the mean level of coding deviation is high or the abnormal index level is high or the mean deviation level is high, then the coding quality level is low" This rule base needs to be learned by combining domain knowledge and a large amount of training data. It can be automatically generated by machine learning or knowledge base construction or designed by human experts. The number of rules is usually large. Assign a weight to each rule to indicate its importance.

[0085] After establishing the fuzzy rule base, fuzzy logic reasoning can be implemented on the given quality feature vector Quality_Features to obtain the final coding quality evaluation value. The specific operation is as follows: first, each feature value in Quality_Features is calculated through the corresponding fuzzy membership function to obtain its membership value belonging to different semantic levels; then the antecedent (if part) of each rule is fuzzy AND or operated to obtain the rule firing strength; the firing strength of each rule is multiplied by its weight to obtain the weighted firing strength; finally, the weighted firing strength of all rules is fuzzy weighted summed to obtain the final coding quality evaluation value, which ranges from [0,1]. The larger the value, the higher the coding quality. Set two thresholds Thresh_High and Thresh_Low. If the coding quality evaluation value is ≥Thresh_High, it is judged as "potentially compliant" coding and the coding quality meets the standard; if it is ≤Thresh_Low, it is "non-compliant" coding; if it is between the two thresholds, it belongs to medium quality.

[0086] 4. Environmental adaptability analysis: Conduct environmental adaptability analysis on the "potential compliance" code in step 3 and calculate the impact scores of environmental factors such as noise and vibration.

[0087] First, it is necessary to identify and quantify all environmental factors and interference sources related to the target environment, mainly including noise, temperature, vibration, electromagnetic interference, etc.

[0088] Analysis of noise environment factors: The impact of noise on coding quality is mainly reflected in the fact that EEG signals in the coding process are contaminated by noise, introducing false signals or covering up real coding information. It is necessary to test the performance of the coding system under known noise conditions through experiments or simulations to evaluate the degree of impact of noise on coding quality. Different types of noise (such as white noise, speech noise, etc.), different intensities and durations can be considered to calculate the noise impact score Noise_Score. The value range of Noise_Score is [0,1]. The larger the value, the worse the adaptability of the coding to noise. The commonly used Noise_Score calculation formula is: Noise_Score = f(SNR, noise type, duration) where SNR is the signal-to-noise ratio and f is a nonlinear influence function that needs to be fitted through experimental data. For example, an exponential function can be used: Noise_Score = 1 - exp(-k noise type duration / SNR) where k is a constant parameter that needs to be estimated based on training data.

[0089] Analysis of vibration environment factors: When subjected to vibration interference, wearable EEG acquisition devices will produce motion artifacts, which will interfere with the encoding quality. Analysis of vibration impact requires evaluating the encoding performance under different vibration frequencies and amplitudes. The actual vibration amplitude can be measured by means such as accelerometers, and then correlated with the encoding quality to obtain a vibration impact evaluation model and calculate the vibration impact score Vibration_Score, which has a value range of [0,1]. For example, a Gaussian kernel function can be used to fit the nonlinear relationship between vibration and encoding quality: Vibration_Score = 1 - exp(-(vibration amplitude-μ)^2 / (2*σ^2)) where μ and σ are Gaussian kernel function parameters, which need to be estimated based on experimental data. Analysis of temperature environment factors: Too high or too low temperature will affect the quality of physiological signal acquisition. A temperature gradient can be set to observe the performance changes of the encoding system under different temperature environments, and a linear or nonlinear regression model can be used to fit the relationship between temperature and encoding quality to obtain the temperature impact score Temp_Score = f(temperature). Analysis of electromagnetic interference factors: The electromagnetic radiation in the environment where the encoding system is located will interfere with the transmission and processing of EEG signals to a certain extent. The system performance can be tested under known electromagnetic field conditions to calculate the electromagnetic interference impact score EMI_Score, which ranges from [0,1]. The larger the value, the worse the adaptability to electromagnetic interference. The environmental adaptability score Adaptation_Score is the weighted comprehensive score of the above environmental factors:

[0090] Adaptation_Score = w1Noise_Score + w2Vibration_Score + w3Temp_Score + w4EMI_Score, where w1, w2, w3, and w4 are the weights of each factor and need to be adjusted according to the actual application scenario. For some environments such as noisy environments, the weight of the noise factor can be appropriately increased. The value range of Adaptation_Score is [0, 1], and the smaller the value, the stronger the overall environmental adaptability.

[0091] 5. Generate an adaptation feature vector: Integrate the environmental impact scores in Step 4 with the coding quality in Step 3 to generate an environmental adaptation feature vector, preparing for the secondary adaptation evaluation.

[0092] First is the feature concatenation step. Obtain the coding quality features Quality_Features from Step 3, including the mean of coding deviation mean(Deviation), the variance of coding deviation var(Deviation), the kurtosis of coding deviation kurtosis(Deviation), the abnormal index Abnormal_Index, and the mean deviation Mean_Deviation, a total of 5 feature dimensions. Obtain the environmental impact scores from Step 4, including the noise impact score Noise_Score, the vibration impact score Vibration_Score, the temperature impact score Temp_Score, and the electromagnetic interference impact score EMI_Score, a total of 4 feature dimensions. Concatenate these 9 features together to form a 9-dimensional initial feature vector Initial_Adaptation_Feature_Vector = <mean(Deviation), var(Deviation), kurtosis(Deviation), Abnormal_Index, Mean_Deviation, Noise_Score, Vibration_Score, Temp_Score, EMI_Score>.

[0093] It should be noted that these 9 feature dimensions take values from different numerical ranges. To eliminate the influence of dimensional differences, it is necessary to normalize the feature vector so that all feature values fall within the range of [0, 1]. The normalization formula is: norm_feature = (original feature value - Min(feature)) / (Max(feature) - Min(feature)). Here, Min(feature) and Max(feature) are respectively the minimum and maximum values of this feature in the entire training dataset, which need to be statistically obtained based on the actual training data. For example, for the mean deviation feature mean(Deviation), this application first statistically obtains the minimum value Min_mean and the maximum value Max_mean of this feature in the entire training dataset, and then performs normalization calculation on the mean(Deviation) value of each sample: norm_mean = (mean(Deviation) - Min_mean) / (Max_mean - Min_mean). In this way, mean(Deviation) can be mapped into the range of [0, 1]. Similar normalization processing is also performed on the other 8 feature dimensions to obtain the normalized initial feature vector Norm_Initial_Adaptation_Feature_Vector = <norm_mean(Deviation), norm_var(Deviation), norm_kurtosis(Deviation), norm_Abnormal_Index, norm_Mean_Deviation, norm_Noise_Score, norm_Vibration_Score, norm_Temp_Score, norm_EMI_Score>.

[0094] The purpose of feature normalization is to eliminate the influence of dimensions, so that each feature dimension is on an equal footing in terms of the numerical range, thereby avoiding some features with overly large values from dominating the entire feature vector and masking the contributions of other features. Different machine learning models also have different sensitivities to feature dimensions. Some models, such as support vector machines, are very sensitive to dimensions and must undergo normalization preprocessing, while some models, such as tree models, are less sensitive to dimensional changes. Normalization processing can also alleviate the difficulties in the convergence of optimization algorithms such as gradient descent and accelerate the model training process. Therefore, in any case, normalizing heterogeneous feature vectors is a very common and effective preprocessing method.

[0095] After the feature concatenation and normalization steps are completed, this application obtains the initial feature vector Norm_Initial_Adaptation_Feature_Vector that describes the coding quality and environmental impact. However, this feature vector does not capture the interaction relationship and nonlinear impact between features. In order to make up for this deficiency, this application needs to construct high-order interaction term features. Considering that the coding deviation will be significantly affected by environmental factors such as noise and temperature, this application selects the core quality feature of the coding deviation mean (deviation) and constructs a second-order interaction term with each environmental impact score. The interaction term is constructed by multiplying the two features in the following form:

[0096] Quality_Noise_Interaction=norm_mean(deviation)*norm_Noise_Score Quality_Vibration_Interaction=norm_mean(deviation)*norm_Vibration_Score Quality_Temp_Interaction=norm_mean(deviation)*norm_Temp_Score Quality_EMI_Interaction=norm_mean(deviation)*norm_EMI_Score.

[0097] The above four interaction terms respectively describe the interactive relationship between the mean value of the coding deviation and the four environmental factors of noise, vibration, temperature, and electromagnetic interference. For example, the larger the value of the Quality_Noise_Interaction interaction term, the greater the increase in the mean value of the coding deviation under the influence of the noise environment, and the more serious the degradation of the coding quality. By introducing these high-order interaction terms, this application enables the feature vector to more finely describe the changing law of coding quality under complex environmental conditions, thereby improving the expressive power of the adaptability evaluation model.

[0098] Concatenate the above four interaction term features with the features in the previous Norm_Initial_Adaptation_Feature_Vector to finally obtain a 13-dimensional environmental adaptability feature vector Final_Adaptation_Feature_Vector = <norm_mean(bias), norm_var(bias), norm_kurtosis(bias), norm_Abnormal_Index, norm_Mean_Deviation, norm_Noise_Score, norm_Vibration_Score, norm_Temp_Score, norm_EMI_Score, Quality_Noise_Interaction, Quality_Vibration_Interaction, Quality_Temp_Interaction, Quality_EMI_Interaction>. This feature vector integrates three aspects of information, namely, the description of the inherent characteristics of coding quality, the description of the degree of environmental impact, and the description of the interactive impact between coding quality and environmental factors, and has the comprehensive ability to describe the adaptability of the coding environment.

[0099] It is worth mentioning that in the above process, only the second-order interaction term between the mean value of coding deviation and the environmental impact score is constructed in this application. In fact, it can be further extended to higher-order interaction terms such as the third-order and fourth-order to capture more complex non-linear relationships. For example, the following third-order interaction terms can be constructed:

[0100] Quality_Noise_Vibration_Interaction = norm_mean(bias)norm_Noise_Scorenorm_Vibration_Score Quality_Noise_Temp_Interaction = norm_mean(bias)norm_Noise_Scorenorm_Temp_Score, etc.

[0101] 6. Secondary adaptability evaluation: Input the adaptability feature vector in step 5 into the secondary adaptability evaluation model to generate a secondary adaptability evaluation value, compare it with the threshold, and make a final environmental adaptability evaluation for the "potentially compliant" coding.

[0102] This application chooses the Gradient Boosting machine learning algorithm based on the tree model to build a secondary adaptability evaluation model because the algorithm has strong nonlinear fitting capabilities and can effectively capture the complex interactive relationships between the features of each dimension in Final_Adaptation_Feature_Vector. Gradient Boosting is an integrated learning algorithm that trains multiple weak models (such as decision tree stumps) and integrates them into a powerful prediction model. For the adaptability evaluation task of this application, it can be classified as a regression problem, and the goal is to predict the continuous adaptability evaluation value Adaptation_Score.

[0103] First, a large number of annotated data sets need to be collected, including coded feature data under various environmental conditions and the corresponding manually annotated adaptability evaluation values. Let the training set be {(x_i, y_i)} (i=1,2,...,n), where x_i is the Final_Adaptation_Feature_Vector of the i-th sample, and y_i is the adaptability annotation value of the sample. Let f(x) be the adaptability evaluation value prediction model that needs to be trained in this application. According to the idea of ​​Gradient Boosting algorithm, this application can iteratively train f(x) in the following way: 1) Initialize f_0(x) as a constant, such as the sample mean; 2) For m=1,2,...,M (M is the total number of iterations): a) For each sample (x_i, y_i), calculate its residual r_i=y_i-f_{m-1}(x_i); b) Fit the residual r_i to obtain a local fitting model h_m(x); c) Update f_m(x)=f_{m-1}(x)+α*h_m(x), where α is the step size parameter (0<α≤1); d) Update the residual r_i=y_i-f_m(x_i); 3) Construct the final additive model: f(x)=f_M(x). The above algorithm decomposes the fitting task into the fitting of multiple basic models. Each step of fitting the model h_m(x) only needs to fit the current residual. The whole process is equivalent to gradually approaching the optimal prediction model f(x).

[0104] In practice, this application often selects decision tree stumps as the basic model h_m(x) for training. A decision tree stump is a decision tree that minimizes overfitting. It has only one decision node, and the number of branches depends on the type of feature (continuous features correspond to two branches, and categorical features correspond to k branches). Based on the decision tree stump as a weak learner, Gradient Boosting can automatically discover the nonlinear interaction between the features of each dimension in Final_Adaptation_Feature_Vector and capture complex adaptive patterns. For the mth iteration, the Gradient Boosting algorithm needs to calculate the residual r_i=y_i-f_{m-1}(x_i) for each training sample (x_i, y_i), that is, the difference between the current predicted value and the true labeled value. Next, use the decision tree stump h_m(x) to fit these residuals to obtain the residual prediction value, and multiply it by the step size α and add it to the predicted value f_{m-1}(x) of the previous round to obtain the f_m(x) value of this round. This process is repeated M times, and finally the additive model f(x)=f_M(x) is formed.

[0105] The reason why Gradient Boosting has powerful predictive capabilities is that it can automatically learn the interaction effects between features. With the decision tree stump as the base learner, each step only requires simply dividing the residual into two parts. The decision tree can easily capture the splitting pattern between features and continuously improve and correct the representation of the interaction effect in subsequent iterations. In the adaptability evaluation problem of this application, although Final_Adaptation_Feature_Vector contains coding quality features and environmental impact scores, a simple linear combination may not be able to truly reflect the complex relationship between them. GradientBoosting can effectively capture high-order interaction rules such as "If the mean of the coding deviation is high and the noise impact score is also high, the adaptability evaluation value will drop significantly" by automatically constructing a tree branch structure.

[0106] During the training process, this application needs to tune some hyperparameters of the Gradient Boosting algorithm to obtain the best performance. The main hyperparameters include: 1) the maximum depth of the base learner (decision stump) to control the fitting complexity; 2) the number of iterations M, generally the larger the number, the more complex patterns can be fitted, but it may overfit; 3) the step size α, the smaller the value, the slower the convergence speed but reduces the risk of overfitting; 4) the sampling ratio, the training set is sampled before training the base learner; 5) the split feature selection standard, such as the Gini coefficient or the entropy gain standard; 6) the regularization parameter, such as L1 / L2 regularization to prevent overfitting, etc. Usually, optimization methods such as grid search or random search can be used, combined with cross-validation technology to systematically search and evaluate the above hyperparameters, and select the parameter combination that achieves the best performance on the validation set.

[0107] The Gradient Boosting model f(x) trained in the above manner can be used in this application to evaluate the adaptability of any given Final_Adaptation_Feature_Vector x' to obtain a predicted value Adaptation_Score'=f(x'). The predicted value reflects the comprehensive adaptability of the code under the described environmental conditions, and the larger the value, the stronger the adaptability.

[0108] In order to determine whether the environmental adaptability of the code meets the requirements, this application needs to set an adaptability threshold Thresh_Adaptation. When Adaptation_Score'≥Thresh_Adaptation, it indicates that the environmental adaptability of the code meets the requirements and is judged as "adaptability compliant"; otherwise, it is judged as "adaptability non-compliant". The setting of the threshold Thresh_Adaptation needs to be based on the statistical analysis of a large amount of labeled data, combined with actual application needs and domain expert experience. A common method is to draw a histogram or kernel density estimation curve of the adaptability evaluation value distribution, and select a threshold point that can maximize the distinction between the two categories of "adaptability compliant" and "adaptability non-compliant" according to the distribution characteristics. The cost matrix can also be used to assign different weights to the two types of misclassification costs, and the optimal threshold is obtained after optimization. The final threshold setting needs to balance the classification effects of the two types of samples of "adaptability compliant" and "adaptability non-compliant" to ensure the accuracy of the overall evaluation. For codes judged as "adaptability compliant", this application needs to ensure the accuracy of this judgment. The setting of Thresh_Adaptation directly affects the classification effect of the two types of samples: "adaptability compliant" and "adaptability non-compliant", so the following aspects need to be considered comprehensively:

[0109] Misclassification Cost In practical applications, misclassifying "non-adaptability-compliant" codes as "adaptability-compliant" and misclassifying "adaptability-compliant" codes as "non-adaptability-compliant" usually have different costs. This application needs to assign different weights or cost values ​​to these two types of misclassification errors according to specific scenarios. For example, if the incorrect application of inappropriate codes to the actual environment may have serious consequences, then this application needs to reduce the probability of occurrence of such "false positives" and give a higher cost weight. On the contrary, if the situation permits, this application can appropriately increase the tolerance of "false negatives" and reduce its cost weight. Let FPcost and FNcost be the cost weights of "false positives" and "false negatives" respectively, then this application can set a weighted cost function: Weighted_Cost = FPcost * FP + FNcost * FN where FP and FN are the number of "false positives" and "false negatives" respectively. By calculating the Weighted_Cost values ​​under different Thresh_Adaptation on the training data set and making a graphical analysis, this application can find that when Thresh_Adaptation increases, FP will decrease but FN will increase. Taking the inflection point of the Weighted_Cost curve as the optimal threshold can balance the two types of errors and minimize the cost.

[0110] Precision and recall trade-off Precision and recall are commonly used binary classification evaluation indicators, which reflect the prediction accuracy and coverage of the model for the "adaptive compliance" category respectively. Generally speaking, an increase in the threshold will increase precision but reduce recall, and vice versa. Therefore, this application can draw a precision-recall curve under different Thresh_Adaptation on the training data set, and select the threshold corresponding to the optimal precision-recall balance point according to the actual application scenario. If there is an extremely high coverage requirement for the "adaptive compliance" encoding, a higher recall rate can be pursued; if the judgment requirements for "adaptive compliance" are very strict, a higher precision can be pursued.

[0111] When performing adaptability evaluation, it is inevitable that there will be some samples with high or low outlier values. If the threshold is set improperly, a large number of outliers will be classified into the same category, affecting the accuracy of the evaluation. Therefore, this application can count the number of outliers in two types of samples under different Thresh_Adaptation, and set a distance threshold, requiring the difference in the number of outliers in the two types to be less than the threshold. This can avoid a large number of outliers from being concentrated in a certain category as much as possible, ensuring the robustness of the evaluation results.

[0112] Based on the above three aspects of analysis, this application can systematically search for the optimal Thresh_Adaptation on the training data set, so that the weighted cost function value is minimized, the precision and recall rate are relatively balanced, and the difference in the number of two types of outliers is controllable, and finally determine an adaptability threshold that can reflect the essence of data distribution and has the best evaluation effect. For the code that is judged to be "adaptive", this application also needs to continue to monitor the changes in its environmental adaptability in the future. Once it is found that it crosses the Thresh_Adaptation boundary, it needs to be promptly classified into the "non-adaptive" category to ensure the real-time accuracy of the evaluation. In general, the setting of the threshold should not be static, but needs to be dynamically adjusted according to real-time data to maintain a high degree of consistency with the environmental adaptability of the code.

[0113] 7. Coding robustness impact analysis: Analyze the time, frequency, etc. of the coding in step 1, calculate the robustness impact value, abnormal frequency and other parameters, and prepare for the coding robustness evaluation.

[0114] First, the factors affecting the robustness of the coding signal in the time domain are analyzed. Let the fuzzy semantic coding signal output by step 1 be X(t), t be the time variable, and the value range of X(t) be [0,1]. The larger the value, the higher the confidence of the corresponding semantics at that moment. This application needs to track and record the persistence of X(t) under different semantic confidence thresholds. Let the threshold be α, and the semantic persistence interval can be defined as the continuous time t1≤t≤t2, satisfying that for all t∈[t1,t2], X(t)≥α. For each persistence interval [t1,t2], its duration can be calculated as Duration=t2-t1. Furthermore, the proportion of semantic confidence above α in the persistence interval can be counted as Confidence_Ratio=(1 / (t2-t1))∫[t1,t2]X(t)dt / α. Obviously, the closer Confidence_Ratio is to 1, the higher the confidence and stability of the semantic coding. This application can calculate the average duration Mean_Duration(α) and the average confidence ratio Mean_Confidence_Ratio(α) of all duration intervals for different α thresholds. Generally, the higher the α value, the smaller the Mean_Duration(α) will be, but the Mean_Confidence_Ratio(α) will increase, reflecting the balance between confidence and duration.

[0115] In addition, the present application also needs to analyze abnormal interruptions in semantic coding signals. The interruption point can be defined as continuous time t1≤t≤t2, and for all t∈[t1,t2], X(t)<γ, where γ is a minimum confidence threshold, usually close to 0. Each interruption interval [t1,t2] means that the coding is interrupted and the confidence is extremely low during this time period. The present application can count the average occurrence frequency of interruption points per unit time Interruption_Freq, and the average duration of each interruption interval Mean_Interruption_Duration. Obviously, the smaller the Interruption_Freq and the shorter the Mean_Interruption_Duration, the better the temporal robustness of the coding.

[0116] Combining the above time domain parameters, this application can construct a coding time domain robustness feature vector:

[0117] Time_Robustness_Features= <Mean_Duration(α1),Mean_Confidence_Ratio(α1),...,Mean_Duration(αn),Mean_Confidence_Ratio(αn),Interruption_Freq,Mean_Interruption_Duration> ;

[0118] Among them, α1, α2, ..., αn are preset different semantic confidence thresholds. This feature vector comprehensively describes the robustness influencing factors such as the duration, confidence level, abnormal interruption frequency, etc. of the coded signal in the time domain.

[0119] In addition to time domain analysis, this application also needs to evaluate the robustness of the coded signal in the frequency domain. By performing time-frequency analysis methods such as Fourier transform or wavelet transform on the original coded signal X(t), its spectrum representation, namely the coded spectrum X(ω), can be obtained, where ω is a frequency variable. The ideal coded spectrum should be concentrated within the target frequency range and have good noise resistance. This application can define the target frequency band as [ω1, ω2], and count the energy proportion of the coded spectrum in this band as the frequency domain energy concentration parameter Energy_Concentration=∫[ω1,ω2]|X(ω)|^2dω / ∫[-∞,+∞]|X(ω)|^2dω, with a value range of [0,1]. The larger the value, the more concentrated the coded spectrum is in the target frequency band, and the higher the coding quality.

[0120] At the same time, the present application also needs to evaluate the anti-interference ability of the coding spectrum to noise. Noise N(t) of different types and intensities can be constructed and superimposed on the original coding signal X(t) to obtain the noisy signal Y(t)=X(t)+N(t). Y(t) is subjected to time-frequency analysis to obtain its spectrum representation Y(ω). The present application defines the signal-to-noise ratio SNR=∫[-∞,+∞]|X(ω)|^2dω / ∫[-∞,+∞]|Y(ω)-X(ω)|^2dω. The higher the SNR value, the stronger the coding spectrum's resistance to noise. The effects of different types of noise (such as Gaussian white noise, periodic noise, impulse noise, etc.) on the coding spectrum can be tested separately to obtain the SNR values ​​under different noise conditions. In addition, the present application also needs to evaluate the temporal stability of the coding spectrum, that is, whether the coding spectrum fluctuates violently over time. The present application can track the spectrum sequence in real time within a short time window and calculate the spectrum distance between adjacent time windows. For example, it can be measured by the L2 norm Distance = ||X_window1(ω)-X_window2(ω)||, and the expected value of Distance is taken as the spectrum stationarity parameter Spectrum_Stationarity. The smaller the value, the more stable the coding spectrum.

[0121] By summarizing the above frequency domain parameters, this application can obtain the coding frequency domain robustness feature vector Frequency_Robustness_Features=<Energy_Concentration,SNR_Gaussian,SNR_Periodic,SNR_Impulse,...,Spectrum_Stationarity> , which reflects the robustness of the coding in multiple dimensions such as frequency distribution, noise resistance, and spectrum stability.

[0122] Finally, this application concatenates the robustness feature vectors in the time domain and frequency domain to obtain a comprehensive feature vector that fully describes the factors affecting coding robustness:

[0123] Overall_Robustness_Features=<Time_Robustness_Features,Frequency_Robustness_Features> The feature vector includes robustness influencing parameters in multiple dimensions, such as coding duration, confidence level, abnormal interruption frequency, energy concentration, noise resistance, spectrum stability, etc.

[0124] 8. Coding robustness evaluation: Input the robustness impact value and other parameters in step 7 into the robustness evaluation model to generate a robustness evaluation value, compare it with the threshold, and generate a robustness qualified or unqualified signal.

[0125] This application chooses a machine learning method based on a feedforward neural network to construct a robustness evaluation model. First, it is necessary to collect a large number of annotated data sets, including the Overall_Robustness_Features feature data under various encoding conditions, and the corresponding manually annotated robustness evaluation values. Suppose the training data set is {(x_i, y_i)} (i=1,2,...,n), where x_i is the Overall_Robustness_Features feature vector of the i-th sample, and y_i is the robustness annotation value of the sample, with a value range of [0,1]. The larger the value, the stronger the robustness. The goal of this application is to train a nonlinear mapping f(x) based on the training data, so that for any given x, f(x)≈y, that is, the model prediction value is close to the true annotation value. As a supervised machine learning model, the feedforward neural network can continuously adjust the network parameters through training data, and gradually optimize the mapping function f(x) so that it can approximate any complex nonlinear function.

[0126] The feedforward neural network constructed in this application includes an input layer, several hidden layers and an output layer. The number of neurons in the input layer is equal to the feature dimension of Overall_Robustness_Features, and each neuron corresponds to an input feature. The number of hidden layers and the number of neurons in each layer need to be set according to the complexity of the problem and the amount of training data. Generally speaking, the more hidden layers and the more neurons, the stronger the nonlinear expression ability of the model, but it is also easier to overfit. The output layer has only one neuron, corresponding to the predicted robustness evaluation value f(x). Every two layers of neurons are connected by weighted connections, and each connection corresponds to a trainable weight parameter. In addition, each hidden layer neuron and output layer neuron has a trainable bias parameter for adjusting the activation value.

[0127] Assume that there are N_l neurons in the lth layer and N_{l-1} neurons in the l-1th layer, then the weighted input of the jth neuron in the lth layer is z_j^l=∑(i=1)^(N_{l-1})w_{ij}^la_{i}^{l-1}+b_j^l, where w_{ij}^l is the connection weight from the i-th neuron in the l-1th layer to the j-th neuron in the l-1th layer, a_i^{l-1} is the output activation value of the i-th neuron in the l-1th layer, and b_j^l is the bias of the j-th neuron in the l-1th layer. The activation value of the input layer is directly determined by the input data, that is, a_i^0=x_i^0 (i=1,2,...,N_0), where N_0 is the feature dimension. For neurons in the hidden layer and output layer, their activation values ​​are generally obtained through nonlinear activation functions, i.e., a_j^l=σ(z_j^l). Common activation functions include Sigmoid function, ReLU function, etc. Introducing nonlinear activation is the key to fitting any function in neural network. Therefore, the nonlinear mapping implemented by the entire network is f(x)=a^L, i.e., the activation value of the output layer neuron, where L is the total number of layers in the network. During the training process, this application needs to find appropriate weight w and bias b parameters so that for any input x, the network output f(x) is close to the expected output y.

[0128] The specific training algorithm adopts the back propagation method. For each sample (x, y) in the training set, the predicted output f(x) of the network is calculated, and the loss function Loss(f(x), y) is defined to measure the difference between the predicted value and the true value. Common loss functions include mean square error loss, cross entropy loss, etc. The goal of this application is to minimize the total loss ∑Loss(f(x_i), y_i) on the training set. According to the back propagation algorithm, for each trainable parameter w or b, this application can calculate its gradient ∂(∑Loss) / ∂w or ∂(∑Loss) / ∂b to the total loss. Using the gradient descent optimization algorithm, the parameters are updated in the opposite direction of the gradient, that is, w=w-η∂(∑Loss) / ∂w, b=b-η∂(∑Loss) / ∂b, where η is the learning rate hyperparameter, which controls the update step size. By continuously and iteratively updating the parameters in the direction of the gradient, the total loss will gradually decrease until it converges to a local minimum point, at which point the network parameters obtain the optimal solution. Since the neural network is a highly nonlinear model, there are often many local minima, so multiple random initializations are usually required to obtain the global optimal solution. During the training process, regularization techniques (such as L1 and L2 regularization) can also be introduced to prevent overfitting, and other optimization strategies (such as momentum method, adaptive learning rate, etc.) can be introduced to accelerate convergence.

[0129] The feedforward neural network model f(x) trained in the above manner can obtain the robustness evaluation value f(x') predicted by the model for any given Overall_Robustness_Features feature vector x' as input. In order to determine whether the robustness of the encoding meets the requirements, this application needs to set a robustness threshold Thresh_Robustness. If f(x') ≥ Thresh_Robustness, a "robustness qualified" signal is output, otherwise a "robustness unqualified" signal is output.

[0130] This application can use a method based on a combination of cost matrix and statistical distribution analysis to determine the optimal robustness threshold Thresh_Robustness. The specific steps are as follows:

[0131] First, on the labeled training data set, for different candidate thresholds, the confusion matrix of the two types of samples "robust qualified" and "unqualified robustness" is calculated to obtain the number of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN). Then, according to the actual application scenario, different cost weights or loss values ​​are assigned to these four classification results to construct a weighted classification cost function. For example, if misjudging the encoding of "unqualified robustness" as "qualified" will lead to serious consequences, then this application can assign a higher cost weight to FP (false positive examples), indicating a greater degree of punishment for this type of error. The weighted classification cost function can be designed as: Weighted_Cost = w_FP * FP + w_FN * FN.

[0132] Where w_FP and w_FN are the cost weights of FP and FN respectively, which need to be set based on domain knowledge and experience, and w_FP >= w_FN. By traversing different candidate thresholds, this application can calculate the corresponding weighted classification cost Weighted_Cost under each threshold and draw a cost function curve.

[0133] Next, this application needs to combine the actual distribution of the two types of samples, "qualified robustness" and "unqualified robustness", in the training set. Specifically, the robustness evaluation values ​​of the two types of samples can be estimated by kernel density to obtain their statistical distribution density functions, namely: qualified sample density: p_accept(x) = (1 / N_accept) * Σ K( (x - x_i) / h) (i=1...N_accept) unqualified sample density: p_reject(x) = (1 / N_reject) * Σ K( (x -x_j) / h) (j=1...N_reject).

[0134] Where K(x) is a kernel function (such as a Gaussian kernel), h is a bandwidth parameter, and N_accept and N_reject are the number of samples of the two categories. By plotting these two density functions, the application can clearly observe the distribution patterns of the two categories of samples in the robustness evaluation values ​​and find their overlapping areas.

[0135] Combining the weighted classification cost function curve and the two types of sample distribution density function images, this application can determine the optimal Thresh_Robustness based on the following principles:

[0136] 1. On both sides of the overlapping area, select the evaluation value that can minimize the weighted classification cost as the preliminary threshold.

[0137] 2. For this preliminary threshold, calculate the corresponding "robust qualified" class precision and recall. If the precision is much higher than the recall, it means that the model is too strict and many actual "qualified" codes are misjudged as "unqualified". On the contrary, if the recall is much higher than the precision, it means that the model is too loose and there are many cases where actual "unqualified" codes are misjudged.

[0138] 3. If the precision and recall rate are unbalanced, it is necessary to appropriately relax or tighten the threshold according to the actual application requirements so that the precision and recall rate reach an acceptable balance point.

[0139] 4. Recalculate the weighted classification cost for the adjusted threshold. If the cost does not increase significantly, the threshold is determined as the final Thresh_Robustness; otherwise, steps 2) and 3) need to be repeated until the best balance between cost and classification index is achieved.

[0140] This method combines multiple considerations such as misclassification cost, data distribution density, and precision-recall rate, and can determine the optimal Thresh_Robustness threshold more comprehensively and accurately. At the same time, by introducing cost weights, the degree of penalty for more critical error types in specific application scenarios (such as misjudging "unqualified" as "qualified") can be effectively constrained, thereby generating a robustness evaluation threshold that meets actual needs.

[0141] 9. Comprehensive coding evaluation: Input the primary quality evaluation value of step 3, the secondary adaptability evaluation value of step 6, and the robustness evaluation value of step 8 into the comprehensive evaluation model to generate a comprehensive coding evaluation score.

[0142] This application uses a Gradient Boosting decision tree (GBDT) model based on an integrated learning framework for comprehensive evaluation. The GBDT model consists of multiple decision tree models, which can efficiently capture the complex nonlinear relationship between features and is suitable for processing heterogeneous feature fusion tasks such as coding comprehensive evaluation. First, a large amount of labeled data needs to be collected, where each sample contains a primary quality evaluation value Quality_Score, a secondary adaptability evaluation value Adaptation_Score, a robustness evaluation value Robustness_Score, and a manually labeled coding comprehensive evaluation score Overall_Score, and a training set {(x_i, y_i)} (i=1,2,...,N) is constructed, where x_i is the feature vector of the i-th sample, and y_i is the corresponding labeled comprehensive evaluation score. The goal of this application is to train a regression model F(x) that can accurately predict the comprehensive evaluation score of any given feature vector x, that is, F(x)≈y.

[0143] GBDT model is trained in the following way to get F(x): 1) Initialize F_0(x) as a constant model, such as sample mean. 2) For m=1,2,...,M (M is the total number of iterations): a) For each training sample (x_i,y_i), calculate its residual r_i=y_i-F_{m-1}(x_i) b) Fit a regression tree model h_m(x) to the residual r_i to get the residual prediction value c) Update F_m(x)=F_{m-1}(x)+η*h_m(x), where η is the step size parameter (0<η≤1) d) Update the residual r_i=y_i-F_m(x_i).

[0144] 3) Construct the final additive model: F(x)=F_M(x): In the mth iteration, the GBDT algorithm calculates the residual r_i for each training sample, and fits a regression tree model h_m(x) as a weak learner based on these residuals. h_m(x) can accurately fit the residuals of local samples, thereby improving the prediction ability of the overall model F_m(x) for samples with large residuals. By continuously stacking these weak learners, the residuals will gradually decrease, and the model will eventually converge. The key advantage of GBDT is that the decision tree has excellent binning feature capture capabilities and can efficiently learn nonlinear interactions between heterogeneous features. The overall framework of GBDT has the advantage of integrated learning and anti-overfitting, which makes the comprehensive evaluation model have strong generalization capabilities.

[0145] The GBDT model F(x) obtained through the above training can input any encoded sample feature vector x'=<Quality_Score', Adaptation_Score', Robustness_Score'> As input, the predicted coding comprehensive evaluation score F(x') is automatically generated. This score reflects the comprehensive performance of the coding in three dimensions: quality, adaptability and robustness, covers all the key indicators of the system evaluation, and is highly representative. Usually, this application will normalize the value range of F(x') to the interval [0,1], where 1 represents the best performance and 0 represents the worst performance. This application can pre-set several segmentation thresholds according to the specific application scenario, and divide the [0,1] interval into multiple levels, such as [0,0.4] for unqualified level, (0.4,0.6] for basically qualified level, (0.6,0.8] for good level, and (0.8,1] for excellent level. For any given coding sample, input it into the trained GBDT model F(x), and you can get its corresponding comprehensive evaluation score and map it to the corresponding level range. This hierarchical evaluation mechanism can intuitively and finely reflect the differences in coding performance, and provide a basis for subsequent hierarchical optimization.

[0146] 10. Hierarchical coding optimization: According to the comprehensive evaluation score of step 9, the coding strategy, parameters, and model of step 1 are hierarchically optimized and adjusted according to the preset multi-level thresholds to obtain the optimized fuzzy semantic coding signal and input it into the decoding stage.

[0147] Hierarchical coding optimization is the core link of the entire coding system. It aims to hierarchically adjust and optimize the coding strategies, parameters, models, etc. in step 1 according to the comprehensive evaluation score generated in step 9, so as to obtain a coding output with better quality, stronger adaptability and higher robustness. This application divides the value range [0,1] of the comprehensive evaluation score into K levels, each level corresponds to a set of targeted optimization strategies, where the lower the score, the greater the corresponding optimization intensity. Let the preset K level thresholds be τ_1, τ_2,..., τ_{K-1}, where 0=τ_0<τ_1<τ_2<...<τ_{K-1}<τ_K=1.

[0148] For any given coded sample x, calculate its comprehensive evaluation score F(x). If F(x) belongs to the kth level, that is, τ_{k-1}≤F(x)<τ_k, then the kth level optimization strategy is executed for the sample. This application first introduces the specific contents of each level of optimization strategy:

[0149] Level 1 (F(x)<τ_1, lowest level): This level corresponds to the situation where the coding quality, adaptability and robustness are extremely poor, and it is necessary to fundamentally optimize and adjust each link of the coding process: 1. Feature extraction link: reselect the feature set, eliminate the original redundant and irrelevant features, and add more discriminative features related to cognitive activities and brain states, such as adding more connectivity features of brain regions, nonlinear dynamic quantity features, etc. At the same time, optimize the parameters of the feature extraction algorithm, such as the window length, overlap rate, wavelet basis function, etc. of time-frequency analysis, to improve the feature quality. 2. Semantic modeling link: Based on the new feature set, reconstruct the fuzzy semantic model vector corresponding to various cognitive activities. It is possible to consider adding new semantic categories, splitting or merging the original semantics, and updating the feature membership score of each semantic. The semantic modeling algorithm also needs to be optimized, such as adjusting the parameters of the fuzzy membership function, introducing evolutionary strategies to automatically evolve the semantic model, etc. 3. Coding strategy link: thoroughly reconstruct the encoder model, such as using a deeper neural network structure, a more complex kernel method, etc., to improve the coding quality. Multiple encoders can be integrated in parallel to correct and enhance the output of a single encoder. In addition, encoding parameters also need to be readjusted, such as learning rate, regularization strength, loss function settings, etc.

[0150] Level 2 (τ_1≤F(x)<τ_2, lower level): This level corresponds to the situation where the overall encoding performance is poor, and the encoding process needs to be partially reconstructed: 1. Keep the original feature set, but optimize the feature extraction algorithm, such as adjusting the time-frequency analysis window length, wavelet basis function and other parameters to improve feature quality. 2. Optimize the semantic model, such as adjusting the feature membership scores of individual semantics, integrating new features, etc., to avoid large-scale reconstruction. At the same time, optimize the semantic modeling algorithm parameters. 3. Optimize the encoder model structure, such as increasing the number of hidden layers, adjusting the number of neurons, etc., and adjust the encoder training parameters such as learning rate, regularization, etc. The encoding strategy remains unchanged.

[0151] Level 3 (τ_2≤F(x)<τ_3, medium level): The overall encoding performance is average, and no large-scale optimization adjustment is required: 1. The feature set and extraction algorithm remain unchanged, but the algorithm parameters such as window length can be fine-tuned. 2. The semantic model structure remains unchanged, and the feature membership scores of some semantics are adjusted individually. There is no need to optimize the semantic modeling algorithm. 3. The encoder model structure remains unchanged, and the main optimization is to optimize the model training hyperparameters, such as adjusting the learning rate, regularization strength, and increasing the number of training rounds, so that the model converges to a better solution.

[0152] Level 4 (τ_3≤F(x)<τ_4, more advanced): The overall encoding performance is good, and only minor adjustments are required: 1. The feature set and extraction algorithm remain unchanged, but the algorithm parameters such as window length and frequency resolution can be slightly adjusted. 2. The semantic model remains unchanged. 3. The encoder model structure and training algorithm remain unchanged, and the training hyperparameters such as learning rate and regularization strength are slightly adjusted to continue to optimize the model in local areas.

[0153] Level 5 (τ_4≤F(x)≤1, the highest level): The coding quality, adaptability and robustness have reached excellent levels, the coding strategy remains unchanged, and the fuzzy semantic coding signal is directly output.

[0154] This application takes the first-level lowest level optimization as an example to introduce the specific process of hierarchical optimization in detail. For the coding sample x whose comprehensive evaluation score F(x) belongs to the lowest level, it is necessary to fundamentally reconstruct and optimize each link of the coding process:

[0155] Feature extraction optimization: 1. Re-preprocess the raw EEG data. In addition to standard baseline correction, bandpass filtering and other steps, more preprocessing algorithms need to be added to improve data quality, such as independent component artifact removal, Laplace or surface filtering, etc. 2. Redesign the feature set. First, based on domain knowledge and literature analysis, list more potential features that may be related to cognitive activities, such as functional connectivity matrix, local quantization and other features. Then, the most discriminative feature subset is automatically selected from the candidate set through feature selection algorithms (such as Relief, mutual information, etc.). 3. Optimize the parameters of the feature extraction algorithm. For time domain features, the window length parameters can be fine-tuned; for frequency domain features, the wavelet basis function, frequency modulation and other parameters can be adjusted; for functional connectivity features, the frequency band, time delay and other settings of coherence calculation can be changed. 4. Integrate multiple heterogeneous feature extraction algorithms in parallel, such as parallel superposition Fourier, wavelet, empirical mode decomposition and other algorithms, to generate heterogeneous feature sets and give full play to the advantages of integrated learning.

[0156] Semantic modeling optimization: 1. Reconstruct the fuzzy semantic model vector based on the new feature set. First, determine the newly added and removed semantic categories, and then assign new feature membership scores to each semantic.

[0157] 2. Improve the semantic modeling algorithm, such as using evolutionary strategies to encode and evolve the fuzzy semantic model in the semantic space so that it can achieve optimal performance on a given training set. A hierarchical semantic model can also be designed, where each semantic is composed of sub-semantic levels.

[0158] 3. Optimize the parameters of the semantic modeling algorithm, such as the shape parameters of the membership function, the kernel function parameters, etc. For the commonly used triangular membership function μ(x;a,b,c)=max(min((xa) / (ba), (cx) / (cb)),0), this application needs to optimize the three parameters (a,b,c) so that the generated membership function can maximize the contribution of each feature to the semantics. This can be done through optimization algorithms such as genetic algorithms, encoding (a,b,c) as population individuals, using the performance of the membership function on the training data (such as classification accuracy) as the fitness function, and continuously evolving better membership function parameter combinations through genetic operations such as cross-breeding and mutation. For other forms of membership functions such as Gaussian kernel functions, their parameters (such as mean, variance, etc.) can also be optimized in a similar way.

[0159] Optimization of encoding strategies: 1. Reconstruct the encoder model architecture, such as using deeper convolutional neural networks, long short-term memory networks, Transformer and other advanced structures, to significantly improve the nonlinear fitting ability of the encoder. 2. Integrate multiple heterogeneous encoder models in parallel, such as GBDT encoder, kernel method encoder, etc., to form an encoder integration system and give full play to their respective advantages. At the same time, it is necessary to design reasonable integration strategies, such as weighted voting, stacking, etc. 3. Optimize encoder training parameters, such as learning rate strategies (such as exponential decay, cyclical, etc.), batch normalization, data enhancement, loss functions (such as focal loss, etc.), etc., to improve convergence speed and generalization performance. 4. Consider introducing strategies such as semi-supervised learning, transfer learning, and adversarial learning to use unlabeled data or other task knowledge to improve encoder performance. 5. Correct the encoder output, such as designing artificial rules based on the knowledge base, pruning and enhancing the encoding vector, and improving the encoding quality.

[0160] Through the above series of targeted optimization and adjustments, the coding quality, adaptability and robustness of the lowest level 1 coding samples will be greatly improved after reconstruction, laying the foundation for subsequent decoding and application.

[0161] In order to implement the fuzzy semantic coding method based on EEG signals corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of a fuzzy semantic coding device 200 provided in an embodiment of the present application is shown. For the convenience of description, only the parts related to the present embodiment are shown. The fuzzy semantic coding device 200 provided in an embodiment of the present application includes:

[0162] A preliminary coding unit 201 is used to perform preliminary fuzzy semantic coding on the EEG data to be coded, generate an original coded signal, and obtain a coding quality corresponding to the original coded signal;

[0163] The threshold comparison unit 202 is used to input the coding quality into a preset primary quality evaluation model, output a primary quality evaluation value, compare the primary quality evaluation value with a preset threshold, and generate label information corresponding to the original coded signal; wherein the label information includes any one of potential compliance or non-compliance;

[0164] An environment analysis unit 203 is used to determine the original coded signal with tag information as a potential compliance as a target coded signal, perform environmental adaptability analysis on the target coded signal, and obtain an environmental impact score corresponding to the target coded signal;

[0165] The secondary evaluation unit 204 is used to merge the environmental impact score with the corresponding coding quality to generate an adaptability feature vector, input the adaptability feature vector into a preset secondary adaptability evaluation model, and output a secondary adaptability evaluation value;

[0166] An evaluation acquisition unit 205 is used to acquire a robustness parameter corresponding to each original coded signal, input the robustness parameter into a preset robustness evaluation model, and acquire a robustness evaluation value corresponding to each original coded signal;

[0167] The primary evaluation unit 206 is used to input the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each original coded signal into a preset comprehensive evaluation model, and output a comprehensive evaluation value corresponding to each original coded signal;

[0168] The coding completion unit 207 is used to determine an optimization strategy for each original coded signal according to the comprehensive evaluation value, so as to complete the fuzzy semantic coding of each original coded signal according to the optimization strategy.

[0169] The above-mentioned fuzzy semantic coding device 200 can implement the fuzzy semantic coding method based on EEG signals of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of the present application can refer to the contents of the above-mentioned method embodiment, and will not be repeated in this embodiment.

[0170] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.

[0171] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0172] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0173] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0174] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0175] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.

[0176] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

[0177] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0178] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A fuzzy semantic coding method based on EEG signals, characterized in that: include: Performing preliminary fuzzy semantic coding on the EEG data to be coded, generating an original coded signal, and obtaining a coding quality corresponding to the original coded signal; Input the encoding quality into a preset primary quality evaluation model, output a primary quality evaluation value, compare the primary quality evaluation value with a preset threshold, and generate label information corresponding to the original encoded signal; wherein the label information includes any one of potential compliance or non-compliance; Determine the original coded signal whose tag information is potentially compliant as a target coded signal, perform environmental adaptability analysis on the target coded signal, and obtain an environmental impact score corresponding to the target coded signal; The environmental impact score is integrated with the corresponding coding quality to generate an adaptability feature vector, the adaptability feature vector is input into a preset secondary adaptability evaluation model, and a secondary adaptability evaluation value is output; Obtaining a robustness parameter corresponding to each of the original coded signals, inputting the robustness parameter into a preset robustness evaluation model, and obtaining a robustness evaluation value corresponding to each of the original coded signals; According to the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each of the original coded signals, the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value are input into a preset comprehensive evaluation model, and the comprehensive evaluation value corresponding to each of the original coded signals is output; Determining an optimization strategy for each of the original coded signals according to the comprehensive evaluation value, so as to complete fuzzy semantic coding of each of the original coded signals according to the optimization strategy; The encoding quality includes a plurality of encoding quality parameters, and the encoding quality parameters include at least an encoding deviation, an abnormality index, and a mean deviation; and obtaining the encoding quality corresponding to the original encoded signal includes: Obtaining an expected coded signal corresponding to the original coded signal, and calculating the coding deviation between the original coded signal and the expected coded signal; The density-based anomaly detection method detects abnormal information of the original coded signal, and forms the abnormal index according to the abnormal information; the abnormal information includes a mutation point or an abnormal point; Obtaining a mean vector corresponding to the original coded signal, and calculating the mean deviation between the mean vector corresponding to the expected coded signal and the mean vector corresponding to the original coded signal; The obtaining of the robustness parameter corresponding to each of the original coded signals comprises: Acquire duration information and abnormal interruption information of each of the original coded signals within a predefined semantic duration interval; Constructing a time domain robustness feature vector according to the duration information and the abnormal interruption information; Performing time-frequency analysis on each of the original coded signals to obtain a coded spectrum corresponding to each of the original coded signals; Obtaining anti-interference information of the coded spectrum to preset noise; Constructing a frequency domain robustness feature vector according to the anti-interference information and the coded spectrum; The robustness parameter is constructed according to the time domain robustness feature vector and the frequency domain robustness feature vector.

2. The method according to claim 1, characterized in that The step of performing preliminary fuzzy semantic coding on the EEG data to be coded to generate an original coded signal includes: Preprocessing the EEG data; the preprocessing includes one or more of baseline correction, bandpass filtering, independent component analysis, re-referencing and standardization; Extracting features from the preprocessed EEG signal to obtain feature information related to cognitive activities and intentions, and constructing a feature space based on the feature information; The feature space is input into a pre-trained fuzzy semantic encoder model to map the feature space to a semantic space, and a fuzzy semantic vector is output, wherein the fuzzy semantic vector constitutes the original encoded signal.

3. The method according to claim 1, characterized in that Before inputting the encoding quality into a preset primary quality assessment model, the method further includes: Determining key parameters among the encoding quality parameters corresponding to the encoding quality, and constructing a quality feature vector according to the key parameters; Obtaining a fuzzy membership function corresponding to the quality feature vector; A fuzzy rule base is constructed according to the fuzzy membership function to generate the primary quality evaluation model, and the primary quality evaluation model is used to output a primary quality assessment value corresponding to the quality feature vector.

4. The method according to claim 3, characterized in that: The encoding quality parameters corresponding to the encoding quality include the encoding deviation mean, encoding deviation variance, encoding deviation kurtosis, anomaly index and mean deviation; the environmental impact score includes at least the noise impact score, temperature impact score, vibration impact score and electromagnetic interference impact score; the environmental impact score is merged with the corresponding encoding quality to generate an adaptive feature vector, including: Concatenate the key parameters with the environmental impact score to obtain an initial feature vector; Normalizing the initial feature vector, and constructing a second-order interaction term in the normalized initial feature vector according to the coding deviation mean and each environmental impact score; The plurality of second-order interaction terms are concatenated with the initial feature vector to obtain the adaptive feature vector.

5. The method according to claim 1, characterized in that Determining the optimization strategy for each of the original coded signals according to the comprehensive evaluation value includes: If the comprehensive evaluation value is less than the first evaluation value, replacing the encoder corresponding to the preliminary fuzzy semantic encoding of the EEG data, re-performing feature extraction, and replacing the feature extraction algorithm corresponding to the encoding quality; If the comprehensive evaluation value is greater than or equal to the first evaluation value and less than the second evaluation value, optimizing the encoder and the feature extraction algorithm; If the comprehensive evaluation value is greater than or equal to the second evaluation value and less than the third evaluation value, adjusting the parameters corresponding to the feature extraction algorithm and optimizing the training hyperparameters of the encoder; If the comprehensive evaluation value is greater than or equal to the third evaluation value, directly output the original coded signal; The first evaluation value is smaller than the second evaluation value, and the second evaluation value is smaller than the third evaluation value.

6. A fuzzy semantic coding device, used to implement the fuzzy semantic coding method based on EEG signals as described in any one of claims 1 to 5, characterized in that: include: A preliminary coding unit, used for performing preliminary fuzzy semantic coding on the EEG data to be coded, generating an original coded signal, and obtaining a coding quality corresponding to the original coded signal; A threshold comparison unit, configured to input the coding quality into a preset primary quality evaluation model, output a primary quality evaluation value, compare the primary quality evaluation value with a preset threshold, and generate label information corresponding to the original coded signal; wherein the label information includes any one of potential compliance or non-compliance; An environmental analysis unit, configured to determine the original coded signal with the tag information as a potential match as a target coded signal, perform environmental adaptability analysis on the target coded signal, and obtain an environmental impact score corresponding to the target coded signal; A secondary evaluation unit, used for fusing the environmental impact score with the corresponding coding quality to generate an adaptability feature vector, inputting the adaptability feature vector into a preset secondary adaptability evaluation model, and outputting a secondary adaptability evaluation value; An evaluation acquisition unit, used to acquire a robustness parameter corresponding to each of the original coded signals, input the robustness parameter into a preset robustness evaluation model, and acquire a robustness evaluation value corresponding to each of the original coded signals; A primary evaluation unit, configured to input the primary quality evaluation value, the secondary adaptability evaluation value and the robustness evaluation value of each of the original coded signals into a preset comprehensive evaluation model, and output a comprehensive evaluation value corresponding to each of the original coded signals; The coding completion unit is used to determine an optimization strategy for each of the original coded signals according to the comprehensive evaluation value, so as to complete the fuzzy semantic coding of each of the original coded signals according to the optimization strategy.

7. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 1 to 5.