Information sharing method and device, equipment, storage medium and program product

By acquiring the changes in the ambient magnetic field, timestamp data, and Bluetooth range information of electronic devices, a security key is generated to encrypt the information, thus solving the security risks when multiple people share information in real time and achieving secure information transmission.

CN120935562APending Publication Date: 2025-11-11VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511212863.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

When multiple people share information in real time, existing technologies pose security risks, and information can easily be leaked.

Method used

By acquiring information such as changes in the ambient magnetic field, timestamp data, and Bluetooth range of electronic devices, and combining this with hash values ​​and data characteristics from the shake-to-use operation, a unique security key is generated to perform symmetric encryption on the information, ensuring the security of information transmission.

Benefits of technology

It enables secure key generation and encryption during wireless transmission between multiple electronic devices, preventing key leakage and ensuring the security of information exchange.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935562A_ABST
    Figure CN120935562A_ABST
Patent Text Reader

Abstract

The invention discloses an information sharing method and device, equipment, a storage medium and a program product, and belongs to the technical field of communication. The method comprises the following steps: acquiring first information under the condition that first electronic equipment executes a shake operation; the first information comprises at least one of a first environment magnetic field variation, first timestamp data and first Bluetooth distance range information; according to a first hash value of the first electronic equipment, a second hash value of second electronic equipment, the first information and first data feature information corresponding to the shake operation, a first security key is obtained through calculation; based on the first security key, performing symmetric encryption processing on first information to obtain a first ciphertext; and sending the first ciphertext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, specifically relating to an information sharing method, apparatus, device, storage medium, and program product. Background Technology

[0002] Near-field interactive multi-user instant sharing is based on the use of sensors (such as accelerometers and gyroscopes) and network technology in electronic devices to achieve rapid matching and data transmission among multiple devices. For example, when a user wants to share pictures or videos with family or friends, they can select the pictures or videos they want to share from their album, then shake their phone. At the same time, the user's family or friends can also shake their phones to quickly share the pictures or videos.

[0003] When multiple users simultaneously shake their electronic devices to share information in the same environment, the information is easily leaked, posing a certain security risk. Summary of the Invention

[0004] The purpose of this application is to provide an information sharing method, apparatus, device, storage medium, and program product that can solve the security risks that exist when users share information using electronic devices.

[0005] In a first aspect, embodiments of this application provide an information sharing method applied to a first electronic device, the method comprising:

[0006] When the first electronic device performs a shake operation, first information is acquired; the first information includes at least one of the following: first environmental magnetic field change, first timestamp data, and first Bluetooth distance range information.

[0007] The first security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information of the shake operation.

[0008] Based on the first security key, the first information is symmetrically encrypted to obtain the first ciphertext;

[0009] Send the first ciphertext.

[0010] Secondly, embodiments of this application also provide an information sharing method applied to a second electronic device, the method comprising:

[0011] When the second electronic device performs a shake operation, second information is acquired; the second information includes at least one of the following: second environmental magnetic field change, second timestamp data, and second Bluetooth distance range information.

[0012] The second security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation.

[0013] Receive the first ciphertext sent by the first electronic device;

[0014] Based on the second security key, the first ciphertext is decrypted to obtain the decrypted first information.

[0015] Thirdly, embodiments of this application also provide an information sharing device, applied to a first electronic device, comprising:

[0016] The first acquisition module is configured to acquire first information when the first electronic device performs a shake operation; the first information includes at least one of the following: a first change in the ambient magnetic field, first timestamp data, and first Bluetooth distance range information.

[0017] The first processing module is configured to calculate the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information of the shake operation;

[0018] The second processing module is used to perform symmetric encryption on the first information based on the first security key to obtain the first ciphertext;

[0019] The first sending module is used to send the first ciphertext.

[0020] Fourthly, embodiments of this application provide an electronic device, which is a first electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can run on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0021] Fifthly, embodiments of this application also provide an information sharing device applied to a second electronic device, comprising:

[0022] The second acquisition module is used to acquire second information when the second electronic device performs a shake operation; the second information includes at least one of the following: a second environmental magnetic field change, a second timestamp data, and second Bluetooth distance range information.

[0023] The third processing module is used to calculate the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation;

[0024] The first receiving module is used to receive the first encrypted text sent by the first electronic device;

[0025] The fourth processing module is used to decrypt the first ciphertext based on the second security key to obtain the decrypted first information.

[0026] In a sixth aspect, embodiments of this application provide an electronic device, which is a second electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the method described in the second aspect.

[0027] In a seventh aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect or the second aspect.

[0028] Eighthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the methods described in the first aspect or the second aspect.

[0029] Ninthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect or the second aspect.

[0030] In this embodiment, when the first electronic device performs a shake operation, first information is acquired, wherein the first information includes at least one of a first environmental magnetic field change, a first timestamp data, and a first Bluetooth distance range information; then, a first security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation; finally, based on the first security key, the first information is symmetrically encrypted to obtain a first ciphertext; the first ciphertext is then sent. In this way, a unique security key is generated using the environmental magnetic field change, timestamp data, and Bluetooth distance range information of the first electronic device at that time, and the information to be exchanged is encrypted using symmetric encryption before being transmitted to the second electronic device, thereby ensuring secure information transmission. Attached Figure Description

