Communication method and system and readable storage medium

Through the encrypted communication and equipment confirmation mechanism between power grid equipment, the information security problem caused by the poor compatibility of equipment from different manufacturers in the power grid is solved, and high-security data transmission is achieved.

CN118748599APending Publication Date: 2024-10-08ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID QINGHAI ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410773075.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

The power equipment produced by different manufacturers in the existing power grid has poor compatibility, which makes information easy to be stolen and cracked during communication, resulting in insufficient security.

Method used

Through encrypted communication between the source device and the target device, encrypted device data is generated and exchanged, and operations are performed after device confirmation. AES encryption and digital signature processing are used to ensure the security of data transmission.

Benefits of technology

It realizes encrypted communication, prevents third parties from cracking communication information, improves communication security, and ensures identity authentication and data transmission security between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748599A_ABST
    Figure CN118748599A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and system and a readable storage medium. The method comprises the following steps: generating first equipment data, and encrypting the first equipment data to obtain encrypted source equipment data; sending the encrypted source device data to the target device, receiving the encrypted target device data from the target device, and decrypting the encrypted target device data to obtain second device data; and according to the target equipment information, carrying out equipment confirmation on the target equipment, and after the target equipment is confirmed to be normal, executing corresponding operation according to the second equipment data. According to the invention, encrypted communication is realized, a third party can be prevented from cracking communication information, and the communication security is improved; and communication is carried out under the condition that the equipment is not abnormal, so that the communication security is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of power grid technology, and in particular, relates to a communication method, system and readable storage medium. Background Art

[0002] The existing power grid is built by power equipment produced by multiple different manufacturers. Power equipment produced by different manufacturers may have poor compatibility. Generally, some interception devices are deployed on the power equipment, and the connection equipment is debugged and modified to ensure smooth communication between the power equipment.

[0003] However, this method can easily lead to information theft and cracking, resulting in poor security. Summary of the invention

[0004] The embodiments of the present application provide a communication method, system and readable storage medium, which can solve the problem of poor communication security between power equipment.

[0005] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a source device, including:

[0006] Generate first device data, and encrypt the first device data to obtain encrypted source device data, where the first device data includes source device information;

[0007] Sending the encrypted source device data to the target device, wherein the encrypted source device data is used to instruct the target device to perform device confirmation on the source device according to the source device information after decrypting the encrypted source device data to obtain the first device data, and after confirming that the source device is normal, determine the second device data according to the first device data, and after encrypting the second device data to obtain the encrypted target device data, send the encrypted target device data to the source device, wherein the encrypted target device data includes the target device information;

[0008] After receiving the encrypted target device data from the target device, decrypting the encrypted target device data to obtain second device data;

[0009] The target device is confirmed according to the target device information, and after confirming that the target device is normal, a corresponding operation is performed according to the second device data.

[0010] In a second aspect, an embodiment of the present application provides a communication method, which is applied to a target device, including:

[0011] receiving encrypted source device data from a source device, wherein the encrypted source device data is obtained by encrypting first device data after the source device generates the first device data, wherein the first device data includes the source device information;

[0012] decrypting the encrypted source device data to obtain the first device data;

[0013] performing device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determining second device data according to the first device data;

[0014] encrypting the second device data to obtain encrypted target device data, where the second device data includes the target device information;

[0015] The encrypted target device data is sent to the source device, and the encrypted target device data is used to instruct the source device to decrypt the encrypted target device data to obtain second device data, then confirm the target device according to the target device information, and perform corresponding operations according to the second device data after confirming that the target device is normal.

[0016] In a third aspect, an embodiment of the present application provides a communication method, including:

[0017] The source device generates first device data, and encrypts the first device data to obtain encrypted source device data, where the first device data includes source device information;

[0018] The source device sends the encrypted source device data to the target device;

[0019] The target device receives the encrypted source device data from the source device;

[0020] The target device decrypts the encrypted source device data to obtain the first device data;

[0021] The target device performs device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determines the second device data according to the first device data;

[0022] The target device encrypts the second device data to obtain encrypted target device data, where the second device data includes target device information;

[0023] The target device sends the encrypted target device data to the source device;

[0024] After receiving the encrypted target device data from the target device, the source device decrypts the encrypted target device data to obtain second device data;

[0025] The source device performs device confirmation on the target device according to the target device information, and after confirming that the target device is normal, performs a corresponding operation according to the second device data.

[0026] In a fourth aspect, an embodiment of the present application provides a communication system, including: a source device and a target device;

[0027] The source device is used to generate first device data, encrypt the first device data, obtain encrypted source device data, and the first device data includes source device information; send the encrypted source device data to the target device; after receiving the encrypted target device data from the target device, decrypt the encrypted target device data to obtain second device data, and the second device data includes target device information; perform device confirmation on the target device according to the target device information, and after confirming that the target device is normal, perform corresponding operations according to the second device data;

