CN114697031A - Communication method, computer device, and computer-readable storage medium - Google Patents

Communication method, computer device, and computer-readable storage medium Download PDF

Info

Publication number
CN114697031A
CN114697031A CN202011588888.7A CN202011588888A CN114697031A CN 114697031 A CN114697031 A CN 114697031A CN 202011588888 A CN202011588888 A CN 202011588888A CN 114697031 A CN114697031 A CN 114697031A
Authority
CN
China
Prior art keywords
communication
communication device
key information
updated
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011588888.7A
Other languages
Chinese (zh)
Inventor
方必文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Danbay Technology Co ltd
Original Assignee
Shenzhen Danbay Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Danbay Technology Co ltd filed Critical Shenzhen Danbay Technology Co ltd
Priority to CN202011588888.7A priority Critical patent/CN114697031A/en
Publication of CN114697031A publication Critical patent/CN114697031A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • H04L9/16Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms the keys or algorithms being changed during operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/068Network architectures or network communication protocols for network security for supporting key management in a packet data network using time-dependent keys, e.g. periodically changing keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application relates to a communication method, computer equipment and a computer readable storage medium, wherein the communication method comprises the following steps: the method comprises the steps that a first communication device obtains target data and detects whether the first communication device meets a preset updating condition or not; when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data; and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment. Since the key information is updated, even if the key information is stolen, the updated encrypted data cannot be decrypted, and thus the target data cannot be obtained, the invention improves the security of data transmission through the updating of the key information.

Description