[0031] Figure 1 This is one of the flowcharts illustrating the information sharing method according to an embodiment of this application;

[0032] Figure 2 These are waveform diagrams of the data characteristic information of device A and device B;

[0033] Figure 3This is a schematic diagram illustrating the quantification process of data feature information of device A and device B;

[0034] Figure 4 This is a second schematic flowchart of the information sharing method according to an embodiment of this application;

[0035] Figure 5 This is the third flowchart illustrating the information sharing method according to an embodiment of this application;

[0036] Figure 6 This is one of the schematic diagrams of the information sharing device according to an embodiment of this application;

[0037] Figure 7 This is a second schematic diagram of the information sharing device according to an embodiment of this application;

[0038] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application;

[0039] Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0041] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0042] The information sharing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0043] like Figure 1 As shown, this application embodiment provides an information sharing method, which is applied to a first electronic device, that is, the method is executed by the first electronic device. Specifically, the method may include:

[0044] Step 101: When the first electronic device performs a shake operation, acquire first information; wherein, the first information includes at least one of the following: first environmental magnetic field change, first timestamp data, and first Bluetooth distance range information;

[0045] Here, the applicable scenario for this application embodiment is: a scenario where a first electronic device and a second electronic device located in the same area as the first electronic device each perform a shake operation at the same time. The number of second electronic devices is greater than or equal to one. The fact that the first and second electronic devices are in the same area indicates that these electronic devices are in the same environment.

[0046] Optionally, multiple electronic devices (including a first electronic device and a second electronic device) establish a first group through their respective users' shake operations. Specifically, this is achieved through the sensors and network technology of the electronic devices, enabling rapid matching of multiple devices. For example, the built-in accelerometer of an electronic device can detect the shaking motion; additionally, to match nearby (within the same area) electronic devices, applications within the electronic devices typically request the device's location information (achieved through GPS, Wi-Fi positioning, or mobile network base stations). Once sufficient information is collected (such as shaking motion, location information, and timestamp information), the application uses a specific algorithm to match nearby users who are simultaneously shaking their electronic devices.

[0047] Step 102: Obtain the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation;

[0048] Here, the change in the first ambient magnetic field can be obtained through the geomagnetic sensor built into the first electronic device. It should be noted that the magnetic field information of multiple electronic devices in the same area (e.g., within a distance of ≤10 meters) is very similar. Therefore, information about similar magnetic fields in the same area can be used as one component of the subsequent first security key to enhance the security and randomness of the key.

[0049] It should be noted that the changes in the environmental magnetic field, timestamp data, and Bluetooth range information are unique characteristics of the "shake-to-share" function, which requires multiple people to perform a shake-to-share operation. These three pieces of information limit the "shake-to-share" function to be enabled only when the shake occurs in the same area and at the same time. Specifically, the conditions for "shake-to-share" are that multiple people (≥2 people), in the same area (e.g., distance ≤ 10 meters), and at the same time (e.g., time difference ≤ 15 seconds) shake (move the electronic device) together. Therefore, the first piece of information is used as one of the components of the subsequent first security key to enhance the security and randomness of the key.

[0050] Optionally, the timestamp precision of the first timestamp data is on the order of hundreds of seconds. It should be noted that there may be slight time differences when multiple electronic devices shake their devices "at the same moment". Therefore, the timestamp information of the units and tens digits can be ignored, and the timestamp information of the hundreds digit can be used (i.e., timestamp precision on the order of hundreds of seconds) to ensure that multiple electronic devices use the same timestamp as part of the subsequent first security key.

[0051] Step 103: Based on the first security key, perform symmetric encryption on the first information to obtain the first ciphertext;

[0052] Step 104: Send the first ciphertext.

[0053] It should be noted that the first and second electronic devices located in the same area are both electronic devices involved in the "shake-to-share" function. The changes in the environmental magnetic field, timestamp data, and Bluetooth distance range information are not only unique to the first electronic device but also unique to the second electronic device. Furthermore, the data characteristics of the shake-to-share operation involved in the first and second electronic devices are similar, and the principles by which the first and second electronic devices generate security keys are also the same.

[0054] In this way, the first electronic device generates a first security key based on the hash value of the electronic device, the change in the ambient magnetic field, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation. The second security key generated by the second electronic device based on the hash value of the electronic device, the change in the ambient magnetic field, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation is the same. This ensures that multiple electronic devices generate their own security keys without having to transmit them wirelessly, preventing the keys from being leaked during transmission and thus ensuring the security of information exchange between electronic devices.

[0055] In some embodiments, step 102 above, calculating the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation, includes:

[0056] Step 1021: Perform a hash calculation on the user identifier of the first electronic device to obtain the first hash value;

[0057] Here, the user identifier of the first electronic device A can be represented as UIDA. A hash calculation is performed on the user identifier of the first electronic device to obtain the first hash value, which can be represented as: HUIDA = Hash(UIDA).

[0058] Step 1022: Receive the second hash value sent by the second electronic device;

[0059] The second hash value is generated from the user identifier of the second electronic device.

[0060] Here, the user identifier of the second electronic device B can be represented as UIDB. The second hash value can be represented as: HUIDB = Hash(UIDB).

[0061] Step 1023: Perform a hash calculation on the first information to obtain a third hash value;

