Weighing sensor data encryption method, device, equipment and storage medium

By blocking the load sensor data, the initial key and ciphertext are generated, the security weight score is calculated and classified, the high and low security parameter set is encrypted, cross-layer binding is realized, and the bottlenecks of storage and transmission of weigh sensor data and the risk of key leakage is solved, and data security and response speed are improved.

CN120455168BActive Publication Date: 2025-09-02JINAN JINZHONG ELECTRONICS SCALE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510941336.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-09-02
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

In the industrial Internet of Things, massive chunks of weighing sensor data require independent management of keys, resulting in storage and transmission bottlenecks, the number of keys increased dramatically and the risk of leakage is high.

Method used

By chunking the preprocessed weighing sensor data into the encryption model, the initial key and ciphertext are generated, the security weight score is calculated, and the high-weight key is used to encrypt the low-weight ciphertext to achieve cross-layer binding.

Benefits of technology

While meeting the real-time requirements of the Industrial Internet of Things, dynamically map data value and encryption strength, ensuring millisecond-level security response of critical control instructions, improving overall encryption strength and reducing cracking difficulties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455168B_ABST
    Figure CN120455168B_ABST
Patent Text Reader

Abstract

The present application relates to the field of information encryption technology and discloses a weighing sensor data encryption method, apparatus, device, and storage medium, including: inputting pre-processed weighing sensor data blocks into an encryption model, outputting the initial key and initial ciphertext of each weighing sensor data block; using each set of the initial key and the initial ciphertext as the initial encryption parameter of each weighing sensor data block, and calculating the security weight score of the initial encryption parameter; classifying the initial encryption parameters according to a preset ratio based on the size of each security weight score to obtain a first encryption parameter set and a second encryption parameter set; encrypting the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block. By cross-layer binding of high-weight keys and low-weight ciphertexts, the traditional single-layer encryption logic is broken, increasing the difficulty of cracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information encryption technology, and in particular to a weighing sensor data encryption method, device, equipment and storage medium. Background Art

[0002] With the rapid development of the Industrial Internet of Things (IIoT), the volume of data generated by load cell sensors in scenarios like truck scales and production lines is growing exponentially, posing a significant challenge to data security. The need to segment massive amounts of data into separate blocks requires independent key management, which can lead to storage and transmission bottlenecks and pose a high risk of key leaks. Summary of the Invention

[0003] The main purpose of this application is to provide a weighing sensor data encryption method, device, equipment and storage medium, aiming to solve the technical problems that massive data blocks require independent management of keys, storage and transmission bottlenecks are easily caused when the number of keys increases sharply, and the risk of key leakage is high.

[0004] To achieve the above objectives, the present application proposes a weighing sensor data encryption method, which includes:

[0005] Input the pre-processed load cell data blocks into the encryption model, and output the initial key and initial ciphertext of each load cell data block;

[0006] Using each set of the initial key and the initial ciphertext as initial encryption parameters of each weighing sensor data block, and calculating a security weight score of the initial encryption parameters;

[0007] Classifying the initial encryption parameters according to a preset ratio based on the size of each of the security weight scores to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set;

[0008] The second ciphertext in the second encryption parameter set is encrypted based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block, where the first key is the initial key of the first encryption parameter set and the second ciphertext is the initial ciphertext of the second encryption parameter set.

[0009] Optionally, the weighing sensor data block includes an encryption instruction set, and the encryption instruction set includes at least one encryption instruction;

[0010] The step of inputting the pre-processed weighing sensor data blocks into the encryption model and outputting the initial key and initial ciphertext of each weighing sensor data block includes:

[0011] Selecting at least one encryption instruction from the encryption instruction set of each weighing sensor data block as a corresponding target encryption instruction;

[0012] splicing the target encrypted instructions into a target instruction sequence;

[0013] Performing data block encoding on the target instruction sequence to obtain a target instruction encoding sequence;

[0014] The target instruction code sequence and the target data in each weighing sensor data block are input into an encryption model to generate an initial key and an initial ciphertext corresponding to each weighing sensor data block.

[0015] Optionally, the step of inputting the target instruction code sequence and the target data in each weighing sensor data block into an encryption model to generate an initial key and an initial ciphertext corresponding to each weighing sensor data block includes:

[0016] Inputting the target data in each of the weighing sensor data blocks into the execution layer of the encryption model, and outputting the instruction query code, the target key and the target ciphertext according to the order of the target instruction sequence in the target instruction code sequence;

[0017] If the instruction query code represents the first target instruction, the target key is directly used as the target key of the weighing sensor data block, and the target ciphertext is used as the initial ciphertext of the weighing sensor data block;

[0018] If the instruction query code does not represent the first target instruction, the target key is spliced ​​with the target key of the previous weighing sensor data block and updated to the initial key of the current weighing sensor data block, and the target ciphertext is spliced ​​with the initial ciphertext of the previous weighing sensor data block and updated to the initial ciphertext of the current weighing sensor data block.

[0019] Optionally, the step of encrypting the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain the target encrypted representation of the load cell data block includes:

[0020] Sorting the first encryption parameter set to obtain a sorting result;

[0021] For each second ciphertext in the second encryption parameter set, encrypt it in sequence using the first key in the first encryption parameter set according to the sorting result to obtain a third ciphertext, and record the first identifier of the first key used in the encryption operation and the second identifier of the corresponding second ciphertext in the second encryption parameter set;

[0022] A third encryption parameter set is constructed according to the first identifier, the second identifier, and the third ciphertext, and a target encryption representation of the weighing sensor data block is obtained based on the first encryption parameter set and the third encryption parameter set.

