Communication method and electronic equipment
By performing the encryption and decryption operation only at the beginning of the communication process between the terminal device and the controlled device, and using temporary encrypted information in subsequent transmission, the problem of time-consuming and delayed data interaction is solved, and control efficiency is improved.
Patent Information
- Application Number
- CN202311021014.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
During the data interaction between the terminal device and the controlled device, the data interaction is delayed due to the encryption and decryption operation, which affects the control delay and control effect of the terminal device on the controlled device.
The security component chip is only called for the encryption and decryption operation at the beginning of the communication. The subsequent transmission of requested instructions does not require the security component chip to be called for the encryption and decryption operation, and temporary encryption information is generated and used during the communication process.
It effectively reduces the delay in transmitting request instructions, reduces the time-consuming data interaction between the terminal device and the controlled device, and improves the control efficiency of the terminal device on the controlled device.
Smart Images

Figure CN119497088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a communication method and electronic equipment. Background Art
[0002] In the application scenario where the terminal device controls the controlled device, in order to ensure security, the control information sent by the terminal device and the feedback information of the controlled device need to be encrypted. For example, in the application scenario of mobile phone remote control parking, the mobile phone is the terminal device and the vehicle is the controlled device. The mobile phone encrypts the control instructions for controlling the vehicle parking and sends them to the vehicle. The vehicle decrypts the received information and obtains the control instructions. Similarly, the vehicle encrypts the feedback data related to parking and sends it to the mobile phone. The mobile phone decrypts the received information and obtains the feedback data.
[0003] In the above data interaction process between the terminal device and the controlled device, the data interaction time between the terminal device and the controlled device is prolonged due to the existence of encryption and decryption operations, which results in a longer control delay of the terminal device over the controlled device, and ultimately affects the control effect of the terminal device over the controlled device.
[0004] Therefore, a new communication method is needed to reduce the time consumption of data interaction between the terminal device and the controlled device and reduce the control delay of the terminal device to the controlled device. Summary of the invention
[0005] In order to solve the problem of how to reduce the time consumption of data interaction between a terminal device and a controlled device, the present application provides a communication method and an electronic device, and the present application also provides a computer-readable storage medium.
[0006] The present application embodiment adopts the following technical solutions:
[0007] In a first aspect, the present application provides a communication method, which is applied to a terminal device, and the method includes:
[0008] Generate temporary encryption information;
[0009] Calling a first security element chip to encrypt temporary encryption information to generate first confidential communication data, wherein the first security element chip is a security element chip of the terminal device itself;
[0010] Sending the first confidential communication data to the controlled device;
[0011] The first request information is sent to the controlled device, wherein the first request information includes the first request ciphertext, and the first request ciphertext is data generated by encrypting the first request instruction using the temporary encryption information.
[0012] According to the method of the embodiment of the present application, the security element chip is called to perform encryption and decryption operations only at the beginning of communication, and the transmission of subsequent request instructions does not need to call the security element chip to perform encryption and decryption operations, which can effectively reduce the transmission delay of request instructions.
[0013] In an implementation of the first aspect, the sending the first confidential communication data to the controlled device includes:
[0014] generating a control start request, wherein the control start request includes the first confidential communication data, and the control start request is used to instruct the controlled device to enter a controlled process;
[0015] The control start request is sent to the controlled device.
[0016] In an implementation of the first aspect, the method further includes:
[0017] receiving a control start response sent by the controlled device, wherein the control start response includes second confidential communication data encrypted by a second security element chip, where the second security element chip is a security element chip of the controlled device itself;
[0018] The first security element chip is called to decrypt the second confidential communication data to obtain a control start request execution status, where the control start request execution status is used to describe a reception status and / or parsing status of the controlled device for the control start request.
[0019] In an implementation of the first aspect, the method further includes:
[0020] receiving first response information sent by the controlled device, where the first response information includes a first response ciphertext encrypted based on the temporary encryption information;
[0021] The first response ciphertext is decrypted using the temporary encryption information to obtain a first request execution status, where the first request execution status is used to describe the reception status, and / or parsing status, and / or execution status of the first request instruction by the controlled device for the first request information.
[0022] In an implementation of the first aspect, the method further includes:
[0023] receiving second request information sent by the controlled device, where the second request information includes a second request ciphertext encrypted based on the temporary encryption information;
[0024] The second request ciphertext is decrypted using the temporary encryption information to obtain a second request instruction, where the second request instruction is directed to the terminal device.
[0025] In an implementation of the first aspect, the method further includes:
[0026] Generate a second request execution status, where the second request execution status is used to describe a reception status, and / or a parsing status, and / or an execution status of the second request instruction by the terminal device for the second request information;
[0027] Encrypt the second request execution status using the temporary encryption information to generate a second response ciphertext;
[0028] Generate second response information, where the second response information includes the second response ciphertext;
[0029] The second response information is sent to the controlled device.
[0030] In an implementation of the first aspect, the method further includes:
[0031] The first state data sent by the controlled device is received, where the first state data is unencrypted plaintext data.
[0032] According to the method in the above implementation mode, when the controlled device reports its status, the temporary encryption information is not called to encrypt the status data, and the SE chip is not enabled to encrypt the status data, which can effectively reduce the status data reporting delay and reduce the communication data processing pressure of the controlled device.
[0033] In an implementation of the first aspect, the method further includes:
[0034] Receive second status data sent by the controlled device, where the second status data is unencrypted plaintext data, the priority of the second status data is lower than the first status data, and the reporting period of the second status data is shorter than the reporting period of the first status data.
[0035] According to the method in the above implementation, the terminal device can confirm the priority of the real-time status based on the type of status data received, so as to perform targeted and rapid processing, thereby improving the data processing speed of the terminal device and reducing the data processing pressure of the terminal device.
[0036] In an implementation of the first aspect, the method further includes:
[0037] Sending a control termination request to the controlled device, wherein the control termination request is used to indicate that the current round of control process is ended, and the control termination request is also used to indicate that the temporary encryption information is invalidated;
[0038] and / or,
[0039] The control termination request sent by the controlled device is received.
[0040] According to the method in the above implementation, the terminal device needs to regenerate temporary encryption information each time before initiating a control start request, so as to avoid the reduction of control security caused by the leakage of temporary encryption information.
[0041] In a second aspect, an embodiment of the present application provides a communication method, which is applied to a controlled device, and the method includes:
[0042] Receiving first confidential communication data sent by a terminal device, where the first confidential communication data is data encrypted by a first security element chip, and the first security element chip is a security element chip of the terminal device itself;
[0043] Calling a second security element chip to decrypt the first confidential communication data to obtain temporary encryption information, where the second security element chip is the security element chip of the controlled device itself;
[0044] receiving first request information sent by the terminal device, wherein the first request information includes a first request ciphertext encrypted based on the temporary encryption information;
[0045] The first request ciphertext is decrypted using the temporary encryption information to obtain a first request instruction.
[0046] In an implementation of the second aspect, the receiving first confidential communication data sent by the terminal device includes:
[0047] A control start request sent by the terminal device is received, wherein the control start request includes the first confidential communication data, and the control start request is used to instruct the controlled device to enter a controlled process.
[0048] In an implementation of the second aspect, the method further includes:
[0049] Generate a control start request execution status, where the control start request execution status is used to describe a reception status and / or parsing status of the controlled device for the control start request;
[0050] calling the second security element chip to encrypt the control start request execution state to generate second confidential communication data;
[0051] generating a control start response, wherein the control start response includes the second confidential communication data;
[0052] The control start response is sent to the terminal device.
[0053] In an implementation of the second aspect, the method further includes:
[0054] Generate a first request execution state, where the first request execution state is used to describe a reception state, and / or a parsing state, and / or an execution state of the first request instruction by the controlled device to the first request information;
[0055] Encrypt the first request execution status using the temporary encryption information to generate a first response ciphertext;
[0056] Generate first response information, where the first response information includes the first response ciphertext;
[0057] Send the first response information to the terminal device.
[0058] In an implementation of the second aspect, the method further includes:
[0059] generating a second request instruction, wherein the second request instruction is directed to the terminal device;
[0060] Encrypt the second request instruction using the temporary encryption information to generate a second request ciphertext;
[0061] Generate second request information, where the second request information includes the second request ciphertext;
[0062] Send the second request information to the terminal device.
[0063] In an implementation of the second aspect, the method further includes:
[0064] receiving second response information sent by the terminal device, where the second response information includes a second response ciphertext encrypted based on the temporary encryption information;
[0065] Use the temporary encrypted information to decrypt the second response ciphertext to obtain the second request execution status, where the second request execution status is used to describe the terminal device's reception status, and / or parsing status, and / or execution status of the second request instruction for the second request information.
[0066] In an implementation of the second aspect, the method further includes:
[0067] Sending first state data to the terminal device, wherein the first state data is unencrypted plaintext data.
[0068] In an implementation of the second aspect, the method further includes:
[0069] Sending second status data to the terminal device, the second status data is unencrypted plaintext data, the priority of the second status data is lower than the first status data, and the reporting period of the second status data is shorter than the reporting period of the first status data.
[0070] In an implementation of the second aspect, the method further includes:
[0071] Sending a control termination request to the terminal device, wherein the control termination request is used to indicate that the current round of control process is ended, and the control termination request is also used to indicate that the temporary encryption information is invalidated;
[0072] and / or,
[0073] The control termination request sent by the controlled device is received.
[0074] In a third aspect, the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps described in the first aspect or the second aspect.
[0075] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method described in the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 The figure shows a schematic diagram of the application scenario of mobile phone remote control parking;
[0077] Figure 2 The figure shows a schematic diagram of the communication interaction process of mobile phone remote control parking;
[0078] Figure 3 The figure is a schematic diagram of the internal modules of the mobile phone 110 according to an embodiment of the present application;
[0079] Figure 4 Shown is a schematic diagram of an internal module of a vehicle 100 according to an embodiment of the present application;
[0080] Figure 5 The figure shows a schematic diagram of the communication interaction process between the mobile phone 110 and the vehicle 100;
[0081] Figure 6 The figure is a schematic diagram of the communication interaction process between a terminal device and a controlled device according to a communication method of an embodiment of the present application;
[0082] Figure 7 The figure is a schematic diagram of the internal modules of a terminal device according to an embodiment of the present application;
[0083] Figure 8 The figure shows a schematic diagram of the internal modules of a controlled device according to an embodiment of the present application;
[0084] Fig. 9FIG. 1 is a schematic diagram of a communication interaction process between a terminal device 600 and a controlled device 700 according to a communication method of an embodiment of the present application;
[0085] Fig.10 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0087] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0088] In an application scenario where a terminal device controls a controlled device, in order to ensure security, the control information sent by the terminal device and the feedback information of the controlled device need to be encrypted.
[0089] Take the application scenario of mobile phone remote parking as an example. Figure 1 The figure shows an application scenario diagram of mobile phone remote control parking.
[0090] like Figure 1 As shown, with the vehicle 100 as the center, the area is divided into an unlocking area 101 , a buffer area 102 and a locking area 103 according to different distances from the vehicle 100 .
[0091] The mobile phone 110 and the vehicle 100 communicate using Bluetooth Low Energy (BLE).
[0092] When the mobile phone 110 is located in the locking area 103 or in an area farther from the vehicle 100, the mobile phone 110 cannot unlock the vehicle 100. When the mobile phone 110 is located in the buffer area 102, the mobile phone 110 cannot unlock the vehicle 100. When the mobile phone 110 is located in the unlocking area 101, the mobile phone 110 can unlock the vehicle 100. In the unlocked state, the vehicle 100 can establish a communication connection with the mobile phone 110 to perform command interaction. For example, the mobile phone 110 can turn on the remote control parking and remotely control the vehicle 100 to perform parking operations.
[0093] When the mobile phone 110 unlocks the vehicle 100 in the unlocking area 101, if the mobile phone 110 does not actively lock the vehicle 100, the mobile phone 110 enters the buffer area 102 from the unlocking area 101, and when it is in the buffer area 102, the vehicle 100 remains unlocked. When the mobile phone 110 unlocks the vehicle 100 in the unlocking area 101, if the mobile phone 110 does not actively lock the vehicle 100, the mobile phone 110 enters the locking area 103 from the buffer area 102, and when it is in the locking area 103, the vehicle 100 is automatically locked.
[0094] Figure 2 FIG. 1 is a flow chart of the communication interaction process of mobile phone remote parking. The vehicle 100 and the mobile phone 110 execute the following steps: Figure 2 The process shown is to achieve remote parking.
[0095] S200 , the vehicle 100 performs BLE broadcasting in an unlocked state.
[0096] S210 , the mobile phone 110 performs BLE broadcast scanning to identify the vehicle 100 .
[0097] S211 , the mobile phone 110 initiates a BLE connection establishment request to connect and pair with the vehicle 100 .
[0098] S220 , the vehicle 100 initiates application layer authentication to the mobile phone 110 .
[0099] S230 , the mobile phone 110 sends a feedback to the vehicle 100 indicating that the authentication is successful.
[0100] S240 , the mobile phone 110 establishes a BLE communication connection with the vehicle 100 .
[0101] After S240, the mobile phone 110 may execute S250 to start remote control parking.
[0102] Specifically, during the remote parking process, the mobile phone 110 executes S251 to send the remote control command to the vehicle 100 ; the vehicle 100 executes S252 to feed back the vehicle status to the mobile phone 110 .
[0103] After the remote control parking is completed, the mobile phone 110 executes S260 to exit the remote control parking.
[0104] During the process of communication and interaction between the mobile phone 110 and the vehicle 100 to realize remote parking, in order to ensure data security, the communication data is encrypted and decrypted by combining the digital key software development kit (Software Development Kit, SDK) encryption and the secure element (Secure Element, SE) chip encryption.
[0105] Specifically, Figure 3FIG. 1 is a schematic diagram of the internal modules of a mobile phone 110 according to an embodiment of the present application.
[0106] like Figure 3 As shown, the mobile phone 110 is installed with a remote parking application (APP) 300. The remote parking APP 300 is loaded with a digital key SDK 301. The digital key SDK 301 can generate a key for encryption, and the remote parking APP 300 can perform encryption and decryption operations by calling the digital key SDK 301.
[0107] The mobile phone 110 is also equipped with an SE chip 310. The mobile phone 110 is also equipped with an identity authentication APP 311, which can call the SE chip 310 for encryption and decryption operations. For example, in one embodiment, the identity authentication APP 311 is a Huawei wallet APP, and the Huawei wallet APP can call the SE chip 310 of the mobile phone 110 for encryption and decryption operations.
[0108] The remote parking APP 300 is also loaded with the identity authentication SDK 301. The remote parking APP 300 can activate the identity authentication APP 311 by calling the identity authentication SDK 301.
[0109] The mobile phone 110 is also equipped with a BLE communication module 320 .
[0110] Figure 4 Shown is a schematic diagram of an internal module of a vehicle 100 according to an embodiment of the present application.
[0111] like Figure 4 As shown, the vehicle 100 is equipped with a vehicle-side Bluetooth processing module 401, a vehicle-side security encryption and decryption module 402, a controller area network (CAN) transceiver module 410, a vehicle-side embedded secure element (eSE) chip 420 and a BLE communication module 430.
[0112] The vehicle-side Bluetooth processing module 401 is used to process data received by the BLE communication module 430; the vehicle-side security encryption and decryption module 402 is used to call the vehicle-side eSE chip 420 to implement data encryption and decryption; and the CAN transceiver module 410 is used to implement data transmission within the vehicle 100.
[0113] Figure 5 The figure is a schematic diagram of the communication interaction process between the mobile phone 110 and the vehicle 100.
[0114] like Figure 5As shown, after the remote parking APP 300 of the mobile phone 110 starts the remote parking, the remote parking APP 300 generates a control instruction. The remote parking APP 300 calls the digital key SDK 301 to encrypt the control instruction. The remote parking APP 300 calls the identity authentication SDK 301 and pulls up the identity authentication APP 311. The encrypted control instruction is sent to the identity authentication APP 311, and the identity authentication APP 311 calls the SE chip 310 for re-encryption. The re-encrypted control instruction is sent to the BLE communication module 430 of the vehicle 100 through the BLE communication module 320.
[0115] After the BLE communication module 430 receives the encrypted control instruction, the encrypted control instruction is sent to the vehicle-side Bluetooth processing module 401. After the vehicle-side Bluetooth processing module 401 recognizes that the data is encrypted data, it sends the encrypted control instruction to the vehicle-side security encryption and decryption module 402. The vehicle-side security encryption and decryption module 402 calls the vehicle-side eSE chip 420 for decryption (one decryption, corresponding to the encryption performed by the identity authentication APP311 calling the SE chip 310), and the decrypted instruction is sent to the CAN transceiver module 410, which sends the decrypted instruction to the corresponding actuator of the vehicle 100 for secondary decryption (corresponding to the encryption of the digital key SDK301) and executes the instruction.
[0116] When the vehicle 100 needs to report data (for example, the vehicle status data) to the mobile phone 110, the data to be reported is encrypted (encrypted once) and then transmitted to the vehicle-side security encryption and decryption module 402 via the CAN transceiver module 410. The vehicle-side security encryption and decryption module 402 calls the vehicle-side eSE chip 420 for encryption (encryption twice), and the encrypted data is sent to the vehicle-side Bluetooth processing module 401. The vehicle-side Bluetooth processing module 401 sends the encrypted data to the BLE communication module 320 of the mobile phone 110 through the BLE communication module 430.
[0117] After receiving the twice-encrypted reported data, the BLE communication module 320 sends the twice-encrypted reported data to the identity authentication APP 311, which calls the SE chip 310 for one-time decryption (corresponding to the encryption performed by the vehicle-side security encryption and decryption module 402 calling the vehicle-side eSE chip 420). The once-decrypted reported data is sent to the remote parking APP 300, which calls the digital key SDK 301 for two-time decryption (corresponding to the one-time encryption of the reported data).
[0118] exist Figure 5In the data interaction process shown, the sending and receiving of data must be decrypted and encrypted twice, which greatly prolongs the time for sending and receiving data. For example, in one application scenario, the remote parking APP300 calls the digital key SDK301 for encryption and decryption, which takes 50ms; the remote parking APP300 calls the identity authentication SDK301, and pulls up the identity authentication APP311 for encryption and decryption, which takes 50 to 100ms; the vehicle-side security encryption and decryption module 402 calls the vehicle-side eSE chip 420 for encryption and decryption, which takes 50ms. The control command is sent by the mobile phone 110 and received and executed by the vehicle 100, which takes more than 150 ms. The Advanced Driver Assistance System (ADAS) requires the communication delay to be controlled within 100ms. Therefore, the above communication method cannot meet the delay requirements of ADAS.
[0119] In order to shorten the communication delay between a terminal device and a controlled device, an embodiment of the present application provides a communication method.
[0120] Figure 6 The figure is a schematic diagram of the communication interaction process between a terminal device and a controlled device according to a communication method of an embodiment of the present application.
[0121] like Figure 6 As shown, before starting communication, the terminal device establishes a communication connection with the controlled device, for example, a Bluetooth connection. (S601)
[0122] S602, the terminal device generates temporary encryption information.
[0123] S603, the terminal device calls the first security element chip to encrypt temporary encryption information to generate first confidential communication data.
[0124] The first security element chip is a security element chip of the terminal device itself.
[0125] S604, the terminal device sends the first confidential communication data (encrypted temporary encryption information) to the controlled device.
[0126] S605: The controlled device receives first confidential communication data sent by the terminal device.
[0127] S606: The controlled device calls the second security element chip to decrypt the first confidential communication data to obtain temporary encryption information.
[0128] The second security element chip is the security element chip of the controlled device itself.
[0129] S607, the terminal device sends a first request message to the controlled device, wherein the first request message includes a first request ciphertext, and the first request ciphertext is data generated by encrypting the first request instruction using temporary encryption information.
[0130] S608, the controlled device receives the first request information sent by the terminal device;
[0131] S609: The controlled device decrypts the first request ciphertext using the temporary encryption information to obtain the first request instruction.
[0132] According to the method of the embodiment of the present application, the SE chip is called to perform encryption and decryption operations only at the beginning of communication, and the transmission of subsequent request instructions does not need to call the SE chip to perform encryption and decryption operations, which can effectively reduce the transmission delay of request instructions.
[0133] Specifically, Figure 7 Shown is a schematic diagram of the internal modules of a terminal device according to an embodiment of the present application.
[0134] like Figure 7 As shown, the terminal device 600 (refer to the mobile phone 110) is installed with a control APP 610 (refer to the remote parking APP 300). The control APP 610 is loaded with a digital key SDK 611 (refer to the digital key SDK 301). The digital key SDK 611 can generate temporary encryption information for encryption and decryption, and the temporary encryption information is used to allow the terminal device and the controlled device to agree on the encryption and decryption method for communication interaction.
[0135] The terminal device 600 is also equipped with a SE chip 620 (a first security element chip, refer to the SE chip 310 ). The terminal device 600 is also equipped with an identity authentication APP 621 (refer to the identity authentication APP 311 ), and the identity authentication APP 621 can call the SE chip 620 to perform encryption and decryption operations.
[0136] The control APP 610 is also loaded with the identity authentication SDK 622 (refer to the identity authentication SDK 301 ). The control APP 610 can activate the identity authentication APP 621 by calling the identity authentication SDK 622 .
[0137] The terminal device 600 is also equipped with a communication module 630 (refer to the BLE communication module 320).
[0138] Figure 8 Shown is a schematic diagram of the internal modules of a controlled device according to an embodiment of the present application.
[0139] like Figure 8As shown, the controlled device 700 (refer to the vehicle 100) is equipped with a controlled module 710, an eSE chip 720 (a second security element chip, refer to the eSE chip 420) and a communication module 730. Data encrypted by the SE chip 620 can be decrypted by the eSE chip 720; data encrypted by the eSE chip 720 can be decrypted by the SE chip 620.
[0140] Fig. 9 The figure is a schematic diagram of the communication interaction process between the terminal device 600 and the controlled device 700 according to the communication method of one embodiment of the present application.
[0141] like Fig. 9 As shown, before starting communication, the terminal device 600 establishes a communication connection with the controlled device 700, for example, a Bluetooth connection. (S800)
[0142] S810 , the terminal device 600 starts the control APP 610 and enters the process of controlling the controlled device 700 .
[0143] For example, the user clicks the remote parking application icon displayed on the mobile phone screen to start the remote parking APP.
[0144] S820, the control APP 610 calls the digital key SDK 611 to generate temporary encryption information. The temporary encryption information is used for the terminal device 600 and the controlled device 700 to agree on the encryption and decryption method of the communication interaction of this control operation.
[0145] In the communication method provided in the embodiment of the present application, the specific encryption and decryption method of the communication interaction between the terminal device 600 and the controlled device 700 is not limited.
[0146] For example, in one embodiment, the communication interaction between the terminal device 600 and the controlled device 700 is encrypted using AEC-GCM. Specifically, in S820, the temporary encryption information includes a secret key (KEY), an initial vector (IV), and additional authentication information (AAD) for AEC-GCM encryption. For example, IV is a randomly generated 12-byte content; AAD takes a value of 16 bytes, and the corresponding hexadecimal data is [49 43 43 5250 41 45 4e 43 52 49 50 54 49 4f 4e], and the corresponding ASCII is ICCRPAENCRIPTION.
[0147] S830, control APP 610 to call identity authentication SDK 622 and enable identity authentication APP 621.
[0148] S831, the identity authentication APP 621 calls the SE chip 620 to encrypt temporary encryption information and generate first confidential communication data.
[0149] S840, the control APP 610 generates a control start request, which includes the first confidential communication data (encrypted temporary encryption information), and the control start request is used to instruct the controlled device 700 to enter the controlled process.
[0150] S841 , the control APP 610 sends a control start request to the controlled device 700 through the communication module 630 .
[0151] After the controlled device 700 receives the control start request through the communication module 730 , the controlled module 710 executes S850 .
[0152] S850: The controlled module 710 identifies the received request as a control start request.
[0153] Specifically, in one embodiment, the communication request sent by the terminal device 600 to the controlled device 700 is configured with an encryption flag. When the encryption flag is 1, it indicates that the communication request is a control start request.
[0154] S851, the controlled module 710 calls the SE chip 720 to decrypt the first confidential communication data in the control start request to obtain temporary encryption information.
[0155] S852, the controlled module 710 saves temporary encryption information.
[0156] After S852, the terminal device 600 and the controlled device 700 can communicate and interact based on the temporary encryption information.
[0157] For example, the terminal device 600 initiates a request instruction to the controlled device 700 .
[0158] Specifically, control APP610 to execute S860.
[0159] S860, control APP610 to generate a first request instruction (eg, a control instruction), call temporary encryption information, encrypt the first request instruction, and generate a first request ciphertext.
[0160] S861 , the control APP 610 generates first request information including a first request ciphertext, and sends the first request information to the controlled device 700 through the communication module 630 .
[0161] Taking AEC-GCM encryption as an example, in S861, the control APP610 calls the secret key (KEY), initial vector (IV), and additional authentication information (AAD) to encrypt the first request instruction and generate the first request ciphertext and authentication information (MAC TAG). In S861, the first request information includes the transmission bus identifier (CAN ID), the first request ciphertext, and authentication information (MAC TAG (TAG length is fixed to 16 bytes)).
[0162] After the controlled device 700 receives the first request information through the communication module 730 , the controlled module 710 executes S862 .
[0163] S862, the controlled module 710 calls the temporary encryption information saved in S852, and decrypts the first request ciphertext in the first request information to obtain the first request instruction.
[0164] For another example, the controlled device 700 initiates a request instruction to the terminal device 600 .
[0165] Specifically, the controlled module 710 executes S870.
[0166] S870, the controlled module 710 generates a second request instruction, calls temporary encryption information, encrypts the second request instruction, and generates a second request ciphertext.
[0167] S871 , the controlled module 710 generates second request information including a second request ciphertext, and sends the second request information to the terminal device 600 through the communication module 730 .
[0168] After the terminal device 600 receives the second request information through the communication module 630 , the APP 610 is controlled to execute S872 .
[0169] S872, control APP610 to call temporary encryption information, decrypt the second request ciphertext in the second request information to obtain a second request instruction.
[0170] Furthermore, the controlled device 700 and / or the terminal device 600 can also initiate a control termination request, which is used to indicate the end of this control process. Furthermore, when a control process ends, the temporary encryption information used in this control process is invalidated, and new temporary encryption information is generated when a new control process starts next time. That is, the terminal device needs to regenerate temporary encryption information each time before initiating a control start request. In this way, the reduction of control security caused by the leakage of temporary encryption information can be avoided.
[0171] Further, after S852, the controlled device 700 may also respond to the control start request, for example, by sending response information to the control start request to the terminal device 600. The response information may be plain text information or information encrypted based on temporary encryption information.
[0172] Specifically, in one embodiment, after the controlled device 700 receives the control start request, the controlled device 700 sends a control start response to the control start request to the terminal device 600. The control start response includes the control start request execution status, and the control start request execution status is used to describe the reception status and / or parsing status of the control start request. For example: whether the control start request is successfully received; whether the first confidential communication data in the control start request is successfully decrypted.
[0173] The control start request execution status included in the control start response may be information encrypted by the SE chip 720, may be information encrypted by temporary encryption information, or may be unencrypted plain text information.
[0174] For example, in one embodiment, after successfully receiving a control start request and successfully decrypting the first confidential communication data, and obtaining temporary encryption information, the controlled device 700 generates a control start request execution status for the control start request, and the control start request execution status indicates that the controlled device 700 successfully obtained the temporary encryption information.
[0175] The controlled device 700 calls the SE chip 720 to encrypt the control start request execution state to generate the second confidential communication data. The controlled device 700 generates a control start response, which includes the second confidential communication data. The controlled device 700 sends the control start response to the terminal device 600.
[0176] Further, after S862, the controlled device 700 executes the first request instruction, and / or responds to the first request instruction, for example, sending response information to the first request instruction to the terminal device 600. The response information may be plain text information or information encrypted based on temporary encryption information.
[0177] Specifically, in one embodiment, after the controlled device 700 receives the first request information, the controlled device 700 sends the first response information for the first request information to the terminal device 600. The first response information includes the first request execution status, and the first request execution status is used to describe the reception status of the first request information, and / or the parsing status, and / or the execution status of the first request instruction. For example: whether the first request information is successfully received; whether the first request information is successfully decrypted; whether the first request instruction is successfully executed.
[0178] The first request execution status included in the first response information may be information encrypted by temporary encryption information, or may be unencrypted plain text information.
[0179] For example, in one embodiment, after successfully receiving the first request information and successfully decrypting the first request ciphertext, and obtaining the first request instruction, the controlled device 700 executes the first request instruction. After successfully executing the first request instruction, the controlled device 700 generates a first request execution status for the first request information, and the first request execution status indicates that the controlled device 700 successfully executes the first request instruction.
[0180] The controlled device 700 encrypts the first request execution status using the temporary encryption information to generate a first response ciphertext. The controlled device 700 generates first response information, which includes the first response ciphertext. The controlled device 700 sends the first response information to the terminal device 600.
[0181] Further, after S872, the terminal device 600 executes the second request instruction, and / or responds to the second request instruction, for example, sends response information to the second request instruction to the controlled device 700. The response information may be plain text information or information encrypted based on temporary encryption information.
[0182] Specifically, in one embodiment, after the terminal device 600 receives the second request information, the terminal device 600 sends the second response information for the second request information to the controlled device 700. The second response information includes the second request execution status, and the second request execution status is used to describe the receiving status of the second request information, and / or the parsing status, and / or the execution status of the second request instruction. For example: whether the second request information is successfully received; whether the second request information is successfully decrypted; whether the second request instruction is successfully executed.
[0183] The second request execution status included in the second response information may be information encrypted by temporary encryption information, or may be unencrypted plain text information.
[0184] For example, in one embodiment, after successfully receiving the second request information and successfully decrypting the second request ciphertext, and obtaining the second request instruction, the terminal device 600 executes the second request instruction. After successfully executing the second request instruction, the controlled device 700 generates a second request execution status for the second request information, and the second request execution status indicates that the terminal device 600 successfully executes the second request instruction.
[0185] The terminal device 600 encrypts the second request execution status using the temporary encryption information to generate a second response ciphertext. The controlled device 700 generates a second response information, which includes the second response ciphertext. The terminal device 600 sends the second response information to the controlled device 700.
[0186] Furthermore, the controlled device 700 also reports status data to the terminal device 600 .
[0187] In one embodiment, the controlled device 700 reports the status data in plain text to reduce the transmission delay of the status data.
[0188] Specifically, the controlled module 710 executes S880.
[0189] S880, the controlled module 710 generates status data, and sends feedback information of the status data to the terminal device 600 through the communication module 730 (without calling temporary encryption information to encrypt the status data, and without enabling the SE chip to encrypt the status data).
[0190] According to the method of the embodiment of the present application, when the controlled device reports its status, temporary encryption information is not called to encrypt the status data, nor is the SE chip enabled to encrypt the status data. This can effectively reduce the status data reporting delay and reduce the communication data processing pressure of the controlled device.
[0191] Further, in one embodiment, the status data reported by the controlled device 700 is divided into two categories: first status data corresponding to a real-time status with a high priority; and second status data corresponding to a real-time status with a low priority (the priority of the second status data is lower than that of the first status data). Compared with the real-time status with a low priority, the reporting period of the real-time status with a high priority is shorter. That is, the reporting period of the second status data is shorter than the reporting period of the first status data.
[0192] In this way, the terminal device 600 can confirm the priority of the received real-time status based on the type of status data, and perform targeted and rapid processing, thereby improving the data processing speed of the terminal device 600 and reducing the data processing pressure of the terminal device 600.
[0193] Furthermore, the embodiments of the present application do not specifically limit the communication protocol used when the terminal device and the controlled device communicate with each other. A person skilled in the art can modify the original communication protocol to obtain a communication protocol for implementing the communication method of the embodiments of the present application, or a person skilled in the art can construct a new communication protocol to obtain a communication protocol for implementing the communication method of the embodiments of the present application.
[0194] Specifically, in one embodiment, the structure of communication data in the communication protocol is as shown in Table 1.
[0195] Table 1
[0196]
[0197] In Table 1:
[0198] The SOF in the Header is the start of frame flag;
[0199] The Length in Header is used to indicate the length of the data header;
[0200] The "reserved" bit of the Control field in the Header is used for the expansion of subsequent control functions;
[0201] The encryption indicator bit of the Control field in the Header is used to indicate whether the current data is encrypted by the SE chip. A value of 1 indicates that the current data is encrypted by the SE chip, and a value of 0 indicates that the current data is not encrypted by the SE chip.
[0202] The direction indicator bit of the Control field in the Header is used to indicate whether the current data is a request initiated by the device (or actively reported) or a response to a request. A value of 1 in the direction indicator bit indicates that the current data is a request initiated by the device or actively reported. A value of 0 in the direction indicator bit indicates that the current data is a response to a request.
[0203] The response indication bit of the Control field in the Header is used to indicate whether the receiving device needs to respond to the current communication data in real time. A value of 0 indicates that the receiving device needs to respond to the current communication data in real time, and a value of 1 indicates that the receiving device does not need to respond to the current communication data in real time.
[0204] The packet indication bit of the Control field in the Header is used to indicate whether the current communication data is packet data (00 represents non-packet data, the value of the packet indication bit is 01 represents the first packet of packet data, the value of the packet indication bit is 10 represents the packet in the middle of packet data, and the value of the packet indication bit is 11 represents the last packet of packet data);
[0205] The FSN (Frame Structure Nr) in the Header is the number of the packetized data;
[0206] MessageID (msg ID) is used to indicate the transmission mode of the instruction. The value of MessageID is 0x80, which indicates the instruction is transparently transmitted to APK.
[0207] CommondID (cmd ID) is used to distinguish different communication types: the value of cmd ID is 0x80, indicating a control start request; the value of cmd ID is 0x83, indicating a request initiated by a terminal device; the value of cmd ID is 0x84, indicating a request initiated by a controlled device; the value of cmd ID is 0x81, indicating that a controlled device reports a high priority status; the value of cmd ID is 0x82, indicating that a controlled device reports a low priority status;
[0208] The Type of Payload in Body is used to indicate the type of the Value of Payload (when the value of Type is 0x01, the Value contains the code content);
[0209] The Length of Payload in Body is used to indicate the length of the Value of Payload.
[0210] Check Sum is the check digit.
[0211] For example, in one embodiment, in a remote parking application scenario, the structure of the RPA control start request is shown in Table 2.
[0212] Table 2
[0213]
[0214]
[0215] In Table 2, the value of SOF is 0x5A, which is a preset value and represents the beginning of a communication data frame; the value of the direction indicator bit is 1, indicating that the current communication data frame is a request initiated by the device; the value of the encryption indicator bit is 1, indicating that the current communication data frame is encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and the value of FSN is 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x80, indicating that the current communication data frame is a control start request.
[0216] In the Value of the RPA control start request, RPA_START is the RPA control start request identifier, which is used to indicate that the current instruction is a control start request. RPA_START occupies 1 byte and has a value of 0x01; RPA_KEY is the key, which occupies 6 bytes; IV is the initial vector, which occupies 12 bytes. The Value uses TLV to store each field.
[0217] For example, in Table 2, the Value is "0x01+0x01+RPA_START+0x02+0x10+RPA_KEY+0x03+0x0C+IV", where the plus sign represents multiple code segments concatenated together.
[0218] "0x01+0x01", "0x02+0x10", and "0x03+0x0C" are used to separate codes with different contents. The "0x01" at the beginning of "0x01+0x01" is used to indicate that the first code segment in Value (i.e., RPA_START) is to follow, and the "0x01" at the end of "0x01+0x01" is used to indicate the length of the first code segment. The "0x02" at the beginning of "0x02+0x10" is used to indicate that the second code segment in Value (i.e., RPA_KEY) is to follow, and the "0x10" at the end of "0x02+0x10" is used to indicate the length of the second code segment. The "0x03" at the beginning of "0x03+0x0C" is used to indicate that the third code segment in Value (i.e., IV) is to follow, and the "0x0C" at the end of "0x03+0x0C" is used to indicate the length of the third code segment.
[0219] In one embodiment, the structure of the vehicle-side response to the RPA control start request is as shown in Table 3.
[0220] Table 3
[0221]
[0222]
[0223] In Table 3, the value of SOF is 0x5A, which is a preset value and represents the beginning of a communication data frame; the value of the direction indicator bit is 0, indicating that the current communication data frame is a response of the device to a request; the value of the encryption indicator bit is 1, indicating that the current communication data frame is encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and FSN is set to 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x80 (combined with the value of the direction indicator bit being 0), indicating that the current communication data frame is a response to a control start request.
[0224] The Type in Status in Payload is used to indicate the data format type of the Status field in Status; the Length in Status is used to indicate the length of the Status field in Status; the Status field in Status is used to describe the execution status of the request to which the current communication response is directed, for example, execution error, correct execution, etc.
[0225] The Type in the Response Payload in the Payload is used to indicate the data format type of the Response field in the ResponsePayload; the Length in the ResponsePayload in the Payload is used to indicate the length of the Response field in the Response Payload.
[0226] As shown in Table 3, when the current communication response only needs to indicate the execution status of the request through Status, Response Payload is empty.
[0227] For another example, in one embodiment, in a remote parking application scenario, the structure of the request initiated by the mobile phone is shown in Table 4.
[0228] Table 4
[0229]
[0230] In Table 4, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 1, indicating that the current communication data frame is a request sent by the device; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is empty, the value is 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x83, indicating that the current communication data frame is a request initiated by the terminal device.
[0231] Specifically, the value of the encryption indicator bit is 0, MessageID and CommondID are not encrypted, the MessageID value is 0x80 to identify the current instruction as an instruction transmitted to the APK, and the CommondID value is 0x83 to identify the current instruction as a request initiated by the mobile phone.
[0232] The value of CAN ID is defined by the communication matrix of different projects. On the mobile phone side, it is maintained by the RPA APP; on the vehicle side, it is filled or removed by the Bluetooth SDK. For example, on the vehicle side, if the vehicle Bluetooth SDK receives the CAN ID+RPACMD sent by the mobile phone, it removes the CANID and transmits the RPA CMD to the corresponding module through the CAN ID channel; if it receives the RPA CMD transmitted by the ADS through the CAN ID channel, it fills the CAN ID and fills the CAN ID+RPA CMD into the Payload.
[0233] In one embodiment, the structure of the vehicle-side response to the request initiated by the mobile phone is shown in Table 5.
[0234] Table 5
[0235]
[0236] In Table 5, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 0, indicating that the current communication data frame is a response to the request; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is blank, the value is 00); the value of Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to APK; the value of Commond ID is 0x83 (combined with the value of the direction indicator bit is 0)) indicating that the current communication data frame is a response to the request initiated by the terminal device.
[0237] The Type value in the Response Payload is 0x01, indicating that the Response field in the Response Payload carries the code content (CAN ID (2 Bytes) + RPA CMD).
[0238] For another example, in one embodiment, in a remote parking application scenario, the structure of the request initiated by the vehicle is shown in Table 6.
[0239] Table 6
[0240]
[0241]
[0242] In Table 6, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 1, indicating that the current communication data frame is a request initiated by the device; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is blank, the value is 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x84, indicating that the current communication data frame is a request initiated by the controlled device.
[0243] In one embodiment, the structure of the response on the mobile phone side to the request initiated by the vehicle is shown in Table 7.
[0244] Table 7
[0245]
[0246] In Table 7, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 0, indicating that the current communication data frame is a response to the request; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 0, indicating that the receiving device of the current communication data frame needs to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is blank, the value is 00); the value of Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to APK; the value of Commond ID is 0x84 (combined with the value of the direction indicator bit is 0), indicating that the current communication data frame is a response to a request initiated by the controlled device.
[0247] For another example, in one embodiment, in a remote parking application scenario, the structure of a vehicle reporting a high priority state is shown in Table 8.
[0248] Table 8
[0249]
[0250]
[0251] In Table 8, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 1, indicating that the current communication data frame is a request initiated by the device; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 1, indicating that the receiving device of the current communication data frame does not need to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is blank, the value is 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x81, indicating that the current communication data frame is high-priority status data reported by the controlled device.
[0252] Based on the data structure in Table 8, the vehicle-side RPA actively reports the real-time status with a high priority. Compared with the real-time status with a low priority, the reporting cycle of the real-time status with a high priority is shorter.
[0253] The high-priority status data reported by the vehicle-side RPA is not encrypted. When the mobile phone receives the high-priority status data reported by the vehicle-side RPA, it does not need to reply to the status data.
[0254] For another example, in one embodiment, in a remote parking application scenario, the structure of a vehicle reporting a low priority state is shown in Table 9.
[0255] Table 9
[0256]
[0257] In Table 9, the value of SOF is 0x5A, which represents the beginning of the communication data frame; the value of the direction indicator bit is 1, indicating that the current communication data frame is a request initiated by the device; the value of the encryption indicator bit is 0, indicating that the current communication data frame is not encrypted by the SE chip; the value of the response indicator bit is 1, indicating that the receiving device of the current communication data frame does not need to respond to the current communication data frame in real time; the value of the packetization indicator bit is 00, indicating that the current communication data frame is non-packetized data (and, FSN is blank, the value is 00); the value of the Message ID is 0x80, indicating that the current communication data frame is an instruction transmitted to the APK; the value of the Commond ID is 0x82, indicating that the current communication data frame is low-priority status data reported by the controlled device.
[0258] Based on the data structure in Table 9, the vehicle-side RPA actively reports the real-time status with a low priority. Compared with the real-time status with a high priority, the reporting cycle of the real-time status with a low priority is longer.
[0259] The low-priority status data reported by the vehicle-side RPA is not encrypted. When the mobile phone receives the low-priority status data reported by the vehicle-side RPA, it does not need to reply to the status data.
[0260] In the description of the embodiments of the present application, for the convenience of description, the device is described by dividing it into various modules according to its functions. The division of each module is merely a division of logical functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or one or more software and / or hardware.
[0261] Specifically, the device proposed in the embodiment of the present application can be fully or partially integrated into a physical entity during actual implementation, or it can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in a processor element or instructions in the form of software.
[0262] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0263] An embodiment of the present application further provides an electronic device.
[0264] Fig.10 Schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0265] like Fig.10 As shown, the electronic device 900 includes a memory 902 for storing computer program instructions and a processor 901 for executing program instructions, wherein when the computer program instructions are executed by the processor 901, the electronic device 900 is triggered to execute the method steps described in the embodiments of the present application.
[0266] Specifically, in one embodiment of the present application, the above-mentioned one or more computer programs are stored in the above-mentioned memory 902, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned electronic device 900, the above-mentioned electronic device 900 executes the method steps described in the embodiment of the present application.
[0267] It is understandable that the structural description of the electronic device 900 in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include other components besides the processor 901 and the memory 902.
[0268] The processor 901 may be a device on a chip (SOC), and the processor 901 may include a central processing unit (CPU), and may further include other types of processors.
[0269] The processor involved in the processor 901 may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units, NPU) and an image signal processor (Image Signal Processing, ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0270] The processor 901 may include one or more processing units. For example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 900 may also include one or more processors 901. The controller may generate an operation control signal based on the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0271] In some embodiments, the processor 901 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. Among them, the USB interface is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge an electronic device, and can also be used to transmit data between an electronic device and a peripheral device.
[0272] The electronic device 900 may also include an external memory interface, which is used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 901 through the external memory interface to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0273] The memory 902 may include a code storage area and a data storage area. The code storage area may store an operating system. The data storage area may store data created during the use of the electronic device 900, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc.
[0274] The memory 902 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or may be any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0275] The processor 901 and the memory 902 may be integrated into one processing device, or more commonly, they are independent components.
[0276] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.
[0277] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0278] In the several embodiments provided in the present application, if any function 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 technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0279] Specifically, in one embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the method provided in the embodiment of the present application.
[0280] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer executes the method provided by the embodiment of the present application.
[0281] The embodiments described in this application are described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0282] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0283] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0284] It should also be noted that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0285] In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0286] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0287] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0288] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, 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.
[0289] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0290] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A communication method, characterized in that: The method is applied to a terminal device, and the method comprises: Generate temporary encryption information; Calling a first security element chip to encrypt temporary encryption information to generate first confidential communication data, wherein the first security element chip is a security element chip of the terminal device itself; Sending the first confidential communication data to the controlled device; Sending first request information to the controlled device, wherein the first request information includes the first request ciphertext, and the first request ciphertext is data generated by encrypting the first request instruction using the temporary encryption information.
2. The method according to claim 1, characterized in that The sending the first confidential communication data to the controlled device comprises: generating a control start request, wherein the control start request includes the first confidential communication data, and the control start request is used to instruct the controlled device to enter a controlled process; The control start request is sent to the controlled device.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a control start response sent by the controlled device, wherein the control start response includes second confidential communication data encrypted by a second security element chip, where the second security element chip is a security element chip of the controlled device itself; The first security element chip is called to decrypt the second confidential communication data to obtain a control start request execution status, where the control start request execution status is used to describe a reception status and / or parsing status of the controlled device for the control start request.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: receiving first response information sent by the controlled device, where the first response information includes a first response ciphertext encrypted based on the temporary encryption information; The first response ciphertext is decrypted using the temporary encryption information to obtain a first request execution status, where the first request execution status is used to describe the reception status, and / or parsing status, and / or execution status of the first request instruction by the controlled device for the first request information.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: receiving second request information sent by the controlled device, where the second request information includes a second request ciphertext encrypted based on the temporary encryption information; The second request ciphertext is decrypted using the temporary encryption information to obtain a second request instruction, where the second request instruction is directed to the terminal device.
6. The method according to claim 5, characterized in that The method further comprises: Generate a second request execution status, where the second request execution status is used to describe a reception status, and / or a parsing status, and / or an execution status of the second request instruction by the terminal device for the second request information; Encrypt the second request execution status using the temporary encryption information to generate a second response ciphertext; Generate second response information, where the second response information includes the second response ciphertext; The second response information is sent to the controlled device.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The first state data sent by the controlled device is received, where the first state data is unencrypted plaintext data.
8. The method according to claim 7, characterized in that The method further comprises: Receive second status data sent by the controlled device, where the second status data is unencrypted plaintext data, the priority of the second status data is lower than the first status data, and the reporting period of the second status data is shorter than the reporting period of the first status data.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Sending a control termination request to the controlled device, wherein the control termination request is used to indicate that the current round of control process is ended, and the control termination request is also used to indicate that the temporary encryption information is invalidated; and / or, The control termination request sent by the controlled device is received.
10. A communication method, characterized in that: The method is applied to a controlled device, and the method comprises: Receiving first confidential communication data sent by a terminal device, where the first confidential communication data is data encrypted by a first security element chip, and the first security element chip is a security element chip of the terminal device itself; Calling a second security element chip to decrypt the first confidential communication data to obtain temporary encryption information, where the second security element chip is the security element chip of the controlled device itself; receiving first request information sent by the terminal device, where the first request information includes a first request ciphertext encrypted based on the temporary encryption information; The first request ciphertext is decrypted using the temporary encryption information to obtain a first request instruction.
11. The method according to claim 10, characterized in that The receiving terminal device sends first confidential communication data, including: A control start request sent by the terminal device is received, wherein the control start request includes the first confidential communication data, and the control start request is used to instruct the controlled device to enter a controlled process.
12. The method according to claim 10 or 11, characterized in that: The method further comprises: Generate a control start request execution status, where the control start request execution status is used to describe a reception status and / or parsing status of the controlled device for the control start request; calling the second security element chip to encrypt the control start request execution state to generate second confidential communication data; generating a control start response, wherein the control start response includes the second confidential communication data; The control start response is sent to the terminal device.
13. The method according to any one of claims 10 to 12, characterized in that: The method further comprises: Generate a first request execution state, where the first request execution state is used to describe a reception state, and / or a parsing state, and / or an execution state of the first request instruction by the controlled device to the first request information; Encrypt the first request execution status using the temporary encryption information to generate a first response ciphertext; Generate first response information, where the first response information includes the first response ciphertext; Send the first response information to the terminal device.
14. The method according to any one of claims 10 to 13, characterized in that: The method further comprises: generating a second request instruction, wherein the second request instruction is directed to the terminal device; Encrypt the second request instruction using the temporary encryption information to generate a second request ciphertext; Generate second request information, where the second request information includes the second request ciphertext; Send the second request information to the terminal device.
15. The method according to claim 14, characterized in that The method further comprises: receiving second response information sent by the terminal device, where the second response information includes a second response ciphertext encrypted based on the temporary encryption information; Use the temporary encrypted information to decrypt the second response ciphertext to obtain the second request execution status, where the second request execution status is used to describe the terminal device's reception status, and / or parsing status, and / or execution status of the second request instruction for the second request information.
16. The method according to any one of claims 10 to 15, characterized in that The method further comprises: Sending first state data to the terminal device, wherein the first state data is unencrypted plaintext data.
17. The method according to claim 16, characterized in that The method further comprises: Sending second status data to the terminal device, the second status data is unencrypted plaintext data, the priority of the second status data is lower than the first status data, and the reporting period of the second status data is shorter than the reporting period of the first status data.
18. The method according to any one of claims 10 to 17, characterized in that: The method further comprises: Sending a control termination request to the terminal device, wherein the control termination request is used to indicate that the current round of control process is ended, and the control termination request is also used to indicate that the temporary encryption information is invalidated; and / or, The control termination request sent by the controlled device is received.
19. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps as described in any one of claims 1-9 or any one of claims 10-18.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 9 or any one of claims 10 to 18.