[0028] The target device is used to receive the encrypted source device data from the source device; decrypt the encrypted source device data to obtain the first device data; confirm the source device according to the source device information, and after confirming that the source device is normal, determine the second device data according to the first device data; encrypt the second device data to obtain the encrypted target device data; and send the encrypted target device data to the source device.

[0029] In a fifth aspect, an embodiment of the present application provides an electric power device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first or second aspects above is implemented.

[0030] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the first aspect or the second aspect above is implemented.

[0031] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on an electrical device, enables the electrical device to execute any of the methods described in the first or second aspects above.

[0032] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0033] In the embodiment of the present application, the source device encrypts the first device data to obtain the encrypted source device data, sends the encrypted source device data to the target device, and the target device decrypts the encrypted source device data to obtain the first device data; after the source device receives the encrypted target device data from the target device, it decrypts the encrypted target device data to obtain the second device data, thereby realizing encrypted communication, preventing a third party from cracking the communication information, and improving the communication security;

[0034] The target device confirms the source device according to the source device information, and after confirming that it is normal, determines the second device data according to the first device data; and the source device confirms the target device according to the target device information, and after confirming that the target device is normal, performs corresponding operations according to the second device data, so as to communicate when there is no abnormality in the device, thereby further improving the security of communication.

[0035] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0037] Figure 1 is a schematic diagram of a system provided by an embodiment of the present application;

[0038] Figure 2 This is a first flow chart of a communication method provided by an embodiment of the present application;

[0039] Figure 3 This is a second flow chart of a communication method provided by an embodiment of the present application;

[0040] Figure 4 This is a third flow chart of a communication method provided in an embodiment of the present application;

[0041] Figure 5 It is a structural schematic diagram of an electric power device provided in one embodiment of the present application. DETAILED DESCRIPTION

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

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

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

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

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

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

[0048] See also Figure 1 , Figure 1 Schematic diagram of a system provided by an embodiment of the present application. Figure 1As shown, the system includes: a source device 10 and a target device 11, wherein the source device 10 and the target device 11 are both power devices.

[0049] The source device 10 is used to generate first device data, encrypt the first device data, obtain encrypted source device data, and the first device data includes source device information; send the encrypted source device data to the target device; after receiving the encrypted target device data from the target device, decrypt the encrypted target device data to obtain second device data, and the second device data includes target device information; confirm the target device according to the target device information, and after confirming that the target device is normal, perform corresponding operations according to the second device data.

[0050] The device data includes communication address, data bit, stop bit, parity bit, etc. The data in the data bit is used to represent the device information.

[0051] In the application, the source device is the power device that initiates the communication. When the source device needs to communicate with a certain power device in the power grid, the certain power device is the target device. When the source device has not yet established a communication link with the target device, the first device data generated by the source device is the communication request data, and the communication request data is used to request the establishment of a communication link. After the communication link is successfully established between the source device and the target device, the first device data generated by the source device is the communication flow data, and the communication flow data includes data to be processed by the target device.

[0052] For communication security, the source device encrypts the first device data to obtain the encrypted source device data. To further improve communication security, after receiving the encrypted target device data returned by the target device, the source device confirms the target device according to the target device information to confirm the identity, status, etc. of the target device. When the source device determines that the target device is normal, it means that the communication environment is safe and the target device is a legal and normally operating device, and performs corresponding operations according to the second device data. Among them, the second device data is used to respond to the first device data and to characterize the status of the target device. The operation includes generating corresponding communication data according to the second device data and sending the communication data to the target device through the communication link, operating the configuration information according to the second device data, etc.

[0053] The target device 11 is used to receive the encrypted source device data from the source device; decrypt the encrypted source device data to obtain the first device data; confirm the source device according to the source device information, and after confirming that the source device is normal, determine the second device data according to the first device data; encrypt the second device data to obtain the encrypted target device data; and send the encrypted target device data to the source device.

[0054] In the application, when the target device has not established a communication link with the source device, the first device data obtained after decryption is the communication request data. For communication security, the target device confirms the source device according to the source device information to confirm the identity, status, etc. of the source device. When the target device confirms that the source device is normal, it means that the communication environment is safe and the source device is a legal and normally operating device. After the communication link is established, the second device data is determined according to the first device data.

[0055] When the target device establishes a communication link with the source device, the first device data obtained after decryption is the communication flow data. For communication security, the target device performs device confirmation on the source device according to the source device information to confirm the identity, status, etc. of the source device. When the target device confirms that the source device is normal, the second device data is determined according to the first device data.

[0056] To further improve communication security, the target device encrypts the second device data to obtain encrypted target device data, and sends the encrypted target device data to the source device via the communication link.

[0057] It is understandable that the existing power grid is built by power equipment produced by multiple different manufacturers, and power equipment produced by different manufacturers may have poor compatibility. Generally, some interception devices are deployed on the power equipment, and the connection equipment is debugged and modified to make the communication between the power equipment smooth. However, because the communication data is processed by the interception device, it is easy to cause the information to be stolen and cracked. By encrypting the data transmitted between devices and confirming the equipment, the communication security of the plant equipment is improved to ensure the communication security, which meets the safety development needs of the power system.

