An anti-cheating system and anti-cheating method for electronic scales

By installing load sensors on the weighing platform of the electronic scale and performing security evaluation and optimization of the encryption system, the problems of increased complexity and management difficulty of encryption system caused by improper key management in the prior art are solved, and the accuracy and security of weighing data are achieved, and the encryption efficiency and overall performance are improved.

CN119164476BActive Publication Date: 2025-04-18XINXIANG LONGKE PRECISION WEIGHING INSTR CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411660942.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-18
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The security of existing electronic scale encryption systems depends on the security management of the key. If the key management is improper, the attacker can obtain the key and decrypt the weighing data, thereby tampering with the weighing results, resulting in increased complexity and management difficulty of the encryption system without bringing the expected security.

Method used

Install a load sensor under the weighing platform of the electronic scale, detect pressure changes in real time and convert them into electrical signals, convert the signal into digital signals through amplifiers and analog-to-digital converters, and calibrate to determine whether there is a basic error between the output signal and the actual weight of the weight. Then, the weighed data is encrypted through the pre-generated key and encryption mode, the security of the encryption system is evaluated, and the encryption system is optimized and dynamically adjusted based on the evaluation results, encrypting speed to improve encryption efficiency.

Benefits of technology

By ensuring the accuracy and security of weighing data, the complexity and management difficulty of the system are reduced, the encryption efficiency and overall performance are improved, real-time monitoring and visualization of data are realized, and the user experience and the practical application value of the system are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119164476B_ABST
    Figure CN119164476B_ABST
Patent Text Reader

Abstract

The present invention discloses an anti-cheating system and an anti-cheating method for an electronic scale, and specifically relates to the field of electronic scales: accurate weight measurement is achieved through real-time detection and signal processing by a load sensor, encryption technology is used to protect the security of data transmission, encryption speed and parameter optimization are dynamically adjusted, the encryption efficiency of the electronic scale encryption system is improved, and the system load is reduced; efficient remote transmission and real-time monitoring of data are achieved through NB‑IoT technology, the reliability and user experience of the electronic scale encryption system are greatly improved, and at the same time, the electronic scale encryption system is optimized based on the evaluation result to ensure the security and stability of the data, which significantly reduces the complexity and management difficulty of the electronic scale encryption system and brings expected security and performance improvements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic scales, and in particular to an anti-cheating system and an anti-cheating method for electronic scales. Background Art

[0002] An electronic scale is a device that uses electronic sensor technology to measure weight, and is usually used to accurately weigh items. It is widely used in commercial, industrial and household fields, providing high-precision and convenient measurement results. The anti-cheating system of an electronic scale is designed to prevent human or technical interference during the weighing process. The system ensures the accuracy and reliability of weighing data through methods such as encrypted transmission, built-in anti-tampering mechanism and real-time monitoring. This anti-cheating system is widely used in commercial transactions and industrial production to ensure fairness and integrity. The anti-cheating technology of electronic scales includes sensor protection, data encryption, calibration lock and real-time monitoring. Through packaging design, tamper-proof data transmission, strict calibration mechanism and abnormal operation alarm system, it ensures the accuracy and reliability of weighing data and effectively prevents various cheating behaviors.

[0003] The prior art has the following deficiencies:

[0004] The transmission of weighing data from the sensor to the display usually uses encryption technology to prevent it from being intercepted or tampered with during the data transmission process. However, the security of the electronic scale encryption system depends largely on the secure management of the key. If the key is not managed properly, an attacker can obtain the key and decrypt the weighing data, thereby tampering with the weighing result. In this case, encryption increases the complexity and management difficulty of the electronic scale encryption system instead of bringing the expected security. Summary of the invention

[0005] The purpose of the present invention is to provide an anti-cheating system and an anti-cheating method for an electronic scale to solve the deficiencies in the background technology.

[0006] In order to achieve the above object, the present invention provides the following technical solution: an anti-cheating method for an electronic scale, comprising the following steps:

[0007] S1: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals;

[0008] S2: amplifying the electrical signal of the load sensor by an amplifier, converting the amplified signal into a digital signal by an analog-to-digital converter, and receiving the digital signal by a microcontroller and calibrating it to determine whether there is a basic error between the output signal and the actual weight of the weight;

[0009] S3: For weighing data without basic errors, encrypt them using pre-generated keys and encryption modes, and evaluate the security of the encryption system based on the fluctuation range of the key replacement frequency in the key generation environment and the impact of the encryption speed in the encryption mode on the overall performance of the system;

[0010] S4: According to the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized;

[0011] S5: For the encryption system with medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency;

[0012] S6: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it is visualized.

[0013] Preferably, in S2, standard weights of different weights are placed on the weighing platform to verify the accuracy of the system output, ensure that all measured data are within the expected error range, and determine whether there is a basic error between the output signal and the actual weight of the weight, specifically:

[0014] The digital signal of the analog-to-digital converter is converted into the actual weight value, and the original value output by the analog-to-digital converter is mapped to the actual weight through the calibration coefficient. The calibration formula is: ; Where K is the predetermined calibration coefficient, record the actual weight value Wstandard of the placed standard weight, and calculate the measurement error Error: Error=Wactual−Wstandard;

[0015] Determine whether the error is within the allowable range. If the error is greater than or equal to the predetermined allowable range ±0.1g, it is considered that there is a basic error. Adjust the calibration coefficient K according to the error to reduce the error. The adjustment formula is: ; In the formula, is the adjusted calibration factor, Calibration factor before adjustment.

[0016] Preferably, in S3, a key change frequency fluctuation index is generated according to the key change frequency fluctuation amplitude in the key generation environment, and the key change frequency fluctuation index is obtained by:

[0017] Collect the time series data of key replacement frequency {f1,f2,…,fi,…,fn}, i=1,2,...,n, where fi represents the key replacement frequency on the i-th day; select the wavelet basis function ψ(i) to perform discrete wavelet transform on the time series data and decompose it into approximate coefficients and detail coefficients of different scales, expressed as: ; In the formula, is the discrete wavelet basis function, j is the scale index, k is the translation index, For the discrete wavelet coefficients at scale j and position k, calculate the energy of the detail coefficients, expressed as: ; is the detail coefficient energy at scale j, and the sum of the detail coefficient energies at all scales is calculated, that is, the key change frequency fluctuation index is calculated.

[0018] Preferably, in S3, an encryption speed interference index is generated according to the influence of the encryption speed in the encryption mode on the overall system performance, and the method for obtaining the encryption speed interference index is:

[0019] Obtain the time series data of system performance indicators and encryption speed during the encryption process, and mark them as x(t) and y(t) respectively, where x(t) represents the system performance indicator at time t and the encryption speed is y(t); preprocess the collected time series data, and perform discrete Fourier transform on the preprocessed system performance indicators and encryption speed data to obtain frequency domain representation, expressed as: X(f) ; X(f) is the frequency domain of x(t) at frequency f, is the kernel function of Fourier transform, N is the length of the time series, i is the imaginary unit; Y(f) ; Y(f) is the frequency domain of y(t) at frequency f; calculate the system performance index and the spectrum energy of the encryption speed as the basis of the encryption speed interference index, the expression is: ; is the spectrum energy of the system performance indicator, ; is the spectrum energy of the encryption speed. After comparative analysis, the encryption speed interference index is calculated. The specific calculation expression is: ; In the formula, is the encryption speed interference index.

[0020] Preferably, in S3, the key change frequency fluctuation index and the encryption speed interference index are converted into a first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model predicts the security analysis value label of the encryption system with each group of first eigenvectors as the prediction target, and minimizes the sum of prediction errors of the security analysis value labels of all encryption systems as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The security analysis value of the encryption system is determined according to the model output results.

[0021] Preferably, in S4, the security of the encryption system is divided into a high security level, a medium security level and a low security level, specifically:

[0022] The obtained security analysis value of the encryption system is compared with a gradient standard threshold, where the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the security analysis value of the encryption system is compared with the first standard threshold and the second standard threshold respectively;

[0023] If the security analysis value of the encryption system is greater than the second standard threshold, the security of the encryption system is classified as a high security level and an encryption security signal is generated; if the security analysis value of the encryption system is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, the security of the encryption system is classified as a medium security level and no encryption security signal is generated; if the security analysis value of the encryption system is less than the first standard threshold, the security of the encryption system is classified as a low security level and no encryption security signal is generated.

[0024] Preferably, in S5, for the encryption system of the medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system during the adjustment process is further analyzed, specifically:

[0025] The security analysis values ​​of the encryption system generated within a fixed time period during the adjustment process are collected, and the corresponding data set is established. The standard deviation and mean of the data set are calculated, and the standard deviation and mean of the security analysis values ​​are calculated. After analyzing them, the encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

[0026] Preferably, if the mean value of the security analysis value in the data set is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is less than the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is stable and high, and there is no need to adjust the encryption parameters and speed, and no warning signal is generated at this time;

[0027] If the mean value of the security analysis value is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is high but the fluctuation is large, and the encryption speed needs to be increased. At the same time, the stability of the system needs to be monitored. At this time, a third-level warning signal is generated;

[0028] If the mean value of the security analysis value is less than the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is low and fluctuates greatly, and it is necessary to slow down the encryption speed and optimize the encryption parameters to improve security. At this time, a first-level warning signal is generated;