[0062] In the first information, the first change in the environmental magnetic field is represented by Ma, the first timestamp data is represented by Ta, and the first Bluetooth distance range information is represented by Ra. Here, the first information is hashed to obtain the third hash value, which can be represented as HMTRa = Hash(Ma + Ta + Ra).

[0063] Step 1024: Determine the first locking key based on the first data feature information;

[0064] See Figure 2 This is a waveform diagram showing the data characteristic information of device A and device B. From... Figure 2 As can be seen, the waveforms of the data characteristic information of device A and device B are similar, meaning that the shaking data obtained by device A and device B through the shaking operation are similar.

[0065] As an optional implementation, step 1024 may specifically include:

[0066] The first data feature information is quantized to obtain the first locking key.

[0067] Here, shaking data is obtained through a shaking operation, and first data feature information is extracted from the shaking data.

[0068] Optionally, the first data feature information includes the feature information of the following data: the starting data, peak data, trough data, zero-crossing point data, and ending data of the shaking data.

[0069] Optionally, the first data feature information is quantized to obtain a first locking key, including:

[0070] Based on the first data feature information, a first locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0071] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0072] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0073] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0074] See Figure 3 This is a schematic diagram illustrating the quantification process of data feature information of device A and device B. Figure 3 The red circle represents the feature data corresponding to device A (i.e., the data included in the first data feature information), and the blue circle represents the feature data corresponding to device B (i.e., the data included in the second data feature information).

[0075] It should be noted that, Figure 3 In the diagram, when the circle (data) falls between the blue dashed line (negative quantization threshold) and the green dashed line (positive quantization threshold), it indicates that the key at that position is 0; when the circle (data) is below the blue dashed line, the key value is -1; when the circle (data) is above the green dashed line, the key value is 1.

[0076] For example, the first electronic device is device A, and the second electronic device is device B, see [reference needed]. Figure 3 The quantization key sequence for device A is [0,1,0,-1,0,1,0,-1,0,1,0], and the quantization key sequence for device B is [0,1,0,-1,0,1,0,-1,0,1,0]. Therefore, the final first locking key KA is [0,1,0,-1,0,1,0,-1,0,1,0], and the second locking key KB is [0,1,0,-1,0,1,0,-1,0,1,0].

[0077] Step 1025: Obtain the first security key based on the first hash value, the second hash value, the third hash value, and the first locking key.

[0078] This step may specifically include: performing a hash calculation on the first locking key to obtain a fifth hash value; and obtaining a first security key based on the first hash value, the second hash value, the third hash value, and the fifth hash value.

[0079] Here, the fifth hash value can be represented as HKA = Hash(KA).

[0080] Specifically, the first hash value is XORed with the second hash value, and then concatenated with the third and fifth hash values ​​to obtain the first security key. That is, the first security key HKeyA = HUIDA. A ⊕HUIDB+HMTRa+HKA.

[0081] As an optional implementation, the method of this application also includes:

[0082] The first hash value is sent to the second electronic device.

[0083] Here, a first hash value is sent to the second electronic device for the purpose of generating a second security key on the second electronic device side.

[0084] In some embodiments, the method of this application further includes:

[0085] Periodically retrieve timestamp data;

[0086] The first security key is updated based on the timestamp data.

[0087] In this embodiment, in order to further enhance the security and randomness of the key, timestamp data is acquired periodically (i.e., periodically). The timestamp data is constantly changing, and the latest timestamp data is acquired periodically. The first information is updated using the timestamp data. Then, the updated first security key is obtained based on the first hash value of the first electronic device, the second hash value of the second electronic device, the updated first information, and the first data feature information corresponding to the shake operation.

[0088] Similarly, the second electronic device also periodically acquires timestamp data and updates the second security key based on the timestamp data. The update cycles for the timestamp data on both the first and second electronic devices are the same, and the updated first and second security keys are identical.

[0089] In some embodiments, the method of this application further includes:

[0090] Receive the second ciphertext sent by the second electronic device;

[0091] Based on the first security key, the second ciphertext is decrypted to obtain the decrypted second information.

[0092] Here, the second ciphertext sent by the second electronic device is the second ciphertext encrypted with the second security key. Since the second security key is the same as the first security key (as can be seen from the above analysis), the second ciphertext can be successfully decrypted based on the first security key, yielding the decrypted second information.

[0093] By using the information sharing method of this application, multiple electronic devices can generate their own security keys without having to transmit them wirelessly, thus preventing the keys from being leaked during transmission and ensuring the security of information exchange between electronic devices.

[0094] like Figure 4As shown in the illustration, this application also provides an information sharing method, which is applied to a second electronic device, i.e., the method is executed by the second electronic device. Specifically, the method may include:

[0095] Step 401: When the second electronic device performs a shake operation, acquire second information; the second information includes at least one of the following: second environmental magnetic field change, second timestamp data, and second Bluetooth distance range information.

[0096] Step 402: Calculate the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation;

[0097] It should be noted that the principle of generating the second security key on the second electronic device side is the same as that on the first electronic device side. For details, please refer to the explanation on the first electronic device side, which will not be repeated here.

[0098] Step 403: Receive the first encrypted message sent by the first electronic device;