[0058] Corresponding to the system described in the above embodiment, for the convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0059] Correspondingly, based on the above communication system, this embodiment proposes a communication method. Figure 2 , Figure 2 This is a schematic diagram of the first flow chart of the communication method provided by an embodiment of the present application. Figure 2 As shown, the method comprises:

[0060] S11: The source device generates first device data, and encrypts the first device data to obtain encrypted source device data.

[0061] The first device data includes source device information.

[0062] In an application, when a source device needs to communicate with a target device, the source device generates first device data, and encrypts the first device data to obtain encrypted source device data.

[0063] S12: The source device sends the encrypted source device data to the target device.

[0064] S13: The target device receives the encrypted source device data from the source device.

[0065] S14: The target device decrypts the encrypted source device data to obtain the first device data.

[0066] S15: The target device performs device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determines the second device data according to the first device data.

[0067] In the application, the target device determines the communication status and identity of the source device based on the source device information. When the source device is confirmed to be normal, it means that the source device is a device that the target device can connect to in the current communication. The target device determines the second device data based on the first device data.

[0068] In a possible implementation manner, determining the second device data according to the first device data includes:

[0069] The data to be responded is determined according to the first device data; and the second device data is determined according to the data to be responded.

[0070] In the application, the target device analyzes the first device data to determine the data that needs to be replied, that is, the data to be replied. The second device data includes the target device information.

[0071] S16: The target device encrypts the second device data to obtain encrypted target device data.

[0072] S17: The target device sends the encrypted target device data to the source device.

[0073] S18: After receiving the encrypted target device data from the target device, the source device decrypts the encrypted target device data to obtain second device data.

[0074] S19: The source device performs device confirmation on the target device according to the target device information, and after confirming that the target device is normal, performs a corresponding operation according to the second device data.

[0075] In the application, the source device determines the communication status and identity of the target device based on the target device information. When it is confirmed that the target device is normal, it means that the target device is the device that the source device requests to communicate with in the current communication. The source device performs corresponding operations based on the second device data.

[0076] In one possible implementation, a priority scheduling algorithm or priority queue can be set to manage data transmission, ensure that urgent messages are processed and transmitted first, reduce the response time of key operations in the power grid, and ensure that urgent information is sent to the corresponding device for processing in a timely manner to achieve rapid distribution. Among them, the priority queue is implemented by calculating the average variance according to the level of the data to be transmitted. When the average variance is smaller, it means the level is higher and needs to be processed in time. When the average variance is larger, it means the level is lower and can be processed later.

[0077] In one possible implementation, timestamp parameters and time synchronization mechanisms can be set in the communication protocol to ensure that all power equipment in the power grid operates under a unified time standard, data is transmitted synchronously, and delays are avoided. Time synchronization can be achieved through the Network Time Protocol (NTP) or the Precision Time Protocol (PTP).

[0078] In one possible implementation, cyclic redundancy check (CRC) and forward error correction (FEC) are used in the communication protocol to enhance the error detection and correction capabilities of the communication protocol, so as to detect and correct errors in the data transmission process, reduce the number of retransmissions, and improve the real-time performance of data transmission.

[0079] In a possible implementation, various signal protections are provided at the communication interface of the power equipment, such as optical pilot current differential protection, pilot permissive protection, etc., to meet the real-time requirements of communication.

[0080] In this embodiment, the source device encrypts the first device data to obtain the encrypted source device data, sends the encrypted source device data to the target device, and the target device decrypts the encrypted source device data to obtain the first device data; after receiving the encrypted target device data from the target device, the target device decrypts the encrypted target device data to obtain the second device data, thereby realizing encrypted communication, preventing a third party from cracking the communication information, and improving communication security;

[0081] The target device confirms the source device according to the source device information, and after confirming that it is normal, determines the second device data according to the first device data; and the source device confirms the target device according to the target device information, and after confirming that the target device is normal, performs corresponding operations according to the second device data, so as to communicate when there is no abnormality in the device, thereby further improving the security of communication.

[0082] In one embodiment, in order to ensure the independence of data and maximize the amount of information when a device receives data, this embodiment proposes a method for determining the data collection interval using an autocorrelation function to solve the above problem. Specifically, the time interval for receiving data by the source device and the target device is determined based on the measurement value at a preset sampling time point, the mean of multiple measurement values, and the variance of multiple measurement values.

[0083] In application, the autocorrelation function is RCF(τ)=(E[(X t -μ)(X t+τ -μ)]) / σ 2 , where τ is the time interval, X t is the measurement value at the preset sampling time point t, μ is the mean of multiple measurement values, and σ is the variance of multiple measurement values.

[0084] In practical applications, the time interval is usually set according to the value when the autocorrelation function approaches zero. In order to obtain better data independence and maximize the amount of information, the time interval is set to the value before the autocorrelation function approaches zero for the first time.