[0023] Optionally, before the step of inputting the pre-processed weighing sensor data blocks into the encryption model and outputting the initial key and initial ciphertext of each weighing sensor data block, the method further includes:

[0024] Block-encoding a first preset number of weighing sensor data streams respectively, and dividing them into a plurality of weighing sensor data blocks;

[0025] Obtaining a second preset number of the encrypted instructions, and classifying each of the encrypted instructions according to the content of each weighing sensor data block to obtain a classification result;

[0026] The encryption instructions are combined into the first preset number of encryption instruction sets according to the classification result, and the encryption instruction sets are associated with the corresponding weighing sensor data blocks.

[0027] Optionally, after the step of combining the encryption instructions into the first preset number of encryption instruction sets according to the classification result, and associating the encryption instruction sets with the corresponding weighing sensor data blocks, the method further includes:

[0028] If the encryption instruction set of the weighing sensor data block does not contain the encryption instruction, at least one universal security encryption instruction is added to the encryption instruction set.

[0029] Optionally, after the step of encrypting the first ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain the target encrypted representation of the weighing sensor data block, the method further includes:

[0030] In response to a data query request from a target user, determining a semantic feature vector of the data query request and a data feature vector of the target data in each of the weighing sensor data blocks;

[0031] Calculating the matching degree between the semantic feature vector and each of the data feature vectors, and taking the weighing sensor data block with the highest matching degree as the target data block;

[0032] The target encrypted representation of the target data block and the data query request are input into the transport layer of the encryption model to generate a security response text.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a weighing sensor data encryption device, which includes:

[0034] A model encryption module, configured to input the pre-processed load cell data blocks into an encryption model and output an initial key and an initial ciphertext of each load cell data block;

[0035] a weight calculation module, configured to use each set of the initial key and the initial ciphertext as initial encryption parameters for each weighing sensor data block, and calculate a security weight score of the initial encryption parameters;

[0036] a parameter classification module, configured to classify the initial encryption parameters according to a preset ratio based on the size of each of the security weight scores to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set;

[0037] A target encryption module is used to encrypt the first ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a weighing sensor data encryption device, which includes: a memory, a processor, and a computer program stored on the memory and runnable on the processor, and the computer program is configured to implement the steps of the weighing sensor data encryption method described above.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the weighing sensor data encryption method described above are implemented.

[0040] This application discloses inputting preprocessed weighing sensor data blocks into an encryption model, outputting an initial key and initial ciphertext for each weighing sensor data block; using each set of the initial key and initial ciphertext as initial encryption parameters for each weighing sensor data block, and calculating a security weight score for the initial encryption parameters; classifying the initial encryption parameters according to a preset ratio based on the magnitude of each security weight score to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set; encrypting the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block, wherein the first key is the initial key of the first encryption parameter set and the second ciphertext is the initial ciphertext of the second encryption parameter set. Initial keys / ciphertexts are generated by preprocessing the data blocks, parameter sets are classified based on the security weight scores, and low-weight ciphertexts are encrypted using high-weight parameters. The cross-layer binding of high-weight keys and low-weight ciphertexts breaks the traditional single-layer encryption logic and increases the difficulty of cracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0043] Figure 1 This is a flow chart of the first embodiment of the weighing sensor data encryption method of the present application;

[0044] Figure 2 This is a schematic diagram of the encryption model for this application;

[0045] Figure 3 This is a flow chart of the second embodiment of the weighing sensor data encryption method of the present application;

[0046] Figure 4 This is a flow chart of the third embodiment of the weighing sensor data encryption method of the present application;

[0047] Figure 5 This is a schematic diagram of the module structure of the weighing sensor data encryption device according to an embodiment of the present application;

[0048] Figure 6This is a schematic diagram of the device structure of the hardware operating environment involved in the weighing sensor data encryption method in the embodiment of the present application.

[0049] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0052] The main solution of the embodiment of the present application is: input the preprocessed weighing sensor data blocks into the encryption model, and output the initial key and initial ciphertext of each weighing sensor data block; use each group of the initial key and the initial ciphertext as the initial encryption parameters of each weighing sensor data block, and calculate the security weight score of the initial encryption parameters; classify the initial encryption parameters according to the size of each security weight score according to a preset ratio to obtain a first encryption parameter set and a second encryption parameter set; encrypt the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block.

[0053] With the in-depth application of Industrial Internet of Things technology in scenarios such as truck scales and smart production lines, weighing sensor data has seen explosive growth. According to industry statistics, the amount of sensor data generated daily by a single production line, such as weighing, temperature, and vibration, has exceeded terabytes, and data real-time requirements have been increased from minutes to milliseconds. Traditional encryption methods use fixed algorithms such as AES (Advanced Encryption Standard) to encrypt the entire data stream. After the massive data is divided into blocks, independent management keys must be generated. The number of keys increases exponentially with the number of blocks, causing storage space utilization to exceed the system's capacity limit by 40%. The key distribution process generates peak network traffic, which can easily cause excessive transmission delays in 5G-MEC edge computing scenarios. In addition, the single mapping relationship between keys and data blocks poses a risk of cascading leakage. When the key of a block is cracked, the overall data security will collapse in a chain reaction.

[0054] This application provides a new weighing sensor data encryption method, which not only meets the real-time requirements of the Industrial Internet of Things, but also establishes a dynamic mapping model that adapts data value assessment and encryption strength to ensure millisecond-level security response to key control instructions.

