Information synchronization method and device, computer equipment and storage medium

Through soft bus technology, the information transmission channel is established between different terminals, and the problems of low information synchronization efficiency and poor user experience in the existing technology are solved, and efficient and general information synchronization effect is achieved.

CN119906714AActive Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311407031.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

In the prior art, information synchronization between devices is inefficient and user experience is poor, and users usually need to manually complete or rely on a closed-loop software ecosystem.

Method used

Through soft bus technology, the optimal communication medium is determined based on the communication factors in the current environment, and an information transmission channel is established between terminals that have issued notification services on the soft bus to realize information synchronization between services of different terminals.

Benefits of technology

It realizes information synchronization between different terminals, has high versatility and ease of use, does not require complex software adaptation, is efficient and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906714A_ABST
    Figure CN119906714A_ABST
Patent Text Reader

Abstract

The invention provides an information synchronization method and device, computer equipment and a storage medium. When the information synchronization method provided by the invention is applied to a first terminal, the method comprises the following steps: receiving a first notification sent by a first service, the first notification carrying to-be-synchronized information; according to the method, at least one second terminal which has published notification service on a soft bus is obtained, the first terminal has published notification service on the soft bus, and the soft bus is used for determining an optimal communication medium between the terminals which have published notification service on the soft bus according to a communication factor in a current environment, based on the optimal communication medium, establishing an information transmission channel between the terminals which have published the notification service; and sending the first notification to the at least one second terminal based on the soft bus. According to the method, information synchronization of different terminals is realized on the basis of relatively high universality; meanwhile, software does not need to carry out complex adaptation on the information synchronization function, use is easy, and usability is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of information synchronization, and in particular to an information synchronization method, apparatus, computer equipment and storage medium. Background Art

[0002] With the prevalence of multi-device usage scenarios, information synchronization across devices (such as notification messages and user files) has become a basic need of users. For example, users may want to be able to paste text copied on their mobile phones on their computers, or to synchronize notifications received on one device on all other devices.

[0003] In the related art, information synchronization across devices usually needs to be completed manually by users or manually with the help of communication software. For example, the clipboard content is sent to another terminal through social software, and then the clipboard content sent from the social software is received on the other terminal to achieve information synchronization. This solution is inefficient and has a poor user experience. Summary of the invention

[0004] To overcome the problems existing in the related art, the present disclosure provides an information synchronization method, apparatus, computer equipment and storage medium.

[0005] A first aspect of the present disclosure provides an information synchronization method, which is applied to a first terminal, and the method includes:

[0006] Receiving a first notification sent by a first service, where the first notification carries information to be synchronized;

[0007] Acquire at least one second terminal on which a notification service has been published on a soft bus, wherein the first terminal has published a notification service on the soft bus, and the soft bus is used to determine an optimal communication medium between the terminals on which the notification service has been published on the soft bus according to a communication factor in a current environment, and establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium;

[0008] Based on the soft bus, the first notification is sent to the at least one second terminal.

[0009] Optionally, the step of acquiring at least one second terminal of the published notification service on the soft bus includes:

[0010] When at least one of the following conditions is met, at least one second terminal on the soft bus that has published a notification service is obtained:

[0011] The first notification is encrypted using a preset encryption method;

[0012] The soft bus meets preset parameters;

[0013] The logged-in user of the first terminal is the user indicated by the first notification.

[0014] Optionally, the step of acquiring at least one second terminal of the published notification service on the soft bus includes:

[0015] A terminal that satisfies at least one of the following conditions among multiple terminals that have published notification services on the soft bus is obtained as the second terminal:

[0016] Running the same service as the first service;

[0017] The logged-in user is the same as the user logged-in at the first terminal;

[0018] The target terminal is consistent with the target terminal indicated by the first notification.

[0019] Optionally, the sending the first notification to the at least one second terminal includes:

[0020] In response to an information transmission channel based on the soft bus being provided between the first terminal and any second terminal among the at least one second terminal, the first notification is sent to the any second terminal through the information transmission channel.

[0021] Optionally, the sending the first notification to the at least one second terminal includes:

[0022] According to a preset protocol provided by the soft bus, the first notification is packaged and sent to the at least one second terminal.

[0023] Optionally, packaging the first notification and sending the packaging to the at least one second terminal includes:

[0024] The first notification and notifications sent by other services except the first service are packaged and sent to the at least one second terminal, wherein the notifications sent by the other services are concurrent notifications of the first notification.

[0025] Optionally, the receiving a first notification sent by a first service includes:

[0026] Receive a first notification sent by a first service, and add the first notification to a first message queue;

[0027] The sending the first notification to the at least one second terminal includes:

[0028] Sending a notification included in the first message queue to the at least one second terminal.

[0029] Optionally, the receiving a first notification sent by the first service and adding the first notification to a first message queue includes:

[0030] When multiple first notifications sent by the first service are received, the multiple first notifications are packaged and added to the first message queue.

[0031] Optionally, the first notification is sent by the first service calling a preset interface, wherein the preset interface is an interface provided by a framework for executing the information synchronization method.

[0032] A second aspect of the present disclosure provides an information synchronization method, which is applied to a second terminal, and the method includes:

[0033] Based on a soft bus, receiving a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, and the second terminal has published a notification service on the soft bus, the soft bus is used to determine the optimal communication medium between the terminals that have published the notification service on the soft bus according to the communication factors in the current environment, and establish an information transmission channel between the terminals that have published the notification service based on the optimal communication medium;

[0034] The information to be synchronized is reported to a second service, where the second service is the service indicated by the first notification.

[0035] Optionally, reporting the information to be synchronized to the second service includes:

[0036] Adding the first notification to a second message queue;

[0037] Report the information to be synchronized carried in the notification contained in the second message queue to the second service.

[0038] Optionally, the method further includes:

[0039] The first notification is unpacked according to a preset protocol provided by the soft bus.

[0040] According to a third aspect of the present disclosure, there is provided an information synchronization device applied to a first terminal, the device comprising:

[0041] A first receiving module, configured to receive a first notification sent by a first service, wherein the first notification carries information to be synchronized;

[0042] an acquisition module, configured to acquire at least one second terminal on a soft bus that has published a notification service, the first terminal having published a notification service on the soft bus, the soft bus being configured to determine an optimal communication medium between the terminals on the soft bus that have published a notification service according to a communication factor in a current environment, and to establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium;

[0043] A sending module is used to send the first notification to the at least one second terminal based on the soft bus.

[0044] Optionally, when the acquisition module is used to acquire at least one second terminal that has published a notification service on the soft bus, it is used to:

[0045] When at least one of the following conditions is met, at least one second terminal on the soft bus that has published a notification service is obtained:

[0046] The first notification is encrypted using a preset encryption method;

[0047] The soft bus meets preset parameters;

[0048] The logged-in user of the first terminal is the user indicated by the first notification.

[0049] Optionally, when the acquisition module is used to acquire at least one second terminal that has published a notification service on the soft bus, it is used to:

[0050] A terminal that satisfies at least one of the following conditions among multiple terminals that have published notification services on the soft bus is obtained as the second terminal:

[0051] Running the same service as the first service;

[0052] The logged-in user is the same as the user logged-in at the first terminal;

[0053] The target terminal is consistent with the target terminal indicated by the first notification.

[0054] Optionally, when the sending module is used to send the first notification to the at least one second terminal, it is used to:

[0055] In response to an information transmission channel based on the soft bus being provided between the first terminal and any second terminal among the at least one second terminal, the first notification is sent to the any second terminal through the information transmission channel.

[0056] Optionally, when the sending module is used to send the first notification to the at least one second terminal, it is used to:

[0057] According to a preset protocol provided by the soft bus, the first notification is packaged and sent to the at least one second terminal.

[0058] Optionally, when the sending module is used to package and send the first notification to the at least one second terminal according to a preset protocol provided by the soft bus, it is used to:

[0059] The first notification and notifications sent by other services except the first service are packaged and sent to the at least one second terminal, wherein the notifications sent by the other services are concurrent notifications of the first notification.

[0060] Optionally, when the first receiving module is used to receive the first notification sent by the first service, it is used to:

[0061] Receive a first notification sent by a first service, and add the first notification to a first message queue;

[0062] The sending module is used to, when sending the first notification to the at least one second terminal,:

[0063] Sending a notification included in the first message queue to the at least one second terminal.

[0064] Optionally, the first receiving module is used to receive a first notification sent by a first service, and when adding the first notification to a first message queue, is used to:

[0065] When multiple first notifications sent by the first service are received, the multiple first notifications are packaged and added to the first message queue.

[0066] Optionally, the first notification is sent by the first service calling a preset interface, wherein the preset interface is an interface provided by a framework for executing the information synchronization method.

[0067] A fourth aspect of the present disclosure provides an information synchronization device, the device comprising:

[0068] A second receiving module is configured to receive, based on a soft bus, a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, the second terminal has published a notification service on the soft bus, the soft bus is configured to determine an optimal communication medium between terminals that have published notification services on the soft bus according to a communication factor in a current environment, and to establish an information transmission channel between the terminals that have published notification services based on the optimal communication medium;

[0069] The reporting module is used to report the information to be synchronized to a second service, where the second service is the service indicated by the first notification.

[0070] Optionally, when the sending module is used to report the information to be synchronized to the second service, it is used to:

[0071] Adding the first notification to a second message queue;

[0072] Report the information to be synchronized carried in the notification contained in the second message queue to the second service.

[0073] Optionally, the device further comprises:

[0074] An unpacking module is used to unpack the first notification according to a preset protocol provided by the soft bus.

[0075] A fifth aspect of the present disclosure provides an information synchronization device, the device comprising:

[0076] The soft bus determines the optimal communication medium between the terminals that have published the notification service on the soft bus according to the communication factors in the current environment, and establishes an information transmission channel between the terminals that have published the notification service based on the optimal communication medium;

[0077] Information synchronization framework, including interface module, security module and processing module;

[0078] Wherein, the interface module is used to notify and interact with the services on the terminal;

[0079] The security module is used to verify the legitimacy of at least one of the notification, the user logged in on the terminal, and the soft bus;

[0080] The processing module is used for performing notification interaction with other terminals on the soft bus that have published notification services.

[0081] A sixth aspect of the present disclosure provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the first and second aspects is implemented.

[0082] A seventh aspect of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method described in any one of the first aspect and the second aspect is implemented.

[0083] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0084] In the embodiment of the present disclosure, based on a soft bus for establishing a communication connection with a terminal that has published a notification service on the soft bus, information synchronization between services of different terminals is realized. The information synchronization method provided by the present disclosure receives a first notification carrying information to be synchronized sent by a first service, obtains at least one second terminal that has published a notification service on the soft bus, and sends the first notification to the at least one second terminal based on the soft bus; after the at least one second terminal receives the first notification, it reports the first notification to the second service indicated by the first notification, that is, the information synchronization process is completed. In the embodiment of the present disclosure, based on a soft bus for establishing a communication connection with a terminal that has published a notification service on the soft bus, information synchronization between services of different terminals is realized. It does not need to be based on a closed-loop software ecosystem. It only needs to receive the first notification carrying information to be synchronized sent by the service that needs to synchronize information, and the information synchronization of different terminals can be realized. It has high versatility; at the same time, there is no need for the software to perform complex adaptation of the information synchronization function, and it is easy to use and has strong usability.

[0085] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0087] Figure 1 The invention is a flow chart of an information synchronization method shown in some exemplary embodiments.

[0088] Figure 2 is a flow chart of another information synchronization method shown in some exemplary embodiments.

[0089] Figure 3 is a flow chart of yet another information synchronization method shown in some exemplary embodiments.

[0090] Figure 4 The invention is an interaction diagram of an information synchronization method shown in some exemplary embodiments.

[0091] Figure 5 The figure is a block diagram of an information synchronization device shown in some exemplary embodiments.

[0092] Figure 6 is a block diagram of another information synchronization device shown in some exemplary embodiments.

[0093] Figure 7 is a block diagram of yet another information synchronization device shown in some exemplary embodiments.

[0094] Figure 8The figure is a hardware structure diagram of a computer device shown in some exemplary embodiments. DETAILED DESCRIPTION

[0095] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0096] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0097] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0098] With the prevalence of multi-device usage scenarios, information synchronization across devices (such as notification messages and user files) has become a basic need of users. For example, users may want to be able to paste text copied on their mobile phones on their computers, or to synchronize notifications received on one device on all other devices.

[0099] Solutions in the existing technology are often limited to specific operating systems or device ecosystems. For example, they rely on the closed-loop characteristics of the device ecosystem to achieve information synchronization. These solutions lack versatility and require a lot of software adaptation to achieve synchronization functions.

[0100] In view of this, the present disclosure provides an information synchronization method, apparatus, computer equipment and storage medium. Next, the concepts involved in the present disclosure are explained.

[0101] The soft bus is a software bus that can establish a communication connection. It can be a distributed soft bus or a self-configured packaged communication connection framework. Preferably, the soft bus can have the following functions. The soft bus can automatically discover other devices configured with the soft bus and establish communication connections on them; at the same time, the soft bus is used to determine the optimal communication medium (for example, via Bluetooth connection or via LAN connection) between the terminals that have published notification services on the soft bus based on the communication factors in the current environment (for example, LAN connection quality, Bluetooth connection quality), and establish an information transmission channel between the terminals that have published notification services based on the optimal communication medium (preferably, the information transmission channel between every two terminals can be maintained or switched in real time according to the communication factors between the two terminals; for example, device A and device B decide through an algorithm that the LAN is optimal, and can choose to establish an information transmission channel based on the LAN and synchronize information; device A and device C use an algorithm to determine the optimal LAN. If it is decided that there is already an information transmission channel between the devices, the information transmission channel can be reused; device A and device D decide through an algorithm that the environment can use multicast to transmit information at this time, and they can choose to establish an information transmission channel based on multicast and synchronize the information; when the LAN connection between device A and device B is disconnected, if device A and device B can be connected through Bluetooth, they can choose to establish an information transmission channel based on Bluetooth and synchronize the information); in addition, the soft bus provides a series of interfaces, and the framework that executes this method can obtain the parameters of the soft bus, the devices that register or publish services (such as notification services) on the soft bus, and the relevant parameters of these devices registering or publishing services on the soft bus (such as users logged in to the device, services running on the device, etc.).

[0102] It should be understood that in order to implement the technical solution provided by the present disclosure, the terminals such as the "first terminal" and the "second terminal" involved in the present disclosure should publish notification services on the soft bus before the method is executed (for example, the framework that executes the method provided by the present disclosure registers a cross-device notification message listener on the soft bus, and the business running on the terminal statically registers the soft bus and subscribes to the cross-device notification message of the framework), so that the soft bus can be networked between devices that have published notification services on the soft bus, and obtain relevant parameters of the first terminal and the second terminal, and can send notifications to the terminals and the businesses running on the terminals.

[0103] Next, the embodiments of the present disclosure are described in detail.

[0104] In a first aspect, an information synchronization method applied to a first terminal is provided. Figure 1 As shown, Figure 1 is a flowchart of an information synchronization method shown in some embodiments of the present disclosure, comprising the following steps:

[0105] In step S101, a first notification sent by a first service is received, where the first notification carries information to be synchronized;

[0106] Among them, the first notification is a notification message carrying information to be synchronized, which is sent by the first service to the framework executing this method based on the information synchronization demand. Regarding the method of sending the first notification, exemplarily, it can be that the module configured by the first service sends it to the framework executing this method after identifying the information synchronization demand (for example, the clipboard clipping content is updated, and a new picture is added to the gallery); another exemplarily, it can be that after the framework executing this method monitors the first service and identifies the information synchronization demand, it reads the information to be synchronized of the first service or sends an instruction to the first service to obtain the information to be synchronized. The information to be synchronized is the information that the first service needs to synchronize to other terminals or other services, such as the clipboard update content and the new picture added to the gallery in the above example.

[0107] In some embodiments of the present disclosure, the first notification is sent by the first service calling a preset interface, wherein the preset interface is an interface provided by the framework that executes the information synchronization method. That is, the framework that executes the present method provides a preset interface, and when the first service has information synchronization requirements, the preset interface is directly called to send the first notification to the framework that executes the present method, thereby realizing cross-terminal information synchronization, which is highly versatile and easy to use, and does not require the first service to make complex adaptations to the present method.

[0108] It should be understood that in addition to the notification message carrying the information to be synchronized, the first notification may also carry other relevant information, such as the target terminal of the first notification or the screening conditions for the target terminal, the target service of the first notification or the screening conditions for the target service, the effective time of the first notification, etc.

[0109] In step S102, at least one second terminal on which a notification service has been published is obtained, the first terminal having published a notification service on the soft bus, the soft bus being used to determine an optimal communication medium between the terminals on which the notification service has been published according to a communication factor in a current environment, and to establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium;

[0110] Among them, the framework executing this method can call the interface provided by the soft bus or read the relevant parameters of the soft bus by itself to know the terminal on which the notification service has been published on the soft bus. In some embodiments of the present disclosure, the execution of step S102 has additional judgment conditions, such as at least one of the following three judgment conditions, that is, when at least one of the following conditions is met, at least one second terminal on the soft bus that has published the notification service is obtained.

[0111] Judgment condition 1: The first notification is encrypted using a preset encryption method.

[0112] The framework for executing the present method or the soft bus used by the present method may be configured with a preset encryption method. The encryption method and the key used by the encryption method may be provided only to authenticated services (e.g., services with cross-device information synchronization permissions). When the first notification is encrypted using the preset encryption method, it can be confirmed that the first notification is sent by the authenticated service, thereby preventing hacker software or tampered software from sending the first notification to the framework for executing the present method, thereby posing security risks to other devices or services.

[0113] It should be understood that the present disclosure does not limit the specific encryption method and encryption content. The encryption using a preset encryption method can be to encrypt the full text of the information to be synchronized, or to generate a signature based on the information to be synchronized or other information carried in the first notification using a preset encryption method, and include the signature in the first notification.

[0114] Judgment condition 2: the soft bus meets the preset parameters.

[0115] In some cases, the soft bus may be configured with a specific feature code (for example, the feature code is calculated based on relevant parameters of the communication channel established on the soft bus, or the feature code is calculated based on user information logged in by a terminal configured with the soft bus, and the calculation method may be based on an information summary algorithm or a field splicing calculation, etc.). In this case, the feature code of the soft bus or the communication channel established on the soft bus can be obtained by calling an interface provided by the soft bus or actively reading relevant parameters of the soft bus. If the user indicated by the feature code is not a user who meets the preset conditions (for example, after the terminal publishes a notification service on the soft bus, the terminal switches users) or the communication channel is not a communication channel that meets the preset conditions (for example, the communication channel has been tampered with), the current information synchronization environment can be considered to be risky.

[0116] Judgment condition 3: the login user of the first terminal is the user indicated by the first notification.

[0117] The user indicated by the first notification is the user that the first service should correspond to. If this user is not logged in on the terminal executing this method, it can be considered that the current logged-in user of the first terminal is illegal and the current information synchronization environment has risks.

[0118] The above judgment conditions provide the judgment conditions for executing step S102 from multiple dimensions. When the first service is not trusted, the soft bus is not trusted, and the user logged in on the first terminal is not trusted, the execution of the steps is stopped, thereby ensuring the security of information synchronization to the greatest extent.

[0119] In some embodiments of the present disclosure, step S102 has the following three screening conditions for the at least one second terminal, that is, obtaining a terminal that satisfies at least one of the following conditions among the multiple terminals that have published notification services on the soft bus as the second terminal:

[0120] Screening condition 1: There is a business running that is the same as the first business.

[0121] In daily use, the service that requires information synchronization is usually the same service running on different terminals. Therefore, only the terminal running the same service as the first service can be used as at least one second terminal.

[0122] Filter condition 2: The logged-in user is the same as the user logged in at the first terminal.

[0123] In daily use, the terminals that require information synchronization are usually terminals logged in by the same user. Therefore, only the terminals whose logged-in user is the same as the user logged in by the first terminal can be used as the at least one second terminal.

[0124] Filtering condition 3: consistent with the target terminal indicated by the first notification.

[0125] When the first notification carries target terminal information or screening conditions for target terminals, only a terminal consistent with the target terminal indicated by the first notification may be used as the at least one second terminal.

[0126] The above screening conditions avoid waste of resources or information leakage caused by sending the first notification to a terminal that does not need to receive the information to be synchronized, thereby improving the security and practicality of the method.

[0127] In step S103, the first notification is sent to the at least one second terminal based on the soft bus.

[0128] The soft bus provides an interface or component (such as a distribution executor) for realizing a communication connection. Therefore, in S103, the interface or component (such as a distribution executor) can be directly called to send the first notification to the at least one second terminal. After the first notification is received by the second terminal, the information to be synchronized carried in the first notification is reported to the second service indicated by the first notification to complete the information synchronization process.

[0129] In some embodiments of the present disclosure, the optional manner of sending the first notification to the at least one second terminal is: according to a preset protocol provided by the soft bus, the first notification is packaged and sent to the at least one second terminal. The advantage of this is that a unified protocol can be used to send and receive notifications, thereby improving the versatility and simplicity of the method.

[0130] Specifically, "packaging and sending" means re-encoding or combining the first notification using a preset protocol to generate a new data packet, and sending the new data packet as the first notification to the second terminal. In addition to the original first notification or the information to be synchronized carried by the original first notification, the packaged object may also include the sender of the first notification (i.e., the first service or the first terminal), the feature code of the first notification (e.g., the hash value generated by calculating the original first notification using the information digest algorithm) or other related information, which is not limited in the present disclosure; in addition, when the first terminal receives multiple notifications with the same target terminal within a preset time range (these notifications may not be from the same service), the multiple notifications may be combined and packaged and sent to the target terminal (i.e., the first notification and the notifications sent by other services except the first service are packaged and sent to the at least one second terminal, wherein the notifications sent by the other services are concurrent notifications of the first notification), which can improve the timeliness of notification sending and avoid the inefficiency caused by sending notifications one by one.

[0131] In some embodiments of the present disclosure, an optional manner of sending the first notification to the at least one second terminal is: in response to an information transmission channel based on the soft bus between the first terminal and any second terminal of the at least one second terminal, sending the first notification to any second terminal through the information transmission channel. That is, the sending of the first notification is achieved by using an existing information transmission channel. The existing information transmission channel can be an information transmission channel opened by other notifications sent by the first service, or an information transmission channel opened by notifications sent by other services running on the first terminal. By multiplexing information transmission channels, resource consumption caused by frequent opening and closing of information transmission channels can be minimized, and the execution efficiency of the method can be improved.

[0132] It should be understood that the information transmission channel described in the present disclosure can, exemplarily, be an information transmission channel established by the soft bus based on the transmission medium determined by the communication factor between the first terminal and the second terminal in the current environment; further exemplarily, the channel between the first terminal and the second terminal based on the soft bus and capable of information transmission can be regarded as the information transmission channel described in the present disclosure and is applicable to the above-mentioned channel multiplexing step.

[0133] In some embodiments of the present disclosure, the receiving a first notification sent by a first service includes:

[0134] Receive a first notification sent by a first service, and add the first notification to a first message queue;

[0135] The sending the first notification to the at least one second terminal includes:

[0136] Sending a notification included in the first message queue to the at least one second terminal.

[0137] That is, the first notification is processed in a message queue manner. This optional solution can process notifications sent by the first service one by one in a concurrent situation, avoiding the problem of chaotic processing of the first notifications when there are a large number of first notifications.

[0138] It should be understood that the action of adding the first notification to the first message queue can be performed before, during, or after the execution of step S102, and the present disclosure does not limit this. At the same time, when the method adopts the above optional scheme, if step S102 has a conditional judgment related to the first notification, the first notification can be taken out of the first message queue and a relevant judgment can be performed during the execution of S102, and then in step S103, the first notification is sent to the at least one second terminal.

[0139] In addition, when the framework executing this method receives multiple first notifications sent by the first service, the multiple first notifications can be packaged and added to the first message queue; when the framework executing this method receives multiple first notifications sent by multiple services, the multiple notifications can be packaged and added to the first message queue. At the same time, different queues can be assigned to multiple notifications (for example, different queues are configured according to different second terminals, different queues are configured according to different services on the first terminal, different queues are configured according to hardware resources, queues are randomly assigned, etc.), so as to perform asynchronous and parallel processing on multiple notifications, improve the efficiency of notification processing and sending, and thus improve the efficiency of information synchronization, which is not limited by the present disclosure.

[0140] In summary, it can be understood that in the embodiments provided in the present disclosure, the following steps may be performed:

[0141] Step 1: Determine safety (such as the above three determination conditions);

[0142] Step 2: Acquire the terminal that has published the notification service on the soft bus (step S102);

[0143] Step 3: Screening the terminals (for example, the above three screening conditions);

[0144] Step 4: Send a first notification to the screened terminals.

[0145] The above given execution order is only a preferred execution order that can save the execution cost of the method. In the actual operation process, the specific execution time of step 1 and step 3 can be set according to the actual situation, and the present disclosure does not limit this. Specifically, step 3 can be executed in the process of executing step 2 (that is, the terminal that meets the screening condition is used as the at least one second terminal), or in the process of executing step 4 (that is, only the first notification is sent to the terminal that meets the screening condition in the at least one second terminal), or it can be executed as an independent step between step 2 and step 4. Similarly, step 1 can be used as a prerequisite for the execution of step 2 (that is, only when at least one of the three judgment conditions is met, step 2 is executed), or as a prerequisite for the execution of step 4 (that is, only when at least one of the three judgment conditions is met, step 4 is executed), or, step 1 can be used as a prerequisite for the execution of step 3 (that is, only when at least one of the three judgment conditions is met, step 3 is executed).

[0146] Correspondingly, the packaging processing (ie, message aggregation) and queue adding operations of multiple notifications disclosed herein can also be performed at any feasible time in the above steps, and the present disclosure does not impose any restrictions on this.

[0147] The information synchronization method provided by the present disclosure receives a first notification carrying information to be synchronized sent by a first service, obtains at least one second terminal on which a notification service has been published on a soft bus, and sends the first notification to the at least one second terminal based on the soft bus; after receiving the first notification, the at least one second terminal reports the first notification to the second service indicated by the first notification, thereby completing the information synchronization process. In the embodiment of the present disclosure, information synchronization between services of different terminals is achieved based on a soft bus for establishing a communication connection with a terminal on which a notification service has been published on the soft bus. It does not require a closed-loop software ecosystem, and only requires receiving the first notification carrying information to be synchronized sent by the service that needs to synchronize information, so that information synchronization between different terminals can be achieved. It has high versatility; at the same time, there is no need for complex software adaptation of the information synchronization function, and it is easy to use and has strong usability.

[0148] In a second aspect, an information synchronization method applied to a second terminal is provided. Figure 2 , the information synchronization method shown therein comprises the following steps:

[0149] S201, based on a soft bus, receiving a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, the second terminal has published a notification service on the soft bus, the soft bus is used to determine the optimal communication medium between the terminals that have published the notification service on the soft bus according to the communication factors in the current environment, and establish an information transmission channel between the terminals that have published the notification service based on the optimal communication medium;

[0150] After receiving the first notification sent by the first service running on the first terminal, the first terminal acquires at least one second terminal that has published a notification service on the soft bus, and sends the first notification to the at least one second terminal based on the soft bus. At this time, the second terminal receives the first notification sent by the first terminal that has published a notification service on the soft bus, and the first notification carries information to be synchronized.

[0151] S202: Report the information to be synchronized to a second service, where the second service is the service indicated by the first notification.

[0152] Report the information to be synchronized to the second service to complete the information synchronization process, and the second service is the service indicated by the first notification. For example, the first notification is a notification sent by the clipboard running on the first terminal carrying the content copied by the user on the first terminal. At this time, the second terminal can report the content copied by the user on the first terminal to the clipboard running on the second terminal, so that the content copied by the user can be synchronized from the first terminal to the second terminal. For another example, the first notification is a notification sent by the gallery running on the first terminal carrying the newly added pictures in the gallery. At this time, the second terminal can report the newly added pictures to the gallery running on the second terminal, so that the user's pictures can be synchronized from the first terminal to the second terminal. For another example, the first terminal is a TV and the second terminal is a mobile phone. When the user is watching TV, the mobile phone receives order information such as takeout or taxi, and the mobile phone will synchronize the message to the TV so that the user can view it in time.

[0153] It should be understood that when the framework of the present method is executed on the second terminal to report the information to be synchronized to the second service, it is not necessarily necessary to upload only the information to be synchronized, but it may also include other information required by the second service (for example, the source terminal or source service of the first notification), or directly report the first notification to the second service, so that the second service parses the first notification and obtains the information to be synchronized.

[0154] In some embodiments of the present disclosure, reporting the information to be synchronized to the second service includes:

[0155] Adding the first notification to a second message queue;

[0156] Report the information to be synchronized carried in the notification contained in the second message queue to the second service.

[0157] That is, the first notification is processed in a message queue manner. This optional solution can process the notifications sent by the first terminal one by one in a concurrent situation, avoiding the problem of chaotic processing of the first notifications when the number of first notifications is large.

[0158] In some embodiments of the present disclosure, the data packets between the first terminal and the second terminal are packaged and sent by the first terminal using a preset protocol. Therefore, the method may also include: Figure 3 The following steps are shown:

[0159] S301, unpacking the first notification according to a preset protocol provided by the soft bus.

[0160] Specifically, unpacking means analyzing or decoding the first notification using a preset protocol to obtain the content contained in the first notification. It should be understood that in the actual operation process, the execution timing of step S301 can be set according to the actual situation. Specifically, the first notification can be unpacked after receiving the first notification, or it can be unpacked when the first notification is added to the second message queue, or it can be unpacked when the information to be synchronized carried by the notification contained in the second message queue is reported to the second service. In addition, the first notification may be sent by the first terminal after packaging multiple information to be synchronized. In this case, the second terminal can unpack the first notification to obtain multiple information to be synchronized, and report the multiple information to be synchronized obtained by unpacking to the corresponding services respectively.

[0161] The information synchronization method provided by the present disclosure receives a first notification carrying information to be synchronized sent by a first service, obtains at least one second terminal on which a notification service has been published on a soft bus, and sends the first notification to the at least one second terminal based on the soft bus; after receiving the first notification, the at least one second terminal reports the first notification to the second service indicated by the first notification, thereby completing the information synchronization process. In the embodiment of the present disclosure, information synchronization between services of different terminals is achieved based on a soft bus for establishing a communication connection with a terminal on which a notification service has been published on the soft bus. It does not require a closed-loop software ecosystem, and only requires receiving the first notification carrying information to be synchronized sent by the service that needs to synchronize information, so that information synchronization between different terminals can be achieved. It has high versatility; at the same time, there is no need for complex software adaptation of the information synchronization function, and it is easy to use and has strong usability.

[0162] Combining the above embodiments, we can get Figure 4 Interaction steps shown:

[0163] S401, a first terminal receives a first notification sent by a first service;

[0164] At this time, the first terminal can detect whether the first notification is encrypted using a preset encryption method, whether the relevant parameters of the soft bus of the notification service published by the first terminal meet the preset parameters, and whether the logged-in user of the first terminal is the user indicated by the first notification. If the above conditions are not met, step S402 can be skipped.

[0165] S402, the first terminal obtains at least one second terminal on the soft bus that has published a notification service;

[0166] The first terminal obtains a terminal running the same service as the first service, having the same user logged in as the first terminal, and consistent with the target terminal indicated by the first notification from multiple terminals on the soft bus that have published notification services, and uses the obtained terminal as at least one second terminal.

[0167] S403, the first terminal sends a first notification to the second terminal;

[0168] The first terminal may package the first notification and send it to the at least one second terminal according to the preset protocol provided by the soft bus. In the case where there is an information transmission channel based on the soft bus between the first terminal and any of the at least one second terminal, the information transmission channel may be reused, that is, the first notification may be sent to any of the second terminals through the information transmission channel. When there are multiple notifications with the same target terminal, the multiple notifications may be packaged and sent to the target terminal.

[0169] S404: The second terminal reports the information to be synchronized to the second service.

[0170] The second terminal receives the first notification sent by the first terminal, unpacks the first notification according to the preset protocol provided by the soft bus, and reports the information to be synchronized carried in the first notification to the service indicated by the first notification.

[0171] Regarding the second aspect embodiment and Figure 4 For details of the specific steps in the interaction diagram shown, please refer to the relevant parts of the aforementioned embodiments. For example, on the second terminal side, notification messages from multiple terminals or multiple services can also be allocated to the same or different queues, and notifications with the same target service can be packaged and processed, which will not be repeated here.

[0172] Corresponding to the embodiments of the aforementioned method, the present disclosure also provides embodiments of a device and a terminal to which the device is applied.

[0173] The third aspect of the present disclosure provides an information synchronization device applied to a first terminal. Figure 5 , the device comprises:

[0174] A first receiving module 501 is configured to receive a first notification sent by a first service, where the first notification carries information to be synchronized;

[0175] An acquisition module 502 is used to acquire at least one second terminal on the soft bus that has published a notification service, the first terminal has published a notification service on the soft bus, the soft bus is used to determine the optimal communication medium between the terminals on the soft bus that have published the notification service according to the communication factors in the current environment, and establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium;

[0176] The sending module 503 is configured to send the first notification to the at least one second terminal based on the soft bus.

[0177] Optionally, when the acquisition module 502 is used to acquire at least one second terminal that has published a notification service on the soft bus, it is used to:

[0178] When at least one of the following conditions is met, at least one second terminal on the soft bus that has published a notification service is obtained:

[0179] The first notification is encrypted using a preset encryption method;

[0180] The soft bus meets preset parameters;

[0181] The logged-in user of the first terminal is the user indicated by the first notification.

[0182] Optionally, when the acquisition module 502 is used to acquire at least one second terminal that has published a notification service on the soft bus, it is used to:

[0183] A terminal that satisfies at least one of the following conditions among multiple terminals that have published notification services on the soft bus is obtained as the second terminal:

[0184] Running the same service as the first service;

[0185] The logged-in user is the same as the user logged-in at the first terminal;

[0186] The target terminal is consistent with the target terminal indicated by the first notification.

[0187] Optionally, the sending module 503 is used to, when sending the first notification to the at least one second terminal,:

[0188] In response to an information transmission channel based on the soft bus being provided between the first terminal and any second terminal among the at least one second terminal, the first notification is sent to the any second terminal through the information transmission channel.