Communication method, computer device, and computer-readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method, a computer device, and a computer-readable storage medium.
Background
With the development of communication devices, data transmission technologies between communication devices are becoming more mature. In the prior art, when data is transmitted by a communication device, a secret key is used to encrypt the data to obtain encrypted data, and then the encrypted data is transmitted to a target device, and the target device uses the secret key to decrypt the encrypted data to obtain the data. However, if the thief obtains the key and the encrypted data, the data transmitted by the communication device can be obtained through the key and the encrypted data, which causes data leakage, and therefore, the security of data transmission is not high.
Therefore, the prior art is in need of improvement.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a communication method, a computer device and a computer readable storage medium, so as to improve the security of data transmission.
In a first aspect, an embodiment of the present invention provides a communication method, which is applied to a first communication device in a communication system, where the communication system includes: the first communication device and a second communication device in communication connection with the first communication device;
the communication method comprises the following steps:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
In a second aspect, an embodiment of the present invention provides a communication method, which is applied to a second communication device in a communication system, where the communication system includes: a first communication device and the second communication device communicatively connected to the first communication device;
the communication method comprises the following steps:
the second communication device receives the updated encrypted data sent by the first communication device;
the second communication device determining updated key information;
and the second communication equipment determines target data corresponding to the updated encrypted data according to the updated key information and the updated encrypted data.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and is applied to a first communication device in a communication system, where the communication system includes: the first communication device and a second communication device in communication connection with the first communication device; the processor, when executing the computer program, implements the steps of:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, for application to a first communication device in a communication system, where the communication system includes: the first communication device and a second communication device in communication connection with the first communication device; the computer program when executed by a processor implementing the steps of:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
Compared with the prior art, the embodiment of the invention has the following advantages:
after the first communication equipment acquires target data, detecting whether the first communication equipment meets a preset updating condition; when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data; and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment. Since the key information is updated, even if the key information is stolen, the updated encrypted data cannot be decrypted, and thus the target data cannot be obtained, the invention improves the security of data transmission through the updating of the key information.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and it is also possible for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a diagram of an application environment of a communication method according to an embodiment of the present invention;
FIG. 2 is a first flowchart of a communication method according to an embodiment of the present invention;
FIG. 3 is a timing diagram of a communication method according to an embodiment of the present invention;
FIG. 4 is a second flowchart of a communication method according to an embodiment of the present invention;
fig. 5 is an internal structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor has found through research that when a communication device transmits data, the communication device encrypts the data by using a key to obtain encrypted data, for example, when a bluetooth device encrypts the data by using the key and then transmits the encrypted data to a target device, but when the key of the bluetooth device is stolen, the data transmitted by the bluetooth device can be obtained by using the key and the encrypted data, so that the data is leaked, and therefore, the security of data transmission is not high.
In order to solve the above problem, as shown in fig. 1 and fig. 2, in the embodiment of the present invention, after the first communication device acquires target data, it is detected whether the first communication device satisfies a preset update condition; when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data; and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment. Since the key information is updated, even if the key information is stolen, the updated encrypted data cannot be decrypted, and thus the target data cannot be obtained, the invention improves the security of data transmission through the updating of the key information.
For example, the mobile phone 10 acquires target data, and detects whether the mobile phone 10 meets a preset update condition; when the mobile phone 10 meets the preset updating condition, the mobile phone 10 determines updated key information corresponding to the target data; the mobile phone 10 determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the door lock 30, specifically, the mobile phone 10 may send the updated encrypted data to the door lock 30 through the server 20.
It should be noted that the above application scenarios are only presented to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in any way in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
Various non-limiting embodiments of the present invention are described in detail below with reference to the accompanying drawings.
As shown in fig. 2, in an embodiment of the present invention, a communication system is provided, where the communication system includes: the communication device comprises a first communication device and a second communication device which is in communication connection with the first communication device. The communication device is a device for transmitting data, and may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, a personal digital assistant, or a wearable device. The first communication device and the second communication device are communicatively connected, and data can be transmitted between the first communication device and the second communication device, where the communicatively connected includes: a network communication connection, a bluetooth communication connection, for example, the first communication device and the second communication device may implement a network communication connection through a local area network, a wide area network, or a metropolitan area network. When the Bluetooth connection is adopted, the first communication equipment is provided with Bluetooth equipment, the second communication equipment is also provided with Bluetooth equipment, and the Bluetooth equipment of the first communication equipment is connected with the Bluetooth equipment of the second communication equipment through Bluetooth communication. As shown in fig. 1, the first communication device is a mobile phone 10 and the second communication device is a door lock 30. As shown in fig. 3 and 4, the bluetooth device a of the first communication device and the bluetooth device B of the second communication device are connected by bluetooth communication.
For example, the first communication device is a mobile phone, the second communication device is a door lock, the mobile phone is connected with a WIFI hotspot, and the door lock is also connected with the WIFI hotspot, that is, the mobile phone and the door lock realize network communication connection through the WIFI hotspot. For another example, the first communication device is a mobile phone, the second communication device is a notebook, and the mobile phone and the notebook are connected through a bluetooth device to realize bluetooth communication connection.
In an embodiment of the present invention, a first communication device is provided, where the first communication device includes: the system comprises a processor, a nonvolatile storage medium, an internal memory, a network interface, a display screen and an input device which are connected through a system bus. The nonvolatile storage medium of the first communication device stores an operating system and a communication device, and the communication device is used for realizing a communication method. The processor is configured to provide computational and control capabilities to support the operation of the entire first communication device. The internal memory in the first communication device provides an environment for operation of the communication apparatus in the non-volatile storage medium, in which computer readable instructions are stored, which, when executed by the processor, cause the processor to perform a communication method. The network interface is used for network communication with the server 20, such as receiving updated key information sent by the server 20, sending first key update request information to the server 20, and the like. The display screen of the first communication device may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen to form a touch screen, or may be a key, a trackball or a touch pad arranged on a housing of the first communication device, or may be an external keyboard, a touch pad or a mouse. The first communication device can also comprise a Bluetooth device, and the Bluetooth device of the first communication device can be in Bluetooth communication connection with other communication devices comprising Bluetooth modules. The first communication device may be a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or the like.
In an embodiment of the present invention, a second communication device is provided, where the second communication device includes: the system comprises a processor, a nonvolatile storage medium, an internal memory, a network interface, a display screen and an input device which are connected through a system bus. The nonvolatile storage medium of the second communication device stores an operating system and a communication device, and the communication device is used for realizing a communication method. The processor is used to provide computing and control capabilities to support the operation of the entire second communication device. An internal memory in the second communication device, which provides an environment for operation of the communication apparatus in the non-volatile storage medium, may store computer readable instructions that, when executed by the processor, may cause the processor to perform a communication method. The network interface is used for network communication with the server 20, such as receiving updated key information sent by the server 20, sending second key update request information to the server 20, and the like. The display screen of the second communication device may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen to form a touch screen, or may be a key, a trackball or a touch pad arranged on the housing of the second communication device, or may be an external keyboard, a touch pad or a mouse. The second communication device may further include a bluetooth device, and the bluetooth device of the second communication device may perform bluetooth communication connection with other communication devices including a bluetooth module, for example, the bluetooth device of the second communication device and the bluetooth device of the first communication device are connected by bluetooth communication. The second communication device may be a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, a door lock, a personal digital assistant, a wearable device, or the like.
The intelligent door lock system further comprises: a server 20 in communicative connection with the first communication device.
In an embodiment of the present invention, a server 20 is provided, where the server 20 includes a processor, a nonvolatile storage medium, an internal memory, and a network interface, which are connected by a system bus. In which an operating system and communication means for implementing a communication method are stored in a non-volatile storage medium of the server 20. The processor is used to provide computing and control capabilities to support the operation of the entire server 20. The internal memory of server 20, which provides an environment for operation of the communication device in the non-volatile storage medium, may store computer readable instructions that, when executed by the processor, may cause the processor to perform a communication method. The network interface is used for connecting to a network for communication, such as receiving key updating request information sent by the first communication device and sending updated key information to the first communication device. Server 20 may be implemented as a stand-alone server or as a server 20 cluster of multiple servers 20.
Referring to fig. 2, a communication method in the embodiment of the present invention is shown, and this embodiment is exemplified by applying the method to a first communication device. In this embodiment, the communication method may include the following steps:
s1, the first communication device acquires the target data and detects whether the first communication device meets the preset updating condition.
Specifically, the target data refers to data transmitted between the first communication device and the second communication device, where the target data may specifically be data sent by the first communication device to the second communication device, and may also be data sent by the second communication device to the first communication device, and this embodiment takes the example of sending the target data by the first communication device to the second communication device as an example for description.
The preset updating condition refers to a preset condition for updating a key, and since the key information is used for encrypting and decrypting the target data when the target data is transmitted between the first communication device and the second communication device, once the key information is leaked, the target data has a risk and is likely to be stolen, the invention updates the original key information, and therefore, whether the first communication device meets the preset updating condition needs to be detected, so as to determine whether to update the original key information.
The key information refers to information for encrypting and decrypting target data. The original key information refers to key information that is not updated when the target data is acquired. For example, when the first communication device sends the target data to the second communication device, the first communication device encrypts the target data by using the original key information to obtain original encrypted data, and sends the encrypted data to the second communication device, and after the second communication device receives the encrypted data, the original encrypted data is decrypted by using the original key information to obtain the target data, so that the target data is transmitted between the first communication device and the second communication device. The original encrypted data is data obtained by encrypting target data using original key information.
The key information is divided into symmetric key information and asymmetric key information. The symmetric key information refers to the same key information used for encrypting the target data and decrypting the target data, that is, the same key information is used for encrypting and decrypting in the encrypting process and the decrypting process. The asymmetric key information is different key information used for encrypting the target data and decrypting the target data, that is, different key information is used for encrypting and decrypting in the encryption process and the decryption process, and the asymmetric encryption is realized by two keys (a public key and a private key) to encrypt and decrypt the target data. Both public and private keys can be used for encryption or decryption, and therefore, there are two encryption methods, the first one: the public key is used for encryption and the private key is used for decryption. The second encryption mode: the private key is used for encryption and the public key is used for decryption.
In one implementation manner of this embodiment of the present invention, the first communication device includes: the touch screen, the preset updating condition includes: the first communication device receives a touch instruction, wherein the touch instruction is obtained by the touch screen according to touch operation.
Specifically, when the touch screen of the first communication device is touched, the first communication device satisfies the preset update condition, and since a thief may attempt to touch the touch screen of the first communication device to steal the target data when the touch screen of the first communication device is touched, the first communication device satisfies the preset update condition and updates the original key information. When the touch screen of the first communication device is touched, the touch operation can be sensed, and a touch instruction is formed.
In an implementation manner of the embodiment of the present invention, the first communication device and the second communication device are disconnected and reconnected.
Specifically, when the first communication device and the second communication device are disconnected and reconnected, the first communication device satisfies the preset update condition, and since it may be that a thief tries to disconnect the first communication device and the second communication device first and reconnects the first communication device and the second communication device to steal the target data when the first communication device and the second communication device are disconnected and reconnected, the first communication device satisfies the preset update condition and updates the original key information.
In an implementation manner of the embodiment of the present invention, a time of the communication connection between the first communication device and the second communication device exceeds a preset time.
Specifically, when the time of the communication connection between the first communication device and the second communication device exceeds a preset time, the first communication device satisfies the preset updating condition, and since the time of the communication connection between the first communication device and the second communication device is too long, there may be a risk of theft, and therefore, when the time of the communication connection between the first communication device and the second communication device exceeds the preset time, the first communication device satisfies the preset updating condition, and updates the original key information. The preset time refers to a preset time, and the preset time can be set as required, for example, the preset time is set to 10 minutes, 1 minute, and 30 seconds. The preset time may be set according to the target data, for example, if the preset time is less than the transmission time of the target data, the original key information is updated at least once during the transmission of the target data, so that the transmission security of the target data can be improved.
It should be noted that, at least one of the three preset update conditions may be adopted, and of course, a plurality of preset update conditions may be used in combination. For example, when the time of the communication connection between the first communication device and the second communication device exceeds a preset time, the original key information may be updated to obtain updated key information, the updated key information is used as the original key information, and when the first communication device receives a touch instruction, the original key information may be updated again to obtain updated key information.
The first communication device first obtains the target data, then detects whether the first communication device meets a preset updating condition, if the first communication device meets the preset updating condition, the original key information needs to be updated, and if the first communication device does not meet the preset updating condition, the original key information does not need to be updated.
For example, the first communication device is a mobile phone, the second communication device is a door lock, the mobile phone is in communication with the door lock, when the mobile phone sends the target data to the door lock, the target data is obtained first, and whether the mobile phone meets a preset updating condition is detected, for example, when the mobile phone is disconnected from the door lock and is in communication connection again, the mobile phone meets the preset updating condition, and the original key information needs to be updated.
And S2, when the first communication device meets the preset updating condition, the first communication device determines the updated key information corresponding to the target data.
Specifically, when the first communication device meets the preset update condition, the first communication device determines updated key information corresponding to the target data, where the updated key information is obtained by updating original key information. When the first communication device meets the preset updating condition, the original key information needs to be updated to obtain updated key information.
For example, the first communication device is a mobile phone, the second communication device is a door lock, and when the mobile phone meets a preset update condition, the original key information needs to be updated to determine the updated key information, and then the mobile phone may encrypt the target data according to the updated key information.
Specifically, the communication system further includes: a server in communication connection with the first communication device; the determining, by the first communication device, the updated key information by the server, and in step S2, when the first communication device satisfies the preset update condition, the determining, by the first communication device, the updated key information corresponding to the target data includes:
and S21, when the first communication device meets the preset updating condition, the first communication device sends first key updating request information corresponding to the target data to the server.
S22, the first communication equipment receives updated key information corresponding to the target data; the updated key information is generated by the server according to the received key update request information.
Specifically, the first key update request information refers to information that the first communication device requests to update the key information. When the first communication device meets the preset updating condition, the first communication device sends first key updating request information corresponding to the target data to the server, and receives updated key information fed back by the server based on the first key updating request information. The server stores original key information, and the first communication device updates the original key information through the server to obtain updated key information.
Specifically, the first communication device sends the first key update request information to the server, after receiving the first key update request information, the server updates original key information according to the first key update request information to obtain updated key information, then the server sends the updated key information to the first communication device, and the first communication device receives the updated key information.
For example, as shown in fig. 3, the first communication device includes a bluetooth device a, the server is a trusted security platform, when the first communication device meets the preset update condition, the first communication device sends first key update request information to the trusted security platform, after receiving the first key update request information, the trusted security platform updates original key information according to the first key update request information to obtain updated key information, then the trusted security platform sends the updated key information to the first communication device, and the first communication device receives the updated key information.
And S3, the first communication device determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication device.
Specifically, after obtaining the updated key information, the first communication device determines the updated encrypted data according to the updated key information and the target data, and sends the updated encrypted data to the second communication device. The updated encrypted data is data obtained by encrypting the target data using the updated key information. Specifically, after obtaining the updated key information, the first communication device encrypts the target data using the updated key information to obtain updated encrypted data, and then sends the updated encrypted data to the second communication device.
For example, as shown in fig. 3 and 4, the first communication device includes a bluetooth device a, the second communication device includes a bluetooth device B, and after the first communication device obtains the updated key information, the bluetooth device a encrypts the target data by using the updated key information to obtain updated encrypted data, and then sends the updated encrypted data to the bluetooth device B.
For example, as shown in fig. 1, the first communication device is a mobile phone, the second communication device is a door lock, and after the mobile phone obtains the updated key information, the mobile phone encrypts the target data by using the updated key information to obtain updated encrypted data, and then sends the updated encrypted data to the door lock.
In an implementation manner of this embodiment of the present invention, after step S2, the communication method further includes the steps of: s4, the first communication device sends an update instruction corresponding to the target data to the second communication device according to the updated key information, so that the second communication device determines the updated key information according to the update instruction.
Specifically, when the first communication device meets a preset update condition, the updated key information is obtained, and the second communication device also needs to update the original key information to obtain the updated key information, so that the updated encrypted data can be decrypted to obtain the target data.
Specifically, after determining the updated key information, the first communication device sends the update instruction to the second communication device, and after receiving the update instruction, the second communication device determines the updated key information according to the update instruction. Specifically, after receiving the update instruction, the second communication device sends second key update request information corresponding to the update instruction to the server, and after receiving the second key update request information, the server obtains updated key information according to the second key update request information and sends the updated key information to the second communication device, and the second communication device receives the updated key information.
Since the key information is divided into symmetric key information and asymmetric key information, when the key information adopts symmetric key information, the updated key information sent by the server to the first communication device and the updated key information sent by the server to the second communication device are the same. When the key information adopts asymmetric key information, the updated key information sent by the server to the first communication device and the updated key information sent by the server to the second communication device are different, for example, the updated key information sent by the server to the first communication device is a public key, the updated key information sent by the server to the second communication device is a private key, and for example, the updated key information sent by the server to the first communication device is a private key, and the updated key information sent by the server to the second communication device is a public key.
In an implementation manner of this embodiment of the present invention, after step S1, the communication method further includes the steps of:
and S5, when the first communication device does not meet the preset updating condition, the first communication device acquires original key information corresponding to the target data.
And S6, the first communication device determines original encrypted data corresponding to the target data according to the original key information and the target data, and sends the original encrypted data to the second communication device.
Specifically, when the first communication device does not satisfy the preset update condition, it is not necessary to update the original key information, and therefore, the first communication device obtains the original key information corresponding to the target data. And then encrypting the target data by adopting the original key information to obtain original encrypted data, and sending the original encrypted data to the second communication equipment.
When the first communication device does not satisfy the preset updating condition, an updating instruction is not sent to the second communication device, so that the second communication device does not update the original key information, and after the second communication device receives the original encrypted data, the original encrypted data can be decrypted by using the original key information to obtain the target data, thereby realizing data transmission between the first communication device and the second communication device.
In the embodiment of the present invention, a communication method is exemplified by applying the method to a second communication device. In this embodiment, the communication method may include, for example, the steps of:
a1, the second communication device receives the updated encrypted data sent by the first communication device.
Specifically, after the first communication device sends updated encrypted data to the second communication device, the second communication device receives the updated encrypted data sent by the first communication device.
For example, as shown in fig. 1, the first communication device is a mobile phone, the second communication device is a door lock, and after the mobile phone sends updated encrypted data to the door lock, the door lock receives the updated encrypted data sent by the door lock.
A2, the second communication device determines updated key information.
Specifically, the second communication device determines updated key information, the first communication device determines updated key information by the server, and the second communication device may also determine updated key information by the server.
In one implementation manner of this embodiment of the present invention, the step a2, where the determining, by the second communications device, the updated key information includes:
a21, the second communication device receives the update instruction, and sends the second key update request information corresponding to the update instruction to the server according to the update instruction.
A22, the first communication device receives updated key information; the updated key information is generated by the server according to the received second key update request information.
Specifically, the second key update request information refers to information that the second communication device requests to update the key information. And when the first communication equipment meets the preset updating condition, the first communication equipment sends an updating instruction to the second communication equipment according to the updated key information, and after receiving the updating instruction, the second communication equipment sends second key updating request information to the server and receives updated key information fed back by the server based on the second key updating request information. The server stores original key information, and the second communication device updates the original key information through the server to obtain updated key information.
Specifically, the second communication device sends the second key update request information to the server, after receiving the second key update request information, the server updates original key information according to the second key update request information to obtain updated key information, then the server sends the updated key information to the second communication device, and the second communication device receives the updated key information.
For example, the second communication device is a door lock, the server is a trusted security platform, when the door lock receives an update instruction, the door lock sends second key update request information to the trusted security platform, after the trusted security platform receives the second key update request information, the trusted security platform updates original key information according to the second key update request information to obtain updated key information, then the trusted security platform sends the updated key information to the door lock, and the door lock receives the updated key information.
For example, as shown in fig. 3 and 4, the second communication device includes a bluetooth device B, and after the second communication device receives the update instruction, the bluetooth device B sends second key update request information to the trusted security platform, and after the trusted security platform receives the second key update request information, the trusted security platform updates original key information according to the second key update request information to obtain updated key information, and then sends the updated key information to the second communication device, and the second communication device receives the updated key information.
A3, the second communication device determines the target data corresponding to the updated encrypted data according to the updated key information and the updated encrypted data.
Specifically, after obtaining the updated key information, the second communication device determines the target data according to the updated key information and the updated encrypted data. Specifically, after the second communication device obtains the updated key information, the updated encrypted data is decrypted by using the updated key information to obtain target data.
For example, the second communication device is a door lock, and after the door lock obtains the updated key information, the updated encrypted data is decrypted by using the updated key information to obtain target data.
It should be noted that, when the first communication device does not satisfy the preset update condition, the original key information is used to encrypt the target data to obtain original encrypted data, and the second communication device uses the original key information to decrypt the original encrypted data to obtain the target data.
In one embodiment, the present invention provides a computer device, which may be a terminal, having an internal structure as shown in fig. 5. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a communication method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that fig. 5 is a block diagram of only a portion of the structure associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program for application to a communication system comprising: the communication device comprises a first communication device and a second communication device which is in communication connection with the first communication device; the processor, when executing the computer program, implements the steps of:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
In one embodiment, there is provided a computer-readable storage medium having a computer program stored thereon, for use in a communication system, the communication system comprising: the communication device comprises a first communication device and a second communication device which is in communication connection with the first communication device; the computer program when executed by a processor implementing the steps of:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by hardware related to instructions of a computer program, which may be stored in a computer readable storage medium, for example, in the storage medium of a computer system, and executed by at least one processor in the computer system, so as to implement the processes of the embodiments including the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