[0085] In one embodiment, step S11 includes:

[0086] S111: The source device generates first original data.

[0087] In the application, when the source device has not established a communication link with the target device, the first original data generated by the source device is the communication request original data, and the protocol of the communication request original data is the source device communication protocol. After the communication link is successfully established between the source device and the target device, the first original data generated by the source device is the communication flow original data, and the protocol of the communication flow original data is the source device communication protocol.

[0088] S112: The source device performs protocol conversion on the first original data according to the first preset conversion model to obtain first device data.

[0089] In the application, according to the communication protocol parameters of the target device, including communication address, data bit, stop bit, parity check, etc., the model is updated to obtain the first preset conversion model. The first preset conversion model is P target =g(P source ), where P target is the first device data, P source is the first original data.

[0090] The first original data is mapped into data of the target device communication protocol through a first preset conversion model to obtain first device data, wherein the protocol of the first device data is the communication protocol of the target device.

[0091] The first preset conversion model is obtained by updating the protocol parameters of the target device. Specifically, the first preset conversion model is to learn the communication characteristics of the target device, and the communication characteristics include normal characteristics and fault characteristics.

[0092] It can be understood that the conversion model can be updated according to the communication protocol of the specific power equipment and can adapt to the complex power grid environment. And the protocol conversion is performed in the power equipment without debugging and modifying through the interception equipment, so that the power grid can realize information digitization, communication networking, and information sharing standardization.

[0093] Because some interception devices are deployed in the power equipment, the connection devices are debugged and modified to ensure smooth communication between the power devices. This debugging and modification method is inefficient and prone to errors, which makes protocol conversion difficult. The source device performs protocol conversion on the first original data according to the first preset conversion model to obtain the first device data. This can ensure that the data of the power equipment has the correct correspondence and expression after the protocol conversion, so that the device receiving the data can directly recognize it without setting up interception devices for debugging and modification, reducing the difficulty of protocol conversion, improving communication efficiency, reducing conversion error rate, and making communication only occur between the target device and the source device, further improving communication security.

[0094] S113: Based on the AES model, encrypt and sign the first device data to obtain encrypted source device data.

[0095] In the application, the AES (Advanced Encryption Standard) model is used to determine the key used for encryption, including the key generation, distribution and management mechanism. The data range to be encrypted is determined, including the encrypted data header or the entire data. And it is determined to perform digital signature processing on the first device data.

[0096] By encrypting and digitally signing the data of the first device, the data of the source device is double-secured, and AES encryption can effectively prevent the attacker from analyzing the relationship between ciphertexts to crack the key and then crack the data sent by the source device; the AES key has an expiration date. This further improves the security of data transmission and thus improves the security of plant equipment communication.

[0097] In one embodiment, step S14 includes:

[0098] S141: Determine the authority of the source device according to the level of the source device.

[0099] In the application, the Access function is used to determine the permissions of the source device according to the level of the source device.

[0100] The level information includes information such as user, operation, resource, etc. Specifically, the Access function is Access(User, Action, Resource)=Allow / Deny, where User is the user, Action is the operation, and Resource is the resource.

[0101] By setting access policy restrictions on the communication link, it is ensured that the communication link is only established between two devices within the rules and that the access operation of the device meets security requirements, further improving communication security.

[0102] S142: If the authority of the source device is to allow access, decrypt the encrypted source device data to obtain the first device data.

[0103] In the application, the encrypted source device data is verified by using a verification function. After the encrypted source device data is successfully verified, the encrypted source device data is decrypted based on the key determined by the AES model, and at the same time, the encrypted source device data is decrypted based on the hash function to obtain the first device data.

[0104] The verification function is Verify(S, Hash(P))=Ture / False. S is the generated signature, P includes PR and PU, PR is the private key, and PU is the public key. The hash function is Hash(P)=M, and M is the second device data.

[0105] By verifying and decrypting the encrypted target device data, the target device data is doubly verified, which ensures the identity authentication security between power equipment, further improves the security of data transmission, and thus improves the security of plant equipment communication.

[0106] In one embodiment, step S15 includes:

[0107] S151: The target device verifies the first device data according to the target device protocol parameters.

[0108] In the application, based on the second preset conversion model, the first device data is checked according to the target device protocol parameters: communication address, data, stop bit, parity bit, etc. to verify whether the data is completely converted.

[0109] After the target device receives data based on the time interval, the first verification model and the target device protocol parameters are used to sum and match the data received by the target device to verify whether the protocol conversion is completed. The first verification model is C(D)=∑Di mod M, Di is the data received by the target device, and mod M is used to integer the data.

[0110] The target device verifies the first device data according to the target device protocol parameters to analyze the data after protocol conversion. The analysis result can reflect whether the data conversion is complete and whether the protocol conversion is completed, thereby ensuring the effectiveness of the data protocol conversion.

