A collaborative parameter encryption method for a manipulator and an injection molding machine
By dynamically adjusting the key update cycle and optimizing the key pre-distribution strategy, the key update problem of the AES-GCM algorithm in the cloud-side collaboration scenario is solved, and the security and efficiency of the coordinated control of the robot and the injection molding machine are improved, and production interruptions are avoided.
Patent Information
- Application Number
- CN202510653674.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-21
AI Technical Summary
In the cloud-edge collaboration scenario, frequent key updates of the AES-GCM algorithm lead to performance overhead and communication interruptions, affecting the coordinated control of robots and injection molding machines. The existing technology lacks an effective key update cycle optimization mechanism.
By collecting monitoring data from edge gateways, robots and injection molding machine control units, dynamically adjusting the key update cycle, combining key pre-distribution and coexistence strategies for new and old keys, the AES-GCM encryption process is optimized, and the impact of key updates on system performance is reduced.
It realizes that while ensuring security, it reduces the frequency of key updates, reduces calculation and communication overhead, improves the continuous control capabilities of the system, and avoids production accidents.
Smart Images

Figure CN120200737B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption, and particularly to a method for encrypting collaborative parameters of a manipulator and an injection molding machine. Background Technique
[0002] With the in-depth development of industrial Internet and intelligent manufacturing, more and more industrial devices are connected to the network to achieve remote monitoring, data analysis, and collaborative control. In a typical cloud-edge collaborative architecture, the cloud platform has powerful computing and storage capabilities and is responsible for global optimization, data analysis, and decision-making; the edge gateway is deployed near the production site and is responsible for connecting the cloud and terminal devices for data aggregation, protocol conversion, edge computing, etc.; terminal devices (such as manipulators and injection molding machines) perform specific production tasks. While this architecture improves production efficiency and flexibility, it also introduces new security challenges.
[0003] Taking the injection molding production of automotive parts as an example, the manipulator and the injection molding machine need to closely cooperate to efficiently and safely complete the production task. The cloud platform generates collaborative parameters (such as the grasping position, grasping force, synchronization timing, etc. of the manipulator) based on information such as the production plan, product model, and equipment status, and sends these parameters to the edge gateway, which then forwards them to the corresponding manipulator or injection molding machine control unit. These collaborative parameters are crucial for production safety and product quality. Once stolen or tampered with by an unauthorized third party, it may lead to equipment damage, product scrapping, or even personal injury.
[0004] To protect the confidentiality and integrity of collaborative parameters in the cloud-edge collaborative scenario, it is necessary to implement encryption and authentication for them. AES-GCM is a widely used authenticated encryption algorithm that can provide data confidentiality, integrity, and authenticity at the same time. The AES-GCM algorithm is based on the CTR (Counter) mode of the block cipher and the GHASH (Galois / Counter Model Hash) function. By dividing the plaintext into multiple blocks and encrypting each block using a counter and a key to generate ciphertext; at the same time, using the GHASH function to calculate the message authentication code MAC for the ciphertext, associated data (AD), and key, etc., to verify the integrity and authenticity of the data. The AES-GCM algorithm has been widely used in various industrial control systems and communication protocols.
[0005] Although the AES-GCM algorithm itself has high security, in the cloud-edge collaboration scenario, its application still faces a key challenge: how to reduce the performance overhead brought by key updates while ensuring security. The security of the AES-GCM algorithm depends on the confidentiality and uniqueness of the key and nonce (Number used once, random number). To prevent the key from being leaked or cracked, the key needs to be updated regularly. However, the key update process involves steps such as the generation, distribution, and enabling of new keys, which will bring additional computational overhead and communication overhead. In the cloud-edge collaboration scenario, frequent key updates may lead to the following problems:
[0006] Performance degradation: Edge gateways and control units are usually resource-constrained embedded devices. Frequent key updates will consume their limited computational resources and affect the execution of real-time control tasks.
[0007] Communication interruption: During key updates, if the switching between old and new keys is not smooth enough, it may lead to communication interruption or data loss, affecting the continuity of production.
[0008] Synchronization difficulty: In the collaborative control scenario of a manipulator and an injection molding machine, if key updates cause control instructions to be delayed or lost, it may disrupt the synchronization of collaborative actions and lead to production accidents.
[0009] The standard AES-GCM algorithm does not provide an optimization mechanism for the key update period. Usually, users manually set a fixed update period according to experience or security policies. This static configuration method cannot adapt to the dynamically changing operating environment and security requirements in the cloud-edge collaboration scenario. Too frequent key updates will increase performance overhead, while too sparse key updates will reduce security. Therefore, how to reduce the frequency of key updates as much as possible while ensuring sufficient security and reduce its impact on system performance is a core issue in the application of the AES-GCM algorithm in the cloud-edge collaboration scenario. Summary of the Invention
[0010] In view of this, the present invention aims to propose a collaborative parameter encryption method for a manipulator and an injection molding machine to solve the key update problem in the AES-GCM algorithm.
[0011] To achieve the above object, the technical solution of the present invention is implemented as follows:
[0012] A collaborative parameter encryption method for a manipulator and an injection molding machine, the method includes the following steps:
[0013] Step S1: Collect the monitoring data of the edge gateway, the manipulator control unit, the injection molding machine control unit, and the cloud platform;
[0014] Step S2: Collaborative parameter encryption and key update period optimization based on AES-GCM;
[0015] Step S2.1: Obtain the key update period optimization factor through adaptive optimization analysis of key update;
[0016] Step S2.2: Obtain the process smoothing factor through key pre-distribution and coexistence analysis of old and new keys;
[0017] Step S2.3: Optimize the AES-GCM encryption process using the key update period optimization factor and the process smoothing optimization factor;
[0018] Step S3: Encrypt the collaborative parameters of the manipulator and the injection molding machine using the optimized AES-GCM encryption process.
[0019] Further, Step S2.1 obtains the key update period optimization factor through adaptive optimization analysis of key update, specifically including:
[0020] Obtain communication frequency monitoring data, data volume monitoring data, and security event occurrence frequency monitoring data. Normalize the three types of characteristic data to obtain communication frequency normalized monitoring data, data volume normalized monitoring data, and security event occurrence frequency normalized monitoring data; evaluate the coefficient of variation of the three normalized characteristic data to obtain the coefficient of variation of the three normalized characteristic data; perform security analysis on the security event occurrence frequency to obtain the security event occurrence frequency weight; perform weight analysis on the coefficients of variation of the communication frequency and data volume normalized monitoring data to obtain the weight of the communication frequency normalized monitoring data and the weight of the data volume normalized monitoring data; perform key update period analysis on the normalized data of the three types of characteristic data to obtain the key update period optimization factor.
[0021] Further, the evaluation of the coefficient of variation of the three normalized characteristic data to obtain the coefficient of variation of the three normalized monitoring data; the security analysis of the security event occurrence frequency to obtain the security event occurrence frequency weight; the weight analysis of the coefficients of variation of the communication frequency and data volume normalized monitoring data to obtain the weight of the communication frequency normalized monitoring data and the weight of the data volume normalized monitoring data, specifically includes:
[0022] Obtain communication frequency normalized monitoring data, data volume normalized monitoring data, and security event occurrence frequency normalized monitoring data, and use the calculation result of dividing the standard deviation of each normalized monitoring data by the mean of the normalized characteristic data as the coefficient of variation of the normalized characteristic data;
[0023] Obtain the minimum value of the weight of the set security event occurrence frequency. Respectively, take the mapping results of the normalized communication frequency, data volume, and security event occurrence frequency through the power function mapping with the natural constant as the base as the exponential mapping results of the normalized communication frequency, data volume, and security event occurrence frequency. Use the exponential mapping result of the security event occurrence frequency as the numerator, and the calculation result of adding the exponential mapping results of the three characteristics of communication frequency, data volume, and security event occurrence frequency as the denominator to form a fraction as the weight of the security event occurrence frequency to be evaluated. Take the larger weight between the minimum value of the weight of the set security event occurrence frequency and the weight of the security event occurrence frequency to be evaluated as the weight of the normalized monitoring data of the security event occurrence frequency;
[0024] Obtain the coefficient of variation of the communication frequency and the data volume. Take the calculation result of subtracting the security event occurrence frequency weight from the constant 1 as the first evaluation weight. Use the coefficient of variation of the communication frequency as the numerator, and the calculation result of adding the coefficient of variation of the communication frequency and the coefficient of variation of the data volume as the denominator to form a fraction and multiply it by the first evaluation weight. The calculation result is used as the weight of the normalized monitoring data of the communication frequency. Use the coefficient of variation of the data volume as the numerator, and the calculation result of adding the coefficient of variation of the communication frequency and the coefficient of variation of the data volume as the denominator to form a fraction and multiply it by the first evaluation weight. The calculation result is used as the weight of the normalized monitoring data of the data volume.
[0025] Furthermore, by analyzing the normalized data of the three characteristic data to obtain the key update period optimization factor, which specifically includes:
[0026] Obtain the weights of the normalized monitoring data of the security event occurrence frequency, the weight of the normalized monitoring data of the communication frequency, and the weight of the normalized monitoring data of the data volume. Respectively, take the calculation results of weighted summation of the weights of the normalized monitoring data of the three characteristics for the normalized communication frequency, data volume, and security event occurrence frequency as the key update period evaluation factor. Take the mapping result of mapping the key update period evaluation factor through the sigmoid function as the key update period optimization factor.
[0027] Furthermore, step S2.2 obtains the process smoothing factor through key pre-distribution and coexistence analysis of old and new keys. The specific steps include:
[0028] Obtain network latency monitoring data and the average time-consuming data for key update. Through security assessment of the security event occurrence frequency data, obtain the security coefficient of key pre-distribution time; through security assessment of the device load data, obtain the security coefficient of the coexistence time of old and new keys; through comprehensive assessment of the security coefficient of key pre-distribution time, the network latency monitoring data and the average time-consuming data for key update, obtain the key pre-distribution time; through comprehensive assessment of the security coefficient of the coexistence time of old and new keys, the network latency monitoring data and the average time-consuming data for key update, obtain the coexistence time of old and new keys; use the two-dimensional array obtained by fusing the key pre-distribution time and the coexistence time of old and new keys as the process smoothing factor.
[0029] Further, according to the security assessment of the security event occurrence frequency data to obtain the security coefficient of key pre-distribution time, and the security assessment of the device load data to obtain the security coefficient of the coexistence time of old and new keys, specifically including:
[0030] Obtain the security event occurrence frequency monitoring data and the device load data. Use the security event occurrence frequency monitoring data as the numerator, and the fraction formed by adding the security event occurrence frequency data and the constant 1 as the denominator as the evaluation factor of the security coefficient of key pre-distribution time. Use the calculation result of adding the evaluation factor of the security coefficient of key pre-distribution time and the constant 1 as the security coefficient of key pre-distribution time.
[0031] Use the device load data as the numerator, and the fraction formed by adding the device load data and the constant 1 as the denominator as the evaluation factor of the security coefficient of the coexistence time of old and new keys. Use the calculation result of adding the evaluation factor of the security coefficient of the coexistence time of old and new keys and the constant 1 as the security coefficient of the coexistence time of old and new keys.
[0032] Further, according to the comprehensive assessment of the security coefficient of key pre-distribution, the network latency monitoring data and the average time-consuming data for key update to obtain the key pre-distribution time, and the comprehensive assessment of the security coefficient of the coexistence time of old and new keys, the network latency monitoring data and the average time-consuming data for key update to obtain the coexistence time of old and new keys, specifically including:
[0033] Obtain network latency data, the average time-consuming data for key update, the security factor of key pre-distribution time, and the security factor of coexistence time of old and new keys; perform a logarithmic function mapping with the natural constant e on the calculation result of adding the network latency data to the constant 1, and use the mapping result as the first evaluation factor for key pre-distribution time; perform a power function mapping with the natural constant as the base on the average time-consuming data for key update, and use the reciprocal of the mapping result as the second evaluation factor for key pre-distribution time; use the mapping result of performing a tanh function mapping on the standard deviation of the network latency data as the third evaluation factor for key pre-distribution time; use the calculation result of multiplying the calculation result of adding the first evaluation factor for key pre-distribution time, the second evaluation factor for key pre-distribution time, and the third evaluation factor for key pre-distribution time by the security factor of key pre-distribution time as the key pre-distribution time;
[0034] Perform a logarithmic function mapping with the natural constant e on the calculation result of adding the network latency data to the constant 1, and use the mapping result as the first evaluation factor for the coexistence time of old and new keys; perform a power function mapping with the natural constant as the base on the average time-consuming data for key update, and use the reciprocal of the mapping result as the second evaluation factor for the coexistence time of old and new keys; use the mapping result of performing a tanh function mapping on the standard deviation of the network latency data as the third evaluation factor for the coexistence time of old and new keys; use the calculation result of multiplying the calculation result of adding the first evaluation factor for the coexistence time of old and new keys, the second evaluation factor for the coexistence time of old and new keys, and the third evaluation factor for the coexistence time of old and new keys by the security factor of the coexistence time of old and new keys as the coexistence time of old and new keys.
[0035] Further, step S2.3 optimizes the AES-GCM encryption process through a key update cycle optimization factor and a process smoothing optimization factor, specifically including:
[0036] Step 1: Key generation and distribution. The cloud platform generates a master key for each edge gateway, and the cloud platform distributes the master key to the corresponding edge gateway through a secure channel. In the initial stage, the cloud platform sets the basic key validity period, the initial value of key pre-distribution, and the initial value of the coexistence time of old and new keys for the edge gateway;
[0037] Step 2: Collaborative parameter encryption. The cloud platform generates collaborative parameters for the manipulator and the injection molding machine according to information such as production plans and equipment status. The cloud platform calculates the key update cycle optimization factor and adjusts the key update cycle. If the current key has expired, the cloud platform generates a new key, obtains the current process smoothing factor, and distributes the new key to the edge gateway according to the key pre-distribution time in the process smoothing factor. The cloud platform selects a random number, encrypts the collaborative parameters using the AES-GCM algorithm in the cloud platform, generates a ciphertext and an authentication tag, and sends the ciphertext, the authentication tag, the random number, and the additional data to the edge gateway;
[0038] Step 3: Collaborative Parameter Forwarding and Verification. The edge gateway receives the ciphertext, authentication tag, random number, and additional data sent by the cloud platform. The edge gateway verifies the validity of the authentication tag based on the currently valid key and the AES-GCM algorithm. If the authentication tag verification passes, the edge gateway forwards the ciphertext, random number, and additional data to the corresponding robot arm or injection molding machine control unit. The edge gateway monitors the network status, device load, and frequency of security events in real time, and dynamically updates the key update cycle optimization factor and process smoothing factor based on this data;
[0039] Step 4: Collaborative Parameter Decryption and Execution. The control unit receives the ciphertext, random number, and additional data forwarded by the edge gateway. The control unit verifies the validity of the authentication tag using the pre-configured key and the AES-GCM algorithm, and decrypts the ciphertext to obtain the plaintext of the collaborative parameters. The control unit performs corresponding actions based on the collaborative parameters;
[0040] Step 5: Key Update. The key update is jointly controlled by the key update cycle optimization factor and the process smoothing factor. The key update cycle optimization factor adjusts the key update cycle, and the process smoothing factor controls the smoothness of the key update process. For the key pre-distribution time in the process smoothing factor, within the key pre-distribution time before the current key expires, the edge gateway requests a new key from the cloud platform. The cloud platform generates a new key and distributes it to the edge gateway. For the coexistence time of the old and new keys in the process smoothing factor, after the new key is enabled, the old key remains valid within the coexistence time of the old and new keys. During this period, the edge gateway and the control unit can use the new key or the old key for encryption and decryption. After the coexistence time of the old and new keys ends, the old key becomes invalid, and the system completely switches to the new key.
[0041] Furthermore, the cloud platform calculates the key update cycle optimization factor and adjusts the key update cycle, specifically including:
[0042] Obtain the key update cycle optimization factor and the basic key update cycle, and use the calculation result of multiplying the key update cycle optimization factor and the basic key update cycle as the adjusted key update cycle.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] A collaborative parameter encryption method for a manipulator and an injection molding machine according to the present invention. First, based on key operating parameters such as communication frequency, data volume, and security event frequency, the present invention dynamically adjusts the key update period of the AES-GCM encryption algorithm through a standardization and weighting mechanism. This mechanism effectively avoids the lag and low adaptability of the traditional static key update period strategy in the face of security threats or performance bottlenecks, and realizes minimizing the encryption overhead and update cost while ensuring the security of system data. Secondly, the present invention further realizes the smoothing of the key update process by introducing the key pre-distribution time and the coexistence time of the old and new keys, effectively solving problems such as communication interruption and control delay caused by key updates. Especially in scenarios where edge computing resources are limited, this strategy significantly reduces the performance jitter caused by key switching and enhances the continuous control ability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0046] Figure 1 It is a flowchart of a collaborative parameter encryption method for a manipulator and an injection molding machine according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0048] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "back", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0049] The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0050] See Figure 1 , which is a flowchart of a collaborative parameter encryption method for a manipulator and an injection molding machine provided in Embodiment 1 of the present invention. As Figure 1 shown, a collaborative parameter encryption method for a manipulator and an injection molding machine may include:
[0051] S1, collecting the monitoring data of the edge gateway, the manipulator control unit, the injection molding machine control unit, and the cloud platform.
[0052] Collect the monitoring data of the edge gateway, robot control unit, injection molding machine control unit, and cloud platform, including:
[0053] 1. Communication frequency-related data: Records of collaborative parameter communication between the edge gateway and the cloud platform or between the edge gateway and the control unit, which should include the timestamps of the communication and the identifiers of the communication events.
[0054] 2. Data volume-related data: Records of the packet sizes of the collaborative parameters transmitted between the edge gateway and the cloud platform or between the edge gateway and the control unit.
[0055] 3. Security event occurrence frequency-related data: Records of security events detected by the edge gateway or the control unit, such as authentication failures, MAC verification failures, and intrusion detection alerts.
[0056] 4. Device load-related data: Performance metric data such as the CPU occupancy rate and memory usage rate of the edge gateway and the control unit.
[0057] 5. Network latency-related data: Network latency data between the edge gateway and the cloud platform or between the edge gateway and the control unit. These data are obtained by periodically sending probe packets and measuring the round-trip time.
[0058] 6. Key update time-consuming-related data: Records of the time consumed for key update operations (including new key generation, distribution, loading, and configuration).
[0059] Preprocess the noise, outliers, or missing values in the collected raw data. The preprocessing steps include but are not limited to: data cleaning and data smoothing. The preprocessed data will be used for subsequent optimization factor calculation and key update strategy adjustment.
[0060] S2. Collaborative parameter encryption based on AES-GCM and key update cycle optimization.
[0061] In the cloud-edge collaboration scenario, the collaboration parameters between the manipulator and the injection molding machine are encrypted and protected by the AES-GCM algorithm to ensure the confidentiality, integrity, and authenticity of data during transmission. The security of the AES-GCM algorithm largely depends on the confidentiality and uniqueness of the key and the random number. To prevent the key from being leaked or cracked, the key needs to be updated regularly. However, the standard AES-GCM algorithm does not provide an optimization mechanism for the key update period and usually adopts a static configuration method, that is, a fixed update period is preset by the user according to experience or security policies. This static configuration method has significant limitations in the cloud-edge collaboration scenario. Specifically, the cloud-edge collaboration environment is highly dynamic, and factors such as network status and security threats may change over time. Moreover, different types of collaboration parameters have different security requirements. The static key update period cannot adapt to these changes. Although frequent key updates can improve security and reduce the risk of key leakage, they will also increase the computational overhead and communication overhead, especially on resource-constrained edge gateways and control units, affecting the execution of real-time control tasks and thus affecting production efficiency and product quality. On the contrary, sparse key updates can reduce performance overhead but will prolong the time the key is exposed to risks and increase the possibility of the key being cracked. Once the key is leaked, the collaboration parameters will be tampered with, leading to consequences such as equipment damage and product scrapping. In addition, the static configuration method cannot respond promptly to sudden security events and cannot dynamically adjust the key update frequency according to the actual security threat level. In the collaborative control scenario of the manipulator and the injection molding machine, this contradiction is particularly prominent because collaborative control has extremely high requirements for real-time performance and reliability, and any communication interruption or data error may lead to production accidents.
[0062] To solve the above problems, it is necessary to collect key operation data in the cloud-edge collaboration environment, including but not limited to the network status (delay, bandwidth, packet loss rate) of the edge gateway and the control unit, the frequency of security events (authentication failure, MAC check failure, intrusion detection alarm, etc.), and the type and importance level of collaboration parameters. By analyzing and processing these data, a comprehensive index that can reflect the current system security status and performance requirements is constructed, and the key update period of the AES-GCM algorithm is dynamically adjusted based on this. In this way, while ensuring sufficient security, the impact of key updates on system performance is minimized, and a dynamic balance between security and efficiency is achieved.
[0063] S2.1, Obtain the key update period optimization factor through the adaptive optimization analysis of key updates.
[0064] In the cloud-edge collaboration scenario, the collaborative control of the manipulator and the injection molding machine has high requirements for both real-time performance and security. Therefore, the setting of the key update period needs to comprehensively consider the following three aspects:
[0065] 1. Communication frequency: The frequency at which collaborative parameter communication continues between the edge gateway and the cloud platform, or between the edge gateway and the control unit (robot control unit, injection molding machine control unit). The higher the communication frequency, the more times the key is used per unit time, and the larger the amount of data encrypted with the same key, which increases the risk of key leakage.
[0066] 2. Data volume: The amount of collaborative parameter data transmitted between the edge gateway and the cloud platform, or between the edge gateway and the control unit per unit time. The larger the data volume, the higher the potential value of being eavesdropped and the higher the risk of being attacked.
[0067] 3. Frequency of security events occurring: The frequency of security events (such as authentication failures, MAC verification failures, intrusion detection alarms, etc.) detected by the edge gateway or the control unit. The higher the frequency of security events occurring, the greater the security threat the system currently faces, and the key needs to be updated more frequently to reduce the risk.
[0068] In order to comprehensively evaluate these different types of data with different dimensions and achieve unified regulation of the key update cycle, it is necessary to normalize them to eliminate the dimension differences. In this embodiment, each feature data is normalized by the Z-score normalization method, and the feature data can be any one of the communication frequency data, data volume monitoring data, and frequency of security events occurring data.
[0069] Next, it is necessary to determine the degree of influence of each data feature on the key update cycle, that is, the weight of each data feature. To avoid the subjectivity and uncertainty brought by artificially setting the weight coefficient, the present invention uses the coefficient of variation method to dynamically calculate the weight of each data feature. The calculation formula of the coefficient of variation is:
[0070]
[0071] Among them, represents the coefficient of variation of the th feature; represents the historical average value of the data feature ; represents the historical standard deviation of the data feature .
[0072] It should be noted that the coefficient of variation reflects the degree of fluctuation (relative fluctuation) of the data feature. The greater the fluctuation, the more sensitive the feature is to changes in the system state, or the greater the uncertainty of the feature. Therefore, a higher weight should be given to automatically adjust the weight according to the actual fluctuation of the data.
[0073] After obtaining the coefficient of variation of each data feature, normalization is performed to obtain the weight of each data feature. It should be noted that since the frequency of security events is essentially different from the other two features (communication frequency and data volume), the communication frequency and data volume are continuous and smoothly changing quantities, while the frequency of security events is a discrete emergency event (for example, under normal circumstances, the frequency of security events is 0, and when a security event occurs, the frequency of security events is a positive integer). For variables of this type of security event occurrence frequency, the coefficient of variation cannot well reflect its fluctuation characteristics and importance. More importantly, during the adaptive adjustment process of the key update frequency, it is necessary to achieve that as long as a security event occurs, regardless of its frequency relative to the historical average level, the key update frequency can be immediately increased to address potential security threats. Therefore, special processing is required for the weight calculation of the security event occurrence frequency.
[0074] The formula for calculating the weight of the security event occurrence frequency is:
[0075]
[0076] Where, represents the weight of the security event occurrence frequency; represents the maximum value function; represents the minimum value of the weight of the security event occurrence frequency; in this embodiment, the minimum value of the weight of the security event occurrence frequency is set to ; a, b, and c respectively represent the normalized communication frequency, data volume, and security event occurrence frequency; represents the natural constant e.
[0077] It should be noted that the main goal of the evaluation process of the security event occurrence frequency weight is to ensure the security of the cooperation parameters in the cloud-edge cooperation scenario. The security event occurrence frequency is the most direct indicator reflecting the system security state. As long as the security event occurrence frequency is not 0, the normalized security event occurrence frequency is a positive number, and the corresponding is greater than 1, so that [[ID=#25]] occupies a certain proportion, ensuring that the key update cycle optimization factor can respond promptly to security events.
[0078] The formula for calculating the weights of the communication frequency and data volume is:
[0079]
[0080]
[0081] Where, represents the weight of the communication frequency; represents the weight of the data volume; The weight representing the frequency of security events; The coefficient of variation representing the communication frequency; The coefficient of variation representing the data volume.
[0082] After obtaining the normalized data features and their respective weights, the evaluation of the key update period optimization factor can be carried out. The calculation formula of the key update period optimization factor is:
[0083]
[0084] Among them, Represents the key update optimization factor; Represents the weight of the communication frequency; Represents the weight of the data volume; Represents the weight of the frequency of security events; a, b, c respectively represent the normalized communication frequency, data volume, and frequency of security events; sigmoid represents the sigmoid mapping function.
[0085] First, multiply the normalized data features by their corresponding weights and then sum them to obtain a comprehensive score. This score reflects the degree of deviation of the current system state from the historical average state and the comprehensive impact of this deviation on the key update period. Then, input the comprehensive score into the sigmoid function. Map the input value to Within the interval. The introduction of the sigmoid function has two main purposes: it introduces a non-linear relationship, making the optimization factor More sensitive to changes in the input value and able to more accurately reflect the subtle changes in the system state; it normalizes the output value and limits Within Within the interval, ensuring that the adjustment of the key update period is always within a reasonable range.
[0086] For the obtained key update period optimization factor , adjust the basic key validity period Through this key update period optimization factor to obtain the new key validity period , the new key validity period The calculation formula is:
[0087]
[0088] Among them, Represents the new key validity period; Represents the key update period optimization factor; T represents the basic key validity period, and T is a pre-set value representing the key update period under ideal conditions (no security threats, low system load).
[0089] It should be noted that since the value range of is it is always less than or equal to T. The dynamic adjustment mechanism of the optimization factor is mainly reflected in the following aspects:
[0090] The frequency of security events plays a leading role. When the frequency of security events increases, its normalized value increases. Since is used in the calculation formula of this will significantly amplify the influence of causing to increase. When decreases or is then decreases or becomes negative (depending on the historical average and standard deviation of ), decreases, and at this time the value of is mainly affected by and .
[0091] The combined effect of the communication frequency and the data volume . When the frequency of security events remains unchanged or changes little, the changes in the communication frequency and the data volume will affect the value of . When or increases, their normalized values and increase. At the same time, and 's coefficient of variation and reflect their respective degrees of fluctuation. In the calculation of and , although and are not directly used, due to the existence of the increase of and can still affect the comprehensive score. When or increases, and its volatility is relatively large compared to another data characteristic, it will cause the comprehensive score to increase, the value of decreases, or when When it decreases, or its volatility is relatively small compared to another data characteristic, it will cause the comprehensive score to decrease. The value increases. It increases, the key update frequency decreases, and the performance overhead decreases.
[0092] S2.2. Obtain the process smoothing factor through key pre-distribution and the analysis of the coexistence of old and new keys.
[0093] The intelligent key update period adjustment mechanism realizes the dynamic adjustment of the key update strategy according to the running state in the cloud-edge collaboration scenario, which can balance the security and performance requirements. However, even if the key update period has been optimized, the key update process itself may still have an instantaneous impact on the system performance. The key update usually involves steps such as new key generation, distribution, and enabling, which consume certain computing resources and communication resources. In resource-constrained edge devices and control units, the key update process may lead to a brief performance degradation, and even cause communication interruptions or control instruction delays, thus affecting the collaborative control accuracy and production efficiency of the robotic arm and the injection molding machine.
[0094] Specifically, the following aspects will affect the performance: The generation of new keys usually involves random number generation and encryption operations, which consume CPU resources; the distribution of new keys requires network bandwidth and is affected by network latency and packet loss. Especially in the cloud-edge collaboration scenario, the unstable network conditions will lead to a long time for key distribution; after receiving the new key, the control unit needs to load it into the memory and update the configuration of the AES-GCM encryption module. These operations also consume CPU resources and time. If the old key is immediately deactivated after the new key is enabled, there is a chance of causing ongoing communication interruptions, or causing some control instructions to be rejected because the old key is used, thus affecting the continuity and reliability of the collaborative control.
[0095] To solve the above problems and further reduce the impact of the key update process on system performance, it is necessary to establish a smooth mechanism for the key update process. Through the strategies of "key pre-distribution" and "coexistence of old and new keys", the overhead of key update is dispersed over a longer time period, and communication interruption caused by key switching is avoided. Specifically, the key pre-distribution time refers to the time when a new key is distributed to the edge gateway and the control unit in advance before the current key expires. In this way, the overhead of key distribution can be advanced to a period with lower system load, avoiding key updates during the production peak period, thereby reducing the impact on real-time control tasks. The coexistence time of old and new keys refers to the period during which the old key is allowed to remain valid for a certain time after the new key is enabled. In this way, it can be ensured that after the new key is enabled, the data that has not been processed yet and is encrypted with the old key can still be correctly decrypted, avoiding communication interruption or data loss, and ensuring the continuity and reliability of collaborative control. The values of the key pre-distribution time and the coexistence time of old and new keys need to be dynamically adjusted according to the actual operation data in the cloud-edge collaboration scenario to adapt to changes in network status, device load, and security requirements.
[0096] In the cloud-edge collaboration scenario, network latency means that when the cloud platform distributes a new key to the edge gateway, it needs to go through network transmission, and there is a certain delay in this process. If the delay is too large, it may cause the new key to not reach the edge gateway in time, affecting the timeliness of key update; the key update time consumption means that after the edge gateway and the control unit receive the new key, a series of operations need to be carried out, including loading the key, updating the encryption module configuration, etc., and these operations consume a certain amount of time. If the key update time consumption is too long, it will affect the execution of real-time control tasks; the switching between old and new keys means that if the old key is immediately deactivated after the new key is enabled, it may cause the ongoing communication to be interrupted, or some control instructions may be rejected because the old key is used.
[0097] In summary, the present invention proposes a key pre-distribution and coexistence strategy for old and new keys. The calculation formula for the key pre-distribution time is as follows:
[0098]
[0099] The calculation formula for the coexistence time of keys is as follows:
[0100]
[0101] Among them, represents the key pre-distribution time; represents the key pre-distribution time safety factor, , the initial value of the safety factor is set to 1, and its value range is ; represents the network latency; Indicates the average time taken for key update, including the time for new key generation, distribution, and enabling; Indicates the frequency of security events; Indicates the security factor of key coexistence time, ; Indicates the standard deviation of network latency; Indicates the device load.
[0102] It should be noted that , that is, the network latency 's logarithmic function (adding 1 is to avoid being 0 when the logarithm is meaningless). Network latency is one of the key factors affecting the key update process. If the network latency is too large, the new key cannot reach the edge gateway and control unit in time, resulting in key update failure or delay. Therefore, and should both increase as increases. The logarithmic function is used because when the network latency is small, its small changes have a greater impact on the pre-distribution time and coexistence time; when the network latency is large, its change has a relatively smaller impact. This design conforms to the actual situation because the timing of key update can be more precisely controlled when the network condition is good, and more margin needs to be reserved when the network condition is poor. , that is, the reciprocal of the exponential function of the key update time consumption ( ). The key update time consumption includes the time required for steps such as new key generation, distribution, loading, and configuration. The longer the key update time consumption, the greater the impact on the system performance during the key update process. Therefore, and should both increase as increases. The reciprocal of the exponential function is used because the impact of key update time consumption on the pre-distribution time and coexistence time should be exponential. When is close to 0, this term approaches 1 and has a smaller impact on and ; when increases, this term rapidly decreases and approaches 0, but still retains a certain impact. , that is, the hyperbolic tangent function of the network latency standard deviation ( ). The network latency standard deviation reflects the volatility of network latency. The greater the network latency fluctuation, the more unstable the network condition and the lower the reliability of key distribution. Therefore, and should both increase as increases. The hyperbolic tangent function is used because 's value may be large, and the hyperbolic tangent function can map the input value to Interval, to avoid having too much impact on the overall result while being able to better reflect the change of network delay volatility.
[0103] Adding these three parts together comprehensively considers the impacts of network delay, key update time consumption, and network delay volatility. Multiply the added result by the security factor and respectively to obtain the final and . The introduction of the security factor is to add a certain margin based on the calculation result to ensure that the pre-distribution time and coexistence time are long enough to better handle various emergencies.
[0104] Finally, the process smoothing factor is jointly formed by the key pre-distribution time and the coexistence time of the old and new keys.
[0105] S2.3. Optimize the AES-GCM encryption process through the key update cycle optimization factor and the process smoothing optimization factor.
[0106] The AES-GCM encryption optimization method proposed by the present invention optimizes the key update cycle and the key update process respectively through the optimization factors and , and realizes the secure and efficient transmission of collaborative parameters in the cloud-edge collaboration scenario. The following details the entire encryption and decryption processes, as well as the action modes of the optimization factors and :
[0107] Step 1. Key generation and distribution (cloud platform): The cloud platform generates a master key for each edge gateway. The cloud platform distributes the master key to the corresponding edge gateway through a secure channel (such as TLS / SSL). In the initial stage, the cloud platform can set a basic key validity period T for the edge gateway, as well as the initial value of the optimization factor ( and ).
[0108] Step 2. Collaborative parameter encryption (cloud platform): The cloud platform generates the collaborative parameters of the manipulator and the injection molding machine according to information such as the production plan and equipment status. The cloud platform calculates the key update cycle optimization factor , and dynamically adjusts the key update cycle according to . If the current key has expired (or is approaching expiration), the cloud platform generates a new key , and calculates the optimization factor according to the formula in step S2.2, and pre-distributes the new key in advance according to Distributed to the edge gateway.
[0109] The cloud platform selects a random number as the nonce. The cloud platform uses the AES-GCM algorithm and the currently valid key ( or ), nonce, and additional data (AD) to encrypt the collaboration parameters, generating the ciphertext and authentication tag. The cloud platform sends the ciphertext, authentication tag, nonce, and AD to the edge gateway.
[0110] Step 3. Collaboration Parameter Forwarding and Verification (Edge Gateway): The edge gateway receives the ciphertext, authentication tag, nonce, and AD sent by the cloud platform. The edge gateway verifies the validity of the authentication tag according to the currently valid key ( or ) and the AES-GCM algorithm. If the authentication tag verification passes, the edge gateway forwards the ciphertext C, nonce, and AD to the corresponding robot arm or injection molding machine control unit. The edge gateway monitors the network status (latency , packet loss rate, etc.), device load, and the frequency of security events in real time, and dynamically updates and optimizes the factors and .
[0111] Step 4. Collaboration Parameter Decryption and Execution (Control Unit): The control unit receives the ciphertext C, nonce, and AD forwarded by the edge gateway. The control unit verifies the validity of the authentication tag and decrypts the ciphertext using the pre-configured key ( or ) and the AES-GCM algorithm to obtain the plaintext of the collaboration parameters. The control unit performs corresponding actions according to the collaboration parameters.
[0112] Step 5. Key Update (Cloud Platform, Edge Gateway, Control Unit): The key update is jointly controlled by the optimization factors and . The optimization factor : Dynamically adjusts the key update period . When the value is small, decreases, and the key update is more frequent; when the value is large, increases, and the key update frequency decreases. The optimization factor controls the smoothness of the key update process. (Key Pre-distribution Time): Before the current key expires time, the edge gateway requests a new key from the cloud platform. The cloud platform generates a new key and distributes it to the edge gateway. (Coexistence time of old and new keys): After the new key is enabled, the old key remains valid within this period. During this period, the edge gateway and the control unit can use or for encryption and decryption. After this period ends, the old key becomes invalid, and the system completely switches to the new key .
[0113] S3, encrypt the collaborative parameters of the manipulator and the injection molding machine through the optimized AES-GCM encryption process.
[0114] The method proposed by the present invention can be widely applied to the collaborative control system of the manipulator and the injection molding machine under various cloud-edge collaborative scenarios. For example, in the automotive parts injection production line, this method is used to encrypt and protect key parameters such as the grasping position, grasping force, and synchronization timing of the manipulator, preventing these parameters from being maliciously tampered with, resulting in incorrect actions of the manipulator, grasping failure, or collision with the mold, thereby avoiding equipment damage, product scrapping, and personal injuries. At the same time, by dynamically adjusting the key update mechanism, the impact of encryption and key update on the system performance can be minimized, ensuring the stable and efficient operation of the production line.
[0115] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A collaborative parameter encryption method for a manipulator and an injection molding machine, characterized in that, The method includes the following steps: Step S1: Collect the monitoring data of the edge gateway, the manipulator control unit, the injection molding machine control unit, and the cloud platform; Step S2: Optimize the collaborative parameter encryption and key update period based on AES-GCM; Step S2.1: Obtain the key update period optimization factor through the adaptive optimization analysis of key update; Step S2.2: Obtain the process smoothing factor through key pre-distribution and coexistence analysis of old and new keys; Step S2.3: Optimize the AES-GCM encryption process through the key update period optimization factor and the process smoothing optimization factor; Step S3: Encrypt the collaborative parameters of the manipulator and the injection molding machine through the optimized AES-GCM encryption process; The step S2.1 obtains the key update period optimization factor through the adaptive optimization analysis of key update, specifically including: obtaining the communication frequency monitoring data, the data volume monitoring data, and the security event occurrence frequency monitoring data, obtaining the communication frequency normalized monitoring data, the data volume normalized monitoring data, and the security event occurrence frequency normalized monitoring data through normalizing the three characteristic data; obtaining the coefficient of variation of the three normalized characteristic data through the coefficient of variation evaluation of the three normalized characteristic data; obtaining the security event occurrence frequency weight through the security analysis of the security event occurrence frequency; obtaining the weight of the communication frequency normalized monitoring data and the weight of the data volume normalized monitoring data through the weight analysis of the coefficient of variation of the communication frequency and the data volume normalized monitoring data; obtaining the key update period optimization factor through the key update period analysis of the normalized data of the three characteristic data; The step S2.2 obtains the process smoothing factor through key pre-distribution and coexistence analysis of old and new keys, and its specific steps include: obtaining the network delay monitoring data and the average key update time-consuming data, obtaining the key pre-distribution time safety coefficient through the security evaluation of the security event occurrence frequency data; obtaining the coexistence time safety coefficient of old and new keys through the security evaluation of the device load data; obtaining the key pre-distribution time through the comprehensive evaluation of the key pre-distribution time safety coefficient, the network delay monitoring data, and the average key update time-consuming data; obtaining the coexistence time of old and new keys through the comprehensive evaluation of the coexistence time safety coefficient of old and new keys, the network delay monitoring data, and the average key update time-consuming data; using the two-dimensional array obtained by fusing the key pre-distribution time and the coexistence time of old and new keys as the process smoothing factor; The step S2.3 optimizes the AES-GCM encryption process through the key update period optimization factor and the process smoothing optimization factor, specifically including: the cloud platform generates the main key and sets the initial validity period and coexistence time; the cloud platform calculates the key update period optimization factor and adjusts the key update period; the collaborative parameters are encrypted by the AES-GCM algorithm to generate ciphertext and authentication tags, and are forwarded to the control unit by the edge gateway and then decrypted and executed; the key update process is jointly controlled by the update period optimization factor and the process smoothing factor; The cloud platform calculates the key update period optimization factor and adjusts the key update period, which specifically includes: obtaining the key update period optimization factor and the basic key update period, and taking the calculation result of multiplying the key update period optimization factor by the basic key update period as the adjusted key update period.
2. The collaborative parameter encryption method for a manipulator and an injection molding machine according to claim 1, characterized in that, By evaluating the coefficient of variation of three types of normalized feature data, the coefficient of variation of three types of normalized monitoring data is obtained; by performing security analysis on the occurrence frequency of security events, the weight of the normalized monitoring data of the occurrence frequency of security events is obtained; by performing weight analysis on the coefficient of variation of the normalized monitoring data of communication frequency and data volume, the weight of the normalized monitoring data of communication frequency and the weight of the normalized monitoring data of data volume are obtained, which specifically includes: Obtain the normalized monitoring data of communication frequency, the normalized monitoring data of data volume, and the normalized monitoring data of the occurrence frequency of security events. Take the calculation result of dividing the standard deviation of each type of normalized monitoring data by the mean of the normalized feature data as the coefficient of variation of the normalized feature data; By performing exponential mapping on the normalized security event frequency data and combining the preset minimum weight, the weight of the normalized monitoring data of the occurrence frequency of security events is obtained; Obtain the coefficient of variation of communication frequency and data volume; take the calculation result of subtracting the weight of the security event occurrence frequency from the constant 1 as the first evaluation weight; according to the coefficient of variation of communication frequency and data volume, combine the weight of the security event frequency to calculate the first evaluation weight; then multiply the coefficient of variation ratio by the first evaluation weight to obtain the weight of the normalized monitoring data of communication frequency and the weight of the normalized monitoring data of data volume respectively.
3. A collaborative parameter encryption method for a manipulator and an injection molding machine according to claim 1, characterized in that, By performing key update period analysis on the normalized data of the three types of feature data, the key update period optimization factor is obtained, which specifically includes: Obtain the weight of the normalized monitoring data of the occurrence frequency of security events, the weight of the normalized monitoring data of communication frequency, and the weight of the normalized monitoring data of data volume; take the calculation result of respectively weighting and summing the weights of the normalized monitoring data of the three types of features for the normalized communication frequency, data volume, and occurrence frequency of security events as the key update period evaluation factor; take the mapping result of mapping the key update period evaluation factor through the sigmoid function as the key update period optimization factor.
4. A collaborative parameter encryption method for a manipulator and an injection molding machine according to claim 1, characterized in that According to the security evaluation of the security event occurrence frequency data, the key pre-distribution time security coefficient is obtained; by performing security evaluation on the device load data, the coexistence time security coefficient of the old and new keys is obtained, which specifically includes: Obtain the security event occurrence frequency monitoring data and the device load data. Take the fraction formed by using the security event occurrence frequency monitoring data as the numerator and the sum of the security event occurrence frequency data and the constant 1 as the denominator as the key pre-distribution time security coefficient evaluation factor, and take the calculation result of adding the key pre-distribution time security coefficient evaluation factor to the constant 1 as the key pre-distribution time security coefficient; Taking the device load data as the numerator and the fraction formed by taking the sum of the device load data and the constant 1 as the denominator as the evaluation factor for the coexistence time security factor of the old and new keys, and taking the calculation result of adding the coexistence time security factor evaluation factor of the old and new keys to the constant 1 as the coexistence time security factor of the old and new keys.
5. A collaborative parameter encryption method for a manipulator and an injection molding machine according to claim 1, characterized in that, Based on the comprehensive evaluation of the key pre-distribution security factor, the network delay monitoring data, and the average key update time data, the key pre-distribution time is obtained; through the comprehensive evaluation of the coexistence time security factor of the old and new keys, the network delay monitoring data, and the average key update time data, the coexistence time of the old and new keys is obtained, specifically including: Through the combined evaluation of the network delay data and the average key update time data, the key pre-distribution time and the coexistence time of the old and new keys are calculated respectively; among them, the key pre-distribution time is obtained by logarithmically mapping the network delay data, taking the reciprocal of the power function of the key time consumption, and performing a tanh mapping on the network delay standard deviation, weighting the three and multiplying by the security factor; after obtaining three evaluation factors using the same mapping method, summing them up and multiplying the sum result by its corresponding security factor to obtain the coexistence time of the old and new keys.
Citation Information
Patent Citations
Encryption optimization method for data communication
CN118944952A
Big data secure storage method and system based on cloud computing
CN119720300A