Claims (10)

1. A communication method applied to a first communication device in a communication system, the communication system comprising: the first communication device and a second communication device in communication connection with the first communication device;
the communication method comprises the following steps:
the first communication equipment acquires target data and detects whether the first communication equipment meets a preset updating condition;
when the first communication device meets the preset updating condition, the first communication device determines updated key information corresponding to the target data;
and the first communication equipment determines updated encrypted data corresponding to the target data according to the updated key information and the target data, and sends the updated encrypted data to the second communication equipment.
2. The communication method according to claim 1, wherein the communication system further comprises: a server in communication connection with the first communication device; when the first communication device meets the preset updating condition, the determining, by the first communication device, the updated key information corresponding to the target data includes:
when the first communication equipment meets the preset updating condition, the first communication equipment sends first key updating request information corresponding to the target data to the server;
the first communication equipment receives updated key information corresponding to the target data; the updated key information is generated by the server according to the received key update request information.
3. The communication method according to claim 1, wherein after the first communication device determines updated key information corresponding to the target data when the first communication device satisfies the preset update condition, the communication method further comprises:
and the first communication equipment sends an updating instruction corresponding to the target data to the second communication equipment according to the updated key information, so that the second communication equipment determines the updated key information according to the updating instruction.
4. The communication method according to claim 1, wherein the first communication device comprises: the touch screen, the preset updating condition includes: the first communication device receives a touch instruction, wherein the touch instruction is obtained by the touch screen according to touch operation.
5. The communication method according to claim 1, wherein the preset update condition comprises: the first communication device and the second communication device are disconnected and connected again; and/or the time of the communication connection between the first communication equipment and the second communication equipment exceeds the preset time.
6. The communication method according to claim 1, wherein after the first communication device acquires target data and detects whether the first communication device satisfies a preset update condition, the communication method further comprises:
when the first communication equipment does not meet the preset updating condition, the first communication equipment acquires original key information corresponding to the target data;
and the first communication equipment determines original encrypted data corresponding to the target data according to the original key information and the target data, and sends the original encrypted data to the second communication equipment.
7. A communication method applied to a second communication device in a communication system, the communication system comprising: a first communication device and the second communication device communicatively connected to the first communication device;
the communication method comprises the following steps:
the second communication equipment receives the updated encrypted data sent by the first communication equipment;
the second communication device determining updated key information;
and the second communication equipment determines target data corresponding to the updated encrypted data according to the updated key information and the updated encrypted data.
8. The communication method according to claim 7, wherein the communication system further comprises: a server in communication connection with the first communication device; the second communications device determining updated key information comprises:
the second communication equipment receives an updating instruction and sends second key updating request information corresponding to the updating instruction to the server according to the updating instruction;
the second communication device receiving updated key information; the updated key information is generated by the server according to the received second key update request information.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the communication method according to any of claims 1-6 and/or implements the steps of the communication method according to any of claims 7-8.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the communication method according to one of claims 1 to 6 and/or carries out the steps of the communication method according to one of claims 7 to 8.
CN202011588888.7A 2020-12-28 2020-12-28 Communication method, computer device, and computer-readable storage medium Pending CN114697031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011588888.7A CN114697031A (en) 2020-12-28 2020-12-28 Communication method, computer device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011588888.7A CN114697031A (en) 2020-12-28 2020-12-28 Communication method, computer device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN114697031A true CN114697031A (en) 2022-07-01