[0111] S152: If the verification of the first device data is successful, the target device determines the second device prediction value of the source device according to the source device status information in the source device information.

[0112] In the application, if the verification of the first device data is successful, it means that the first device data is complete and there is no packet loss, and the target device can process the first device data.

[0113] The source device state information includes the state estimation value, covariance estimation value, state transfer matrix, control input matrix, control input value and process noise covariance of the source device. The source device state information is used to characterize the state of the source device: online, offline, noise, etc.

[0114] The state prediction value of the source device is determined according to the state estimation value, state transfer matrix, control input matrix and control input value of the source device. The covariance prediction value of the source device is determined according to the covariance estimation value, state transfer matrix and process noise covariance of the source device. The second device prediction value includes the state prediction value and covariance prediction value of the source device.

[0115] Specifically, the formula for determining the state prediction value is:

[0116] x k|k-1 =Ax k-1|k-1 +Bu k-1 , where x k-1|k-1 is the state estimate, A is the state transfer matrix, B is the control input matrix and u k-1 Enter a value for the control.

[0117] The formula for determining the predicted value of the covariance is:

[0118] P k|k-1 =AP k-1|k-1 A T +Q, where P k-1|k-1 covariance estimate, A is the state transfer matrix, and Q is the process noise covariance.

[0119] The various information included in the state information is determined by analyzing the communication of the traditional power protocol. The traditional power protocol describes various identifiers and their corresponding meanings. In the application, the various information included in the target state information can be represented by various identifiers.

[0120] S153: The target device determines the second communication status and the second device identity of the source device according to the second device prediction value and the source device state information.

[0121] In the application, after the state prediction value and covariance prediction value of the source device are calculated according to the above formula, the state prediction value is compared with the state estimation value, and the covariance prediction value is compared with the covariance estimation value. When the difference between the prediction value and the estimation value is less than the preset difference, it can be determined that the device identity of the source device is normal and the information matches. The target device establishes communication with the source device. When there is at least one difference between the prediction value and the estimation value that is greater than the preset difference, it is determined that the device identity of the source device is abnormal and the information does not match. The target device refuses to establish communication with the source device.

[0122] When the second device prediction value and the source device status information are data indicating a good communication status, the source device communication status is determined to be good, that is, the second communication status is good. When the second device prediction value and the source device status information are data indicating a poor communication status, the source device communication status is determined to be poor, that is, the second communication status is poor. Correspondingly, the target device re-establishes a communication link with the source device. Typically, the reasons for the poor communication status include communication timeout or inability to connect to the device.

[0123] The data setting indicating whether the communication status is good or bad may be determined according to the actual situation.

[0124] S154: After confirming that the source device is normal, the target device generates second original data according to the source device information.

[0125] In the application, the information to be responded is determined according to the source device information, and the second original data is generated according to the information to be responded. The protocol of the second original data is the communication protocol of the target device.

[0126] S155: The target device performs protocol conversion on the second original data according to the second preset conversion model to obtain second device data.

[0127] In the application, according to the communication protocol parameters of the source device, including communication address, data bit, stop bit, parity check, etc., the model is updated to obtain the second preset conversion model. Among them, the second preset conversion model is P` target =g(P` source ), where P` target For the second device data, P` source is the second original data.

[0128] The second original data is mapped into data of the source device communication protocol through a second preset conversion model to obtain second device data, wherein the protocol of the second device data is the communication protocol of the source device.

[0129] The second preset conversion model is obtained by updating the protocol parameters of the target device. Specifically, the second preset conversion model is to learn the communication characteristics of the source device, and the communication characteristics include normal characteristics and fault characteristics.

[0130] It can be understood that the conversion model can be updated according to the communication protocol of the specific power equipment and can adapt to the complex power grid environment. And the protocol conversion is performed in the power equipment without debugging and modifying through the interception equipment, so that the power grid can realize information digitization, communication networking, and information sharing standardization.

[0131] By performing protocol conversion on the second original data according to the second preset conversion model to obtain the second device data, it can be ensured that the data of the power equipment has correct correspondence and expression after the protocol conversion, so that the device receiving the data can directly identify it without setting up an intercepting device for debugging and modification, thereby reducing the difficulty of protocol conversion, improving communication efficiency, reducing the conversion error rate, and ensuring that communication only occurs between the target device and the source device, further improving communication security.

[0132] In one embodiment, step S16 includes:

[0133] Based on the AES model, the second device data is encrypted and signed to obtain the encrypted target device data.

[0134] In the application, the AES model is used to determine the key used for encryption, including the key generation, distribution and management mechanism. The data scope of encryption is determined, including the encrypted data header or the entire data. And the digital signature processing of the second device data is determined.

[0135] By encrypting and digitally signing the data of the second device, the data of the target device is double-secured, and AES encryption can effectively prevent the attacker from analyzing the relationship between ciphertexts to crack the key and then crack the data sent by the source device; the AES key has an expiration date. This further improves the security of data transmission and thus the security of plant equipment communication.