[0029] If the mean of the security analysis values ​​is less than the reference threshold of the mean of the security analysis values, and the standard deviation of the security analysis values ​​is less than the reference threshold of the standard deviation of the security analysis values, the security of the encryption system is low but stable, and the encryption algorithm and parameter settings need to be re-evaluated and significantly optimized. At this time, a secondary warning signal is generated.

[0030] The present invention also provides an anti-cheating system for an electronic scale, comprising a detection module, a signal processing module, an encryption evaluation module, a security division module, a dynamic adjustment module, and a data transmission and visualization module;

[0031] Detection module: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals;

[0032] Signal processing module: The electrical signal of the load sensor is amplified by an amplifier, and the amplified signal is converted into a digital signal by an analog-to-digital converter. The digital signal is received by the microcontroller and calibrated to determine whether there is a basic error between the output signal and the actual weight of the weight;

[0033] Encryption evaluation module: For weighing data without basic errors, the weighing data is encrypted by using pre-generated keys and encryption modes. The security of the encryption system is evaluated based on the fluctuation range of the key replacement frequency in the key generation environment and the influence of the encryption speed in the encryption mode on the overall performance of the system.

[0034] Security classification module: Based on the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized;

[0035] Dynamic adjustment module: For encryption systems with medium security levels, the encryption speed is dynamically adjusted through the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

[0036] Data transmission and visualization module: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it will be visualized.

[0037] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0038] 1. The present invention ensures the accuracy of weighing data by installing a load sensor under the weighing platform; signal amplification and analog-to-digital conversion make data processing more accurate. The transmission and key management of encrypted data improve the security and efficiency of the system by pre-generating keys and dynamically adjusting the encryption speed. At the same time, the use of NB-IoT technology for remote data transmission realizes real-time monitoring and visualization of data, significantly improving the convenience and security of data management.

[0039] 2. The present invention not only ensures the secure transmission of weighing data and prevents data from being intercepted or tampered with during transmission, but also reduces the complexity and management difficulty of the system by evaluating and optimizing the security of the encryption system. Furthermore, by dynamically adjusting the encryption speed and parameters, the overall performance and operating efficiency of the system are improved. In addition, the remote transmission and real-time visual display of data enable users to easily monitor and manage weighing data, improving the user experience and the practical application value of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0041] Figure 1 The figure is a flow chart of the method of the present invention.

[0042] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Example 1, please refer to Figure 1 As shown, the anti-cheating method for an electronic scale described in this embodiment includes the following steps:

[0045] S1: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals;

[0046] S2: amplifying the electrical signal of the load sensor by an amplifier, converting the amplified signal into a digital signal by an analog-to-digital converter, and receiving the digital signal by a microcontroller and calibrating it to determine whether there is a basic error between the output signal and the actual weight of the weight;

[0047] S3: For weighing data without basic errors, encrypt them using pre-generated keys and encryption modes, and evaluate the security of the encryption system based on the fluctuation range of the key replacement frequency in the key generation environment and the impact of the encryption speed in the encryption mode on the overall performance of the system;

[0048] S4: According to the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized;

[0049] S5: For the encryption system with medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency;

[0050] S6: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it is visualized.

[0051] Among them, in S1, a number of load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals.

[0052] Select a high-precision load cell (such as a strain gauge sensor) suitable for electronic scale applications. Make sure all sensors are calibrated and functionally tested before installation to ensure their accuracy and stability. Determine the installation position of the load cell under the weighing platform. Usually, the sensors are evenly distributed at the four corners of the platform or at multiple supporting points to ensure the accuracy and stability of the weighing. Use screws or adhesives to firmly fix the sensor between the weighing platform and the base to ensure that the sensor can accurately sense the pressure changes on the platform. Connect the output wires of the load cell to the amplifier or data acquisition module to ensure that the signal of each sensor can be read correctly.

[0053] S2: The electrical signal of the load sensor is amplified by an amplifier, and the amplified signal is converted into a digital signal by an analog-to-digital converter. The digital signal is received by a microcontroller and calibrated to determine whether there is a basic error between the output signal and the actual weight of the weight.

[0054] Connect the output of the load sensor to the input of the amplifier. The load sensor converts the weight change into very weak electrical signals, which need to be amplified for subsequent processing. Select a suitable amplifier, usually a precision instrument amplifier (such as the INA series), and ensure that it has high gain, low noise, and high linearity to accurately amplify the sensor signal. Configure the gain of the amplifier according to the strength of the load sensor output signal and the required input range. The gain value is usually set by adjusting the gain resistor of the amplifier. Ensure that the amplifier has a stable power supply and connect the amplified signal output to the input of the analog-to-digital converter (ADC).

