Calendar synchronization method and device, equipment and storage medium
By establishing secure connections in the Hongmeng system and providing multiple synchronization methods, the security and flexibility issues in smart device calendar synchronization are solved, and the user experience is improved.
Patent Information
- Application Number
- CN202510525654.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-07-11
AI Technical Summary
The existing smart device calendar synchronization solution poses the risk of data leakage, insufficient security, poor synchronization method flexibility, incomplete synchronization status feedback, and poor user experience.
By establishing a secure connection between the watch end and the device end in the Hongmeng system, it provides timing, watch active and device active synchronization methods, generate and send synchronization commands, and feedback the synchronization status, ensuring the security and flexibility of data interaction.
The security and flexibility of calendar synchronization have been improved, the user experience has been improved, making it convenient for problem positioning and solving, and meeting the needs of different scenarios.
Smart Images

Figure CN120301550A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data synchronization, and in particular to a calendar synchronization method, device, equipment and storage medium. Background Art
[0002] With the popularization of smart wearable devices, the demand for data interaction between watches and other smart devices is increasing day by day, especially the synchronization of calendar information. In the HarmonyOS ecosystem, users hope to be able to synchronize calendar schedules conveniently and securely between different devices, so as to obtain the latest schedule at any time and improve the efficiency of life and work.
[0003] In existing smart device calendar synchronization solutions, some realize the connection and data transmission between devices through wireless communication technologies such as Bluetooth or Wi-Fi. The existing systems provide a basic timed synchronization function to update calendar data at preset time intervals. In addition, the existing technologies use simple password verification or device pairing mechanisms to ensure the security of the connection.
[0004] The existing password verification or pairing mechanisms are difficult to resist complex network attacks, there is a risk of data leakage, and they are less flexible in the synchronization method and cannot meet the diverse needs of users. In addition, the feedback on the synchronization status in the existing solutions is not perfect, and it is difficult for devices to know whether the synchronization is successful and the reason for the failure, which brings inconvenience to users' use and problem troubleshooting. Summary of the Invention
[0005] The present invention provides a calendar synchronization method, device, equipment and storage medium to realize the calendar synchronization between the watch end and the device end, completely covering the user's calendar usage scenarios and improving the user experience.
[0006] According to an aspect of the present invention, there is provided a calendar synchronization method applied to the HarmonyOS, including: a watch end and a device end, and the method includes:
[0007] Establish a secure connection between the watch end and the device end;
[0008] Determine the synchronization method through the device end, generate a first synchronization command according to the synchronization method, and send the first synchronization command to the watch end based on the secure connection, where the synchronization method includes timed synchronization, active synchronization by the watch, and active synchronization by the device;
[0009] Perform calendar synchronization by the watch end according to the first synchronization command and feedback the synchronization status to the device end.
[0010] Optionally, establish a secure connection between the watch end and the device end, including: determining the device end to be connected by the watch end and sending a connection request to the device end; performing permission verification by the device end based on the connection request, and when the verification passes, determining to establish a secure connection with the watch end.
[0011] Optionally, determining the device end to be connected by the watch end includes: obtaining a device search instruction by the watch end and obtaining a device list within a specified range based on the device search instruction, where the device list includes each device identifier; screening each device identifier in the device list based on a preset field to determine a target device identifier; and determining the device end according to the target device identifier.
[0012] Optionally, determining the synchronization method by the device end includes: when a preset synchronization time is reached, determining the synchronization method as scheduled synchronization; when receiving a request synchronization command sent by the watch end, determining the synchronization method as watch-initiated synchronization; when detecting a calendar modification action, determining the synchronization method as device-initiated synchronization, where the calendar modification action includes addition, deletion, and modification.
[0013] Optionally, generating a first synchronization command according to the synchronization method includes: obtaining a corresponding instruction header template according to the synchronization method, where the instruction header template includes the data flow direction; obtaining the content to be synchronized and determining the date corresponding to the content to be synchronized; and combining the content to be synchronized, the date, and the instruction header template to generate a first synchronization command.
[0014] Optionally, before determining the synchronization method by the device end, the method further includes: obtaining a request synchronization command input by the user through a preset application on the watch end and sending the request synchronization command to the device end.
[0015] Optionally, performing calendar synchronization by the watch end according to the first synchronization command and feeding back the synchronization status to the device end includes: sending a second synchronization command to the local calendar based on the date and the content to be synchronized to perform calendar synchronization; when it is confirmed that the synchronization is completed, obtaining the synchronization status and reporting the synchronization status to the device end.
[0016] According to another aspect of the present invention, there is provided a calendar sharing device applied to the HarmonyOS system, including: a watch end and a device end, and the device includes:
[0017] A secure connection establishment module for establishing a secure connection between the watch end and the device end;
[0018] A synchronization command generation module for determining the synchronization method by the device end, generating a first synchronization command according to the synchronization method, and sending the first synchronization command to the watch end based on the secure connection, where the synchronization methods include scheduled synchronization, watch-initiated synchronization, and device-initiated synchronization;
[0019] A calendar synchronization module for performing calendar synchronization according to a first synchronization command on the watch side and feeding back the synchronization status to the device side.
[0020] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0021] At least one processor;
[0022] And a memory communicatively connected to the at least one processor;
[0023] Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a calendar sharing method according to any embodiment of the present invention.
[0024] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a calendar sharing method according to any embodiment of the present invention when executed.
[0025] The technical solution of the embodiment of the present invention can ensure the security of data interaction by establishing a secure connection, meet different scenario requirements by providing synchronization methods of timing, active on the watch side and active on the device side, and facilitate the device side to monitor by the watch side feeding back the synchronization status to the device side, which helps to quickly locate and solve problems occurring in the calendar synchronization process, and comprehensively improves the security, flexibility and user experience of calendar synchronization.
[0026] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0028] Figure 1 Is a flowchart of a calendar sharing method provided in Embodiment 1 of the present invention;
[0029] Figure 2 Is a flowchart of another calendar sharing method provided in Embodiment 2 of the present invention;
[0030] Figure 3It is a schematic diagram of a calendar sharing interaction process provided by Embodiment 2 of the present invention;
[0031] Figure 4 It is a schematic structural diagram of a calendar sharing device provided by Embodiment 3 of the present invention;
[0032] Figure 5 It is a schematic structural diagram of an electronic device for implementing a calendar sharing method according to an embodiment of the present invention. Detailed implementation manners
[0033] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0035] Embodiment 1
[0036] Figure 1 This is a flowchart of a calendar sharing method provided by Embodiment 1 of the present invention. This method can be executed by a calendar sharing device, which can be implemented in the form of hardware and / or software. The calendar sharing device can be configured in a HarmonyOS system and includes: a watch terminal and a device terminal. As Figure 1 shown, this method includes:
[0037] S110. Establish a secure connection between the watch terminal and the device terminal.
[0038] Among them, the watch end refers to a smart watch device running the OpenHarmony system. In the calendar synchronization method of this application, as one of the terminals for receiving and displaying calendar information, it has the functions of interacting with the user to view calendar schedules and receiving and executing calendar synchronization operations in response to synchronization commands sent from the device end. The device end refers to a standard device that is paired with the watch end and runs the OpenHarmony system, such as a mobile phone, a tablet, etc. The device end has relatively strong computing and storage capabilities and is responsible for determining the calendar synchronization method, generating synchronization commands, and sending them to the watch end. At the same time, it receives the synchronization status information fed back by the watch end. A secure connection refers to a communication channel established through security mechanisms such as encryption and authentication, which can ensure that the data transmitted between the watch end and the device end is not stolen or tampered with, guaranteeing the confidentiality and integrity of the data.
[0039] S120. Determine the synchronization method through the device end, generate a first synchronization command according to the synchronization method, and send the first synchronization command to the watch end based on the secure connection, where the synchronization methods include scheduled synchronization, active synchronization by the watch, and active synchronization by the device.
[0040] Among them, the synchronization methods include scheduled synchronization, active synchronization by the watch, and active synchronization by the device. Scheduled synchronization is to perform synchronization automatically at a preset time interval. Active synchronization by the watch is a synchronization operation triggered by the user on the watch end. Active synchronization by the device is an active synchronization initiated by the device end when it detects changes in calendar data. The first synchronization command refers to an instruction generated by the device end according to the synchronization method, which contains information such as the range of calendar data to be synchronized and the operation type, and is used to instruct the watch end to perform corresponding calendar synchronization operations.
[0041] Optionally, determining the synchronization method through the device end includes: when the preset synchronization time is reached, determining the synchronization method as scheduled synchronization; when receiving a request synchronization command sent from the watch end, determining the synchronization method as active synchronization by the watch; when detecting a calendar modification action, determining the synchronization method as active synchronization by the device, where the calendar modification actions include addition, deletion, and modification.
[0042] Among them, timed synchronization means that in the applications_calendar calendar schedule APP on the OpenHarmony standard device side, users can set the synchronization time for calendar schedules. For example, if the user sets the synchronization time to 0:00 every day, when the time reaches the preset synchronization time, that is, 0:00 every day, the device side will determine that the synchronization method is timed synchronization. At this time, the device side will send a specific instruction through the serial communication API provided by the OpenHarmony system to perform the synchronization operation. In addition, the OpenHarmony watch side is equipped with a calendar JsApp and has 1 sharing application preset. When the user clicks the "Request Synchronization" button in the calendar JsApp on the watch side, the watch side will send a request synchronization command to the device side. After receiving this command, the device side can determine that the synchronization method is active synchronization by the watch. When the device side detects a calendar modification action, it will determine that the synchronization method is active synchronization by the device. Calendar modification actions include operations such as adding, deleting, and modifying schedules. When the device side monitors that the user has performed a calendar modification action, it will automatically trigger the synchronization process.
[0043] Optionally, generating a first synchronization command according to the synchronization method includes: obtaining a corresponding instruction header template according to the synchronization method, where the instruction header template includes the data flow direction; obtaining the content to be synchronized and determining the date corresponding to the content to be synchronized; combining the content to be synchronized, the date, and the instruction header template to generate a first synchronization command.
[0044] It should be noted that different synchronization methods correspond to different instruction header templates, and the instruction header templates contain information about the data flow direction, which is used to clarify whether data is transmitted from the device side to the watch side or from the watch side to the device side.
[0045] Specifically, when the synchronization method is timed synchronization, the device side usually actively synchronizes calendar data to the watch side. The corresponding instruction header template is, for example, "af 030204", where "af 03" can be used as a fixed instruction start identifier, and "0204" indicates that the data flow direction is from the OpenHarmony standard device to the OpenHarmony watch for synchronization. When the synchronization method is active synchronization by the watch, it indicates that the data request is initiated from the watch side, and the device side responds and transmits data to the watch side. At this time, the corresponding instruction header template may be "af 030402", where "0402" indicates that the data is requested from the watch side and the device side synchronizes to the watch side. When active synchronization by the device is triggered by detecting a calendar modification action on the device side, the data flow direction is also from the device side to the watch side, and its instruction header template may be the same as that of timed synchronization, such as "af 030204".
[0046] Among them, the content to be synchronized refers to the calendar information that needs to be synchronized between the device side and the watch side, such as schedule arrangements, meeting reminders, etc. The device side will extract the content to be synchronized from its own calendar database. For example, if a new schedule is added, the device side will obtain the detailed information of the schedule, including the schedule title, start time, end time, location, etc. In addition, for different types of content to be synchronized, there will be corresponding identification information. For example, the identification corresponding to adding a schedule is "01", the identification corresponding to deleting a schedule is "02", and the identification corresponding to modifying a schedule is "03". The identification will also be reflected in the subsequent generated synchronization commands, which is convenient for the watch side to accurately identify and process different types of synchronized content.
[0047] It should be noted that the date information will be represented in a specific format, such as the combination of year, month, and day. Suppose the current schedule to be synchronized is a meeting on March 13, 2025, and the date information can be represented as "250313". Finally, by combining the instruction header template, the identification of the content to be synchronized, the date information, and the content to be synchronized itself according to certain rules. For example, for a scheduled synchronization and the content to be synchronized is a new schedule with the title "Project Meeting" on March 13, 2025. Suppose the instruction header template is "af 030204", the identification for adding a schedule is "01", the date is "250313", and the schedule title "Project Meeting" after encoding conversion is "C1E9B9F3BBE1D2E9", the finally generated first synchronization command can be represented as "af03020401250313C1E9B9F3BBE1D2E9". When the watch side receives the first synchronization command, it can perform corresponding calendar synchronization operations according to the information in it.
[0048] Optionally, before determining the synchronization method through the device side, the method further includes: obtaining a request synchronization command input by the user through a preset application on the watch side, and sending the request synchronization command to the device side.
[0049] It should be noted that the OpenHarmony watch side is equipped with a dedicated calendar JsApp, in which a sharing application is pre-installed. The sharing application provides a user interaction interface. When the user has a need to synchronize the calendar, the user can operate in the calendar JsApp of the watch. For example, in scenarios such as exercise and sleep, when the user wants to confirm the latest schedule on the standard device, the user will click a specific "Request Synchronization" button in the calendar JsApp on the watch side. At this time, the sharing application will obtain this request synchronization command input by the user.
[0050] Specifically, after the watch end obtains the request synchronization command input by the user, it will use the communication mechanism provided by the OpenHarmony system for data transmission. That is, after the watch and the standard device establish a secure connection, the watch end will send the request synchronization command based on the secure connection. For example, the request synchronization command can be transmitted to the device end through the serial communication API via the Bluetooth link that establishes the secure connection. After the device end receives the request synchronization command, it can determine that the synchronization method is active synchronization by the watch, and then start the subsequent synchronization process.
[0051] S130. Perform calendar synchronization according to the first synchronization command by the watch end, and feedback the synchronization status to the device end.
[0052] Among them, calendar synchronization refers to the interaction and update process of calendar schedule data between the device end and the watch end, ensuring that the calendar information displayed on both devices, such as schedule arrangements, meeting reminders, etc., is consistent, facilitating the user to view and manage calendar content on different devices at any time. The synchronization status refers to the information feedback by the watch end to the device end after completing the calendar synchronization operation, used to inform the device end whether the synchronization operation has been successfully executed.
[0053] Optionally, performing calendar synchronization according to the first synchronization command by the watch end and feedbacking the synchronization status to the device end includes: sending a second synchronization command to the local calendar of this end based on the date and the content to be synchronized for calendar synchronization; when it is confirmed that the synchronization is completed, obtaining the synchronization status and reporting the synchronization status to the device end.
[0054] Specifically, after the watch end receives the first synchronization command sent by the device end, it will first parse the command. The first synchronization command contains an instruction header template, an identifier of the content to be synchronized, date information, and the content to be synchronized itself. For example, assume that the received first synchronization command is "af 03020401250313C1E9B9F3BBE1D2E9". The watch end will recognize that "af 030204" is the instruction header, "01" is the identifier of the newly added schedule in the content to be synchronized, "250313" is the date information, and "C1E9B9F3BBE1D2E9" is the encoded schedule title "Project Meeting". The watch end can extract the date and the content to be synchronized from the parsed first synchronization command, and then generate a second synchronization command. The second synchronization command is specifically for the local calendar application on the watch end, and its purpose is to make the local calendar perform corresponding update operations. For example, in the case of adding a new schedule, the second synchronization command may contain instructions to create a new schedule and detailed information about the schedule, such as the title, date, time, etc. Then, the watch end will send the second synchronization command to the local calendar application of this end.
[0055] Further, after the calendar application on the watch end receives the second synchronization command, it will perform corresponding operations according to the information in the command. For example, if it is a new schedule, the calendar application will create a new schedule entry in the local calendar and enter information such as the title, date, and time; if it is to modify or delete a schedule, the calendar application will perform modification or deletion operations on the corresponding schedule entry to complete the calendar synchronization. In addition, after the calendar application on the watch end completes the synchronization operation, it will also feedback a completion signal to the watch system. The watch end confirms that the calendar synchronization has been completed based on the completion signal. For example, after successfully creating, modifying, or deleting a schedule entry, the calendar application will return a flag indicating successful operation. After the watch end detects this flag, it can determine that the synchronization is complete. At this time, the watch end will obtain the synchronization status information, and the synchronization status is usually divided into two cases: success and failure. If the flag feedback by the calendar application indicates successful operation, it means the synchronization status is successful. If an error occurs during the synchronization process, such as incorrect data format or insufficient storage space, the calendar application will return the corresponding error message, and the watch end will organize the received error message into a status of synchronization failure. Finally, the watch end will report the obtained synchronization status to the device end. After receiving the synchronization status information, the device end can understand the calendar synchronization situation on the watch end for further processing or prompting the user.
[0056] The technical solution of the embodiment of the present invention can ensure the security of data interaction by establishing a secure connection, meet different scenario requirements by providing synchronous methods of timing, watch initiative, and device initiative, and facilitate device-end monitoring and help quickly locate and solve problems occurring during calendar synchronization by the watch end feeding back the synchronization status to the device end, comprehensively improving the security, flexibility, and user experience of calendar synchronization.
[0057] Embodiment 2
[0058] Figure 2 The flowchart of a calendar sharing method provided by the second embodiment of the present invention adds the specific process of establishing a secure connection between the watch end and the device end on the basis of the first embodiment above. The specific content of steps S230 - S240 is substantially the same as that of steps S120 - S130 in the first embodiment, so it will not be repeated in this embodiment. As Figure 2 shown, the method includes:
[0059] S210. Determine the device end to be connected through the watch end and send a connection request to the device end.
[0060] Optionally, determining the device end to be connected through the watch end includes: obtaining a device search instruction through the watch end, and obtaining a device list within a specified range based on the device search instruction, where the device list includes each device identifier; screening each device identifier in the device list based on a preset field to determine a target device identifier; and determining the device end according to the target device identifier.
[0061] It should be noted that on the watch end of the HarmonyOS system, users can trigger the device search instruction in various ways. For example, the user may click the "Search for Devices" button in the watch's settings interface, and at this time, the watch system will generate a device search instruction. It can also be that when starting the calendar synchronization application, the application automatically sends a device search instruction to the watch system to prepare to establish a connection with a suitable device end for calendar synchronization.
[0062] Specifically, after receiving the device search instruction, the watch end will use its built-in Bluetooth module or other wireless communication modules to start searching for surrounding devices. The search range is usually determined by the communication capabilities of the devices and preset parameters. During the search process, the watch end will interact with the surrounding devices to obtain their device identifiers. Among them, the preset field is a condition preset by the watch end for screening devices. The watch end will traverse each device identifier in the device list and compare it with the preset field to determine the device end corresponding to the target device identifier. In addition, the user can also select one from each device identifier as the device end to be finally connected according to the connection requirement. After the user makes a selection, the watch end will determine the final device end according to the user's selection.
[0063] In a specific implementation, the user can operate the OpenHarmony watch to turn on the Bluetooth function, and at this time, the watch enters the device search state. The watch end scans for surrounding OpenHarmony standard devices through Bluetooth, and the list of searched devices will be displayed on the watch's connection interface. The user can select the device end to be connected from the list, and the watch end will determine the target device end to be connected according to the user's selection. Subsequently, the watch end can send a connection request to the selected device end by means of the Bluetooth communication mechanism provided by the OpenHarmony system.
[0064] S220. The device end performs permission verification based on the connection request, and when the verification passes, a secure connection with the watch end is determined.
[0065] Among them, a secure connection refers to a connection established after authentication based on the Universal Keystore Kit (HUKS) of the OpenHarmony system. HUKS provides a set of standard authentication processes to ensure that connections can only be established between legitimate devices, prevent illegal devices from accessing, and guarantee the security of data transmission. After establishing a secure connection, the device side and the watch side interact with data instructions through the serial communication API provided by the OpenHarmony system.
[0066] S230. Determine the synchronization method through the device side, generate a first synchronization command according to the synchronization method, and send the first synchronization command to the watch side based on the secure connection, where the synchronization method includes timed synchronization, active synchronization by the watch, and active synchronization by the device.
[0067] Optionally, determining the synchronization method through the device side includes: when the preset synchronization time is reached, determining the synchronization method as timed synchronization; when receiving a request synchronization command sent by the watch side, determining the synchronization method as active synchronization by the watch; when detecting a calendar modification action, determining the synchronization method as active synchronization by the device, where the calendar modification action includes adding, deleting, and modifying.
[0068] Optionally, generating the first synchronization command according to the synchronization method includes: obtaining the corresponding instruction header template according to the synchronization method, where the instruction header template includes the data flow direction; obtaining the content to be synchronized and determining the date corresponding to the content to be synchronized; combining the content to be synchronized, the date, and the instruction header template to generate the first synchronization command.
[0069] Optionally, before determining the synchronization method through the device side, the method further includes: obtaining a request synchronization command input by the user through a preset application on the watch side and sending the request synchronization command to the device side.
[0070] S240. Perform calendar synchronization on the watch side according to the first synchronization command and feedback the synchronization status to the device side.
[0071] Optionally, performing calendar synchronization on the watch side according to the first synchronization command and feedbacking the synchronization status to the device side includes: sending a second synchronization command to the local calendar based on the date and the content to be synchronized to perform calendar synchronization; when it is confirmed that the synchronization is completed, obtaining the synchronization status and reporting the synchronization status to the device side.
[0072] Specific application scenario: Figure 3 This is a schematic diagram of the calendar sharing interaction process provided in the second embodiment of the present invention. Figure 3 In it, the watch side is an OpenHarmony watch, and the device side is an OpenHarmony standard device, such as Figure 3As shown in the figure, during the device connection phase, the OpenHarmony watch actively sends a device connection request to the OpenHarmony standard device, attempting to establish a communication link. After receiving the request, the standard device performs permission verification and conducts an authentication operation through HUKS to ensure the legality of both parties' identities and prevent unauthorized devices from accessing. After successful authentication, a Bluetooth connection is established between the watch and the standard device, providing a channel for subsequent data transmission. During the calendar synchronization phase, during scheduled synchronization, the device will automatically initiate a calendar synchronization operation according to the preset time, that is, 0:00 every day, to keep the calendar information at both ends consistent. After the synchronization is completed, the watch will report the synchronization completion status to the standard device. The watch can also actively initiate a synchronization request according to the user's operation. After receiving the request, the standard device performs corresponding processing and the watch reports the synchronization completion status after the synchronization is completed. When there are operations such as addition, deletion, modification, and query on the local calendar of the standard device, the device will also actively initiate synchronization to synchronize the changed information to the watch, and the watch also reports the synchronization completion status after the synchronization is completed. In addition, after the watch completes the synchronization, it will make relevant reminders on the local side according to the settings of calendar events, such as schedule reminders, to facilitate the user to know relevant matters in a timely manner.
[0073] The technical solution of the embodiment of the present invention can ensure the security of data interaction by establishing a secure connection, meet different scenario requirements by providing scheduled, watch-initiated, and device-initiated synchronization methods, and facilitate device-side monitoring by the watch reporting the synchronization status to the device side, which helps to quickly locate and solve problems that occur during calendar synchronization, comprehensively improving the security, flexibility, and user experience of calendar synchronization.
[0074] Embodiment III
[0075] Figure 4 It is a schematic structural diagram of a calendar sharing device provided by Embodiment III of the present invention. As Figure 4 shown, the device includes: a secure connection establishment module 310 for establishing a secure connection between the watch side and the device side;
[0076] a synchronization command generation module 320 for determining a synchronization method through the device side, generating a first synchronization command according to the synchronization method, and sending the first synchronization command to the watch side based on the secure connection, where the synchronization methods include scheduled synchronization, watch-initiated synchronization, and device-initiated synchronization;
[0077] a calendar synchronization module 330 for performing calendar synchronization on the watch side according to the first synchronization command and feeding back the synchronization status to the device side.
[0078] Optionally, the secure connection establishment module 310 specifically includes: a device-to-be-connected determination unit, configured to: determine the device-to-be-connected at the watch end and send a connection request to the device-to-be-connected; a secure connection establishment unit, configured to: perform permission verification at the device-to-be-connected based on the connection request, and when the verification passes, determine to establish a secure connection with the watch end.
[0079] Optionally, the device-to-be-connected determination unit is specifically configured to: obtain a device search instruction at the watch end, and obtain a device list within a specified range based on the device search instruction, where the device list includes each device identifier; screen each device identifier in the device list based on a preset field to determine a target device identifier; and determine the device-to-be-connected according to the target device identifier.
[0080] Optionally, the synchronization command generation module 320 specifically includes: a synchronization method determination unit, configured to: when a preset synchronization time is reached, determine that the synchronization method is timed synchronization; when a request synchronization command sent by the watch end is received, determine that the synchronization method is watch-initiated synchronization; when a calendar modification action is detected, determine that the synchronization method is device-initiated synchronization, where the calendar modification action includes addition, deletion, and modification.
[0081] Optionally, the synchronization command generation module 320 specifically includes: a first synchronization command generation unit, configured to: obtain a corresponding instruction header template according to the synchronization method, where the instruction header template includes a data flow direction; obtain the content to be synchronized, and determine the date corresponding to the content to be synchronized; and combine the content to be synchronized, the date, and the instruction header template to generate a first synchronization command.
[0082] Optionally, the apparatus further includes: a request synchronization command sending module, configured to obtain a request synchronization command input by a user through a preset application at the watch end before determining the synchronization method at the device-to-be-connected, and send the request synchronization command to the device-to-be-connected.
[0083] Optionally, the calendar synchronization module 330 is specifically configured to: send a second synchronization command to the local calendar based on the date and the content to be synchronized for calendar synchronization; after confirming that the synchronization is completed, obtain the synchronization status and report the synchronization status to the device-to-be-connected.
[0084] The technical solution of the embodiment of the present invention can ensure the security of data interaction by establishing a secure connection, meet different scenario requirements by providing timed, watch-initiated, and device-initiated synchronization methods, and the watch end will feedback the synchronization status to the device-to-be-connected, which is convenient for the device-to-be-connected to monitor and helps to quickly locate and solve problems occurring during calendar synchronization, comprehensively improving the security, flexibility, and user experience of calendar synchronization.
[0085] A calendar sharing device provided by an embodiment of the present invention can execute a calendar sharing method provided by any embodiment of the present invention, and has a function module corresponding to the execution method and beneficial effects.
[0086] Embodiment 4
[0087] Figure 5 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital assistant, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0088] As Figure 5 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0089] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0090] The processor 11 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a calendar sharing method.
[0091] In some embodiments, a calendar sharing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the calendar sharing method described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute a calendar sharing method by any other suitable means (e.g., by means of firmware).
[0092] The various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0093] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0094] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0095] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0096] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0097] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0098] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0099] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A calendar synchronization method, characterized in that, Applied to the HarmonyOS system, including: a watch end and a device end. The method includes: Establish a secure connection between the watch end and the device end; Determine the synchronization method through the device end, generate a first synchronization command according to the synchronization method, and send the first synchronization command to the watch end based on the secure connection, where the synchronization methods include timed synchronization, watch-initiated synchronization, and device-initiated synchronization; Perform calendar synchronization by the watch end according to the first synchronization command and feedback the synchronization status to the device end.
2. The method according to claim 1, wherein The establishment of the secure connection between the watch end and the device end includes: Determine the device end to be connected through the watch end and send a connection request to the device end; Perform permission verification by the device end based on the connection request, and when the verification passes, determine to establish a secure connection with the watch end.
3. The method according to claim 2, characterized in that The determination of the device end to be connected through the watch end includes: Obtain a device search instruction through the watch end and obtain a list of devices within a specified range based on the device search instruction, where the device list includes each device identifier; Filter each device identifier in the device list based on a preset field to determine the target device identifier; Determine the device end according to the target device identifier.
4. The method according to claim 1, characterized in that The determination of the synchronization method through the device end includes: When the preset synchronization time is reached, determine the synchronization method as timed synchronization; When receiving a request synchronization command sent by the watch end, determine the synchronization method as watch-initiated synchronization; When detecting a calendar modification action, determine the synchronization method as device-initiated synchronization, where the calendar modification action includes addition, deletion, and modification.
5. The method according to claim 4, wherein The generation of the first synchronization command according to the synchronization method includes: Obtain the corresponding instruction header template according to the synchronization method, where the instruction header template includes the data flow direction; Obtain the content to be synchronized and determine the date corresponding to the content to be synchronized; Combine the content to be synchronized, the date, and the instruction header template to generate the first synchronization command.
6. The method according to claim 4, wherein Before determining the synchronization method through the device end, the method further includes: Obtain a request synchronization command input by the user through a preset application on the watch end and send the request synchronization command to the device end.
7. The method according to claim 5, characterized in that The performance of calendar synchronization by the watch end according to the first synchronization command and the feedback of the synchronization status to the device end includes: Send a second synchronization command to the local calendar based on the date and the content to be synchronized to perform calendar synchronization; After confirming that the synchronization is completed, obtain the synchronization status and report the synchronization status to the device end.
8. A calendar sharing device, characterized in that, Applied to the HarmonyOS system, including: a watch end and a device end, characterized by including: A secure connection establishment module for establishing a secure connection between the watch end and the device end; A synchronization command generation module for determining the synchronization method through the device end, generating a first synchronization command according to the synchronization method, and sending the first synchronization command to the watch end based on the secure connection, where the synchronization methods include timed synchronization, watch-initiated synchronization, and device-initiated synchronization; A calendar synchronization module for performing calendar synchronization by the watch end according to the first synchronization command and feedbacking the synchronization status to the device end.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions for causing a processor to execute the method according to any one of claims 1-7 when executed.