[0055] It should be noted that the execution subject of this embodiment may be a computing service device with data encryption, network communication, and program execution functions, such as a data encryption module, or an electronic device capable of implementing the above functions. This embodiment and the following embodiments will be described below using a data transmission system as an example.

[0056] Based on this, the embodiment of the present application provides a weighing sensor data encryption method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the weighing sensor data encryption method of the present application.

[0057] In this embodiment, the weighing sensor data encryption method includes:

[0058] Step S10: input the pre-processed weighing sensor data blocks into the encryption model, and output the initial key and initial ciphertext of each weighing sensor data block.

[0059] It should be noted that before the initial encryption of the load cell data blocks, the raw load cell data needs to be cleaned, formatted, and feature-enhanced. This includes filtering out high-frequency noise from the signal, scaling the data to a uniform dimension, and segmenting the continuous data stream into independent blocks based on fixed time windows or event triggering rules. A load cell data block is a segmented unit of data. For example, the weight data stream collected by a truck scale load cell within 10 seconds is segmented into 10 1-second blocks, each containing 100 sampling points.

[0060] It's also important to note that the initial key is a dynamically generated encryption parameter for each data block. Unlike traditional fixed keys, its value depends on the data content and the encryption instruction. Each key is valid only for the current block, minimizing the risk of global key leakage. Different keys are generated for the same data block under different instructions. The initial ciphertext is the result of encrypting the data block using the initial key.

[0061] It is understood that the encryption model can be a hybrid architecture that combines deep neural networks with traditional encryption algorithms, including an embedding layer, an instruction encoder, a multi-head attention layer, a key generation layer, and a ciphertext generation layer. It inputs preprocessed data blocks and the target encryption instruction encoding sequence, and outputs an initial key (e.g., 32 bytes) and an initial ciphertext (e.g., a 128-byte ciphertext block) for each data block.

[0062] In one example, reference Figure 2 , Figure 2This is a schematic diagram of the encryption model used in this application. The embedding layer maps data blocks into high-dimensional vectors (256 dimensions) and extracts temporal features. The instruction encoder parses the encryption instruction set and generates a control vector. The multi-head attention layer dynamically calculates the association weights between different data blocks and generates a context-aware intermediate key. The key generation layer outputs an initial key (a fragment of the AES-256 key) based on the attention weights and the control vector. The ciphertext generation layer encrypts the data blocks using the initial key and outputs the initial ciphertext (ciphertext block). The preprocessed data block D1 is transmitted to the encryption model via the input interface. Each block is accompanied by metadata such as a timestamp and load cell ID. The target encryption instruction is encoded as a vector and concatenated with the data block vector D1 to form a joint input. The instruction encoder parses the instruction and generates a control vector V1. Simultaneously, the multi-head attention layer calculates the association weights between D1 and adjacent blocks D0 and D2, outputting an intermediate vector. The key generation layer combines V1 with the intermediate vector to generate the initial key K1. The ciphertext generation layer encrypts D1 using K1 and outputs the initial ciphertext C1.

[0063] Step S20: Using each set of the initial key and the initial ciphertext as initial encryption parameters of each weighing sensor data block, and calculating a security weight score of the initial encryption parameters.

[0064] It should be noted that the initial encryption parameter is a binary tuple consisting of the initial key and the initial ciphertext, representing the encryption status of a single data block. The security weight score is a numerical indicator that quantifies the security of the initial encryption parameter. The range is determined by the number of load cell data blocks used in the actual encryption process. The larger the number, the wider the range of the security weight score. The higher the score, the stronger the security of the initial encryption parameter.

[0065] It should be understood that the security weight score can be calculated based on key strength, ciphertext entropy, and the semantic complexity of the encryption instruction. Alternatively, dynamic weight optimization based on machine learning can be used to quantify the security of the initial encryption parameters. In some resource-constrained devices, a lightweight edge adaptation solution can be used to retain only core features to calculate the security weight score. This embodiment does not limit this.

[0066] In one example, the initial encryption parameter is a tuple consisting of an initial key and an initial ciphertext, and the structure is ( , ),in is the initial key of the i-th block, is the corresponding initial ciphertext.

[0067] When calculating the security weight score, the extracted features are as follows:

[0068] 1. Key characteristics: key length ( ), Shannon entropy ( )、Hamming distance( );

[0069] 2. Ciphertext characteristics: Ciphertext entropy ( ), avalanche effect value ( );

[0070] 3. Instruction characteristics: Depth of semantic tree for parsing encrypted instructions ( ), parameter complexity (such as the number of loop rounds ).

[0071] Resource-constrained devices (such as industrial weighing sensor nodes) cannot handle complex calculations, and truck weighing sensors require a faster response time. Therefore, a lightweight edge adaptation solution is used to retain only core features to calculate the security weight score, as follows:

[0072]

[0073] Among them, the key length, Shannon entropy, avalanche effect value and semantic tree depth of encryption instructions are selected as core features. Among them, 256 is the number of bits of the key, 、 and 5 are the maximum values ​​of Shannon entropy, avalanche effect value and semantic tree depth respectively. 、 、 and These are the corresponding weight coefficients, which can be adjusted based on actual conditions. For example, in scenarios with high real-time requirements (such as dynamic weighing on a truck scale), the γ weight can be reduced to 0.1 and the α weight can be increased to 0.5. If an attack is detected (such as a replay attack attempt), the β weight can be temporarily increased to 0.4.

[0074] Finally, the Sigmoid function is used to map the original score to the [0, 1] interval. The formula is as follows:

[0075]

[0076] in, is the normalized security weight score.

[0077] Step S30, based on the size of each of the security weight scores, the initial encryption parameters are classified according to a preset ratio to obtain a first encryption parameter set and a second encryption parameter set, and the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set.

[0078] It should be noted that the preset ratio is a pre-set classification threshold ratio used to divide high-security parameter sets into low-security parameter sets. When an attack is detected, the ratio can be adjusted to 20%, that is, only the top 20% highest-scoring parameters are retained. The preset ratio for key data such as vehicle scale weighing can be 30%. The first encryption parameter set is a set of initial encryption parameters with a security weight score above the classification threshold. The second encryption parameter set is a set of initial encryption parameters with a security weight score below the classification threshold and is used for non-core data encryption.

[0079] In one example, all initial encryption parameters are sorted from high to low according to their security weight scores to generate an ordered list:

[0080] )

[0081] in, Represents the security weight score.

[0082] Next, the classification threshold position is calculated in the ordered list according to the preset ratio:

[0083]

[0084] in, is the preset ratio threshold, is the total number of initial encryption parameters to be classified, and Threshold_Index is the index position of the classification, that is, the dividing point of the first encryption parameter set.

[0085] First encryption parameter set That is, select the first Parameters:

[0086]

[0087] The remaining parameters are automatically included in the second encryption parameter set :

[0088]

[0089] In the case of the same score, the parameter with longer key length is preferred to enter the first set. If the key length is the same, the parameter with higher ciphertext entropy value is selected.

[0090] Step S40: encrypt the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain the target encrypted representation of the weighing sensor data block, where the first key is the initial key of the first encryption parameter set, and the second ciphertext is the initial ciphertext of the second encryption parameter set.

[0091] Furthermore, in order to associate encryption operations with identifiers, quickly locate key usage records, and facilitate auditing and anomaly detection, step S40 may include:

[0092] Sorting the first encryption parameter set to obtain a sorting result;

[0093] For each second ciphertext in the second encryption parameter set, encrypt it in sequence using the first key in the first encryption parameter set according to the sorting result to obtain a third ciphertext, and record the first identifier of the first key used in the encryption operation and the second identifier of the corresponding second ciphertext in the second encryption parameter set;

[0094] A third encryption parameter set is constructed according to the first identifier, the second identifier, and the third ciphertext, and a target encryption representation of the weighing sensor data block is obtained based on the first encryption parameter set and the third encryption parameter set.

[0095] It should be noted that the third ciphertext is the result of encrypting the second ciphertext using the first key. The second ciphertext is re-encrypted with a higher-security key to enhance its resistance to cracking. The first and second identifiers are unique identifiers used to track encryption operations. The first identifier identifies the first key used, and the second identifier identifies the encrypted second ciphertext. The target encryption is represented by the final encryption result of the fusion of the first and third encryption parameter sets, which can be a multidimensional vector or a composite ciphertext structure.

[0096] As can be seen, through sequencing, double encryption, and identity binding, this method achieves layered defense and operational traceability in weighing sensor data encryption, making it particularly suitable for high-security industrial scenarios such as truck scales. Its core value lies in dynamically binding low-security ciphertext to high-security keys, significantly improving overall encryption strength with manageable resource overhead. Even if the second ciphertext is cracked, an attacker still needs to crack the first key to restore the original data.

[0097] It should be understood that the sorting algorithm used to sort the first encryption parameter set may be quick sort or bucket sort, which is suitable for scenarios where the scores are evenly distributed. Sorting the first keys by security weight can ensure that the most secure key prioritizes protecting the weakest ciphertext.

[0098] In one example, the first encryption parameter sets are sorted in descending order according to the security weight scores, and the sorted list is Sorted_Primary.

[0099] Each second ciphertext in the second encryption parameter set (Secondary Set) is represented as , select the next first key from Sorted_Primary ,use encryption , generate the third ciphertext :

[0100]

[0101] The first identifier and the second identifier are recorded simultaneously until all second ciphertexts are traversed or the first key is used up.

[0102] Finally, the generated third ciphertext is bound to the identifier to generate the third encryption parameter set :

[0103]

[0104] Concatenate the first encryption parameter set and the third encryption parameter set:

[0105]

[0106] in, Targeted encrypted representation of chunked load cell data.

[0107] Furthermore, in order to input the target encrypted representation of the target data block and the data query request into the transport layer of the encryption model, and provide the user with an accurate query response while ensuring data security, after step S40, the following steps are further included:

[0108] In response to a data query request from a target user, determining a semantic feature vector of the data query request and a data feature vector of the target data in each of the weighing sensor data blocks;

[0109] Calculating the matching degree between the semantic feature vector and each of the data feature vectors, and taking the weighing sensor data block with the highest matching degree as the target data block;

[0110] The target encrypted representation of the target data block and the data query request are input into the transport layer of the encryption model to generate a security response text.

[0111] It should be noted that a data query request is a query instruction submitted by the user to the system. It can be expressed in natural language or structured statements, requesting specific load cell data. For example, a natural language query might be: "Query the peak vehicle scale weight data from 10:00 AM to 12:00 PM today"; a structured statement might be: {"type": "weight", "time_range": ["10:00", "12:00"], "metric": "max"}. A semantic feature vector maps the semantic information of a user's query into a high-dimensional numerical vector, representing the intent and context of the query. A data feature vector is a feature vector extracted from encrypted load cell data blocks, representing the content attributes of the data blocks.

[0112] Additionally, it's important to note that the match degree is a numerical metric that quantifies the relevance between the query semantics and the data segment content. The target data segment is the load cell data segment with the highest match, meaning it represents the encrypted data unit that best matches the user's query intent. The encryption model transport layer is the component within the encryption model responsible for handling the interaction between encrypted data and external queries, supporting data operations in a secure state. The secure response text is a desensitized response generated based on the encrypted data, containing only information within the user's permission range.

[0113] Specifically, after the user submits a query request, the system verifies the user's identity and permissions, and uses the BERT model to encode the query text to generate a 768-dimensional semantic vector; then calculates the mean, variance, etc. for each encrypted data block to generate a feature vector, and uses a pre-trained autoencoder to extract potential features from the target encrypted representation; for each data block, calculates the cosine similarity between its data feature vector and the semantic vector. Arrange them in descending order of matching, and select the block with the highest similarity as the target data block. In the transport layer, the target block can be controllably decrypted using a partial key of the first encryption parameter set; the response content is obfuscated according to the user's permissions, and finally the result is converted into natural language text or a structured response.

[0114] In this embodiment, the preprocessed weighing sensor data blocks are input into the encryption model, and the initial key and initial ciphertext of each weighing sensor data block are output; each set of the initial key and the initial ciphertext are used as the initial encryption parameters of each weighing sensor data block, and the security weight score of the initial encryption parameters is calculated; according to the size of each security weight score, the initial encryption parameters are classified according to a preset ratio to obtain a first encryption parameter set and a second encryption parameter set; based on the first key in the first encryption parameter set, the second ciphertext in the second encryption parameter set is encrypted to obtain the target encrypted representation of the weighing sensor data block. The initial key / ciphertext is generated by preprocessing the data blocks, the parameter sets are classified based on the security weight score, and the low-weight ciphertext is encrypted using the high-weight parameter. The cross-layer binding of the high-weight key and the low-weight ciphertext breaks the traditional single-layer encryption logic and increases the difficulty of cracking.

[0115] Reference Figure 3 , Figure 3 This is a flow chart of the second embodiment of the weighing sensor data encryption method of the present application. Based on the above-mentioned first embodiment, the second embodiment of the weighing sensor data encryption method of the present application is proposed.

[0116] In a second embodiment, the weighing sensor data block includes an encryption instruction set, and the encryption instruction set includes at least one encryption instruction. Step S10 includes:

[0117] Step S101 : selecting at least one encryption instruction from the encryption instruction set of each weighing sensor data block as a corresponding target encryption instruction.

[0118] It should be noted that the encryption instruction set is a set of preset instructions bound to the load cell data block. It contains multiple optional encryption strategies or operation commands, which are used to dynamically control the encryption process. An encryption instruction is a single encryption strategy unit within the encryption instruction set, explicitly specifying the execution method and parameters of the encryption operation. Each encryption instruction is associated with different parameters such as the encryption algorithm, key length, and number of rounds. The target encryption instruction is one or more instructions dynamically selected from the encryption instruction set for the actual encryption operation of the current data block.

[0119] Understandably, high-strength instructions can be selected for highly sensitive data (such as truck scale calibration parameters); low-latency instructions can be selected for real-time data transmission; and anti-attack instructions can be automatically switched to when an attack is detected. This dynamic instruction selection mechanism deeply aligns encryption strategies with data characteristics and environmental context, addressing the limitations of traditional "one-size-fits-all" strategies.

[0120] Step S102: assemble the target encrypted instructions into a target instruction sequence.

[0121] It should be noted that the target instruction sequence is a structured sequence formed by splicing multiple target encryption instructions according to the execution order or logical dependency relationship, which is used to guide the encryption model to execute the corresponding encryption operations in sequence.

[0122] Step S103 , performing data block encoding on the target instruction sequence to obtain a target instruction encoding sequence.

[0123] It's important to note that data block encoding involves segmenting the target instruction sequence into multiple data blocks according to pre-defined rules and then performing structured encoding on each block to adapt it to the transmission, storage, or input requirements of the encryption model. The target instruction encoding sequence, the result of data block encoding, consists of multiple sequential instruction blocks carrying metadata and verification information, and can be directly input into the encryption model or transport layer.

[0124] It is understood that data block encoding of the target instruction sequence can include fixed block encoding (block size is fixed, with the remaining portion filled with random data), dynamic block encoding (split by logical instruction boundaries), and hybrid block encoding (combining fixed size and logical boundaries, prioritizing logical segmentation, and splitting overlong instructions by fixed size). If there are dependencies between instructions (e.g., instruction 2 must be executed after instruction 1 completes), a dependency identifier is added to the block header.

[0125] Step S104: input the target instruction code sequence and the target data in each weighing sensor data block into an encryption model to generate an initial key and an initial ciphertext corresponding to each weighing sensor data block.

[0126] Furthermore, in order to cumulatively update the key and ciphertext according to the instruction query code during the encryption process, the encryption of subsequent data blocks is associated with the previous data blocks, thereby increasing the complexity and security of the encryption. The step S104 includes:

[0127] Inputting the target data in each of the weighing sensor data blocks into the execution layer of the encryption model, and outputting the instruction query code, the target key and the target ciphertext according to the order of the target instruction sequence in the target instruction code sequence;

[0128] If the instruction query code represents the first target instruction, the target key is directly used as the target key of the weighing sensor data block, and the target ciphertext is used as the initial ciphertext of the weighing sensor data block;