[0055] Select a suitable analog-to-digital converter, usually a high-resolution (such as 24-bit) and high-sampling-rate ADC is required to ensure the accuracy and real-time performance of the weight data. Connect the output of the amplifier to the input of the ADC to ensure that the signal can be correctly sampled and converted by the ADC. Configure the sampling rate and resolution of the ADC according to the system requirements. Set the reference voltage to ensure that the input signal range of the ADC matches the output signal range of the amplifier. Convert the amplified analog signal into a digital signal. These digital signals represent the weight data on the weighing platform.

[0056] Connect the digital signal output of the ADC to the input port of the microcontroller. The microcontroller receives the digital signal from the ADC through a communication interface such as SPI or I2C. The microcontroller stores the received digital signal in memory, ready for further processing. Perform a preliminary calibration on the received data to eliminate the basic deviations of the sensor and amplifier. Use pre-defined calibration constants to adjust the data to make it close to the true value. If there is a nonlinear relationship between the sensor output and the weight, use a linearization algorithm to convert the digital signal into linear weight data. If the ambient temperature changes affect the sensor accuracy, use the data of the temperature sensor to perform temperature compensation on the weight data to ensure the accuracy of the measurement results. Use standard weights of known weight to finely calibrate the system and adjust the calibration constants to minimize the error. The calibration data is stored in the microcontroller and used to adjust the measurement results in real time.

[0057] Place standard weights of different weights on the weighing platform to verify the accuracy of the system output. Ensure that all measured data are within the expected error range and determine whether there is a basic error between the output signal and the actual weight of the weight, specifically:

[0058] Convert the ADC digital signal into the actual weight value, and map the original value output by the ADC to the actual weight through the calibration coefficient. The calibration formula is: ; Where K is the predetermined calibration coefficient, record the actual weight value Wstandard of the placed standard weight, and calculate the measurement error Error: Error=Wactual−Wstandard;

[0059] Determine whether the error is within the allowable range. If the error is greater than or equal to the predetermined allowable range of ±0.1g, it is considered that there is a basic error.

[0060] Adjust the calibration coefficient K according to the error to reduce the error. The adjustment formula is: ; In the formula, is the adjusted calibration factor, Adjust the calibration coefficient before, remeasure and calculate the error, and repeat the adjustment process until the error is within the allowable range.

[0061] S3: For weighing data without basic errors, encrypt them using pre-generated keys and encryption modes. Evaluate the security of the encryption system based on the fluctuation range of the key replacement frequency in the key generation environment and the impact of the encryption speed in the encryption mode on the overall performance of the system.

[0062] Generate an encryption key using a high-quality random number generator (such as a hardware random number generator). For example, use the AES-256 algorithm, so a 256-bit key needs to be generated. Store the generated key securely in a hardware security module (HSM) or secure storage media to prevent unauthorized access. Implement a key rotation strategy to regularly change keys to improve security and ensure that new keys replace old keys in a timely manner.

[0063] Select Advanced Encryption Standard (AES) as the encryption algorithm. Select an appropriate encryption mode, such as CBC (Cipher Block Chaining Mode) or GCM (Galois / Counter Mode). GCM mode provides not only encryption but also data integrity verification.

[0064] Select an encryption mode and generate an initialization vector (IV). The IV must be unique and unpredictable. Using the generated key and IV, encrypt the weight data. Encapsulate the encrypted data, IV, and authentication tag together and prepare for transmission.

[0065] Use secure communication protocols (such as TLS or HTTPS) to transmit encrypted data to remote servers or other devices. Ensure the security of the transmission channel to prevent man-in-the-middle attacks. Store the encrypted data in a secure database or storage device. Ensure that the storage system has access control and logging capabilities to monitor and record all data access operations.

[0066] The remote server or device receives the encrypted data. The IV and Tag are extracted from the received data and used to decrypt and verify the data. The data is decrypted using the same key and IV, and the integrity of the data is verified.

[0067] The key change frequency fluctuation index is generated according to the key change frequency fluctuation amplitude in the key generation environment. The key change frequency fluctuation index is obtained as follows:

[0068] Collect the time series data of key replacement frequency {f1,f2,…,fi,…,fn}, i=1,2,...,n, where fi represents the key replacement frequency on the i-th day; select the wavelet basis function ψ(i) to perform discrete wavelet transform on the time series data and decompose it into approximate coefficients and detail coefficients of different scales, expressed as: ; In the formula, is the discrete wavelet basis function, j is the scale index, k is the translation index, For the discrete wavelet coefficients at scale j and position k, calculate the energy of the detail coefficients, expressed as: ; is the detail coefficient energy at scale j, and the sum of the detail coefficient energies at all scales is calculated, that is, the key change frequency fluctuation index is calculated.

[0069] The key change frequency fluctuation index reflects the degree of fluctuation in the key change frequency. Specifically, a higher key change frequency fluctuation index indicates greater instability in the key change frequency, that is, the time intervals between key changes change more frequently and dramatically. This may mean that there are inconsistencies in the key change strategy or that the system responds to external threats more frequently. A low fluctuation index indicates that the key change frequency is relatively stable and the key management system is more consistent and predictable.

[0070] The encryption speed interference index is generated according to the influence of the encryption speed on the overall system performance in the encryption mode. The method for obtaining the encryption speed interference index is:

[0071] Obtain the time series data of system performance indicators (such as CPU usage, memory consumption) and encryption speed during the encryption process, and mark them as x(t) and y(t) respectively, where x(t) represents the system performance indicator at time t, and the encryption speed is y(t); preprocess the collected time series data, such as removing trends and normalizing, and perform discrete Fourier transform on the preprocessed system performance indicators and encryption speed data to obtain frequency domain representation, expressed as: X(f) ; X(f) is the frequency domain of x(t) at frequency f, is the kernel function of Fourier transform, N is the length of the time series, i is the imaginary unit; Y(f) ; Y(f) is the frequency domain of y(t) at frequency f; calculate the system performance index and the spectrum energy of the encryption speed as the basis of the encryption speed interference index, the expression is: ; is the spectrum energy of the system performance indicator, ; is the spectrum energy of the encryption speed. After comparative analysis, the encryption speed interference index is calculated. The specific calculation expression is: ; In the formula, is the encryption speed interference index.

[0072] The larger the encryption speed interference index, the more significant the impact of encryption speed on the overall system performance. Specifically, a larger encryption speed interference index means that the system performance (such as CPU usage, memory consumption, etc.) is more disturbed during the encryption process. Such interference may cause the system response time to be longer, the processing power to be reduced, and may even affect the execution of other parallel tasks. When the encryption speed interference index is high, it means that the encryption operation requires more computing resources. This may cause the system to have bottlenecks when performing encryption tasks, especially in embedded systems with limited resources. This situation will reduce the overall efficiency of the system and worsen the user experience. To alleviate this problem, it is necessary to optimize the encryption algorithm, reasonably allocate computing resources, or increase hardware resources to support encryption operations when necessary.

[0073] The key change frequency fluctuation index and the encryption speed interference index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model predicts the security analysis value label of the encryption system for each group of first eigenvectors as the prediction target, and minimizes the sum of prediction errors of the security analysis value labels of all encryption systems as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The security analysis value of the encryption system is determined according to the model output results.

[0074] The method for obtaining the security analysis value of the encryption system is: from the first feature vector training data of the trained machine learning model, obtain the corresponding function expression: ; In the formula, is the output function of the model, The key replacement frequency fluctuation index, is the encryption speed interference index, Security analysis value for the encryption system.

[0075] S4: Based on the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized.

[0076] The obtained security analysis value of the encryption system is compared with a gradient standard threshold, where the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the security analysis value of the encryption system is compared with the first standard threshold and the second standard threshold respectively;

[0077] If the security analysis value of the encryption system is greater than the second standard threshold, it means that the security of the encryption system is relatively high, the security of the encryption system is classified as a high security level, and an encryption security signal is generated;

[0078] If the security analysis value of the encryption system is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it means that the security of the encryption system is general, and the security of the encryption system is classified as medium security level, and no encryption security signal is generated;

[0079] If the security analysis value of the encryption system is less than the first standard threshold, it means that the security of the encryption system is low, the security of the encryption system is classified as a low security level, and no encryption security signal is generated.

[0080] Optimize low-security encryption systems, specifically: Check the key generation, distribution, storage, and destruction processes to ensure the security and reliability of the key management process. Verify whether the encryption algorithm currently in use has known vulnerabilities and whether it complies with the latest security standards (such as NIST or ISO / IEC 27001). If the encryption algorithm currently in use has been proven to have vulnerabilities or is inefficient, consider upgrading to a more secure and efficient algorithm. For example, use AES-256 instead of AES-128. Use hardware security modules (HSM) or security chips to store and manage keys to ensure that the keys are not leaked during generation, distribution, and storage. Change keys regularly and use multi-factor authentication to protect key access.

[0081] S5: For encryption systems with a medium security level, the encryption speed is dynamically adjusted through a microcontroller, and the security of the encryption system during the adjustment process is further analyzed. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

[0082] Set up the microcontroller to ensure that it has hardware acceleration capabilities (such as AES-NI) and dynamic adjustment capabilities. Load the necessary encryption algorithm libraries (such as mbedTLS, OpenSSL) and initialize the encryption configuration. Record the speed and frequency of current encryption tasks and collect system resource usage. Analyze the collected data to determine the impact of the current system load and encryption speed on the overall performance. Set performance thresholds and encryption speed adjustment policies. For example, when the CPU utilization rate exceeds 80%, reduce the encryption speed; when the CPU utilization rate is less than 50%, increase the encryption speed.

[0083] Dynamically adjust encryption speed through the microcontroller to: Adjust encryption batch size: increase or decrease the size of the data block encrypted each time. Dynamically adjust the priority of encryption tasks in the operating system to balance encryption speed and system performance. Enable or disable hardware acceleration function and switch dynamically as needed.

[0084] Continuously monitor system performance and encryption speed to ensure the effectiveness of the adjustment strategy. Record the results of each adjustment and adjust the strategy to optimize performance.

[0085] Further analysis is conducted on the security of the encryption system during the adjustment process. Specifically, the security analysis values ​​of the encryption system generated within a fixed time period during the adjustment process are collected, and the corresponding data set is established. The standard deviation and mean of the data set are calculated, and the standard deviation and mean of the security analysis values ​​are calculated. After analyzing them, the encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

[0086] If the mean value of the security analysis value in the data set is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is less than the reference threshold value of the standard deviation of the security analysis value, it means that the security of the encryption system is stable and high, and there is no need to adjust the encryption parameters and speed. At this time, no warning signal is generated;

[0087] If the mean value of the security analysis value is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, it means that the security of the encryption system is high but the fluctuation is large, and the encryption speed needs to be increased. At the same time, the stability of the system needs to be monitored. At this time, a third-level warning signal is generated;

[0088] If the mean value of the security analysis value is less than the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, it means that the security of the encryption system is low and fluctuates greatly, and it is necessary to slow down the encryption speed and optimize the encryption parameters to improve security. At this time, a first-level warning signal is generated;

[0089] If the mean of the security analysis value is less than the reference threshold of the mean of the security analysis value, and the standard deviation of the security analysis value is less than the reference threshold of the standard deviation of the security analysis value, it means that the security of the encryption system is low but stable, and the encryption algorithm and parameter settings need to be re-evaluated and significantly optimized. At this time, a secondary warning signal is generated.

[0090] In this application, the encryption speed is dynamically adjusted by a microcontroller, and the security of the encryption system during the adjustment process is further analyzed, which helps to optimize system performance and data security. The specific steps include setting up a microcontroller with hardware acceleration function, loading the encryption algorithm library, recording and analyzing the data of encryption speed and system load, and dynamically adjusting the encryption speed and parameters according to the analysis results. At the same time, the system performance is continuously monitored and the security analysis value is collected, the mean and standard deviation are calculated, and an early warning signal is generated according to a predetermined threshold, and the encryption strategy is adjusted accordingly. Not only can the system efficiency be maximized while ensuring data security, but also timely dynamic adjustments can be made to ensure that the system is always in the best operating state.

[0091] S6: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it is visualized.

[0092] Ensure that the electronic scale is equipped with an NB-IoT module for wireless communication. Equip a remote server to support receiving and processing data transmitted by NB-IoT. Configure encryption and data transmission software on the electronic scale. Configure data reception, decryption and visualization software on the remote server.

[0093] Encrypt the weighing data. Use advanced encryption standards such as AES-256 to encrypt the weighing data to ensure the security of data transmission.

[0094] Initialize the NB-IoT module and configure the connection parameters of the NB-IoT module, including APN (Access Point Name), server address and port, etc.

[0095] Establish a connection with the operator network through the NB-IoT module to ensure that data can be transmitted through the network. Transmit the encrypted weighing data through the NB-IoT module. Send the encrypted data packet to the specified remote server address and port through the UDP / TCP protocol.

[0096] The remote server receives the data transmitted by the NB-IoT module. Configure the server's network listening port to receive the data packets transmitted from the NB-IoT module. Decrypt the received data. Decrypt the data using the same AES-256 key and initialization vector (IV) as used for encryption to obtain the original weighing data.

[0097] Visualize the decrypted weighing data. Use visualization tools (such as Matplotlib, Plotly, Grafana, etc.) to graphically display the weighing data for users to view intuitively.

[0098] In this embodiment, by installing several load sensors under the weighing platform of the electronic scale, when the object is placed on the platform, the load sensor detects the pressure change in real time and converts the pressure change into an electrical signal; the electrical signal of the load sensor is amplified by an amplifier, and the amplified signal is converted into a digital signal by an analog-to-digital converter, and the digital signal is received by a microcontroller and calibrated to determine whether there is a basic error between the output signal and the actual weight of the weight; accurate measurement is achieved through real-time detection and signal processing of the load sensor. The encryption and dynamic adjustment mechanism enhances the security of data transmission, optimizes encryption efficiency, and reduces system load.

[0099] In this embodiment, for weighing data without basic error, it is encrypted by using pre-generated keys and encryption modes, and the security of the encryption system is evaluated according to the fluctuation amplitude of the key replacement frequency in the key generation environment and the influence of the encryption speed in the encryption mode on the overall performance of the system; according to the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system of low security level is optimized; for the encryption system of medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system during the adjustment process is further analyzed, and the encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency; the encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology, and when the remote server receives the data, it is visualized. Not only the accuracy and security of the weighing data are ensured, but also the encryption efficiency is improved through dynamic adjustment and optimization, and the NB-IoT technology is used to realize the efficient remote transmission and real-time monitoring of data, which greatly improves the overall performance and user experience of the system.