[0189] Optionally, the sending module 503 is used to, when sending the first notification to the at least one second terminal,:

[0190] According to a preset protocol provided by the soft bus, the first notification is packaged and sent to the at least one second terminal.

[0191] Optionally, the sending module 503 is configured to package the first notification and send the first notification to the at least one second terminal according to a preset protocol provided by the soft bus, and is configured to:

[0192] The first notification and notifications sent by other services except the first service are packaged and sent to the at least one second terminal, wherein the notifications sent by the other services are concurrent notifications of the first notification.

[0193] Optionally, when the first receiving module 501 is used to receive the first notification sent by the first service, it is used to:

[0194] Receive a first notification sent by a first service, and add the first notification to a first message queue;

[0195] The sending module 503 is used to, when sending the first notification to the at least one second terminal,:

[0196] Sending a notification included in the first message queue to the at least one second terminal.

[0197] Optionally, the first receiving module 501 is used to receive a first notification sent by a first service, and when adding the first notification to a first message queue, is used to:

[0198] When multiple first notifications sent by the first service are received, the multiple first notifications are packaged and added to the first message queue.

[0199] Optionally, the first notification is sent by the first service calling a preset interface, wherein the preset interface is an interface provided by a framework for executing the information synchronization method.

[0200] A fourth aspect of the present disclosure provides an information synchronization device. Figure 6 , the device comprises:

[0201] The second receiving module 601 is used to receive, based on a soft bus, a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, the second terminal has published a notification service on the soft bus, the soft bus is used to determine the optimal communication medium between the terminals that have published the notification service on the soft bus according to the communication factors in the current environment, and establish an information transmission channel between the terminals that have published the notification service based on the optimal communication medium;

[0202] The reporting module 602 is configured to report the information to be synchronized to a second service, where the second service is the service indicated by the first notification.

[0203] Optionally, when the sending module 503 is used to report the information to be synchronized to the second service, it is used to:

[0204] Adding the first notification to a second message queue;

[0205] Report the information to be synchronized carried in the notification contained in the second message queue to the second service.

[0206] Optionally, the device further comprises:

[0207] An unpacking module is used to unpack the first notification according to a preset protocol provided by the soft bus.

[0208] The fifth aspect of the present disclosure provides an information synchronization device. Figure 7 , the device comprises:

[0209] The soft bus 720 is used to determine the optimal communication medium between the terminals that have published the notification service on the soft bus 720 according to the communication factors in the current environment, and to establish an information transmission channel between the terminals that have published the notification service based on the optimal communication medium;

[0210] The information synchronization framework 710 includes an interface module 711, a security module 712 and a processing module 713;

[0211] The interface module 711 is used to perform notification interaction with the service on the terminal;

[0212] Specifically, the interface module 711 is used to provide an interface to the business running on the terminal where the information synchronization framework 710 is located, so that the business can send a first notification to the framework by calling the interface, or receive the first notification reported by the framework through the interface module 711; the framework receives the first notification sent by the business through the interface module 711, or sends a first notification to the business.

[0213] The security module 712 is used to verify the legitimacy of at least one of the notification, the user logged in on the terminal, and the soft bus 720;

[0214] Specifically, the security module 712 can be used to verify the legitimacy of the following dimensions (i.e., whether each dimension satisfies the corresponding conditions described below):

[0215] The first notification is encrypted using a preset encryption method;

[0216] The soft bus 720 meets the preset parameters;

[0217] The logged-in user of the first terminal is the user indicated by the first notification, wherein the first terminal is the terminal where the information synchronization device is located.

[0218] In addition, the security module 712 can also screen other terminals on the soft bus 720 that have published notification services to determine a whitelist for cross-device information synchronization. For example, among the terminals on the soft bus 720 that have published notification services, terminals whose login users are the same as the login users of the first terminal are added to the whitelist, and the devices in the whitelist are used as optional target devices for the processing module 713 to send notifications.

[0219] The processing module 713 is used to perform notification interaction with other terminals on the soft bus 720 that have published notification services.

[0220] Specifically, the processing module 713 can be used to select a target terminal of the first notification (for example, a terminal running the same service as the service indicated by the first notification, or a terminal that is the same as the terminal indicated by the first notification), determine a distribution strategy, and based on the soft bus 720, send a first notification to the target terminal so that the target terminal reports the information to be synchronized carried in the first notification to the service indicated by the first notification.

[0221] The determination of the distribution strategy may include the following optional steps:

[0222] In response to an information transmission channel based on the soft bus 720 being provided between the first terminal and any second terminal among the at least one second terminal, the first notification is sent to the any second terminal through the information transmission channel.

[0223] According to a preset protocol provided by the soft bus 720, the first notification is packaged and sent to the at least one second terminal.

[0224] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0225] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0226] In a sixth aspect, the embodiments of the information synchronization device provided by the present disclosure can be applied to computer devices. Figure 8 , which exemplarily shows a hardware schematic diagram of a computer device. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0227] The device 800 may include one or more of the following components: a processing component 801 , a memory 802 , a power component 803 , a multimedia component 804 , an audio component 805 , an input / output (I / O) interface 806 , a sensor component 807 , and a communication component 808 .

[0228] The processing component 801 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 801 may include one or more processors 809 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 801 may include one or more modules to facilitate the interaction between the processing component 801 and other components. For example, the processing component 801 may include a multimedia module to facilitate the interaction between the multimedia component 804 and the processing component 801.

[0229] The memory 802 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0230] The power component 803 provides power to the various components of the device 800. The power component 803 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 800.

[0231] The multimedia component 804 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 804 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0232] The audio component 805 is configured to output and / or input audio signals. For example, the audio component 805 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 802 or sent via the communication component 808. In some embodiments, the audio component 805 also includes a speaker for outputting audio signals.

[0233] I / O interface 806 provides an interface between processing component 801 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0234] The sensor assembly 807 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 807 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 807 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 807 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 807 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 807 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0235] The communication component 808 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 808 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 808 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0236] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned method for determining the holding method of the electronic device.

[0237] In a seventh aspect, the present disclosure, in an exemplary embodiment, further provides a non-transitory computer-readable storage medium including instructions, such as a memory 802 including instructions, and the instructions can be executed by a processor 809 of a device 800 to complete the above-mentioned method for determining the holding mode of an electronic device. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0238] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0239] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the inventions claimed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not claimed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0240] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0241] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. An information synchronization method, characterized in that: Applied to a first terminal, the method includes: Receiving a first notification sent by a first service, where the first notification carries information to be synchronized; Acquire at least one second terminal on which a notification service has been published on a soft bus, wherein the first terminal has published a notification service on the soft bus, and the soft bus is used to determine an optimal communication medium between the terminals on which the notification service has been published on the soft bus according to a communication factor in a current environment, and establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium; Based on the soft bus, the first notification is sent to the at least one second terminal.

2. The information synchronization method according to claim 1, characterized in that: The step of acquiring at least one second terminal of the notification service published on the soft bus includes: When at least one of the following conditions is met, at least one second terminal on the soft bus that has published a notification service is obtained: The first notification is encrypted using a preset encryption method; The soft bus meets the preset parameters; The logged-in user of the first terminal is the user indicated by the first notification.

3. The information synchronization method according to claim 1, characterized in that: The step of acquiring at least one second terminal of the notification service published on the soft bus includes: A terminal that satisfies at least one of the following conditions among multiple terminals that have published notification services on the soft bus is obtained as the second terminal: Running the same service as the first service; The logged-in user is the same as the user logged-in at the first terminal; The target terminal is consistent with that indicated by the first notification.

4. The information synchronization method according to claim 1, characterized in that: The sending the first notification to the at least one second terminal includes: In response to an information transmission channel based on the soft bus being provided between the first terminal and any second terminal among the at least one second terminal, the first notification is sent to the any second terminal through the information transmission channel.

5. The information synchronization method according to claim 1, characterized in that: The sending the first notification to the at least one second terminal includes: According to a preset protocol provided by the soft bus, the first notification is packaged and sent to the at least one second terminal.

6. The information synchronization method according to claim 1, characterized in that: The packaging and sending the first notification to the at least one second terminal includes: The first notification and notifications sent by other services except the first service are packaged and sent to the at least one second terminal, wherein the notifications sent by the other services are concurrent notifications of the first notification.

7. The information synchronization method according to claim 1, characterized in that: The receiving a first notification sent by a first service includes: Receive a first notification sent by a first service, and add the first notification to a first message queue; The sending the first notification to the at least one second terminal includes: Sending a notification included in the first message queue to the at least one second terminal.

8. The information synchronization method according to claim 7, characterized in that: The receiving a first notification sent by a first service and adding the first notification to a first message queue includes: When multiple first notifications sent by the first service are received, the multiple first notifications are packaged and added into the first message queue.

9. The information synchronization method according to claim 1, characterized in that: The first notification is sent by the first service calling a preset interface, wherein the preset interface is an interface provided by a framework for executing the information synchronization method.

10. An information synchronization method, characterized in that: Applied to the second terminal, the method includes: Based on a soft bus, receiving a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, and the second terminal has published a notification service on the soft bus, the soft bus is used to determine the optimal communication medium between the terminals that have published the notification service on the soft bus according to the communication factors in the current environment, and establish an information transmission channel between the terminals that have published the notification service based on the optimal communication medium; The information to be synchronized is reported to a second service, where the second service is the service indicated by the first notification.

11. The information synchronization method according to claim 10, characterized in that: The reporting the information to be synchronized to the second service includes: Adding the first notification to a second message queue; Report the information to be synchronized carried in the notification contained in the second message queue to the second service.

12. The information synchronization method according to claim 10, characterized in that: The method further comprises: The first notification is unpacked according to a preset protocol provided by the soft bus.

13. An information synchronization device, characterized in that: Applied to a first terminal, the device includes: A first receiving module, configured to receive a first notification sent by a first service, wherein the first notification carries information to be synchronized; an acquisition module, configured to acquire at least one second terminal on a soft bus that has published a notification service, the first terminal having published a notification service on the soft bus, the soft bus being configured to determine an optimal communication medium between the terminals on the soft bus that have published a notification service according to a communication factor in a current environment, and to establish an information transmission channel between the terminals on which the notification service has been published based on the optimal communication medium; A sending module is used to send the first notification to the at least one second terminal based on the soft bus.

14. An information synchronization device, characterized in that: Applied to a second terminal, the device includes: A second receiving module is configured to receive, based on a soft bus, a first notification sent by a first terminal that has published a notification service on the soft bus, the first notification carrying information to be synchronized, the second terminal has published a notification service on the soft bus, the soft bus is configured to determine an optimal communication medium between terminals that have published notification services on the soft bus according to a communication factor in a current environment, and to establish an information transmission channel between the terminals that have published notification services based on the optimal communication medium; The reporting module is used to report the information to be synchronized to a second service, where the second service is the service indicated by the first notification.

15. An information synchronization device, characterized in that: The device comprises: A soft bus, for determining an optimal communication medium between terminals that have published notification services on the soft bus according to communication factors in a current environment, and establishing an information transmission channel between the terminals that have published notification services based on the optimal communication medium; Information synchronization framework, including interface module, security module and processing module; Wherein, the interface module is used to notify and interact with the services on the terminal; The security module is used to verify the legitimacy of at least one of the notification, the user logged in on the terminal, and the soft bus; The processing module is used for performing notification interaction with other terminals on the soft bus that have published notification services.

16. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 12 is implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Soft bus communication method based on remote procedure call

    CN108804238A

  • Message board implementation method and device, equipment and storage medium

    CN115865946A

  • Multi-device collaboration method, electronic device, and multi-device collaboration system

    US20230345074A1