[0099] Step 404: Based on the second security key, the first ciphertext is decrypted to obtain the decrypted first information.

[0100] Here, the first ciphertext sent by the first electronic device is the first ciphertext encrypted with the first security key. Since the first security key generated by the first electronic device and the second security key generated by the second electronic device are the same (as can be seen from the analysis of the first electronic device), the first ciphertext can be successfully decrypted based on the second security key, yielding the decrypted first information.

[0101] The information sharing method of this application embodiment obtains second information when the second electronic device performs a shake operation. The second information includes at least one of a second environmental magnetic field change, a second timestamp data, and a second Bluetooth distance range. Then, a second security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation. Since the first security key generated by the first electronic device based on the hash value of the electronic device, the environmental magnetic field change, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation is the same as the second security key generated by the second electronic device, the second security key is the same. Therefore, when the first ciphertext sent by the first electronic device is received, the second ciphertext can be decrypted based on the second security key, and the decrypted second information can be obtained. This ensures that multiple electronic devices generate their own security keys without wireless transmission, preventing the keys from being leaked during transmission and thus ensuring the security of information interaction between electronic devices.

[0102] In some embodiments, step 402 above, calculating the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation, includes:

[0103] Step 4021: Receive the first hash value sent by the first electronic device;

[0104] Here, the user identifier of the first electronic device A can be represented as UIDA. The first hash value can be represented as: HUIDA = Hash(UIDA).

[0105] Step 4022: Perform a hash calculation on the user identifier of the second electronic device to obtain the second hash value;

[0106] Here, the user identifier of the second electronic device B can be represented as UIDB. A hash calculation is performed on the user identifier of the second electronic device to obtain a second hash value, which can be represented as HUIDB = Hash(UIDB).

[0107] Step 4023: Perform a hash calculation on the second information to obtain a fourth hash value;

[0108] In the second information, the change in the second environmental magnetic field is represented by Mb, the first timestamp data is represented by Tb, and the first Bluetooth distance range information is represented by Rb. Here, the second information is hashed to obtain the fourth hash value, which can be represented as HMTRb = Hash(Mb + Tb + Rb).

[0109] Step 4024: Determine the second locking key based on the second data feature information;

[0110] As an optional implementation, step 4024 may specifically include:

[0111] The second data feature information is quantized to obtain the second locking key.

[0112] In some embodiments, this step, which quantizes the second data feature information to obtain a second locking key, includes:

[0113] Based on the second data feature information, a second locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0114] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0115] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0116] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0117] Analysis from the first electronic device shows that the second locking key KB is the same as the first locking key KA.

[0118] Step 4025: Obtain the second security key based on the first hash value, the second hash value, the fourth hash value, and the second locking key.

[0119] This step may specifically include: performing a hash calculation on the second locking key to obtain a sixth hash value; and obtaining a second security key based on the first hash value, the second hash value, the fourth hash value, and the sixth hash value.

[0120] Here, the sixth hash value can be represented as HKB = Hash(KB).

[0121] Specifically, the first hash value and the second hash value are XORed together, and then concatenated with the fourth and sixth hash values ​​to obtain the second security key. That is, the first security key HKeyB = HUIDA. A ⊕HUIDB+HMTRb+HKB.

[0122] As an optional implementation, the method of this application also includes:

[0123] Send the second hash value to the first electronic device.

[0124] Here, a second hash value is sent to the first electronic device for the purpose of generating a first security key on the first electronic device side.

[0125] In some embodiments, the method of this application further includes:

[0126] Periodically retrieve timestamp data;

[0127] The second security key is updated based on the timestamp data.

[0128] In this embodiment, in order to further enhance the security and randomness of the key, timestamp data is acquired periodically (i.e., periodically). The timestamp data is constantly changing, and the latest timestamp data is acquired periodically. The second information is updated using the timestamp data. Then, the updated second security key is obtained based on the first hash value of the first electronic device, the second hash value of the second electronic device, the updated second information, and the second data feature information corresponding to the shake operation.

[0129] Similarly, the first electronic device also periodically acquires timestamp data and updates the first security key based on the timestamp data. The update cycles for the timestamp data on both the first and second electronic devices are the same, and the updated second security key is identical to the updated first security key.

[0130] In some embodiments, the method of this application further includes:

[0131] Based on the second security key, the second information is symmetrically encrypted to obtain the second ciphertext;

[0132] Send the second ciphertext.

[0133] Since the first security key is the same as the second security key, the first electronic device can decrypt the second ciphertext after receiving the second ciphertext based on the first security key, and successfully decrypt the second ciphertext to obtain the decrypted second information.

[0134] See Figure 5 The following example illustrates the specific implementation process of the information sharing method of this application from the perspective of interaction between smart terminals (i.e., electronic devices).

[0135] exist Figure 5 The example includes the dynamic key update process of the smart terminal and the information security interaction process of the smart terminal.

[0136] The specific process for dynamically updating the key on a smart terminal is as follows:

[0137] Multiple users in the same environment simultaneously shake their respective smart terminals. The multiple smart terminal systems recognize the shake event and then execute step 501.

[0138] Step 501: Smart terminal A uses its own UIDA to generate HUIDA, i.e., HUIDA = Hash(UIDA). Similarly, smart terminal B uses its own UIDB to generate HUIDB, i.e., HUIDB = Hash(UIDB). Smart terminal C uses its own UIDC to generate HUIDC, i.e., HUIDC = Hash(UIDC).

[0139] Step 502: Smart terminal C sends HUIDC to the master device smart terminal A, and at the same time, smart terminal B sends HUIDB to the master device smart terminal A.

[0140] Step 503: After the master device smart terminal A has received all the HUIDx from all the smart terminals, it then sends HUIDx to all the slave device smart terminals x.

[0141] That is, smart terminal A sends UIDA and UIDC to smart terminal B, and smart terminal A sends UIDA and UIDB to smart terminal C.

[0142] Step 504: Smart terminal A acquires the environmental magnetic field change information Ma, the timestamp data of more than 100 digits Ta, and the Bluetooth distance range information Ra, and generates HMTRa, i.e., HMTRa = Hash(Ma + Ta + Ra); similarly, smart terminals B and C are similar: HMTRb = Hash(Mb + Tb + Rb); HMTRc = Hash(Mc + Tc + Rc).

[0143] Step 505: Smart terminal A extracts the data feature information corresponding to the shake operation, quantifies the data feature information, and generates the locking key KA; similarly, smart terminals B and C do the same.

[0144] Step 506: Generate HKA, i.e., HKA = Hash(KA); similarly, smart terminals B and C generate HKB = Hash(KB) and HKC = Hash(KC).

[0145] Step 507: Each smart terminal generates its own security key, namely, the security key HKeyA of smart terminal A is generated, HKeyA = HUIDA⊕HUIDB⊕HUIDC+HMTRb+HKA; similarly, smart terminals B and C generate security keys HKeyB = HUIDA⊕HUIDB⊕HUIDC+HMTRb+HKB and HKeyC = HUIDA⊕HUIDB⊕HUIDC+HMTRc+HKC, respectively.

[0146] The information security interaction process of the smart terminal is as follows:

[0147] Step 508: The information that smart terminal A needs to transmit is represented by Msga. The information Msga that needs to be transmitted is symmetrically encrypted using the dynamically generated HKeyA to obtain EMsga, that is, EMsga = AES-enc(HkeyA, Msga). Then, the encrypted information EMsga is sent to smart terminal B and smart terminal C.

[0148] Step 509: After receiving the encrypted information EMsga from smart terminal A, smart terminal B decrypts it using its own key HKeyB, i.e., Msga = AES - dec(HKeyB, EMsga), to obtain the plaintext information Msga from smart terminal A. Similarly, after receiving the encrypted information EMsga from smart terminal A, smart terminal C decrypts it using its own key HKeyC, i.e., Msga = AES - dec(HKeyC, EMsga), to obtain the plaintext information Msga from smart terminal A.

[0149] Step 510: Similarly, the information that smart terminal B needs to transmit is represented by Msgb. The information Msgb is symmetrically encrypted using its own key HKeyB to obtain EMsgb, i.e., EMsgb = AES - enc(HkeyB, Msgb). Then, the encrypted information EMsgb is sent to smart terminal A. Similarly, the information that smart terminal C needs to transmit is represented by Msgc. The information Msgc is symmetrically encrypted using its own key HKeyC to obtain EMsgc, i.e., EMsgc = AES - enc(HkeyC, Msgc). Then, the encrypted information EMsgc is sent to smart terminal A.

[0150] Step 511: After receiving the encrypted information EMsgb from smart terminal B, smart terminal A decrypts it using its own key HKeyA, i.e., Msgb = AES - dec(HKeyA, EMsgb), to obtain the plaintext information Msgb from smart terminal B. Similarly, smart terminal C does the same.

[0151] The keys for smart terminals are dynamically generated based on sensor data, changes in the ambient magnetic field, timestamp data, and Bluetooth range information. Therefore, the keys are generated in real-time, and the user is unaware of the generation process. Furthermore, the keys are never transmitted wirelessly, preventing leakage during transmission. These two unique methods enhance the security of information exchange between smart terminals.

[0152] The information sharing method provided in this application can be executed by an information sharing device. This application uses an information sharing device to perform the information sharing method as an example to illustrate the information sharing device provided in this application.

[0153] like Figure 6 As shown in the figure, this application embodiment also provides an information sharing device, which is applied to a first electronic device.

[0154] The device 600 may include:

[0155] The first acquisition module 601 is used to acquire first information when the first electronic device performs a shake operation; wherein the first information includes at least one of the following: a first change in the ambient magnetic field, a first timestamp data, and a first Bluetooth distance range information;

[0156] The first processing module 602 is used to calculate the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation;

[0157] The second processing module 603 is used to perform symmetric encryption on the first information based on the first security key to obtain the first ciphertext;

[0158] The first sending module 604 is used to send the first ciphertext.

[0159] Optionally, the first processing module 602 includes:

[0160] The first computing unit is used to perform a hash calculation on the user identifier of the first electronic device to obtain the first hash value;

[0161] The first receiving unit is configured to receive the second hash value sent by the second electronic device;

[0162] The second calculation unit is used to perform hash calculation on the first information to obtain a third hash value;

[0163] The first processing unit is configured to determine the first locking key based on the first data feature information;

[0164] The third calculation unit is used to calculate the first security key based on the first hash value, the second hash value, the third hash value, and the first locking key.

[0165] Optionally, the apparatus of this application further includes:

[0166] The second sending module is used to send the first hash value to the second electronic device.

[0167] Optionally, the first processing unit is specifically used for:

[0168] The first data feature information is quantized to obtain the first locking key.

[0169] Optionally, the first processing unit is also specifically used for:

[0170] Based on the first data feature information, a first locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0171] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0172] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0173] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0174] Optionally, the apparatus of this application further includes:

[0175] The third acquisition module is used to periodically acquire timestamp data;

[0176] The first key update module is used to update the first security key based on the timestamp data.

[0177] Optionally, the apparatus of this application further includes:

[0178] The second receiving module is used to receive the second ciphertext sent by the second electronic device;

[0179] The first decryption module is used to decrypt the second ciphertext based on the first security key to obtain the decrypted second information.

[0180] The information sharing device of this application embodiment acquires first information when the first electronic device performs a shake operation. The first information includes at least one of a first environmental magnetic field change, a first timestamp data, and a first Bluetooth distance range information. Then, a first security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation. Finally, the first information is symmetrically encrypted based on the first security key to obtain a first ciphertext. The first ciphertext is then sent. In this way, a unique security key is generated using the environmental magnetic field change, timestamp data, and Bluetooth distance range information of the first electronic device at that time. Finally, the information to be exchanged is encrypted using symmetric encryption and then transmitted to the second electronic device, thereby ensuring secure information transmission.

[0181] like Figure 7 As shown in the figure, this application embodiment also provides an information sharing device, which is applied to a second electronic device.

[0182] The device 700 may include:

[0183] The second acquisition module 701 is used to acquire second information when the second electronic device performs a shake operation; the second information includes at least one of the following: a second environmental magnetic field change, a second timestamp data, and second Bluetooth distance range information.

[0184] The third processing module 702 is used to calculate the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation;

[0185] The first receiving module 703 is used to receive the first ciphertext sent by the first electronic device;

[0186] The fourth processing module 704 is used to decrypt the first ciphertext based on the second security key to obtain the decrypted first information.

[0187] Optionally, the third processing module 702 includes:

[0188] The second receiving unit is used to receive the first hash value sent by the first electronic device;

[0189] The fourth calculation unit is used to perform a hash calculation on the user identifier of the second electronic device to obtain the second hash value;

[0190] The fifth calculation unit is used to perform a hash calculation on the second information to obtain a fourth hash value;

[0191] The second processing unit is used to determine the second locking key based on the second data feature information;

[0192] The sixth calculation unit is used to calculate the second security key based on the first hash value, the second hash value, the fourth hash value, and the second locking key.

[0193] Optionally, the apparatus of this application further includes:

[0194] The third sending module is used to send the second hash value to the first electronic device.

[0195] Optionally, the second processing unit is specifically used for:

[0196] The second data feature information is quantized to obtain the second locking key.

[0197] Optionally, the second processing unit is also specifically used for:

[0198] Based on the second data feature information, a second locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0199] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0200] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0201] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0202] Optionally, the apparatus of this application further includes:

[0203] The fourth acquisition module is used to periodically acquire timestamp data;

[0204] The second key update module is used to update the second security key based on the timestamp data.

[0205] Optionally, the apparatus of this application further includes:

[0206] The first encryption module is used to perform symmetric encryption on the second information based on the second security key to obtain the second ciphertext;

[0207] The fourth sending module is used to send the second ciphertext.

[0208] The information sharing device of this application embodiment acquires second information when the second electronic device performs a shake operation. The second information includes at least one of a second environmental magnetic field change, a second timestamp data, and a second Bluetooth distance range. Then, a second security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation. Since the first security key generated by the first electronic device based on the hash value of the electronic device, the environmental magnetic field change, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation is the same as the second security key generated by the second electronic device, the device can successfully decrypt the second ciphertext sent by the first electronic device by decrypting the second ciphertext based on the second security key, thus obtaining the decrypted second information. This ensures that multiple electronic devices generate their own security keys without wireless transmission, preventing key leakage during transmission and ensuring the security of information interaction between electronic devices.

[0209] The information sharing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0210] The information sharing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0211] The information sharing device provided in this application embodiment can achieve... Figure 1 or Figure 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0212] Optionally, such as Figure 8 As shown, this application embodiment also provides an electronic device 800, which may be a first electronic device or a second electronic device, including a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, they implement the various steps of the above-described information sharing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0213] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0214] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0215] The electronic device 900 is a first electronic device or a second electronic device, including but not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910, etc.

[0216] Those skilled in the art will understand that the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0217] When the electronic device is the first electronic device, the processor 910 is used for:

[0218] When the first electronic device performs a shake operation, first information is acquired; the first information includes at least one of the following: first environmental magnetic field change, first timestamp data, and first Bluetooth distance range information.

[0219] The first security key is calculated based on the first hash value of the first electronic device, the first hash value of the second electronic device, the first information, and the first data feature information corresponding to the shake operation.

[0220] Based on the first security key, the first information is symmetrically encrypted to obtain the first ciphertext;

[0221] Send the first ciphertext.