[0136] In one embodiment, step S18 includes:

[0137] The encrypted target device data is signature verified and decrypted to obtain the second device data.

[0138] In the application, the encrypted target device data is verified by using the verification function. After the encrypted target device data is successfully verified, the encrypted target device data is decrypted based on the key determined by the AES model, and at the same time, the encrypted target device data is decrypted based on the hash function to obtain the second device data.

[0139] By verifying and decrypting the encrypted target device data, the target device data is doubly verified, which ensures the identity authentication security between power equipment, further improves the security of data transmission, and thus improves the security of plant equipment communication.

[0140] In one embodiment, step S19 includes:

[0141] S191: The source device verifies the second device data according to the source device protocol parameters.

[0142] In the application, based on the first preset conversion model, the second device data is checked according to the source device protocol parameters: communication address, data, stop bit, parity bit, etc. to verify whether the data is completely converted.

[0143] After the source device receives data based on the time interval, the second verification model and the source device protocol parameters are used to sum and match the data received by the source device to verify whether the protocol conversion is completed. The second verification model is C(D`)=∑D`i mod M, and D`i is the data received by the source device.

[0144] The received data is verified by the power equipment according to the equipment protocol parameters to analyze the data after protocol conversion. The analysis results can reflect whether the data conversion is complete and whether the protocol conversion is completed, thereby ensuring the effectiveness of the data protocol conversion.

[0145] S192: If the verification of the second device data is successful, the source device determines the first device prediction value of the target device according to the target device state information in the target device information.

[0146] In the application, if the verification of the second device data is successful, it means that the second device data is complete and there is no packet loss, and the source device can process the second device data.

[0147] In the application, the target device state information includes the target device state estimation value, covariance estimation value, state transfer matrix, control input matrix, control input value and process noise covariance. The target device state information is used to characterize the state of the target device: online, offline, noise, etc.

[0148] The state prediction value of the target device is determined according to the state estimation value, state transfer matrix, control input matrix and control input value of the target device. The covariance prediction value of the target device is determined according to the covariance estimation value, state transfer matrix and process noise covariance of the target device. The first device prediction value includes the state prediction value and the covariance prediction value of the target device.

[0149] S193: The source device determines a first communication status and a first device identity of the target device according to the first device prediction value and the target device state information.

[0150] In the application, after calculating and obtaining the state prediction value and covariance prediction value of the target device, the state prediction value is compared with the state estimation value, and the covariance prediction value is compared with the covariance estimation value. When the difference between the prediction value and the estimation value is less than the preset difference, it can be determined that the device identity of the target device is normal and the information matches. The source device establishes communication with the target device. When there is at least one difference between the prediction value and the estimation value that is greater than the preset difference, it is determined that the device identity of the target device is abnormal and the information does not match. The source device refuses to establish communication with the target device.

[0151] When the first device prediction value and the target device status information are data indicating a good communication status, the target device communication status is determined to be good, that is, the first communication status is good. When the second prediction value and the target device status information are data indicating a poor communication status, the target device communication status is determined to be poor, that is, the first communication status is poor. Correspondingly, the source device requests the target device to establish communication.

[0152] It can be understood that through the device confirmation operation, the communication status and identity of the device are confirmed based on the information, thereby realizing intelligent identification of the device data.

[0153] S194: After confirming that the target device is normal, the source device determines the authority of the target device according to the level of the target device;

[0154] S195: If the permission of the target device is to allow access, the source device performs a corresponding operation according to the second device data.

[0155] In a possible implementation, the allowed access is subdivided and it is set that only a communication connection can be established, communication data processing and forwarding can be performed, or configuration information of the target device can be accessed after the communication connection is established, so as to further improve communication security.

[0156] By setting access policy restrictions on the communication link, it is ensured that the communication link is only established between two devices within the rules and that the access operation of the device meets security requirements, further improving communication security.

[0157] Based on the above method embodiment, the compatibility of plant equipment can be effectively improved, the communication security of equipment can be improved, the privacy of communication can be ensured, and the protection of equipment operation data can be enhanced. At the same time, the power grid can have functions such as automatic control, intelligent adjustment, online analysis and decision-making, and collaborative interaction.

[0158] Please refer to Figure 3 , Figure 3This is a second flow chart of a communication method provided in an embodiment of the present application.

[0159] like Figure 3 As shown, the method, applied to a source device, includes:

[0160] S21: Generate first device data, and encrypt the first device data to obtain encrypted source device data.

[0161] The first device data includes source device information.

[0162] In a possible implementation, step S21 includes:

[0163] S211: Generate first original data.

[0164] S212: Perform protocol conversion on the first original data according to the first preset conversion model to obtain first device data.

[0165] S213: Based on the AES model, encrypt and sign the first device data to obtain encrypted source device data.

[0166] S22: Send the encrypted source device data to the target device.

[0167] Among them, the encrypted source device data is used to instruct the target device to confirm the source device according to the source device information after decrypting the encrypted source device data to obtain the first device data, and after confirming that it is normal, determine the second device data according to the first device data, and after encrypting the second device data to obtain the encrypted target device data, send the encrypted target device data to the source device, and the second device data includes the target device information.

[0168] S23: After receiving the encrypted target device data from the target device, decrypt the encrypted target device data to obtain second device data.

[0169] In a possible implementation, step S43 includes:

[0170] The encrypted target device data is signature verified and decrypted to obtain the second device data.

[0171] S24: performing device confirmation on the target device according to the target device information, and after confirming that the target device is normal, performing a corresponding operation according to the second device data.

[0172] In a possible implementation, step S24 includes:

[0173] S241: Verify the second device data according to the source device protocol parameters;

[0174] S242: If the verification of the second device data is successful, determining the first device prediction value of the target device according to the target device state information in the target device information;

[0175] S243: Determine a first communication status and a first device identity of the target device according to the first device prediction value and the target device state information;

[0176] S244: After confirming that the target device is normal, determining the authority of the target device according to the level of the target device;

[0177] S245: If the permission of the target device is to allow access, perform a corresponding operation according to the second device data.

[0178] In this embodiment, the source device encrypts the first device data to obtain the encrypted source device data, sends the encrypted source device data to the target device, and the source device decrypts the encrypted source device data to obtain the first device data; after receiving the encrypted target device data from the target device, the target device decrypts the encrypted target device data to obtain the second device data, thereby realizing encrypted communication, preventing a third party from cracking the communication information, and improving communication security;

[0179] The target device confirms the source device according to the source device information, and after confirming that it is normal, determines the second device data according to the first device data; and the source device confirms the target device according to the target device information, and after confirming that the target device is normal, performs corresponding operations according to the second device data, so as to communicate when there is no abnormality in the device, thereby further improving the security of communication.

[0180] Please refer to Figure 4 , Figure 4 This is a third flow chart of the communication method provided in one embodiment of the present application.

[0181] like Figure 4 The method, as shown, is applied to a target device and includes:

[0182] S31: receiving encrypted source device data from a source device.

[0183] The encrypted source device data is obtained by encrypting the first device data after the source device generates the first device data, and the first device data includes the source device information.

[0184] S32: Decrypt the encrypted source device data to obtain first device data.

[0185] In a possible implementation, step S52 includes:

[0186] S321: Determine the authority of the source device according to the level of the source device;

[0187] S322: If the authority of the source device is to allow access, the encrypted source device data is signature verified and decrypted to obtain the first device data.

[0188] S33: performing device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determining the second device data according to the first device data.

[0189] The second device data includes target device information.

[0190] In a possible implementation, step S33 includes:

[0191] S331: Verify the first device data according to the target device protocol parameters.

[0192] S332: If the first device data is verified successfully, a second device prediction value of the source device is determined according to the source device state information in the source device information.

[0193] S333: Determine a second communication status and a second device identity of the source device according to the second device prediction value and the source device state information.

[0194] S334: After confirming that the source device is normal, generate second original data according to the source device information.

[0195] S335: Perform protocol conversion on the second original data according to the second preset conversion model to obtain second device data.

[0196] S34: Encrypt the second device data to obtain encrypted target device data.

[0197] In a possible implementation, step S34 includes:

[0198] Based on the AES model, the second device data is encrypted and signed to obtain the encrypted target device data.

[0199] S35: Send the encrypted target device data to the source device.

[0200] The encrypted target device data is used to instruct the source device to decrypt the encrypted target device data to obtain the second device data, confirm the target device according to the target device information, and perform corresponding operations according to the second device data after confirming that the target device is normal.

[0201] In this embodiment, the source device encrypts the first device data to obtain the encrypted source device data, sends the encrypted source device data to the target device, and the target device decrypts the encrypted source device data to obtain the first device data; after receiving the encrypted target device data from the target device, the source device decrypts the encrypted target device data to obtain the second device data, thereby realizing encrypted communication, preventing a third party from cracking the communication information, and improving communication security;

[0202] The target device confirms the source device according to the source device information, and after confirming that it is normal, determines the second device data according to the first device data; and the source device confirms the target device according to the target device information, and after confirming that the target device is normal, performs corresponding operations according to the second device data, so as to communicate when there is no abnormality in the device, thereby further improving the security of communication.

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

[0204] Figure 5 This is a schematic diagram of the structure of the power equipment provided by one embodiment of the present application. Figure 5 As shown, the power device 2 of this embodiment includes: at least one processor 20 ( Figure 5 Only one is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned method embodiments when executing the computer program 22.

[0205] The power device 2 may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 5 It is only an example of the power device 2 and does not constitute a limitation on the power device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

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

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

[0208] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0209] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0210] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0211] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0212] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some cases, the computer-readable medium cannot be an electric carrier signal and a telecommunication signal.

[0213] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0215] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0216] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0217] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A communication method, characterized in that: Applicable to source devices, including: Generate first device data, and encrypt the first device data to obtain encrypted source device data, where the first device data includes source device information; Sending the encrypted source device data to the target device, wherein the encrypted source device data is used to instruct the target device to perform device confirmation on the source device according to the source device information after decrypting the encrypted source device data to obtain the first device data, and after confirming that the source device is normal, determine the second device data according to the first device data, and after encrypting the second device data to obtain the encrypted target device data, send the encrypted target device data to the source device, wherein the encrypted target device data includes the target device information; After receiving the encrypted target device data from the target device, decrypting the encrypted target device data to obtain second device data; The target device is confirmed according to the target device information, and after confirming that the target device is normal, a corresponding operation is performed according to the second device data.

2. The method according to claim 1, characterized in that The generating the first device data and encrypting the first device data to obtain the encrypted source device data includes: generating first original data; According to a first preset conversion model, performing protocol conversion on the first original data to obtain first device data; Based on the AES model, encrypt and sign the first device data to obtain the encrypted source device data; The decrypting the encrypted target device data to obtain the second device data includes: The encrypted target device data is signature verified and decrypted to obtain the second device data.

3. The method according to claim 1 or 2, characterized in that: Confirming the target device according to the target device information, and after confirming that the target device is normal, performing a corresponding operation according to the second device data, including: Verifying the second device data according to the source device protocol parameters; If the verification of the second device data is successful, determining the first device prediction value of the target device according to the target device state information in the target device information; Determining a first communication situation and a first device identity of the target device according to the first device prediction value and the target device state information; After confirming that the target device is normal, determining the authority of the target device according to the level of the target device; If the permission of the target device is to allow access, a corresponding operation is performed according to the second device data.

4. A communication method, characterized in that: Applied to target devices, including: receiving encrypted source device data from a source device, wherein the encrypted source device data is obtained by encrypting first device data after the source device generates the first device data, wherein the first device data includes the source device information; decrypting the encrypted source device data to obtain the first device data; performing device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determining second device data according to the first device data; encrypting the second device data to obtain encrypted target device data, where the second device data includes the target device information; The encrypted target device data is sent to the source device, and the encrypted target device data is used to instruct the source device to decrypt the encrypted target device data to obtain second device data, then confirm the target device according to the target device information, and perform corresponding operations according to the second device data after confirming that the target device is normal.

5. The method according to claim 4, characterized in that The performing device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determining the second device data according to the first device data, includes: Verifying the first device data according to the target device protocol parameters; If the verification of the first device data is successful, determining a second device prediction value of the source device according to the source device state information in the source device information; Determine a second communication condition and a second device identity of the source device according to the second device prediction value and the source device state information; After confirming that the source device is normal, generating second original data according to the source device information; According to a second preset conversion model, protocol conversion is performed on the second original data to obtain the second device data.

6. The method according to claim 4 or 5, characterized in that: The encrypting the second device data to obtain encrypted target device data includes: Based on the AES model, encrypt and sign the second device data to obtain the encrypted target device data; The decrypting the encrypted source device data to obtain the first device data includes: Determining the authority of the source device according to the level of the source device; If the authority of the source device allows access, the encrypted source device data is signature verified and decrypted to obtain the first device data.

7. A communication method, characterized in that: include: The source device generates first device data, and encrypts the first device data to obtain encrypted source device data, where the first device data includes source device information; The source device sends the encrypted source device data to the target device; The target device receives the encrypted source device data from the source device; The target device decrypts the encrypted source device data to obtain the first device data; The target device performs device confirmation on the source device according to the source device information, and after confirming that the source device is normal, determines the second device data according to the first device data; The target device encrypts the second device data to obtain encrypted target device data, where the second device data includes target device information; The target device sends the encrypted target device data to the source device; After receiving the encrypted target device data from the target device, the source device decrypts the encrypted target device data to obtain second device data; The source device performs device confirmation on the target device according to the target device information, and after confirming that the target device is normal, performs a corresponding operation according to the second device data.

8. The method according to claim 7, characterized in that The time interval for the source device and the target device to receive data is determined according to the measurement value at a preset sampling time point, the mean of the multiple measurement values, and the variance of the multiple measurement values.

9. A communication system, characterized in that: include: Source device and target device; The source device is used to generate first device data, encrypt the first device data, obtain encrypted source device data, and the first device data includes source device information; send the encrypted source device data to the target device; after receiving the encrypted target device data from the target device, decrypt the encrypted target device data to obtain second device data, and the second device data includes target device information; perform device confirmation on the target device according to the target device information, and after confirming that the target device is normal, perform corresponding operations according to the second device data; The target device is used to receive the encrypted source device data from the source device; decrypt the encrypted source device data to obtain the first device data; confirm the source device according to the source device information, and after confirming that the source device is normal, determine the second device data according to the first device data; encrypt the second device data to obtain the encrypted target device data; and send the encrypted target device data to the source device.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 or 4 to 6 is implemented.