[0129] If the instruction query code does not represent the first target instruction, the target key is spliced ​​with the target key of the previous weighing sensor data block and updated to the initial key of the current weighing sensor data block, and the target ciphertext is spliced ​​with the initial ciphertext of the previous weighing sensor data block and updated to the initial ciphertext of the current weighing sensor data block.

[0130] It should be noted that the target data is the core data portion of the load cell data block that requires encryption. It is typically a raw data fragment that has undergone preprocessing (denoising and standardization). The instruction query code, such as 0x0001, identifies the position and type of the currently executed instruction in the target instruction sequence. The target key is the encryption key fragment generated by the execution layer based on the current instruction. The target ciphertext is the result of encrypting the target data using the target key.

[0131] Specifically, the target data from the load cell data blocks (e.g., vehicle scale weight blocks) and the corresponding target instruction code sequence are input into the execution layer of the encryption model, which then executes the instructions sequentially. First, the instruction query code is parsed to determine the current instruction location. Then, based on the instruction parameters (algorithm, key length) and the data block content, the target key Ki and target ciphertext Ci for the current block are generated. Finally, the initial key and initial ciphertext are determined based on conditional judgment.

[0132] In one example, the encryption process for the three blocks of truck scale weight data is as follows:

[0133] 1. Block 1 (instruction 1):

[0134] Target data D1 = [15.2, 15.5, 15.3], instruction query code 0x0001 (first instruction);

[0135] Generate target key K1 = 0xA1B2, generate target ciphertext C1 = 0x3D4F

[0136] Initial key / ciphertext: K1_initial = K1, C1_initial = C1.

[0137] 2. Block 2 (instruction 2):

[0138] Target data D2 = [15.4, 15.6], instruction query code 0x0002 (not the first one);

[0139] Generate target key K2 = 0xC7E8, generate target ciphertext C2 = 0x9A0B;

[0140] Initial key / ciphertext:

[0141] K2_initial=K2 K1_initial=0xC7E8A1B2;

[0142] C2_initial=C2 C1_initial=0x9A0B3D4F.

[0143] 3. Block 3 (instruction 3):

[0144] Target data D3 = [15.1], instruction query code 0x0003 (not the first one)

[0145] Generate target key K3 = 0x5F6D and target ciphertext C3 = 0x1E2F;

[0146] Initial key / ciphertext:

[0147] K3_initial=K3 K2_initial=0x5F6DC7E8A1B2;

[0148] C3_initial=C3 C2_initial=0x1E2F9A0B3D4F.

[0149] By executing target instructions in sequence and dynamically splicing keys and ciphertexts, the core innovation lies in upgrading traditional single-block independent encryption to chain encryption with inter-block dependencies, which is suitable for industrial Internet of Things scenarios with high real-time and high security requirements.

[0150] In this embodiment, at least one encryption instruction is selected from the encryption instruction set for each load cell data block as the corresponding target encryption instruction; each target encryption instruction is concatenated into a target instruction sequence; the target instruction sequence is encoded by data blocks to obtain a target instruction code sequence; and the target instruction code sequence and the target data in each load cell data block are input into an encryption model to generate an initial key and initial ciphertext corresponding to each load cell data block. By combining the instruction code sequence with the data blocks, the encryption model understands the business semantics (e.g., "high-precision encryption" instructions), improving the accuracy of the encryption strategy.

[0151] Reference Figure 4 , Figure 4 This is a flow chart of the third embodiment of the weighing sensor data encryption method of the present application. Based on the above second embodiment, the third embodiment of the weighing sensor data encryption method of the present application is proposed.

[0152] In the third embodiment, before step S10, the method further includes:

[0153] Step S01 : performing block encoding on a first preset number of weighing sensor data streams, and dividing the data streams into a plurality of weighing sensor data blocks.

[0154] It should be noted that a load cell data stream is time-series data continuously generated by a load cell, typically containing real-time physical quantities, such as the weight data stream output per second by a truck scale. The first preset number is the pre-set number of load cell data streams to be processed. Block encoding is the process of dividing a continuous data stream into multiple logical blocks and performing structured encoding on each block.

[0155] Step S02: Acquire a second preset number of the encryption instructions, and classify the encryption instructions according to the content of each weighing sensor data block to obtain a classification result.

[0156] It should be noted that the second preset number is the number of encrypted instructions to be screened, which represents the number of instructions selected from the candidate instruction set. For example, if the system needs to select the top 5 most relevant instructions from 20 candidate instructions, the second preset number is 5.

[0157] Specifically, first, the specific value of the second preset number must be determined. This is usually predefined in the system configuration file or a parameter setting. Then, the corresponding number of encryption instructions is retrieved from a location where encryption instructions are stored (such as a database or file system). The data collected by the load cell is then divided into blocks, and the specific contents of each data block are read. The data block division method can be determined based on actual needs, such as by fixed size, time interval, etc. Furthermore, reasonable classification rules are developed based on the characteristics of the load cell data blocks. For example, classification can be based on factors such as the data's numerical range, data change trend, and data type. Based on the defined classification rules, each encryption instruction is compared with the contents of the load cell data block to determine the category to which each encryption instruction belongs. Finally, the classification results are organized and output.

[0158] Step S03: combining the encryption instructions into the first preset number of encryption instruction sets according to the classification result, and associating the encryption instruction sets with the corresponding weighing sensor data blocks.

[0159] It should be understood that there are various strategies for combining encryption instruction sets based on the classification results, such as even distribution, grouping by category, etc. Of course, a correspondence between encryption instruction sets and load cell data blocks can also be established, and each encryption instruction set can be associated with a corresponding load cell data block based on the order of the data blocks or other rules.

[0160] Furthermore, in order to add a general security encryption instruction when there is no encryption instruction in the encryption instruction set of the weighing sensor data block, it is ensured that each data block has an encryption instruction available, thereby avoiding the occurrence of unencrypted data and ensuring data security. After step S03, the following steps are also included:

[0161] If the encryption instruction set of the weighing sensor data block does not contain the encryption instruction, at least one universal security encryption instruction is added to the encryption instruction set.

[0162] It should be noted that general security encryption instructions are widely applicable and are not specific to a particular type of load cell data or application scenario. Instead, they are basic instructions that can meet a variety of data encryption needs. They are often used as a backup or supplementary solution to provide basic data security protection when specific encryption instructions are missing.

[0163] It is understandable that in order to ensure that the encryption instruction set corresponding to each load cell data block contains the necessary encryption instructions, if it is found that the encryption instruction set of a data block is missing the required encryption instructions, this missing instruction can be compensated by adding a universal security encryption instruction, thereby ensuring the encryption integrity and security of the data block.

[0164] Specifically, each weighing sensor data block and its corresponding encryption instruction set are first traversed, and the required encryption instructions are checked one by one. If the required encryption instruction is not found in a certain encryption instruction set, an add operation is triggered to add at least one general security encryption instruction to the encryption instruction set that is missing the encryption instruction. After adding the general security encryption instruction, the association between the encryption instruction set and the weighing sensor data block is updated to ensure that subsequent data processing or encryption operations can correctly call the updated instruction set.

[0165] In this embodiment, a first preset number of load cell data streams are block-encoded and divided into a plurality of load cell data blocks. A second preset number of encryption instructions are obtained and, based on the content of each load cell data block, each encryption instruction is classified to obtain a classification result. Based on the classification result, each encryption instruction is combined into the first preset number of encryption instruction sets, and each encryption instruction set is associated with a corresponding load cell data block. Categorizing instructions based on block content avoids instruction redundancy, ensuring that each load cell data block has a corresponding encryption instruction set, thereby improving the compatibility of encryption instructions with data and enhancing encryption effectiveness.

[0166] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the weighing sensor data encryption method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0167] This application also provides a weighing sensor data encryption device, please refer to Figure 5 , the weighing sensor data encryption device includes:

[0168] The model encryption module 10 is used to input the pre-processed weighing sensor data blocks into the encryption model and output the initial key and initial ciphertext of each weighing sensor data block;

[0169] a weight calculation module 20 for using each set of the initial key and the initial ciphertext as initial encryption parameters for each weighing sensor data block, and calculating a security weight score of the initial encryption parameters;

[0170] a parameter classification module 30, configured to classify the initial encryption parameters according to a preset ratio based on the size of each of the security weight scores to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set;

[0171] The target encryption module 40 is configured to encrypt the first ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block.

[0172] The weighing sensor data encryption device provided in this application utilizes the weighing sensor data encryption method of the aforementioned embodiment, resolving the technical issues of requiring independent key management for massive data blocks, resulting in storage and transmission bottlenecks when the number of keys increases dramatically, and a high risk of key leakage. Compared to the prior art, the beneficial effects of the weighing sensor data encryption device provided in this application are the same as those of the weighing sensor data encryption method provided in the aforementioned embodiment, and the other technical features of the weighing sensor data encryption device are the same as those disclosed in the aforementioned embodiment, which are not further elaborated here.

[0173] The present application provides a weighing sensor data encryption device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the weighing sensor data encryption method in the above-mentioned embodiment 1.

[0174] Reference below Figure 6 , which shows a schematic diagram of the structure of a weighing sensor data encryption device suitable for implementing the embodiments of the present application. The weighing sensor data encryption device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The weighing sensor data encryption device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0175] like Figure 6As shown, the load cell data encryption device may include a processing device 1001 (e.g., a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the load cell data encryption device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image load cell, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or hard disk; and a communication device 1009. The communication device 1009 can allow the load cell data encryption device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a load cell data encryption device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have alternatively.

[0176] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0177] The weighing sensor data encryption device provided in this application utilizes the weighing sensor data encryption method of the aforementioned embodiment, resolving the technical issues of requiring independent key management for massive data blocks, resulting in storage and transmission bottlenecks when the number of keys increases dramatically, and a high risk of key leakage. Compared to the prior art, the beneficial effects of the weighing sensor data encryption device provided in this application are the same as those of the weighing sensor data encryption method provided in the aforementioned embodiment, and the other technical features of the weighing sensor data encryption device are the same as those disclosed in the aforementioned embodiment, which are not further elaborated here.

[0178] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0179] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0180] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, and the computer-readable program instructions are used to execute the weighing sensor data encryption method in the above embodiment.

[0181] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0182] The computer-readable storage medium may be included in the weighing sensor data encryption device; or may exist independently without being assembled into the weighing sensor data encryption device.

[0183] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the weighing sensor data encryption device, the weighing sensor data encryption device executes the weighing sensor data encryption method described above.

[0184] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0186] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0187] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned weighing sensor data encryption method. This computer-readable storage medium addresses the technical issues of requiring independent key management for massive data blocks, resulting in storage and transmission bottlenecks when the number of keys increases dramatically, and the high risk of key leakage. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the weighing sensor data encryption method provided in the aforementioned embodiments and are not further elaborated here.