[0100] Example 2, please refer to Figure 2 As shown, the anti-cheating system for an electronic scale described in this embodiment includes a detection module, a signal processing module, an encryption evaluation module, a security division module, a dynamic adjustment module, and a data transmission and visualization module;

[0101] Detection module: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals;

[0102] Signal processing module: The electrical signal of the load sensor is amplified by an amplifier, and the amplified signal is converted into a digital signal by an analog-to-digital converter. The digital signal is received by the microcontroller and calibrated to determine whether there is a basic error between the output signal and the actual weight of the weight;

[0103] Encryption evaluation module: For weighing data without basic errors, the weighing data is encrypted by using pre-generated keys and encryption modes. The security of the encryption system is evaluated based on the fluctuation range of the key replacement frequency in the key generation environment and the influence of the encryption speed in the encryption mode on the overall performance of the system.

[0104] Security classification module: Based on the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized;

[0105] Dynamic adjustment module: For encryption systems with medium security levels, the encryption speed is dynamically adjusted through the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

[0106] Data transmission and visualization module: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it will be visualized.

[0107] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0108] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0109] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0110] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0111] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. An anti-cheating method for an electronic scale, characterized in that: The steps include: S1: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals; S2: amplifying the electrical signal of the load sensor by an amplifier, converting the amplified signal into a digital signal by an analog-to-digital converter, and receiving the digital signal by a microcontroller and calibrating it to determine whether there is a basic error between the output signal and the actual weight of the weight; S3: For weighing data without basic errors, encrypt them using pre-generated keys and encryption modes, and evaluate the security of the encryption system based on the fluctuation range of the key replacement frequency in the key generation environment and the impact of the encryption speed in the encryption mode on the overall performance of the system; S4: According to the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized; S5: For the encryption system with medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency; S6: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it is visualized.

2. The anti-cheating method for an electronic scale according to claim 1, characterized in that: In S2, standard weights of different weights are placed on the weighing platform to verify the accuracy of the system output, ensure that all measured data are within the expected error range, and determine whether there is a basic error between the output signal and the actual weight of the weight, specifically: The digital signal of the analog-to-digital converter is converted into the actual weight value, and the original value output by the analog-to-digital converter is mapped to the actual weight through the calibration coefficient. The calibration formula is: ; Where K is the predetermined calibration coefficient, record the actual weight value Wstandard of the placed standard weight, and calculate the measurement error Error: Error=Wactual−Wstandard; Determine whether the error is within the allowable range. If the error is greater than or equal to the predetermined allowable range ±0.1g, it is considered that there is a basic error. Adjust the calibration coefficient K according to the error to reduce the error. The adjustment formula is: ; In the formula, is the adjusted calibration factor, Calibration factor before adjustment.

3. The anti-cheating method for an electronic scale according to claim 1, characterized in that: In S3, a key change frequency fluctuation index is generated according to the key change frequency fluctuation amplitude in the key generation environment, and the key change frequency fluctuation index is obtained as follows: Collect the time series data of key replacement frequency {f1,f2,…,fi,…,fn}, i=1,2,...,n, where fi represents the key replacement frequency on the i-th day; select the wavelet basis function ψ(i) to perform discrete wavelet transform on the time series data and decompose it into approximate coefficients and detail coefficients of different scales, expressed as: ; In the formula, is the discrete wavelet basis function, j is the scale index, k is the translation index, For the discrete wavelet coefficients at scale j and position k, calculate the energy of the detail coefficients, expressed as: ; is the detail coefficient energy at scale j, and the sum of the detail coefficient energies at all scales is calculated, that is, the key change frequency fluctuation index is calculated.

4. The anti-cheating method for an electronic scale according to claim 3, characterized in that: In S3, an encryption speed interference index is generated according to the influence of the encryption speed on the overall system performance in the encryption mode. The encryption speed interference index is obtained as follows: Obtain the time series data of system performance indicators and encryption speed during the encryption process, and mark them as x(t) and y(t) respectively, where x(t) represents the system performance indicator at time t and the encryption speed is y(t); preprocess the collected time series data, and perform discrete Fourier transform on the preprocessed system performance indicators and encryption speed data to obtain frequency domain representation, expressed as: X(f) ; X(f) is the frequency domain of x(t) at frequency f, is the kernel function of Fourier transform, N is the length of the time series, i is the imaginary unit; Y(f) ; Y(f) is the frequency domain of y(t) at frequency f; calculate the system performance index and the spectrum energy of the encryption speed as the basis of the encryption speed interference index, the expression is: ; is the spectrum energy of the system performance indicator, ; is the spectrum energy of the encryption speed. After comparative analysis, the encryption speed interference index is calculated. The specific calculation expression is: ; In the formula, is the encryption speed interference index.

5. The anti-cheating method for an electronic scale according to claim 4, characterized in that: In S3, the key change frequency fluctuation index and the encryption speed interference index are converted into a first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model predicts the security analysis value label of the encryption system with each group of first eigenvectors as the prediction target, and minimizes the sum of prediction errors of the security analysis value labels of all encryption systems as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The security analysis value of the encryption system is determined according to the model output results.

6. The anti-cheating method for an electronic scale according to claim 5, characterized in that: In S4, the security of the encryption system is divided into high security level, medium security level and low security level, specifically: The obtained security analysis value of the encryption system is compared with a gradient standard threshold, where the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the security analysis value of the encryption system is compared with the first standard threshold and the second standard threshold respectively; If the security analysis value of the encryption system is greater than the second standard threshold, classifying the security of the encryption system as a high security level and generating an encryption security signal; If the security analysis value of the encryption system is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, the security of the encryption system is classified as a medium security level, and no encryption security signal is generated; If the security analysis value of the encryption system is less than the first standard threshold, the security of the encryption system is classified as a low security level, and no encryption security signal is generated.

7. The anti-cheating method for an electronic scale according to claim 1, characterized in that: In S5, for the encryption system with medium security level, the encryption speed is dynamically adjusted by the microcontroller, and the security of the encryption system during the adjustment process is further analyzed, specifically: The security analysis values ​​of the encryption system generated within a fixed time period during the adjustment process are collected, and the corresponding data set is established. The standard deviation and mean of the data set are calculated, and the standard deviation and mean of the security analysis values ​​are calculated. After analyzing them, the encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency.

8. The anti-cheating method for an electronic scale according to claim 7, characterized in that: If the mean value of the security analysis value in the data set is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is less than the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is stable and high, and there is no need to adjust the encryption parameters and speed. At this time, no warning signal is generated; If the mean value of the security analysis value is greater than or equal to the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is high but the fluctuation is large, and the encryption speed needs to be increased. At the same time, the stability of the system needs to be monitored. At this time, a third-level warning signal is generated; If the mean value of the security analysis value is less than the reference threshold value of the mean value of the security analysis value, and the standard deviation of the security analysis value is greater than or equal to the reference threshold value of the standard deviation of the security analysis value, the security of the encryption system is low and fluctuates greatly, and it is necessary to slow down the encryption speed and optimize the encryption parameters to improve security. At this time, a first-level warning signal is generated; If the mean of the security analysis values ​​is less than the reference threshold of the mean of the security analysis values, and the standard deviation of the security analysis values ​​is less than the reference threshold of the standard deviation of the security analysis values, the security of the encryption system is low but stable, and the encryption algorithm and parameter settings need to be re-evaluated and significantly optimized. At this time, a secondary warning signal is generated.

9. An anti-cheating system for an electronic scale, used to implement an anti-cheating method for an electronic scale according to any one of claims 1 to 8, characterized in that: It includes detection module, signal processing module, encryption assessment module, security division module, dynamic adjustment module and data transmission and visualization module; Detection module: Several load sensors are installed under the weighing platform of the electronic scale. When an object is placed on the platform, the load sensors detect pressure changes in real time and convert the pressure changes into electrical signals; Signal processing module: The load sensor's electrical signal is amplified by an amplifier, and the amplified signal is converted into a digital signal by an analog-to-digital converter. The digital signal is received by a microcontroller and calibrated to determine whether there is a basic error between the output signal and the actual weight of the weight; Encryption evaluation module: For weighing data without basic errors, the weighing data is encrypted by using pre-generated keys and encryption modes. The security of the encryption system is evaluated based on the fluctuation range of the key replacement frequency in the key generation environment and the influence of the encryption speed in the encryption mode on the overall performance of the system. Security classification module: Based on the evaluation results, the security of the encryption system is divided into high security level, medium security level and low security level, and the encryption system with low security level is optimized; Dynamic adjustment module: For encryption systems with medium security levels, the encryption speed is dynamically adjusted through the microcontroller, and the security of the encryption system is further analyzed during the adjustment process. The encryption parameters and encryption speed are adjusted according to the analysis results to improve the encryption efficiency. Data transmission and visualization module: The encrypted weighing data is transmitted to the remote server through NB-IoT wireless communication technology. When the remote server receives the data, it will be visualized.

Citation Information

Patent Citations

  • Intelligent evaluation system of cross-network isolation safety system

    CN111031003A

  • Remote unattended wagon balance weighing system

    CN117516677A