[0222] The first electronic device in this application uses the change in the ambient magnetic field, timestamp data, and Bluetooth range information of the first electronic device at that time to generate a unique security key. Finally, it uses symmetric encryption to encrypt the information to be exchanged and then transmits it to the second electronic device, thereby ensuring secure information transmission.

[0223] Optionally, the processor 910 is also used for:

[0224] The user identifier of the first electronic device is hashed to obtain the first hash value;

[0225] The second hash value sent by the second electronic device is received through the radio frequency unit 901;

[0226] Perform a hash calculation on the first information to obtain a third hash value;

[0227] Based on the first data feature information, determine the first locking key;

[0228] The first security key is calculated based on the first hash value, the second hash value, the third hash value, and the first locking key.

[0229] Optionally, the radio frequency unit 901 is also used for:

[0230] The first hash value is sent to the second electronic device.

[0231] Optionally, the processor 910 is also used for:

[0232] The first data feature information is quantized to obtain the first locking key.

[0233] Optionally, the processor 910 is also used for:

[0234] Based on the first data feature information, a second locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0235] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0236] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0237] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0238] Optionally, the processor 910 is also used for:

[0239] Periodically retrieve timestamp data;

[0240] The first security key is updated based on the timestamp data.

[0241] Optionally, the processor 910 is also used for:

[0242] The second ciphertext sent by the second electronic device is received through the radio frequency unit 901;

[0243] Based on the first security key, the second ciphertext is decrypted to obtain the decrypted second information.

[0244] When the electronic device is a second electronic device, the processor 910 is used for:

[0245] When the second electronic device performs a shake operation, second information is acquired; the second information includes at least one of the following: second environmental magnetic field change, second timestamp data, and second Bluetooth distance range information.

[0246] The second security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation.

[0247] Receive the first ciphertext sent by the first electronic device;

[0248] Based on the second security key, the first ciphertext is decrypted to obtain the decrypted first information.

[0249] In this embodiment of the application, the second electronic device generates a first security key based on the hash value of the first electronic device, the change in the ambient magnetic field, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation. The second security key generated by the second electronic device is the same as that generated by the first electronic device based on the hash value of the first electronic device, the change in the ambient magnetic field, the timestamp data, the Bluetooth distance range information, and the data feature information corresponding to the shake operation. Therefore, when the first ciphertext sent by the first electronic device is received, the second ciphertext can be decrypted based on the second security key, and the decrypted second information can be obtained. This ensures that multiple electronic devices generate their own security keys without wireless transmission, preventing the keys from being leaked during transmission and thus ensuring the security of information interaction between electronic devices.

[0250] Optionally, the processor 910 is also used for:

[0251] The first hash value sent by the first electronic device is received through the radio frequency unit 901;

[0252] The user identifier of the second electronic device is hashed to obtain the second hash value;

[0253] Perform a hash calculation on the second information to obtain the fourth hash value;

[0254] Based on the second data feature information, determine the second locking key;

[0255] The second security key is calculated based on the first hash value, the second hash value, the fourth hash value, and the second locking key.

[0256] Optionally, the radio frequency unit 901 is also used for:

[0257] The second hash value is sent to the first electronic device.

[0258] Optionally, the processor 910 is also used for:

[0259] The second data feature information is quantized to obtain the second locking key.

[0260] Optionally, the processor 910 is also used for:

[0261] Based on the second data feature information, a second locking key is determined using a preset quantization rule; wherein the preset quantization rule is:

[0262] If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1;

[0263] If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1;

[0264] If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

[0265] Optionally, the processor 910 is also used for:

[0266] Periodically retrieve timestamp data;

[0267] The second security key is updated based on the timestamp data.

[0268] Optionally, the processor 910 is also used for:

[0269] Based on the second security key, the second information is symmetrically encrypted to obtain the second ciphertext;

[0270] Send the second ciphertext.

[0271] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0272] The memory 909 can be used to store software programs and various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0273] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.

[0274] This application embodiment also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the above-described functionality. Figure 1 The various processes or implementations of the information sharing method embodiments shown above Figure 4 The various processes of the information sharing method embodiments shown are all capable of achieving the same technical effect, and will not be described again here to avoid repetition.

[0275] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0276] This application embodiment also provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the above. Figure 1 The various processes or implementations of the information sharing method embodiments shown above Figure 4 The various processes of the information sharing method embodiments shown are all capable of achieving the same technical effect, and will not be described again here to avoid repetition.

[0277] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0278] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the above-described functionality. Figure 1 The various processes or implementations of the information sharing method embodiments shown above Figure 4 The various processes of the information sharing method embodiments shown are all capable of achieving the same technical effect, and will not be described again here to avoid repetition.

[0279] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0280] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0281] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An information sharing method applied to a first electronic device, characterized in that, include: When the first electronic device performs a shake operation, first information is obtained; The first information includes at least one of the following: first environmental magnetic field change, first timestamp data, and first Bluetooth range information; The first security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information of the shake operation. Based on the first security key, the first information is symmetrically encrypted to obtain the first ciphertext; Send the first ciphertext.

2. The method according to claim 1, characterized in that, The calculation of the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the data feature information corresponding to the shake operation includes: The user identifier of the first electronic device is hashed to obtain the first hash value; Receive the second hash value sent by the second electronic device; Perform a hash calculation on the first information to obtain a third hash value; Based on the first data feature information, determine the first locking key; The first security key is calculated based on the first hash value, the second hash value, the third hash value, and the first locking key.