[0188] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A weighing sensor data encryption method, characterized in that: The weighing sensor data encryption method includes: Input the pre-processed load cell data blocks into the encryption model, and output the initial key and initial ciphertext of each load cell data block; Using each set of the initial key and the initial ciphertext as initial encryption parameters of each weighing sensor data block, and calculating a security weight score of the initial encryption parameters; Classifying the initial encryption parameters according to a preset ratio based on the size of each of the security weight scores to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set; The second ciphertext in the second encryption parameter set is encrypted based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block, where the first key is the initial key of the first encryption parameter set and the second ciphertext is the initial ciphertext of the second encryption parameter set.

2. The weighing sensor data encryption method according to claim 1, wherein: The weighing sensor data block includes an encryption instruction set, and the encryption instruction set includes at least one encryption instruction; The step of inputting the pre-processed weighing sensor data blocks into the encryption model and outputting the initial key and initial ciphertext of each weighing sensor data block includes: Selecting at least one encryption instruction from the encryption instruction set of each weighing sensor data block as a corresponding target encryption instruction; splicing the target encrypted instructions into a target instruction sequence; Performing data block encoding on the target instruction sequence to obtain a target instruction encoding sequence; The target instruction code sequence and the target data in each weighing sensor data block are input into an encryption model to generate an initial key and an initial ciphertext corresponding to each weighing sensor data block.

3. The weighing sensor data encryption method according to claim 2, wherein: The step of inputting the target instruction code sequence and the target data in each weighing sensor data block into an encryption model to generate an initial key and an initial ciphertext corresponding to each weighing sensor data block includes: Inputting the target data in each of the weighing sensor data blocks into the execution layer of the encryption model, and outputting the instruction query code, the target key and the target ciphertext according to the order of the target instruction sequence in the target instruction code sequence; If the instruction query code represents the first target instruction, the target key is directly used as the target key of the weighing sensor data block, and the target ciphertext is used as the initial ciphertext of the weighing sensor data block; If the instruction query code does not represent the first target instruction, the target key is spliced ​​with the target key of the previous weighing sensor data block and updated to the initial key of the current weighing sensor data block, and the target ciphertext is spliced ​​with the initial ciphertext of the previous weighing sensor data block and updated to the initial ciphertext of the current weighing sensor data block.

4. The weighing sensor data encryption method according to claim 1, characterized in that: The step of encrypting the second ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain the target encrypted representation of the load cell data block comprises: Sorting the first encryption parameter set to obtain a sorting result; For each second ciphertext in the second encryption parameter set, encrypt it in sequence using the first key in the first encryption parameter set according to the sorting result to obtain a third ciphertext, and record the first identifier of the first key used in the encryption operation and the second identifier of the corresponding second ciphertext in the second encryption parameter set; A third encryption parameter set is constructed according to the first identifier, the second identifier, and the third ciphertext, and a target encryption representation of the weighing sensor data block is obtained based on the first encryption parameter set and the third encryption parameter set.

5. The weighing sensor data encryption method according to any one of claims 1 to 4, characterized in that: Before the step of inputting the pre-processed weighing sensor data blocks into the encryption model and outputting the initial key and initial ciphertext of each weighing sensor data block, the method further includes: Block-encoding a first preset number of weighing sensor data streams respectively, and dividing them into a plurality of weighing sensor data blocks; Obtaining a second preset number of the encrypted instructions, and classifying each of the encrypted instructions according to the content of each weighing sensor data block to obtain a classification result; The encryption instructions are combined into the first preset number of encryption instruction sets according to the classification result, and the encryption instruction sets are associated with the corresponding weighing sensor data blocks.

6. The method according to claim 5, characterized in that After the step of combining the encryption instructions into the first preset number of encryption instruction sets according to the classification results, and associating the encryption instruction sets with the corresponding weighing sensor data blocks, the method further includes: If the encryption instruction set of the weighing sensor data block does not contain the encryption instruction, at least one universal security encryption instruction is added to the encryption instruction set.

7. The weighing sensor data encryption method according to any one of claims 1 to 4, characterized in that: After the step of encrypting the first ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain the target encrypted representation of the weighing sensor data block, the method further includes: In response to a data query request from a target user, determining a semantic feature vector of the data query request and a data feature vector of the target data in each of the weighing sensor data blocks; Calculating the matching degree between the semantic feature vector and each of the data feature vectors, and taking the weighing sensor data block with the highest matching degree as the target data block; The target encrypted representation of the target data block and the data query request are input into the transport layer of the encryption model to generate a security response text.

8. A weighing sensor data encryption device, characterized in that: The device comprises: A model encryption module, configured to input the pre-processed load cell data blocks into an encryption model and output an initial key and an initial ciphertext of each load cell data block; a weight calculation module, configured to use each set of the initial key and the initial ciphertext as initial encryption parameters for each weighing sensor data block, and calculate a security weight score of the initial encryption parameters; a parameter classification module, configured to classify the initial encryption parameters according to a preset ratio based on the size of each of the security weight scores to obtain a first encryption parameter set and a second encryption parameter set, wherein the security weight score of the initial encryption parameters in the first encryption parameter set is greater than the security weight score of the initial encryption parameters in the second encryption parameter set; A target encryption module is used to encrypt the first ciphertext in the second encryption parameter set based on the first key in the first encryption parameter set to obtain a target encrypted representation of the weighing sensor data block.

9. A weighing sensor data encryption device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the weighing sensor data encryption method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the weighing sensor data encryption method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Encryption method and device, storage medium and electronic equipment

    CN116170180A

  • Data encryption communication method and system applied to intelligent cash register

    CN120281573A