Family

ID=82131909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011588888.7A Pending CN114697031A (en) 2020-12-28 2020-12-28 Communication method, computer device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114697031A (en)

Similar Documents

Publication Publication Date Title
US11456864B2 (en) Information storage method, device, and computer-readable storage medium
CN110492990B (en) Private key management method, device and system under block chain scene
US9503433B2 (en) Method and apparatus for cloud-assisted cryptography
CN108600182B (en) Block chain key management method, system, key management device and storage medium
CN109218263B (en) Control method and device
US8792636B2 (en) Protocol for protecting content protection data
CN105978917A (en) System and method for trusted application security authentication
US10601590B1 (en) Secure secrets in hardware security module for use by protected function in trusted execution environment
CN113691502B (en) Communication method, device, gateway server, client and storage medium
US11240008B2 (en) Key management method, security chip, service server and information system
JP2004513420A (en) Method and apparatus for leveled security access control
JP7135569B2 (en) Terminal registration system and terminal registration method
CN114629639A (en) Key management method and device based on trusted execution environment and electronic equipment
WO2023051337A1 (en) Data processing method and apparatus, and device and storage medium
CN110621016A (en) User identity protection method, user terminal and base station
CN116244750A (en) Secret-related information maintenance method, device, equipment and storage medium
CN112966287A (en) Method, system, device and computer readable medium for acquiring user data
CN110730447B (en) User identity protection method, user terminal and core network
CN108900595B (en) Method, device and equipment for accessing data of cloud storage server and computing medium
CN109960935B (en) Method, device and storage medium for determining trusted state of TPM (trusted platform Module)
CN108848094B (en) Data security verification method, device, system, computer equipment and storage medium
CN116366364A (en) Terminal data processing method and system for cloud computer
CN110826097A (en) Data processing method and electronic equipment
EP4174695A1 (en) Method to store data persistently by a software payload
CN113872979B (en) Login authentication method, login authentication device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination