Communication method, electronic equipment and readable storage medium
By caching and utilizing far-field communication synchronization messages when the near-field communication is disconnected, the message synchronization problem between electronic devices is solved, which improves synchronization success rate and user experience, while saving device power consumption.
Patent Information
- Application Number
- CN202310859178.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
When the near-field communication between electronic devices is disconnected, timely synchronization of messages cannot be achieved, affecting the user experience and the success rate of message synchronization.
When the near-field communication is disconnected, the messages corresponding to the subscription request are detected and cached, and after establishing a far-field communication connection, the messages are synchronized in time, and the cached messages are transmitted using the far-field communication.
It improves the success rate of message synchronization between the mobile phone and the smartwatch, improves the user experience, and switches to near-field communication for synchronization when the near-field communication is reconnected, reducing the power consumption of electronic devices.
Smart Images

Figure CN119316921A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a communication method, an electronic device and a readable storage medium. Background Art
[0002] With the development of communication technology, when the distance between multiple electronic devices meets the distance requirement of near field communication, near field (short distance) communication technology can be used for communication to achieve message synchronization between multiple electronic devices. Figure 1A In the present invention, the mobile phone 10 and the smart watch 20 can communicate using Bluetooth (near field communication technology), and then the smart watch can receive messages from the mobile phone to achieve message synchronization between the mobile phone and the smart watch. For example, the mobile phone 10 can synchronize the notification message to the smart watch 20 after receiving the SMS notification of a missed call, and then the smart watch 20 can synchronously receive the notification message from the mobile phone.
[0003] However, when the distance between the smart watch 20 and the mobile phone 10 increases, the Bluetooth communication between them is disconnected, for example Figure 1B In this case, the smart watch 20 cannot receive notification messages from the mobile phone 10, and thus cannot synchronize messages between the mobile phone and the smart watch and process them in a timely manner, which affects the user experience of obtaining synchronization messages based on the smart watch. Summary of the invention
[0004] To solve the above problems, embodiments of the present application provide a communication method, an electronic device, and a readable storage medium.
[0005] In a first aspect, the present application provides a communication method, in which a first communication connection is established between a first electronic device and a second electronic device based on a first communication mode, and the first electronic device sends a subscription request to the second electronic device; the first communication connection between the first electronic device and the second electronic device is disconnected; the second electronic device detects a first message corresponding to the first subscription request and stores the first message; the second electronic device establishes a second communication connection with the first electronic device based on a second communication mode, and the second electronic device sends a first message to the first electronic device, wherein the second communication mode includes a long-distance communication mode.
[0006] In some embodiments, the first communication mode may be near field communication, and the second communication mode may be far field communication. A near field communication connection is established between the first electronic device and the second electronic device based on the near field communication. The first electronic device sends a subscription request to the second electronic device. The content of the subscription request may include the message type and message format of the message from the second electronic device that the first electronic device needs to obtain under the far field communication. For example, the message type of the synchronized message may be a text message notification message, an incoming call notification message, and a yoyo card prompt message. When the near field communication connection is disconnected, the second electronic device detects the first message corresponding to the first subscription request and stores the first message. For example, the first subscription request is a subscription short message notification message, and the first message is a text message notification message, and the text message notification message is stored. When the first electronic device establishes a far field communication connection with the second electronic device, the second electronic device may send the first message to the first electronic device.
[0007] In some embodiments, when a second electronic device establishes a second communication connection with a first electronic device based on a second communication method, and the first electronic device receives a first message sent by the second electronic device, the second electronic device can send a notification message to the first electronic device based on the second communication connection indicating that the first message has been successfully received, and the second electronic device can determine that the first message has been successfully sent based on the notification message sent by the first electronic device. For example, when a first electronic device (such as a watch) receives a first message (such as a text message notification message) from a second electronic device (such as a mobile phone), the first electronic device can send a notification message to the second electronic device indicating that the first message has been successfully received, so that the second electronic device can determine that the first message has been successfully sent based on the above notification message.
[0008] In other embodiments, when the first electronic device (e.g., a watch) supports the second communication mode, i.e., far-field communication, the first electronic device may send a request to the second electronic device to establish a second communication connection, and the second electronic device may respond to the request to establish the second communication connection sent by the first electronic device, and when the second electronic device (e.g., a mobile phone) also supports the second communication mode, the first electronic device and the second electronic device may establish a second communication connection.
[0009] Based on the above scheme, far-field communication can be established when near-field communication is disconnected, and the message corresponding to the subscription request can be cached when the near-field communication is disconnected. After the far-field communication is established, the message can be synchronized based on the far-field communication in time, so that the user can obtain the synchronized message in time, thereby improving the success rate of message synchronization between the mobile phone and the smart watch.
[0010] In a possible implementation of the first aspect above, a first electronic device sends a subscription request to a second electronic device; including: the first electronic device determines whether the first electronic device supports a second communication method, and corresponding to the first electronic device supporting the second communication method, the first electronic device sends a subscription request to the second electronic device; the subscription request includes at least one of the type of subscription message and the format of the subscription message.
[0011] In some embodiments, before sending a subscription request to a second electronic device, the first electronic device needs to determine that the first electronic device supports far field communication. If it is determined that the first electronic device supports far field communication, the first electronic device may send a subscription request to the second electronic device.
[0012] Based on the above solution, when the first electronic device does not support the second communication mode, the first electronic device does not send a subscription request to the second electronic device, thereby avoiding the problem of process waste.
[0013] In a possible implementation of the first aspect above, the second electronic device detects the first message corresponding to the first subscription request and stores the first message; including: the second electronic device detects the first message corresponding to the first subscription request; determines whether the first communication mode is disconnected; in the case where the first communication mode is disconnected, determines whether there is a first electronic device with a second communication connection relationship; in the case where there is no first electronic device with a second communication connection relationship, stores the first message.
[0014] In some embodiments, when the second electronic device detects the first message corresponding to the first subscription request, the second electronic device needs to determine whether the near-field communication is disconnected, for example, it can determine whether the Bluetooth communication is disconnected. When the near-field communication is disconnected, the second electronic device further determines whether there is a first electronic device that supports far-field communication, and when it is determined that there is no first electronic device that supports far-field communication, the second electronic device stores the detected first message in the second electronic device.
[0015] Based on the above scheme, when the near-field communication between the first electronic device and the second electronic device is disconnected and the far-field communication is not connected, the second electronic device stores the first message in the second electronic device, and then the stored first message can be directly sent to the first electronic device after the near-field connection or the far-field connection, so as to synchronize the messages in time.
[0016] In a possible implementation of the first aspect above, the method also includes: after storing the first message, corresponding to the presence of a first electronic device with a second communication connection relationship, the second electronic device sends the first message to the first electronic device based on the second communication method; the second electronic device determines whether the first message is sent successfully; corresponding to the first message not being sent successfully, the second electronic device stores the first message.
[0017] In some embodiments, when the second electronic device detects the existence of a first electronic device with a far-field communication connection relationship, the second electronic device can send the first message to the second electronic device based on the far-field communication, and further determine whether the first message is sent successfully. If it is not sent successfully, the first message will still be stored in the second electronic device.
[0018] Based on the above solution, the second electronic device can store the first message if the first message is not sent successfully, and then directly send the stored first message to the first electronic device after the far field connection, so as to synchronize the messages in time.
[0019] In a possible implementation of the first aspect above, the method further includes: after storing the first message, corresponding to the presence of a first electronic device with a first communication connection relationship, the second electronic device sends the first message to the first electronic device based on the first communication method.
[0020] In a possible implementation of the first aspect above, the second electronic device establishes a second communication connection with the first electronic device based on the second communication method, including: the second electronic device detects that the first communication connection is disconnected, and determines whether the first electronic device meets the communication conditions of the second communication method; in response to the first electronic device meeting the communication conditions of the second communication method, the first electronic device registers the device information of the first electronic device on the server; in response to the second electronic device having registered the device information of the second electronic device on the server, the first electronic device and the second electronic device perform account authentication; in response to the first electronic device and the second electronic device successfully authenticating the same account, the second electronic device establishes a second communication channel of the second communication method with the first electronic device.
[0021] In some embodiments, when the first electronic device and the second electronic device register device information on the server, i.e., the cloud side, device verification is required. PKI authentication can be used on the cloud-authenticated device side; and certificates can be used to authenticate the cloud on the device side. And after authenticating the device side based on the cloud and the cloud on the device side, end-to-end authentication is required between the device sides. For example, same-account authentication can be used, i.e., the account logged in between the first electronic device and the second electronic device needs to be the same account, and a key negotiation algorithm can be used for end-to-end authentication to enable far-field communication between end-to-end devices based on far-field channels.
[0022] In a possible implementation of the first aspect above, the communication conditions of the second communication mode include at least one of the following: the account information corresponding to the account logged in to the first electronic device is the same as the account information corresponding to the account logged in to the second electronic device; the switch corresponding to the second communication mode in the first electronic device is in the on state; the first communication mode connection is in the disconnected state; the first electronic device is in the network state.
[0023] In a possible implementation of the first aspect above, the second electronic device determines that the storage time of the first message is greater than or equal to a preset time, and deletes the first message.
[0024] Based on the above scheme, when the second electronic device detects that the first message is stored in the second electronic device for longer than the preset storage time, the first message can be cleared in time to reduce the power consumption of the second electronic device and save the storage resources of the second electronic device.
[0025] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions; a processor for executing instructions to implement the communication method provided in the first aspect and any possible implementation of the first aspect.
[0026] In a third aspect, the present application provides a readable storage medium having instructions stored thereon, which, when executed, enables an electronic device to implement the communication method provided by the first aspect and any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1A According to some embodiments of the present application, a schematic diagram of a scenario of near field communication between a mobile phone and a watch is shown;
[0028] Figure 1B According to some embodiments of the present application, a schematic diagram of a scenario in which near field communication between a mobile phone and a watch is disconnected is shown;
[0029] Figure 1C According to some embodiments of the present application, a schematic diagram of a scenario of far-field communication between a mobile phone and a watch is shown;
[0030] Figure 2 According to some embodiments of the present application, a schematic diagram of a far-field communication system is shown;
[0031] Figure 3 According to some embodiments of the present application, a flow chart of a communication method is shown;
[0032] Figure 4 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0033] Illustrative embodiments of the present application include, but are not limited to, a communication method, an electronic device, and a readable storage medium.
[0034] The technical solution of the present application is described below in conjunction with the accompanying drawings.
[0035] In some embodiments, when two electronic devices are close to each other, data transmission can be performed based on near field communication. When the two electronic devices are far away and cannot perform near field communication, far field communication can be established to perform data transmission through far field communication.
[0036] For example, Figure 1B As shown, taking the mobile phone 10 and the smart watch 20 as an example, the near field communication based on Bluetooth between the mobile phone 10 and the smart watch 20 is disconnected, and the information of the mobile phone 10 cannot be transmitted to the smart watch 20. Then, the far field communication between the mobile phone 10 and the smart watch 20 can be established, and the information is transmitted based on the far field communication, such as Figure 1C As shown, the mobile phone 10 and the smart watch 20 establish far-field communication and transmit information based on the far-field communication.
[0037] Specifically, in some embodiments, the process of establishing far-field communication is generally as follows: first, under near-field communication, the user account is logged in on the mobile phone 10, and then the mobile phone 10 sends a command to synchronize the user account to the mobile phone assistant in the smart watch 20, and then the mobile phone assistant in the smart watch 20 can control the smart watch 20 to log in to the same account based on the command, so that the mobile phone 10 and the smart watch 20 are electronic devices under the same user account, and, under near-field communication, the mobile phone 10 can register the mobile phone 10 in the cloud through the far-field service module on the mobile phone 10. Further, after the smart watch determines that the near-field communication is disconnected, if it is determined that the smart watch 20 has the far-field communication capability, the smart watch 20 registers the smart watch 20 in the cloud through the far-field service module on the smart watch 20, and then the mobile phone 10 and the smart watch 20 can establish a far-field communication connection based on the cloud.
[0038] It can be understood that in some embodiments, when the smart watch 20 supports the second communication mode, i.e., far-field communication, the smart watch 20 can send a request to the mobile phone 10 to establish a far-field communication connection, and then the mobile phone 10 can respond to the request sent by the smart watch 20 to establish a far-field communication connection. When the mobile phone 10 also supports the far-field communication mode, the smart watch 20 and the mobile phone 10 can establish a far-field communication connection.
[0039] Therefore, in order to solve the above-mentioned problem that messages cannot be synchronized in a timely manner due to the disconnection of near-field communication, an embodiment of the present application provides a communication method. In this method, when two electronic devices are in near-field communication, one electronic device (such as a watch) can send a subscription request to another electronic device (such as a mobile phone). The subscription request may include the type and format of the message to be synchronized. After the other electronic device receives the subscription request, when receiving the message corresponding to the subscription request, if it is determined that the near-field communication is disconnected at this time (for example, the near-field communication connection between the two electronic devices is disconnected due to the long distance, etc.), the message corresponding to the subscription request is stored, and after a far-field channel is established between the two electronic devices, the message corresponding to the subscription request is sent to the opposite device through the far-field channel.
[0040] For example, if the smart watch 20 has subscribed to phone notification messages from the mobile phone 20 in advance, then when the near-field communication connection is disconnected, if the mobile phone 10 receives a phone notification message, the phone notification message can be stored. When the mobile phone 10 and the smart watch 20 establish far-field communication, the mobile phone 10 will send the phone notification message to the smart watch 20 through the established far-field channel, i.e., through far-field communication.
[0041] Based on the above scheme, far-field communication can be established when near-field communication is disconnected, and the message corresponding to the subscription request can be cached when the near-field communication is disconnected. After the far-field communication is established, the message can be synchronized based on the far-field communication in time, so that the user can obtain the synchronized message in time, thereby improving the success rate of message synchronization between the mobile phone and the smart watch.
[0042] In some embodiments, when the near field communication is reconnected, the near field communication can be switched immediately to synchronize messages. For example, when the mobile phone detects the Bluetooth connection, the far field communication is stopped, and the near field communication based on Bluetooth is performed to transmit synchronization messages. Since the transmission speed of the near field communication is faster, the message synchronization speed can be increased. Based on this, it is possible to communicate based on only one communication method at the same time, which saves the power consumption of electronic devices, reduces the power consumption of electronic devices, and also improves the user's smart watch experience.
[0043] The far-field communication system mentioned in this application is introduced below. Figure 2 As shown, the system may include a mobile phone terminal, a watch terminal, a business cloud, and a device cloud. Among them:
[0044] The mobile phone terminal may include applications (APPs), such as sports health APPs, message notifications, and far-field message data processing. Among them, the sports health APP may include message notifications and device pairing, and the message notification may receive notifications or request messages from the message notification module; the device pairing may be based on the account information of the mobile phone 10 and the account of the smart watch 20 for pairing.
[0045] Mobile phone message notification can refer to Figure 3 The message service module on the mobile phone can be used to receive messages or requests from the message service module and far-field service module of the mobile phone and watch. Sports health can monitor the current Bluetooth connection status based on message notifications. Message notifications can send a request to establish a far-field channel to the far-field message data processing, and can send synchronization messages to the watch end through the far-field channel.
[0046] Far-field message data processing on the mobile phone can refer to Figure 3 The far-field service module on the mobile phone can be used to encrypt messages transmitted based on the far-field channel.
[0047] The watch side can include a mobile assistant and far-field message data processing. Among them, the mobile assistant on the watch side can include message notifications, device pairing and account login;
[0048] Watch-side far-field message data processing can refer to Figure 3 The far-field service module in the watch can be used to send synchronization messages to the message service module on the watch side to check the reception status of the messages.
[0049] The device cloud can be used to implement device authentication of mobile phones and watches on the cloud side. It can register and authenticate the cloud-side mobile phone based on the mobile phone's far-field message data processing module on the cloud side, and it can register and authenticate the cloud-side watch based on the watch's far-field message data processing on the cloud side.
[0050] The business cloud can establish connections with the business cloud based on the corresponding registered devices of the mobile phone and the watch on the cloud side, and the mobile phone 10 on the cloud side and the smart watch 20 on the cloud side respectively, and then the mobile phone and the watch can establish a far-field channel through the business cloud.
[0051] The communication method mentioned in the embodiments of the present application is introduced in detail below. Figure 3 A flow chart of a communication method is shown. Figure 3 As shown, the specific process of the communication method includes:
[0052] S101: The application software on the mobile phone sends device binding and account synchronization instructions to the mobile assistant on the watch.
[0053] In some embodiments, for example Figure 2 In the process, you can log in to your account in the application software of the mobile phone 10, such as sports health, and the application software sends an instruction to synchronize the account to the mobile assistant of the smart watch 20, so that the mobile phone 10 and the smart watch 20 are logged in with the same account, thereby realizing the account binding of the mobile phone 10 and the smart watch 20.
[0054] It can be understood that the mobile phone 10 application software sports health also includes a message notification function and a device pairing function, wherein the message notification function can receive and respond to messages sent by the message service module of the mobile phone 10 or the smart watch 20. The mobile assistant of the smart watch 20 also includes a message notification function, a device pairing function and an account login function, and the mobile assistant in the smart watch 20 can be used to receive instructions sent by the application software of the mobile phone 10 to control the smart watch 20 to perform operations corresponding to the instructions.
[0055] S102: The mobile assistant on the watch negotiates with the application software on the mobile phone whether the mobile phone supports far-field capability.
[0056] In some embodiments, when the smart watch 20 completes account synchronization with the mobile phone 10, the mobile assistant of the smart watch 20 negotiates with the application software of the mobile phone 10 whether both devices support far-field communication, that is, have far-field communication capabilities.
[0057] S103: After the mobile phone negotiates to support the far field capability, it sends a request to activate the far field service capability to the message service module.
[0058] In some embodiments, when the mobile phone 10 supports far field communication, the application software of the mobile phone 10 sends an instruction to the message service module of the mobile phone 10 to activate the far field service capability of the mobile phone 10. It can be understood that the message service module of the mobile phone 10 can respond to the notification or request sent by the application software of the mobile phone 10 and perform corresponding operations or send corresponding notifications and requests based on the request.
[0059] S104: The message service module on the mobile phone sends an instruction to register the far-field device to the far-field service module.
[0060] In some embodiments, the message service module of the mobile phone 10 sends an instruction to register the mobile phone 10 in the cloud to the far-field service module of the mobile phone 10 based on the instruction sent by its application software to pull up the far-field service capability of the mobile phone 10. It can be understood that the far-field service module can assign a far-field communication address to the mobile phone 10 based on the above instruction, so that the mobile phone 10 can perform far-field communication with other electronic devices through the cloud based on the far-field communication address. For example, in some embodiments, the mobile phone 10 registers the device cloud in the cloud through its far-field service module, that is, registers the mobile phone 10 in the cloud.
[0061] S105: The mobile assistant on the watch determines whether the watch supports far-field communication.
[0062] In some embodiments, based on the fact that the mobile phone 10 has been registered in the cloud and has far-field communication capabilities, the mobile assistant of the smart watch 20 determines whether the smart watch 20 supports far-field communication. If the smart watch 20 supports far-field communication, the process proceeds to step S106, i.e., the mobile assistant of the smart watch 20 subscribes to the message service module of the mobile phone 10 for information such as the type and format of messages that need to be synchronized under far-field communication; and executes step S108, i.e., determining whether the Bluetooth connection of the smart watch 20 is disconnected. If the smart watch 20 does not support far-field communication, the determination process ends.
[0063] S106: The mobile assistant on the watch sends a subscription request to the message service module on the mobile phone for subscribing to the type and format of messages to be synchronized under far field communication.
[0064] In some embodiments, when it is determined that the smart watch 20 supports far field communication, the mobile assistant of the smart watch 20 subscribes to the message service module of the mobile phone 10 for information such as the type and format of messages that need to be synchronized under far field communication. For example, the type of messages that need to be synchronized may be SMS notification messages, incoming call notification messages, yoyo card prompt messages, etc., which are not limited here.
[0065] S107: The message service module on the mobile phone caches the types of messages subscribed by the watch to be synchronized under far field communication.
[0066] In some embodiments, when the message service module of the mobile phone 10 receives a subscription request for information such as the type and format of messages to be synchronized in far-field communication sent by the mobile assistant of the smart watch 20, for example, in some embodiments, when connected to Bluetooth, the mobile assistant of the smart watch 20 can send information such as the type of messages to be synchronized in far-field to the message service module of the mobile phone 10. Further, the mobile phone 10 stores the type of messages to be synchronized subscribed by the smart watch 20 in the mobile phone 10.
[0067] S108: The mobile assistant on the watch determines whether the Bluetooth connection on the watch is disconnected.
[0068] In some embodiments, when it is determined that the smart watch 20 does not support far field communication, the mobile assistant of the smart watch 20 further determines whether the Bluetooth connection of the smart watch 20 is disconnected. For example, in some embodiments, the mobile assistant of the smart watch 20 determines the current Bluetooth connection state and determines whether the Bluetooth is disconnected. If the Bluetooth connection of the smart watch 20 is disconnected, go to step S109, that is, determine whether the smart watch 20 meets the far field communication conditions.
[0069] S109: The mobile assistant on the watch determines whether the watch meets the far-field communication conditions.
[0070] In some embodiments, when it is determined that the Bluetooth connection of the smart watch 20 is disconnected, the mobile assistant of the smart watch 20 further determines whether the smart watch 20 meets the far-field communication conditions. If the smart watch 20 meets the far-field communication conditions, the process goes to step S110, and the mobile assistant of the smart watch 20 sends an instruction to activate the far-field capability of the smart watch 20 to the message service module of the smart watch 20.
[0071] In some embodiments, determining whether the smart watch 20 meets the far-field communication conditions includes: the first far-field communication condition is that the account login status is normal, that is, the account of the smart watch 20 and the mobile phone 10 are the same account; the second far-field communication condition is the far-field message switch status, that is, the switch for the smart watch 20 to receive far-field communication messages is turned on.
[0072] In some embodiments, the third far-field communication condition may be that the Bluetooth connection is disconnected; the fourth far-field communication condition is that the data preparation for the smart watch to carry out modem stationing is completed. It can be understood that stationing means that the electronic device can access the network, that is, the electronic device is in the stationed state.
[0073] S110: The mobile assistant on the watch side sends an instruction to activate the far-field service capability to the message service module on the watch side.
[0074] In some embodiments, when it is determined that the smart watch 20 meets the far-field communication conditions, the mobile phone assistant of the smart watch 20 sends an instruction to activate the far-field capability to the message service module of the smart watch 20.
[0075] S111: The message service module on the watch sends an instruction to register the far-field device to the far-field service module.
[0076] In some embodiments, the message service module of the smart watch 20 sends an instruction to register the smart watch 20 in the cloud to the far-field service module of the smart watch 20 based on the instruction sent by the mobile assistant of the smart watch 20 to pull up the far-field service capability of the smart watch 20. For example, in some embodiments, the smart watch 20 registers the device cloud in the cloud through its far-field service module, that is, registers the smart watch 20 in the cloud.
[0077] In some embodiments, when an electronic device registers a device cloud in the cloud through a far-field service module, device verification is required. PKI (Public Key Infrastructure) authentication can be used to authenticate the device side on the cloud side. It can be understood that PKI authentication can be authenticated by binding the identity of the certificate holder and the relevant key pair; and the cloud authentication on the device side can be authenticated through certificates. And after authenticating the device side based on the cloud side and the device side authenticating the cloud, end-to-end authentication is required between the device side and the device side. For example, the same account authentication can be used, that is, the account logged in between the two devices needs to be the same account, and the ECDH key negotiation algorithm is used for end-to-end authentication, so that end-to-end devices can communicate far-field based on far-field channels.
[0078] It can be understood that ECDH (Diffie Hellman key exchange) is an anonymous key negotiation scheme that allows two parties to establish a shared key over an insecure channel, with each party having an elliptic curve public-private key pair.
[0079] S112: The far-field service module on the watch notifies the message service module that the far-field device is online.
[0080] In some embodiments, the far-field service module of the smart watch 20 registers the smart device 20 in the cloud based on the instruction to register the smart watch 20 in the cloud sent by the message service module of the smart watch 20, notifies the message service module of the smart device 20 of the result of the successful registration of the smart device 20 in the cloud, and notifies the far-field communication service of the mobile phone 10 of the result of the successful registration of the smart device 20 in the cloud by the far-field service module of the smart watch 20.
[0081] S113: After receiving the notification that the remote device is online at the other end, the remote service module at the mobile phone notifies the message service module at the mobile phone that the remote device is online.
[0082] In some embodiments, the far-field service module of the mobile phone 10 can receive a notification sent by the far-field service module of the smart watch 20 that the smart device 20 has successfully registered for far-field communication in the cloud, and further send a notification to the message service module of the mobile phone 10 that the smart device 20 has successfully registered for far-field communication in the cloud.
[0083] S114: The message service module on the mobile phone notifies the mobile phone application software that the mobile phone far-field device is online.
[0084] In some embodiments, the message service module of the mobile phone 10 receives a notification sent by the message service module of the mobile phone 10 that the smart device 20 has successfully registered for far-field communication in the cloud, and further sends a notification to the application software of the mobile phone 10 that the smart device 20 has successfully registered for far-field communication in the cloud.
[0085] S115: After receiving the online notification of the remote device on the watch, the message service module on the mobile phone performs dual-end device same account authentication with the message service module on the watch.
[0086] In some embodiments, when the application software of the mobile phone 10 receives the notification that the smart device 20 has successfully registered for far-field communication in the cloud, the message service module of the mobile phone 10 initiates a dual-end device same-account authentication instruction to the message service module of the smart watch 20, so that the dual-end device same-account authentication is realized after the dual-end device same-account security authentication is completed. For example, in some embodiments, the mobile phone 10 and the smart watch 20 can perform the same-account trust ring authentication based on their respective encrypted far-field message data. It can be further established that the mobile phone 10 and the smart watch 20 respectively notify their respective message processing modules that they can perform far-field communication based on their respective cloud devices. It can be understood that encryption can be based on the Advanced Encryption Standard (AES), which is the most common symmetric encryption algorithm. A symmetric encryption algorithm means that the same key is used for encryption and decryption.
[0087] S116: The user sends a message to the application software.
[0088] S117: The application software on the mobile phone sends a message to the message service module on the mobile phone.
[0089] In some embodiments, when the application software of the mobile phone 10 receives a message sent by the user, the application software of the mobile phone 10 sends an instruction to send a message to the smart device 20 to the message service module of the mobile phone 10. The message service module of the mobile phone 10 detects that the synchronization switch of the application software corresponding to the message is turned on, and can call the interface of the message service module of the mobile phone 10 to receive synchronization information. For example, if the sports health software detects that its message synchronization switch is turned on, it calls the interface of the message service module to send a synchronization message to the message service module of the mobile phone 10, that is, sends a request to send a synchronization message.
[0090] S118: After receiving the message sent by the application software on the mobile phone, the message service module on the mobile phone determines whether the Bluetooth is connected.
[0091] In some embodiments, when the message service module of the mobile phone 10 receives a request for synchronous message sending sent by the application software, it determines whether the Bluetooth connection of the mobile phone 10 is connected. If the Bluetooth of the mobile phone 10 is normally connected, it goes to step S119, that is, the mobile phone 10 sends a synchronous message to the message service module of the smart watch 20 via Bluetooth; if the Bluetooth of the mobile phone 10 is disconnected, it goes to step S122 to determine whether there is a far-field online device.
[0092] S119: The message service module on the mobile phone sends a message to the message service module on the watch via the Bluetooth channel.
[0093] In some embodiments, when it is determined that the Bluetooth of the mobile phone 10 is in a connected state, the message service module of the mobile phone 10 sends a synchronization message to the message service module of the smart watch 20 via Bluetooth. For example, in some embodiments, when it is determined that the Bluetooth is in a connected state, the mobile phone 10 and the smart watch 20 can send synchronization messages through a near-field Bluetooth channel.
[0094] S120: The message service module on the watch side sends a near-field message notification to the mobile assistant on the watch side.
[0095] In some embodiments, after the message service module of the smart watch 20 receives the synchronization message sent by the message service module of the mobile phone 10, it further sends a notification of the near-field synchronization message to the mobile phone assistant of the smart watch 20.
[0096] S121: The far-field service module on the mobile phone sends a notification of the near-field message sending result to the message service module on the mobile phone.
[0097] In some embodiments, after the message service module of the mobile phone 10 sends a synchronization message to the smart watch 20 via Bluetooth, the far-field service module of the mobile phone 10 sends a notification of the sending result of the near-field synchronization message to the message service module of the mobile phone 10 .
[0098] S122: The message service module on the mobile phone determines whether there is a far-field online device.
[0099] In some embodiments, when it is determined that the Bluetooth of the mobile phone 10 is disconnected, the message service module of the mobile phone 10 further determines whether there is a far-field online device. If there is no far-field online device, the process goes to step S123, and a notification is sent to the application software of the mobile phone 10 that both the near-field (Bluetooth) communication and the far-field communication are disconnected at this time; if there is a far-field online device, the process goes to step S125, and an instruction is sent to the far-field service module of the mobile phone 10 to send a synchronization message through the far-field communication.
[0100] S123: The message service module on the mobile phone sends a notification to the application software that there is no far-field online device and no Bluetooth connection.
[0101] In some embodiments, when the message service module of the mobile phone 10 determines that there is no far-field online device, a notification is sent to the application software of the mobile phone 10 that there is no far-field online device and no Bluetooth connection.
[0102] S124: The application software on the mobile phone caches the message and waits for the far field communication to go online or the Bluetooth to go online.
[0103] In some embodiments, when the application software of the mobile phone 10 receives a notification that there is no far-field online device and no Bluetooth connection, the application software of the mobile phone 10 stores the synchronization message and waits for the far-field device such as the smart watch 20 to come online or the Bluetooth connection notification. If there is no remote device online or Bluetooth connection notification after a certain period of time, such as 6 hours, the synchronization message stored by the application software of the mobile phone 10 will be cleared, that is, the storage time of the message stored in the mobile phone 10 is greater than or equal to the preset time of 6 hours, and the message is cleared.
[0104] It is understandable that in other embodiments, the effective storage time of the synchronization message stored in the mobile phone 10 can also be preset to other effective storage time than 6 hours, which is not limited here.
[0105] S125: The message service module on the mobile phone sends a message to the far-field service module on the mobile phone through the far-field channel.
[0106] In some embodiments, when the message service module of the mobile phone 10 determines that there is a far-field online device, an instruction to send a synchronization message through far-field communication is sent to the far-field service module of the mobile phone 10, i.e., triggering the establishment of a far-field channel.
[0107] S126: The far-field service module on the mobile phone and the far-field service module on the watch send notifications to each other to establish a far-field channel.
[0108] In some embodiments, the far-field service module of the mobile phone 10 sends a request to establish a far-field channel to the far-field service module of the smart watch 20 based on the instruction sent by the message service module of the mobile phone 10 to send a synchronization message through far-field communication.
[0109] In other embodiments, the far-field service module of the smart watch 20 may send a request to establish a far-field channel to the message service module of the mobile phone 10, which is not limited here.
[0110] S127: The far-field service module on the watch side sends a far-field channel establishment success notification to the message service module on the watch side.
[0111] In some embodiments, the far-field service module of the smart watch 20 receives a request for establishing a far-field channel sent by the far-field service module of the mobile phone 10 to establish a far-field channel between the smart watch 20 and the mobile phone 10, and sends a notification of successful establishment of the far-field channel to the message service module of the smart watch 20.
[0112] S128: The far-field service module on the mobile phone sends a far-field channel establishment success notification to the message service module on the mobile phone.
[0113] In some embodiments, the far-field service module of the mobile phone 10 sends a notification of successful establishment of the far-field channel to the message service module of the mobile phone 10. For example, in some embodiments, when the mobile phone 10 and the smart watch 20 successfully register the device cloud in the cloud, the mobile phone 10 and the smart watch 20 can respectively establish a connection with the service cloud through their devices registered in the cloud, and then each realizes the establishment of a far-field channel between the mobile phone 10 and the smart watch 20 through the service cloud.
[0114] S129: The message service module on the mobile phone sends the message to the far-field service module on the mobile phone.
[0115] In some embodiments, the message service module of the mobile phone 10 sends a request to send a synchronization message to the smart watch 20 to the far-field service module of the mobile phone 10 based on the notification of successful establishment of the far-field channel.
[0116] S130: The far-field service module on the mobile phone sends the message to the far-field service module on the watch.
[0117] In some embodiments, the far-field service module on the mobile phone sends a synchronization message to the far-field service module on the smart watch 20 based on the request sent by the message service module on the mobile phone 10 .
[0118] S131: The far-field service module on the watch side sends a far-field message notification to the message service module on the watch side.
[0119] In some embodiments, after receiving the synchronization message, the far-field service module of the smart watch 20 sends a notification of receiving the far-field synchronization message to the message service module of the smart watch 20 .
[0120] S132: The message service module on the watch side sends a far-field message notification to the mobile assistant on the watch side.
[0121] In some embodiments, after receiving the synchronization message, the message service module of the smart watch 20 sends a notification of receiving the far-field synchronization message to the mobile assistant of the smart watch 20 .
[0122] S133: The far-field service module on the mobile phone sends a far-field message sending success notification to the message service module on the mobile phone.
[0123] In some embodiments, based on the smart watch 20 receiving the far field synchronization message, the far field service module of the mobile phone 10 sends a notification of successful sending of the far field synchronization message to the message service module of the mobile phone 10 .
[0124] S134: The message service module on the mobile phone determines whether the message is sent successfully.
[0125] In some embodiments, the message service module of the mobile phone 10 determines whether the far-field synchronization message sent by the mobile phone 10 to the smart watch 20 based on the far-field channel is successfully sent. If it is sent successfully, go to step S135, that is, send a notification of the result that the synchronization message has been successfully sent to the application software of the mobile phone 10; if it is not sent successfully, go to step S138, that is, the application software of the mobile phone 10 caches the synchronization message that was not sent successfully.
[0126] S135: The message service module on the mobile phone sends the message sending result to the application software on the mobile phone.
[0127] In some embodiments, when the message service module of the mobile phone 10 determines that the synchronization message has been successfully sent to the smart watch 20 through the far-field channel, the message service module of the mobile phone 10 sends a notification of the result that the synchronization message has been successfully sent to the smart watch 20 through the far-field channel to the application software of the mobile phone 10. When the message service module of the mobile phone 10 determines that the synchronization message has not been successfully sent to the smart watch 20 through the far-field channel, the message service module of the mobile phone 10 sends a notification of the result that the synchronization message has not been successfully sent to the smart watch 20 through the far-field channel to the application software of the mobile phone 10.
[0128] S136: The application software on the mobile phone caches the message.
[0129] In some embodiments, when the application software of the mobile phone 10 receives a notification of failure to send a synchronization message, the synchronization message that was not sent successfully is cached.
[0130] S137: The application software on the mobile phone triggers the message sending when the remote field is online or the Bluetooth connection is established.
[0131] In some embodiments, based on the fact that the synchronization message has not been successfully sent to the smart watch 20, the application software of the mobile phone 10 continues to monitor the Bluetooth connection or the far-field device is online, so that when the Bluetooth connection or the far-field device is online, the synchronization message is sent via the Bluetooth or far-field channel.
[0132] S138: The message service module on the mobile phone determines whether the Bluetooth is connected.
[0133] In some embodiments, the message service module of the mobile phone 10 determines whether there is a Bluetooth connection currently. If the Bluetooth is currently connected, the message service module of the mobile phone 10 sends an instruction to stop the far-field service to the far-field service module of the mobile phone 10. If the Bluetooth is not connected, the synchronization message continues through the far-field channel.
[0134] S139: The message service module on the mobile phone sends an instruction to stop far field communication to the far field service module on the mobile phone.
[0135] In some embodiments, when the message service module of the mobile phone 10 determines that a Bluetooth connection is currently established, the process goes to step S139 , that is, sending an instruction to stop the far-field service to the far-field service module of the mobile phone 10 .
[0136] S140: The far-field service module on the mobile phone releases resources.
[0137] In some embodiments, when the far-field service module of the mobile phone 10 receives an instruction to stop the far-field service, the resources transmitted in the far-field channel, such as synchronization messages, are released based on the instruction.
[0138] S141: The application software on the mobile phone sends a message to the message service module on the mobile phone.
[0139] In some embodiments, based on the Bluetooth connection, the application software of the mobile phone 10 sends a request to send a near field synchronization message via Bluetooth to the message service module of the mobile phone 10 .
[0140] S142: The message service module on the mobile phone sends a message to the message service module on the watch.
[0141] In some embodiments, the message service module of the mobile phone 10 sends a near field synchronization message to the message service module of the smart watch 20 based on the above request.
[0142] S143: The message service module on the watch side sends a near-field message notification to the mobile assistant on the watch side.
[0143] In some embodiments, after the message service module of the smart watch 20 receives the near field synchronization message sent by the mobile phone 10 via Bluetooth, it sends a notification of receiving the near field synchronization message to the mobile phone assistant of the smart device 20.
[0144] S144: The message service module on the mobile phone sends a near field message notification to the application software on the mobile phone.
[0145] In some embodiments, based on the smart watch 20 having received the near field synchronization message obtained through the mobile phone assistant, the message service module of the mobile phone 10 sends a notification to the application software of the mobile phone 10 indicating the result of successfully sending the near field synchronization message.
[0146] Through the communication method of the present application, messages can be synchronized based on far-field communication when near-field communication is disconnected, so that users can obtain synchronized messages in a timely manner, thereby improving the success rate of message synchronization between mobile phones and smart watches; and when near-field communication is reconnected, near-field communication can be immediately switched to synchronize messages, thereby improving the message synchronization speed, reducing the power consumption of electronic devices, and improving the user's smart watch usage experience.
[0147] To facilitate understanding of the technical solutions of each implementation of the present application, the hardware structure of the electronic device 100 is introduced below.
[0148] It can be understood that the electronic device 100 can be any electronic device that can run a neural network model, including but not limited to mobile phones, wearable devices (such as smart watches, smart bracelets, etc.), tablet computers, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks, augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) devices, etc., and the embodiments of the present application are not limited thereto.
[0149] For example Figure 4 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 100 is shown. Figure 4 The illustrated electronics 100 includes one or more processors 101 , system memory 102 , non-volatile memory (NVM) 103 , a communication interface 104 , input / output (I / O) devices 105 , system control logic 106 , and instructions 107 .
[0150] Among them: the processor 101 may include one or more processing units, for example, it may include a central processing unit CPU (central processing unit), an image processor GPU (graphics processing unit), a digital signal processor (digital signal processor, DSP), a microprocessor MCU (micro-programmed control Unit), an AI (Artificial Intelligence) processor or a processing module or processing circuit of a programmable logic device (field programmable gate array, FPGA) may include one or more single-core or multi-core processors.
[0151] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store the above-mentioned business server information, etc.
[0152] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. The non-volatile memory 103 may be used to store the above-mentioned business server information, etc.
[0153] The instruction 107 may include: being executed by at least one of the processors 101 to enable the terminal 100 to implement the far-field communication method provided by each embodiment of the present application.
[0154] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the terminal 100, thereby communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the terminal 100, for example, the communication interface 104 may be integrated into the processor 101.
[0155] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the terminal 100 via the input / output (I / O) device 105 .
[0156] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of terminal 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0157] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0158] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0159] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0160] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0161] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0162] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0163] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0164] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0165] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A communication method, characterized in that: include: A first communication connection is established between the first electronic device and the second electronic device based on a first communication mode, and the first electronic device sends a subscription request to the second electronic device; The first communication connection between the first electronic device and the second electronic device is disconnected; The second electronic device detects a first message corresponding to the first subscription request and stores the first message; The second electronic device establishes a second communication connection with the first electronic device based on a second communication method, and the second electronic device sends the first message to the first electronic device, wherein the second communication method includes a long-distance communication method.
2. The method according to claim 1, characterized in that The first electronic device sends a subscription request to the second electronic device; comprising: The first electronic device determines whether the first electronic device supports the second communication mode, and corresponding to the first electronic device supporting the second communication mode, the first electronic device sends a subscription request to the second electronic device; The subscription request includes at least one of a type of subscription message and a format of the subscription message.
3. The method according to claim 1, characterized in that The second electronic device detects a first message corresponding to a first subscription request and stores the first message; comprising: The second electronic device detects a first message corresponding to the first subscription request; Determining whether the first communication mode is disconnected; In response to the disconnection of the first communication mode, determining whether there is a first electronic device having a second communication connection relationship; In the case where the first electronic device having the second communication connection relationship does not exist, the first message is stored.
4. The method according to claim 3, characterized in that The method further comprises: After storing the first message, in response to the presence of the first electronic device having the second communication connection relationship, the second electronic device sends the first message to the first electronic device based on the second communication method; The second electronic device determines whether the first message is sent successfully; Corresponding to the first message not being sent successfully, the second electronic device stores the first message.
5. The method according to claim 4, characterized in that The method further comprises: After storing the first message, in response to the presence of the first electronic device having the first communication connection relationship, the second electronic device sends the first message to the first electronic device based on the first communication method.
6. The method according to claim 1, characterized in that The second electronic device establishes a second communication connection with the first electronic device based on a second communication mode, including: The second electronic device detects that the first communication connection is disconnected, and determines whether the first electronic device meets the communication conditions of the second communication mode; Corresponding to the first electronic device satisfying the communication condition of the second communication mode, the first electronic device registering device information of the first electronic device in the server; Corresponding to the second electronic device having registered the device information of the second electronic device on the server, the first electronic device and the second electronic device perform account authentication; In response to the first electronic device and the second electronic device successfully performing the same account authentication, the second electronic device establishes a second communication channel of the second communication mode with the first electronic device.
7. The method according to claim 4, characterized in that The communication condition of the second communication mode includes at least one of the following: The account information corresponding to the account logged in by the first electronic device is the same as the account information corresponding to the account logged in by the second electronic device; The switch corresponding to the second communication mode in the first electronic device is in an on state; The first communication mode connection is in a disconnected state; The first electronic device is in a network-stationed state.
8. The method according to claim 4, characterized in that The second electronic device determines that the storage time of the first message is greater than or equal to a preset time, and deletes the first message.
9. The method according to claim 1, characterized in that: The first communication mode is a near field communication mode.
10. An electronic device, characterized in that: The invention comprises: a memory for storing instructions; A processor, configured to execute the instructions to implement the communication method according to any one of claims 1 to 9.
11. A readable storage medium, characterized in that: The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the communication method according to any one of claims 1 to 9.
Citation Information
Cited By
Message synchronization method and device, electronic equipment and storage medium
CN121418801A
Message synchronization method and apparatus, and electronic device, storage medium and product
WO2026171163A1