3. The method according to claim 2, characterized in that, The method further includes: The first hash value is sent to the second electronic device.

4. The method according to claim 2, characterized in that, Determining the first locking key based on the first data feature information includes: The first data feature information is quantized to obtain the first locking key.

5. The method according to claim 4, characterized in that, The step of quantizing the first data feature information to obtain the first locking key includes: Based on the first data feature information, a first locking key is determined using a preset quantization rule; wherein the preset quantization rule is: If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1; If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1; If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

6. The method according to claim 1, characterized in that, The method further includes: Periodically retrieve timestamp data; The first security key is updated based on the timestamp data.

7. The method according to claim 1, characterized in that, The method further includes: Receive the second ciphertext sent by the second electronic device; Based on the first security key, the second ciphertext is decrypted to obtain the decrypted second information.

8. An information sharing method applied to a second electronic device, characterized in that, include: When the second electronic device performs a shake operation, the second information is obtained; The second information includes at least one of the following: a second environmental magnetic field change, a second timestamp data, and a second Bluetooth range information; The second security key is calculated based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation. Receive the first ciphertext sent by the first electronic device; Based on the second security key, the first ciphertext is decrypted to obtain the decrypted first information.

9. The method according to claim 8, characterized in that, The calculation of the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation includes: Receive the first hash value sent by the first electronic device; The user identifier of the second electronic device is hashed to obtain the second hash value; Perform a hash calculation on the second information to obtain the fourth hash value; Based on the second data feature information, determine the second locking key; The second security key is calculated based on the first hash value, the second hash value, the fourth hash value, and the second locking key.

10. The method according to claim 9, characterized in that, The method further includes: The second hash value is sent to the first electronic device.

11. The method according to claim 9, characterized in that, The step of determining the second locking key based on the second data feature information includes: The second data feature information is quantized to obtain the second locking key.

12. The method according to claim 11, characterized in that, The step of quantizing the second data feature information to obtain the second locking key includes: Based on the second data feature information, a second locking key is determined using a preset quantization rule; wherein the preset quantization rule is: If the data is greater than or equal to the positive quantization threshold, then the key corresponding to the data is 1; If the data is less than or equal to the negative quantization threshold, the key corresponding to the data is -1; If the data falls between the positive quantization threshold and the negative quantization threshold, the corresponding key for the data is 0.

13. The method according to claim 8, characterized in that, The method further includes: Periodically retrieve timestamp data; The second security key is updated based on the timestamp data.

14. The method according to claim 8, characterized in that, The method further includes: Based on the second security key, the second information is symmetrically encrypted to obtain the second ciphertext; Send the second ciphertext.

15. An information sharing device, applied to a first electronic device, characterized in that, include: The first acquisition module is used to acquire first information when the first electronic device performs a shake operation; The first information includes at least one of the following: first environmental magnetic field change, first timestamp data, and first Bluetooth range information; The first processing module is configured to calculate the first security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the first information, and the first data feature information of the shake operation; The second processing module is used to perform symmetric encryption on the first information based on the first security key to obtain the first ciphertext; The first sending module is used to send the first ciphertext.

16. The apparatus according to claim 15, characterized in that, The first processing module includes: The first computing unit is used to perform a hash calculation on the user identifier of the first electronic device to obtain the first hash value; The first receiving unit is configured to receive the second hash value sent by the second electronic device; The second calculation unit is used to perform hash calculation on the first information to obtain a third hash value; The first processing unit is configured to determine the first locking key based on the first data feature information; The third calculation unit is used to calculate the first security key based on the first hash value, the second hash value, the third hash value, and the first locking key.

17. An electronic device, wherein the electronic device is a first electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the information sharing method as described in any one of claims 1 to 7.

18. An information sharing device, applied to a second electronic device, characterized in that, include: The second acquisition module is used to acquire second information when the second electronic device performs a shake operation; The second information includes at least one of the following: a second environmental magnetic field change, a second timestamp data, and a second Bluetooth range information; The third processing module is used to calculate the second security key based on the first hash value of the first electronic device, the second hash value of the second electronic device, the second information, and the second data feature information corresponding to the shake operation; The first receiving module is used to receive the first encrypted text sent by the first electronic device; The fourth processing module is used to decrypt the first ciphertext based on the second security key to obtain the decrypted first information.

19. The apparatus according to claim 18, characterized in that, The third processing module includes: The second receiving unit is used to receive the first hash value sent by the first electronic device; The fourth calculation unit is used to perform a hash calculation on the user identifier of the second electronic device to obtain the second hash value; The fifth calculation unit is used to perform a hash calculation on the second information to obtain a fourth hash value; The second processing unit is used to determine the second locking key based on the second data feature information; The sixth calculation unit is used to calculate the second security key based on the first hash value, the second hash value, the fourth hash value, and the second locking key.

20. An electronic device, wherein the electronic device is a second electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the information sharing method as described in any one of claims 8 to 14.

21. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the information sharing method as described in any one of claims 1 to 7, or implement the steps of the information sharing method as described in any one of claims 8 to 14.

22. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the information sharing method as described in any one of claims 1 to 7, or implement the steps of the information sharing method as described in any one of claims 8 to 14.