Note synchronization method and device, storage medium and electronic equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2026-04-10
AI Technical Summary
Existing note-taking software has data loss during synchronization, which affects the security and reliability of local data, especially when network is unstable or user operations are likely to lead to data loss.
By creating a temporary storage space in the terminal device, obtaining the difference between the server's note identification set and the local note identification set, obtaining the server's target record data and syncing it to the local note directory, ensuring that the data is processed in the temporary storage space and then synchronizing it, realizing data security and reliability.
While ensuring local data security, the reliability and security of note synchronization are improved, data loss is avoided, and data integrity is ensured.
Smart Images

Figure CN121844307A_ABST
Abstract
Description
Note synchronization method, device, storage medium and electronic device Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a note synchronization method, device, storage medium, and electronic device. Background Art
[0002] Nowadays, with the popularization and continuous development of cloud services, more and more users are accustomed to recording data in note-taking software. In the process of using note-taking software, improving the security and reliability of note synchronization is an urgent problem to be solved.
[0003] Summary of the Invention
[0004] The embodiments of this specification provide a note synchronization method, device, storage medium and electronic device. By verifying the note identifier of the server and the local note identifier in the temporary storage space, the recorded data that exists on the server but not locally is determined and synchronized to the local note directory. Then, the data is processed in the temporary storage space, and the data that needs to be synchronized to the local on the server is determined based on the identifier, and the data is downloaded and synchronized. This achieves data synchronization while ensuring the security of the local data, thereby improving the reliability and security of synchronized notes.
[0005] In a first aspect, embodiments of this specification provide a note synchronization method, applied to a note application, comprising:
[0006] In response to a note synchronization instruction, creating a first temporary storage space, the note synchronization instruction being triggered by a note application in a logged-in state;
[0007] Obtaining from the server a first note identifier set corresponding to the user account currently logged into the note application, and storing the first note identifier set and the second note identifier set in a first temporary storage space, wherein the second note identifier set includes all second note identifiers corresponding to the local note directory of the ink screen;
[0008] Obtaining a target note identifier of the first temporary storage space, where the target note identifier is a note identifier that belongs to the first note identifier set but does not belong to the second note identifier set;
[0009] Obtain target record data corresponding to the target note identifier from the server, and store the target record data in the first temporary storage space;
[0010] The target record data and target note identifier in the first temporary storage space are synchronized to the local note directory.
[0011] In a second aspect, an embodiment of this specification provides a note synchronization device, the device comprising:
[0012] A first space creation unit, configured to create a first temporary storage space in response to a note synchronization instruction, where the note synchronization instruction is triggered by a note application in a logged-in state;
[0013] an identification set acquisition unit, configured to acquire, from the server, a first note identification set corresponding to the user account currently logged into the note application, and store the first note identification set and a second note identification set in the local note directory in a first temporary storage space, wherein the second note identification set includes all second note identifications corresponding to the local note directory of the ink screen;
[0014] an identifier determining unit, configured to obtain a target note identifier from the first temporary storage space, the target note identifier being a target note identifier that belongs to the first note identifier set but does not belong to the second note identifier set;
[0015] A data acquisition unit, configured to acquire target record data corresponding to a target note identifier from a server, and store the target record data in a first temporary storage space;
[0016] The note synchronization unit is used to synchronize the target record data and target note identifier in the first temporary storage space to the local note directory.
[0017] In a third aspect, an embodiment of this specification provides a computer storage medium, which stores a plurality of instructions suitable for being loaded by a processor and executing the steps of the above method.
[0018] In a fourth aspect, an embodiment of this specification provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.
[0019] In an embodiment of the present specification, by responding to a triggered note synchronization instruction, a target note identifier is obtained, which is stored in a first temporary storage space and included in a first note identifier set on the server but not in a second note identifier set on the local note directory, and target record data corresponding to the target note identifier is obtained on the server and stored in the first temporary storage space. The target record data and the target note identifier in the first temporary storage space are then synchronized to the local note directory, thereby determining the notes that are on the server but not locally based on verification of the server's note identifier and the local note identifier in the temporary storage space, and synchronizing them to the local note directory. Furthermore, by processing the data in the temporary storage space and determining the data on the server that needs to be synchronized to the local based on the identifier, the data is downloaded and synchronized, thereby achieving data synchronization while ensuring the security of the local data, thereby improving the reliability and security of synchronized notes. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0021] FIG1 is a system architecture diagram of a note synchronization method provided by an embodiment of this specification;
[0022] FIG2 is a flow chart of a note synchronization method provided in an embodiment of this specification;
[0023] FIG3 is a flow chart of another note synchronization method provided in an embodiment of this specification;
[0024] FIG4 is a schematic diagram illustrating an example of setting a modification operation to be enforced according to an embodiment of this specification;
[0025] FIG5 is a schematic diagram illustrating an example of adding target record data to a local note directory according to an embodiment of the present disclosure;
[0026] FIG6 is a schematic diagram illustrating another example of adding target record data to a local note directory according to an embodiment of the present disclosure;
[0027] FIG7 is a schematic diagram illustrating an example of adding target record data to a note application interface provided by an embodiment of this specification;
[0028] FIG8 is a schematic diagram illustrating another example of adding target record data to a note application interface according to an embodiment of the present disclosure;
[0029] FIG9 is a schematic diagram of the structure of a note synchronization device provided in an embodiment of this specification;
[0030] FIG10 is a schematic structural diagram of another note synchronization device provided in an embodiment of this specification;
[0031] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0032] To make the features and advantages of this specification more obvious and easy to understand, the technical solutions in this specification are clearly and completely described below in conjunction with the drawings in this specification. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of this specification.
[0033] In the prior art, when note-taking software synchronizes notes, it typically synchronizes data with the cloud based on data stored in the cloud. This can lead to data loss, impacting the security and reliability of local data. For example, if a user logs in to their account on multiple different terminals, adds new records on different terminals, and uploads the data from different terminals to the cloud under the same account, when the user logs in to their account on the e-ink screen, the e-ink screen's note-taking software will check for differences between the data stored there and the data stored locally on the e-ink screen. If there are new records, the notebook corresponding to the new records will overwrite the notebook locally on the e-ink screen. However, various problems may arise during this process, leading to data loss. For example, if the network connection is unstable or interrupted, if the entire notebook is not overwritten, data synchronization may fail or the entire notebook data may be lost. For example, if the user performs operations during the synchronization process, such as changing the file name or moving the file location, the change in the file name or the file location may prevent the note-taking software from finding the original notebook or the original notebook location, resulting in data synchronization failure or the loss of the entire notebook data. During the synchronization process, if the synchronization fails, the data recorded locally on the e-ink screen may be lost, affecting the security and reliability of the local data.
[0034] Based on this, an embodiment of the present specification provides a note synchronization method. Using the embodiment of the present specification, by responding to a triggered note synchronization instruction, a target note identifier stored in a first temporary storage space is obtained, which is included in a first note identifier set on the server but not in a second note identifier set in the local note directory. The target record data corresponding to the target note identifier is obtained on the server and stored in the first temporary storage space. The target record data and the target note identifier in the first temporary storage space are synchronized to the local note directory. Therefore, based on the verification of the server's note identifier and the local note identifier in the temporary storage space, the notes that are present on the server but not locally are determined and synchronized to the local note directory. Furthermore, the data is processed in the temporary storage space, and the data that needs to be synchronized to the local on the server is determined based on the identifier. The data is downloaded and synchronized, thereby achieving data synchronization while ensuring the security of the local data, thereby improving the reliability and security of synchronized notes.
[0035] Please refer to Figure 1, which is a system structure diagram of a note synchronization method provided in an embodiment of this specification. As shown in Figure 1, the note synchronization method provided in an embodiment of this specification can be applied to a terminal device to synchronize notes. The system structure provided in an embodiment of this specification mainly includes an interactive device 10 and a server 20. Among them, the terminal device 10 can be a device with a network transmission function and a note application installed, such as a smart phone, an interactive tablet, a personal computer, etc.; the server 20 can be a server corresponding to the note application, such as a hardware server, a virtual server, an integrated server group, a cloud server, etc.
[0036] In an embodiment of the present specification, the terminal device 10 creates a first temporary storage space in response to a note synchronization instruction triggered in a note application in a logged-in state, obtains a first note identification set corresponding to a user account of the logged-in note application in the server 20, stores the first note identification set and the second note identification set of the local note directory in the first temporary storage space, obtains a target note identification included in the first note identification set but not included in the second note identification set in the first temporary storage space, obtains target record data corresponding to the target note identification in the server 20, stores the target record data in the first temporary storage space, and synchronizes the target record data and the target note identification in the first temporary storage space to the local note directory.
[0037] In an embodiment of the present specification, by responding to a triggered note synchronization instruction, a target note identifier is obtained that belongs to a first note identifier set of the server but does not belong to a second note identifier set in the local note directory and is stored in a first temporary storage space, and target record data corresponding to the target note identifier is obtained in the server and stored in the first temporary storage space, and then the target record data and the target note identifier in the first temporary storage space are synchronized to the local note directory, thereby determining the notes that exist on the server but not locally based on the verification of the server's note identifier and the local note identifier in the temporary storage space, and synchronizing them to the local note directory, and then processing the data in the temporary storage space, and determining the data that needs to be synchronized to the local based on the identifier, and downloading and synchronizing the data, thereby achieving data synchronization while ensuring the security of the local data, and improving the reliability and security of synchronized notes.
[0038] Based on the system architecture shown in FIG1 , the note synchronization method provided in the embodiment of this specification will be introduced in detail in combination with FIG2 .
[0039] Please refer to Figure 2, which is a flowchart of a note synchronization method according to an embodiment of this specification. As shown in Figure 2, the method is applied to a note application and may include the following steps S101 to S105.
[0040] S101, creating a first temporary storage space in response to a note synchronization instruction;
[0041] In one embodiment, when the note application in the terminal device is in a logged-in state, a note synchronization instruction is triggered, and a first temporary storage space is created in response to the triggered note synchronization instruction.
[0042] The note application may be an application for editing and displaying notes. The note application has a user login function. When different user accounts are used to log in to the note application, different notes are displayed.
[0043] Notes can be note data or shorthand data. Note data can include at least one notebook, each containing at least one note page; shorthand data can include a shorthand notebook, each containing at least one shorthand page. The shorthand notebook can be a data recording program that is continuously active within the note application, allowing users to access the notebook at any time for data recording. To avoid affecting the user's use of the terminal device, the notebook's display interface can be minimized when exiting the notebook.
[0044] It should be noted that the note application may be an application set including a note application and a shorthand application, or may be an application including a note program and a shorthand program, where the note program and the shorthand program are two functional modules in the note application.
[0045] The note synchronization instruction can be triggered by the note application in a logged-in state to synchronize notes corresponding to the user account. The triggering condition of the note synchronization instruction can be a manual instruction generated by the user, or a synchronization instruction generated based on a fixed duration. For example, the note synchronization instruction can be automatically triggered when the note application switches from a non-logged-in state to a logged-in state, or can be triggered when the user clicks the synchronization button in the note application interface of the note application, etc.
[0046] The user account may be an identifier corresponding to an account created by the user, and each user account may correspond to different notes.
[0047] The first temporary storage space may be a storage space created in the memory of the terminal device.
[0048] S102, obtaining a first note identifier set corresponding to the user account that logs into the note application from the server, and storing the first note identifier set and a second note identifier set in the local note directory into a first temporary storage space;
[0049] In one embodiment, the note application sends an identification acquisition request to the server in response to a note synchronization instruction, receives a first note identification set corresponding to the user account of the logged-in note application returned by the server, and stores the first note identification set and the second note identification set in the local note directory in a first temporary storage space.
[0050] The identification acquisition request can be a request for obtaining the note identification set corresponding to the user account. The identification acquisition request carries the user account logged in by the current note application, so that the server can find the first note identification set corresponding to the user account and send the first note identification set to the terminal device.
[0051] The first note identifier set may be a set of note identifiers corresponding to user accounts in the server, and the first note identifier set may include at least one first note or first shorthand first note identifier.
[0052] The first note may be a notebook or shorthand page stored in the server.
[0053] The first note identifier may be a note identifier used to mark the first note, for example, it may be a notebook identifier of a notebook, or it may be an identifier of each shorthand page in a shorthand book.
[0054] Note: Note IDs can be different from note names. To improve note reliability, note IDs are immutable. For example, if a notebook is created with the note ID "Notebook C" and the notebook name is "Notebook C," and you rename "Notebook C" to "Notebook C1," the note ID remains "Notebook C."
[0055] The local note directory can be a directory on the terminal device for storing the second note. The local note directory can be a local notebook directory or a local shorthand directory. The local shorthand directory can be a directory for storing local shorthand data. The local shorthand directory can be the same directory as the local note directory or a different directory, and can be set according to actual circumstances.
[0056] The second note may be a notebook or shorthand data stored in the terminal device. The second note identifier set may be a set of all second note identifiers corresponding to the local note directory of the ink screen.
[0057] The second note identifier may be an identifier corresponding to the second note in the local note directory, and may specifically be a notebook identifier or a shorthand page identifier.
[0058] It can be understood that in order to improve the security of the second notes of the terminal device, the second note identifier of each second note in the local note directory is copied to the first temporary storage space to avoid damage to the data in the local note directory when data corruption occurs during data processing in the first temporary storage space.
[0059] Furthermore, in addition to storing the second note identification set of the local note directory in the first temporary storage space to facilitate identification comparison between the first note identification set and the second note identification set, the second note identification set and each second note in the local note directory can also be stored together in the first temporary storage space. The specific setting can be made according to actual needs.
[0060] S103, obtaining the target note identifier of the first temporary storage space;
[0061] In one embodiment, each first note identifier of the first note identifier set in the first temporary storage space is compared with each second note identifier in the second note identifier set to obtain note identifiers that belong to the first note identifier set but not to the second note identifier set.
[0062] For example, the first note identification set includes "Notebook a", "Notebook b" and "Notebook c", and the second note identification set includes "Notebook a" and "Notebook b". After comparison, it can be determined that "Notebook c" is a note identification included in the first note identification set but not included in the second note identification set, then "Notebook c" is determined as the target note identification.
[0063] It can be understood that the target note identifier may include at least one note identifier.
[0064] S104, obtaining target record data corresponding to the target note identifier from the server, and storing the target record data in a first temporary storage space;
[0065] In one embodiment, after determining the target note identifier in the first temporary storage space, a data acquisition request is sent to the server based on the target note identifier, the target record data corresponding to the target note identifier in the data acquisition request returned by the server is obtained, and the target record data is stored in the first temporary storage space.
[0066] The data acquisition request may be a request for acquiring target record data on the server side, and the data acquisition request carries a target note identifier.
[0067] The target record data may be the record data corresponding to the target note identifier. For example, if the target note identifier is "Notebook C," the target record data corresponding to the target note identifier is the notebook with the note identifier "Notebook C." If the target note identifier is "Shorthand Page 5," the target record data corresponding to the target note identifier is the shorthand page with the note identifier "Shorthand Page 5."
[0068] S105, synchronizing the target record data and target note identifier in the first temporary storage space to the note application;
[0069] In one embodiment, after the target record data is stored in the first temporary storage space, the target record data and the target note identifier in the first temporary storage space are synchronized to the note application based on the data type of the target record data.
[0070] Specifically, when the target record data is a target notebook and the target note identifier is a target notebook identifier, the target notebook and the target notebook identifier in the first temporary storage space are added to the note application.
[0071] It can be understood that when the target record data is a target notebook, the local note directory can be a local note directory, and the local note directory includes at least one notebook.
[0072] Exemplary methods include adding the target notebook after the last notebook in the local note directory, or adding it based on the target notebook's name. For example, if the target notebook is "Notebook C" and the target note is identified as "Notebook C," "Notebook C" and "Notebook C" are added to the local note directory, and then sorted based on the names of the notebooks in the local note directory.
[0073] Furthermore, when the target record data is the target shorthand page and the target note identifier is the target shorthand page identifier, the target shorthand page and the target shorthand page identifier are merged with the local shorthand data obtained from the local shorthand directory to obtain updated shorthand data, and the updated shorthand data in the first temporary storage space replaces the local shorthand data in the local shorthand directory.
[0074] The updated shorthand data may be shorthand data generated in the first temporary storage space and used to replace the local shorthand data.
[0075] Exemplarily, a feasible method for merging the target shorthand page and the target shorthand page identifier with the local shorthand data obtained from the local shorthand directory may be to merge the target shorthand page to the end of the local shorthand data, and establish a corresponding relationship between the target shorthand page identifier and the local shorthand data, thereby completing the merging of the target shorthand page and the target shorthand page identifier with the local shorthand data to obtain updated shorthand data.
[0076] Furthermore, the method of replacing the local shorthand data in the local shorthand directory with the updated shorthand data in the first temporary storage space can be: when the local shorthand data has not been modified during the process of obtaining the updated shorthand data, the local shorthand data in the local shorthand directory is replaced with the updated shorthand data in the first temporary storage space; when the local shorthand data is modified during the process of obtaining the updated shorthand data, the updated shorthand data is deleted.
[0077] In an embodiment of the present specification, by responding to a triggered note synchronization instruction, a target note identifier is obtained that belongs to a first note identifier set on the server but does not belong to a second note identifier set in the local note directory and is stored in a first temporary storage space, and target record data corresponding to the target note identifier is obtained on the server and stored in the first temporary storage space, and then the target record data and the target note identifier in the first temporary storage space are synchronized to the local note directory. Thus, based on the verification of the server's note identifier and the local note identifier in the temporary storage space, notes that are present on the server but not locally are determined and synchronized to the local note directory. Furthermore, by processing the data in the temporary storage space and determining the data on the server that needs to be synchronized to the local based on the identifier, data synchronization is achieved while ensuring the security of the local data, thereby improving the reliability and security of synchronized notes.
[0078] Please refer to Figure 3, which is a flowchart of a note synchronization method according to an embodiment of this specification. As shown in Figure 3, the method is applied to a note application and may include the following steps S201 to S212.
[0079] S201, creating a first temporary storage space in response to a note synchronization instruction;
[0080] In one embodiment, when the note application in the terminal device is in a logged-in state, a note synchronization instruction is triggered, and a first temporary storage space is created in response to the triggered note synchronization instruction.
[0081] The note application may be an application for editing and displaying notes. The note application has a user login function. When different user accounts are used to log in to the note application, different notes are displayed.
[0082] Notes can be note data or shorthand data. Note data can include at least one notebook, each containing at least one note page; shorthand data can include a shorthand notebook, each containing at least one shorthand page. The shorthand notebook can be a data recording program that is continuously active within the note application, allowing users to access the notebook at any time for data recording. To avoid affecting the user's use of the terminal device, the notebook's display interface can be minimized when exiting the notebook.
[0083] It should be noted that the note application may be an application set including a note application and a shorthand application, or may be an application including a note program and a shorthand program, where the note program and the shorthand program are two functional modules in the note application.
[0084] The note synchronization instruction may be an instruction for synchronizing notes corresponding to a user account. The triggering condition of the note synchronization instruction may be an instruction generated by a manual operation of the user, or a synchronization instruction generated based on a fixed duration. For example, the note synchronization instruction may be automatically triggered when the note application switches from a non-logged-in state to a logged-in state, or may be triggered when the user clicks a synchronization button in the note application interface of the note application, etc.
[0085] A user account can be an identifier corresponding to an account created by the user, and each user account corresponds to different notes. It should be noted that the same user account can be logged in simultaneously on different terminal devices, and the data in the local note directories of each terminal device does not interfere with each other. It is understandable that in order to facilitate data transmission between different terminal devices, a feasible method is to use the server corresponding to the note application as the server, and to use different terminal devices as servers for data transmission. The specific setting can be based on actual needs.
[0086] The first temporary storage space may be a storage space created in the memory of the terminal device.
[0087] Furthermore, if the note application is in a non-logged-in state and a second modification operation occurs on the second note in the local note directory, then the note application responds to the note synchronization instruction when it is in a logged-in state, and the second modification operation is a modification operation in a non-mandatory state; if the note application is in a non-logged-in state and a third modification operation occurs on the second note in the local note directory, then the note application does not respond to the note synchronization instruction when it is in a logged-in state, and the third modification operation is a modification operation in a mandatory state.
[0088] It should be noted that the note-taking application allows users to switch between different users and log out. When logged out, if a user makes a second modification to a note in the local note directory and receives a note synchronization instruction, the second note will be synchronized with the first note on the server. If a third modification occurs, it can be assumed that the user does not want to restore the third modification, and thus, even if a note synchronization instruction is received, the note synchronization instruction will not be responded to.
[0089] Furthermore, a feasible method may be to send the third modification operation to the server when the third modification operation occurs, so that the server modifies the first note based on the third modification operation. It should be noted that whether to modify the first note on the server terminal based on the third modification operation can be set according to actual needs.
[0090] The second modification operation can be operations such as adding, deleting and updating the second note, specifically adding or deleting a notebook, shorthand page or note page, entering data in the shorthand page or note page, or adjusting the order of the shorthand page or note page.
[0091] The forced execution state can be when the user performs a modification operation in the logged out state, selects the "Forced Execution" option in the application interface as shown in Figure 4, and selects the "OK" option in the inquiry window displayed in Figure 4 to set the modification operation as the third modification operation.
[0092] S202, obtaining a first note identifier set corresponding to the user account currently logged into the note application from the server, and storing the first note identifier set and a second note identifier set in the local note directory into a first temporary storage space;
[0093] In one embodiment, the note application sends an identification acquisition request to the server in response to a note synchronization instruction, receives a first note identification set corresponding to the user account of the logged-in note application returned by the server, and stores the first note identification set and the second note identification set in the local note directory in a first temporary storage space.
[0094] The identification acquisition request can be a request for obtaining the note identification set corresponding to the user account. The identification acquisition request carries the user account logged in by the current note application, so that the server can find the first note identification set corresponding to the user account and send the first note identification set to the terminal device.
[0095] The first note identifier set may be a set of note identifiers corresponding to user accounts in the server, and the first note identifier set may include at least one first note identifier.
[0096] The first note may be a notebook or shorthand page stored in the server.
[0097] The first note identifier may be a note identifier used to mark the first note, for example, it may be a notebook identifier of a notebook, or it may be an identifier of each shorthand page in a shorthand book.
[0098] Note: Note IDs can be different from note names. To improve note reliability, note IDs are immutable. For example, if a notebook is created with the note ID "Notebook C" and the notebook name is "Notebook C," and you rename "Notebook C" to "Notebook C1," the note ID remains "Notebook C."
[0099] The local note directory can be a directory on the terminal device for storing the second note. The local note directory can be a local notebook directory or a local shorthand directory. The local shorthand directory can be a directory for storing local shorthand data. The local shorthand directory can be the same directory as the local note directory or a different directory, and can be set according to actual circumstances.
[0100] The second note may be a notebook or shorthand data stored in the terminal device. The second note identifier set may be a set of all second note identifiers corresponding to the local note directory of the ink screen.
[0101] The second note identifier may be an identifier corresponding to the second note in the local note directory, and may specifically be a notebook identifier or a shorthand page identifier.
[0102] It can be understood that in order to improve the security of the second notes of the terminal device, the second note identifier of each second note in the local note directory is copied to the first temporary storage space to avoid damage to the data in the local note directory when data corruption occurs during data processing in the first temporary storage space.
[0103] Furthermore, in addition to storing the second note identification set of the local note directory in the first temporary storage space to facilitate identification comparison between the first note identification set and the second note identification set, the second note identification set and each second note in the local note directory can also be stored together in the first temporary storage space. The specific setting can be made according to actual needs.
[0104] S203, identifying the target note in the first temporary storage space;
[0105] In one embodiment, each first note identifier of the first note identifier set in the first temporary storage space is compared with each second note identifier in the second note identifier set to obtain a target note identifier that belongs to the first note identifier set but does not belong to the second note identifier set.
[0106] For example, the first note identification set includes "Notebook a", "Notebook b" and "Notebook c", and the second note identification set includes "Notebook a" and "Notebook b". After comparison, it can be determined that "Notebook c" is a note identification included in the first note identification set but not included in the second note identification set, then "Notebook c" is determined as the target note identification.
[0107] It can be understood that the target note identifier may include at least one note identifier.
[0108] S204, obtaining target record data corresponding to the target note identifier from the server, and storing the target record data in a first temporary storage space;
[0109] In one embodiment, after determining the target note identifier in the first temporary storage space, a data acquisition request is sent to the server based on the target note identifier, the target record data corresponding to the target note identifier in the data acquisition request returned by the server is obtained, and the target record data is stored in the first temporary storage space.
[0110] The data acquisition request may be a request for acquiring target record data on the server side, and the data acquisition request carries a target note identifier.
[0111] The target record data may be the record data corresponding to the target note identifier. For example, if the target note identifier is "Notebook C," the target record data corresponding to the target note identifier is the notebook with the note identifier "Notebook C." If the target note identifier is "Shorthand Page 5," the target record data corresponding to the target note identifier is the shorthand page with the note identifier "Shorthand Page 5."
[0112] S205, synchronizing the target record data and target note identifier in the first temporary storage space to the local note directory;
[0113] In one embodiment, after the target record data is stored in the first temporary storage space, the target record data and the target note identifier in the first temporary storage space are synchronized to the local note directory based on the data type of the target record data.
[0114] Specifically, when the target record data is a target notebook and the target note identifier is a target notebook identifier, the target notebook and the target notebook identifier in the first temporary storage space are added to the local note directory.
[0115] It can be understood that when the target record data is a target notebook, the local note directory can be a local note directory, and the local note directory includes at least one notebook.
[0116] Exemplarily, the adding method may be to add the target notebook to the back of the last notebook in the local note directory, or to add it according to the name of the target notebook. For example, the target notebook is "Notebook C", the target note is identified as "Notebook c", and "Notebook C" and "Notebook c" are added to the local note directory, and then sorted according to the names of the notebooks in the local note directory. For example, as shown in Figure 5, the local note directory in Figure 5 includes "Notebook A", "Notebook B" and "Notebook D". The target record data "Notebook C" is added to the back of the local note directory to obtain the local note directory in the right figure of Figure 5; or as shown in Figure 6, the target record data "Notebook C" is added to the local note directory, and then sorted according to the names of the notebooks in the local note directory to obtain the local note directory in the right figure of Figure 6.
[0117] It should be noted that when the target record data is added to the local note directory, the target note identifier corresponding to the target record data is also added to the local note directory. The corresponding target note identifier can be obtained by querying the target record data, but the target note identifier is not directly displayed in the local note directory.
[0118] Furthermore, in addition to synchronizing notebooks, it is also possible to synchronize the note pages within the notebooks. Specifically, the target note page identifier of the target notebook is obtained from the server, the target note page in the target notebook is merged with the target note page corresponding to the target note page identifier to obtain an updated notebook, and the updated notebook in the first temporary storage space replaces the target notebook in the note application.
[0119] The target note page identifier is a note page identifier that belongs to the first note page identifier set but does not belong to the second note page identifier set. The first note page identifier set is the note page identifier of all notes in the server, and the second note page identifier set includes the note page identifiers of all notes in the local note directory of the ink screen.
[0120] Furthermore, when the target record data is the target shorthand page and the target note identifier is the target shorthand page identifier, the target shorthand page and the target shorthand page identifier are merged with the local shorthand data obtained from the local shorthand directory to obtain updated shorthand data, and the updated shorthand data in the first temporary storage space replaces the local shorthand data of the local shorthand directory in the note application.
[0121] The local shorthand directory can be a directory used to store local shorthand data in the note application. The local shorthand directory can be the same directory as the local note directory or a different directory. The specific setting can be made according to actual conditions.
[0122] The updated shorthand data may be shorthand data generated in the first temporary storage space and used to replace the local shorthand data.
[0123] Exemplarily, a feasible method for merging the target shorthand page and the target shorthand page identifier with the local shorthand data obtained from the local shorthand directory may be to merge the target shorthand page to the end of the local shorthand data, and establish a corresponding relationship between the target shorthand page identifier and the local shorthand data, thereby completing the merging of the target shorthand page and the target shorthand page identifier with the local shorthand data to obtain updated shorthand data.
[0124] Furthermore, when the target shorthand page includes multiple shorthand pages, a feasible method for merging the shorthand pages may be to sort the target shorthand pages according to their target shorthand page identifiers, and merge the target shorthand pages into the local shorthand data based on the sorting.
[0125] Furthermore, the method of replacing the local shorthand data in the local shorthand directory with the updated shorthand data in the first temporary storage space can be: when the local shorthand data has not been modified during the process of obtaining the updated shorthand data, the local shorthand data in the local shorthand directory in the note application is replaced with the updated shorthand data in the first temporary storage space; when the local shorthand data is modified during the process of obtaining the updated shorthand data, the updated shorthand data is deleted.
[0126] It can be understood that since the updated shorthand data in the first temporary storage space needs to replace the local shorthand data in the local shorthand directory, if the data in the local shorthand data is modified in the process of obtaining the updated shorthand data, it means that the local shorthand data used to generate the updated shorthand data is different from the local shorthand data in the local shorthand directory. In order to avoid overwriting the corresponding content, the updated shorthand data in the first temporary storage space is deleted.
[0127] Furthermore, since the data in the local shorthand data is modified during the process of obtaining the updated shorthand data, resulting in incomplete shorthand data synchronization, in order to improve the efficiency of the next data synchronization, a feasible method may be to retain the target shorthand page and target shorthand page identifier in the first temporary space if the modification occurs before the updated shorthand data is obtained; if the modification occurs after the updated shorthand data is obtained, the updated shorthand data can be restored to the target shorthand page for storage, and the local shorthand data in the first temporary storage space can be deleted.
[0128] S206, adding the target record data to the note application interface, so as to display the target record data based on the application interface of the note application;
[0129] In one embodiment, after the target record data is synchronized to the local note directory, in order to facilitate the user to view and edit the added target record data, the target record data is added to the note application interface to display the target record data based on the application interface of the note application.
[0130] The note application interface may be a display interface of the note application, used to display the second note in the local note directory.
[0131] Furthermore, the method of adding the target record data to the note application interface for display can be to add the target record data to the bottom of the note application interface, or to add the target record data to the note application interface and then sort and display it based on the data name of each second note in the note application interface.
[0132] For example, as shown in Figure 7, the note application interface includes "Notebook A," "Notebook B," and "Notebook D." Adding the target record data "Notebook C" to the end of the note application interface yields the note application interface shown on the right in Figure 7. Alternatively, as shown in Figure 8, adding the target record data "Notebook C" to the note application interface and then sorting the notebooks in the note application interface according to their names yields the note application interface shown on the right in Figure 8. The method for adding shorthand pages can be referenced to the method for adding notebooks and will not be further elaborated here.
[0133] S207, searching for the to-be-synchronized note identifier in the local data record, obtaining the to-be-synchronized note corresponding to the to-be-synchronized note identifier in the local note directory, and copying the to-be-synchronized note and the to-be-synchronized note identifier to the second temporary storage space;
[0134] In one embodiment, the to-be-synchronized note identifier that has not been synchronized to the server is searched in the local data record, the to-be-synchronized note corresponding to the to-be-synchronized note identifier is obtained in the local note directory, and the to-be-synchronized note and the to-be-synchronized note identifier are copied to the second temporary storage space.
[0135] The note to be synchronized may be a second note in the local note directory indicated by the local data record that has not been synchronized to the server.
[0136] The to-be-synchronized note identifier may be a note identifier corresponding to the to-be-synchronized note.
[0137] Local data records can be used to record data operations that occur in local data, such as the specific execution time and execution object of operations such as modifying, synchronizing, and adding notes.
[0138] The second temporary storage space may be the same temporary storage space as the first temporary storage space, or may be a temporary storage space different from the first temporary storage space, and may be specifically set according to actual conditions.
[0139] S208, uploading the notes to be synchronized and the identifiers of the notes to be synchronized in the second temporary storage space to the server, so that the server synchronizes the notes to be synchronized;
[0140] In one embodiment, after the notes to be synchronized and the note identifiers to be synchronized that need to be uploaded to the server in the local note directory are stored in the second temporary storage space, the notes to be synchronized and the note identifiers to be synchronized are uploaded to the server so that the server synchronizes the notes to be synchronized and the note identifiers to be synchronized.
[0141] S209, in response to the synchronization completion information returned by the server, deleting the second temporary storage space;
[0142] In one embodiment, after receiving the synchronization completion information returned by the server, the terminal device deletes the second temporary storage space in response to the synchronization completion information.
[0143] The synchronization completion information may be information generated after the server completes synchronization of the notes to be synchronized, and is used to indicate that data synchronization is complete.
[0144] It should be noted that if all the notes to be synchronized in the second temporary storage space have been synchronized, the second temporary storage space will be deleted; if there are notes to be synchronized that have not been synchronized in the second temporary storage space, the notes to be synchronized that have been synchronized can be deleted, or the operation of deleting the second temporary storage space can be executed when all the notes to be synchronized in the second temporary storage space have been synchronized.
[0145] S210, when a first modification operation occurs on a second note in the local note directory, storing the modified content corresponding to the first modification operation in a third temporary storage space, and uploading the modified content to the server so that the server synchronizes the modified content;
[0146] In one embodiment, when a user performs a first modification operation on a second note in a local note directory while the note application is logged in, the terminal device stores the modified content corresponding to the first modification operation in a third temporary storage space when a first preset trigger condition is met, and uploads the modified content to the server so that the server synchronizes the modified content.
[0147] The first modification operation may be an operation such as adding or updating the second note. Specifically, it may be adding a new notebook or adding a new shorthand page, or writing content on a shorthand page or a note page in a notebook.
[0148] The modified content is the notebook to which the modification is made and the notebook identifier corresponding to the modified notebook, or the shorthand page to which the modification is made and the shorthand page identifier corresponding to the modified shorthand page. It is understood that the modified content may also be the specific modified portion of the first modification operation, and the specific modification content can be set according to actual needs.
[0149] The specific modified part may be the modification details corresponding to the first modification operation, for example, an identifier of the modified shorthand page in the shorthand data, and the modified details in the shorthand page.
[0150] The first preset trigger condition can be a pre-set condition for determining whether the first modified content is currently uploaded to the server. Specifically, the preset trigger condition can be if the first modification operation occurs and no operation is performed on the second note within a first preset time period. Alternatively, the preset trigger condition can be to determine whether the first modification operation occurs every second preset time period, and if the first modification operation occurs, the preset trigger condition is satisfied.
[0151] The specific durations of the first preset duration and the second preset duration can be set according to actual needs.
[0152] One possible method for synchronizing content modification on the server side is to find the first note corresponding to the modified content on the server side and replace the first note with the modified content. For example, if the modified content is the notebook "Notebook A" and the notebook identifier "Notebook a", then the notebook "Notebook A" will replace the notebook "Notebook A" on the server side.
[0153] Furthermore, another feasible method for synchronously modifying content on the server side may be to search for a first note corresponding to the modified content on the server side, modify the first note accordingly based on a specific modified portion in the modified content, and obtain a modified first note.
[0154] The third temporary storage space may be the same temporary storage space as the first temporary storage space and the second temporary storage space, or may be a temporary storage space different from the first temporary storage space and the second temporary storage space, and may be specifically set according to actual conditions.
[0155] S211, in response to the modification completion information returned by the server, deleting the third temporary storage space;
[0156] In one embodiment, after receiving the modification completion information returned by the server, the terminal device deletes the third temporary storage space in response to the modification completion information.
[0157] The modification completion information may be information generated after the server completes synchronization of the modified content, and is used to indicate that the data modification is completed.
[0158] It should be noted that if all modified contents in the third temporary storage space have been synchronized, the third temporary storage space will be deleted; if there are modified contents in the third temporary storage space that have not been synchronized, the modified contents that have been synchronized can be deleted, or the operation of deleting the third temporary storage space can be executed when all modified contents in the third temporary storage space have been synchronized.
[0159] S212, when a deletion operation occurs on the second note in the local note directory, uploading the deleted content corresponding to the deletion operation to the server, so that the server deletes the deleted content of the first note on the server based on the deleted content;
[0160] In one embodiment, when a user deletes a second note in a local note directory while the note application is logged in, the terminal device uploads the deleted content corresponding to the deletion operation to the server when a second preset trigger condition is met, so that the server deletes the deleted content in the first note based on the deleted content.
[0161] The deletion operation may be an operation of deleting data in the second note, specifically, deleting a notebook or deleting a shorthand page.
[0162] The modified content is the notebook ID corresponding to the deleted notebook, or the shorthand page ID corresponding to the deleted shorthand page.
[0163] The specific content of the second preset trigger condition can refer to the first preset trigger condition in step S209 and will not be described in detail here.
[0164] One possible method for the server to delete the deleted content in the first note is to search the server for the first note corresponding to the deleted content and delete the first note. For example, if the deleted content is the notebook identifier "Notebook A," then the server will delete the notebook identifier "Notebook A."
[0165] It is understandable that the server only needs to determine the object to be deleted in order to delete the deleted content in the first note. Therefore, only the note identifier can be uploaded without uploading the corresponding note.
[0166] Furthermore, the execution order of steps S202 to S206, steps S207 to S209, steps S210 to S211, and step S212 may be adaptively adjusted according to actual conditions.
[0167] In an embodiment of the present specification, by verifying the note identifier of the server and the local note identifier in the temporary storage space, notes that are present on the server but not locally are determined and synchronized to the local note directory and the note application interface to complete the synchronization and display of local data; further, the unsynchronized data as well as the modified and deleted content in the local note directory are uploaded to the server through the temporary storage space to achieve synchronization of local data to the server, and then by processing the data in the temporary storage space and determining the data on the server that needs to be synchronized to the local according to the identifier, and uploading the local data to the server, the synchronization of data downloading and uploading is achieved while ensuring the security of local data, thereby improving the reliability and security of synchronized notes.
[0168] Based on the system architecture shown in Figure 1, the note synchronization device provided in the embodiments of this specification will be described in detail below in conjunction with Figures 9 and 10. It should be noted that the note synchronization device in Figures 9 and 10 is used to execute the method of the embodiments shown in Figures 2 to 8 of the embodiments of this specification. For ease of explanation, only the parts related to the embodiments of this specification are shown. For specific technical details not disclosed, please refer to the embodiments shown in Figures 2 to 8 of the embodiments of this specification.
[0169] Please refer to Figure 9, which provides a schematic diagram of the structure of a note synchronization device according to an embodiment of this specification. As shown in Figure 9, the note synchronization device 1 according to the embodiment of this specification may include: a command response unit 11, an identification set acquisition unit 12, an identification determination unit 13, a data acquisition unit 14, and a note synchronization unit 15.
[0170] An instruction response unit 11 is configured to create a first temporary storage space in response to a note synchronization instruction, where the note synchronization instruction is triggered by a note application in a logged-in state;
[0171] An identifier set acquisition unit 12 is configured to acquire a first note identifier set corresponding to a user account currently logged into the note application from a server, and store the first note identifier set and a second note identifier set in a first temporary storage space, wherein the second note identifier set includes all second note identifiers corresponding to a local note directory of the ink screen;
[0172] An identifier determining unit 13 is configured to obtain a target note identifier in the first temporary storage space, where the target note identifier is a target note identifier that belongs to the first note identifier set but does not belong to the second note identifier set;
[0173] The data acquisition unit 14 is used to acquire the target record data corresponding to the target note identifier from the server, and store the target record data in the first temporary storage space;
[0174] The note synchronization unit 15 is used to synchronize the target record data and target note identifier in the first temporary storage space to the note application.
[0175] Optionally, the note synchronization unit 15 is further configured to:
[0176] The target notebook and the target notebook identifier in the first temporary storage space are added to the note application.
[0177] Optionally, the note synchronization unit 15 is further configured to:
[0178] Obtain the target note page identifier of the target notebook from the server. The target note page identifier is a note page identifier that belongs to the first note page identifier set but does not belong to the second note page identifier set. The first note page identifier set includes the note page identifiers of all notes in the server, and the second note page identifier set includes the note page identifiers of all notes in the local note directory of the ink screen.
[0179] Merging the target note page in the target notebook with the target note page corresponding to the target note page identifier to obtain an updated notebook;
[0180] Replace the target notebook in the note application with the updated notebook in the first temporary storage space.
[0181] Optionally, the note synchronization unit 15 is further configured to:
[0182] Merging the target shorthand page and the target shorthand page identifier with the local shorthand data obtained from the local shorthand directory to obtain updated shorthand data;
[0183] The updated shorthand data in the first temporary storage space replaces the local shorthand data in the note application.
[0184] Optionally, the note synchronization unit 15 is further configured to:
[0185] When the local shorthand data is not modified during the process of obtaining the updated shorthand data, replacing the local shorthand data in the note application with the updated shorthand data in the first temporary storage space;
[0186] When local shorthand data is modified during the process of obtaining updated shorthand data, the updated shorthand data is deleted.
[0187] Optionally, as shown in FIG10 , the note synchronization device 1 further includes a data uploading unit 16 for:
[0188] Searching for a to-be-synchronized note identifier in the local data record, obtaining a to-be-synchronized note corresponding to the to-be-synchronized note identifier in the local note directory, and copying the to-be-synchronized note and the to-be-synchronized note identifier to a second temporary storage space, where the to-be-synchronized note is the second note in the local note directory indicated by the local data record that has not been synchronized to the server;
[0189] Uploading the notes to be synchronized and the identifiers of the notes to be synchronized in the second temporary storage space to the server, so that the server synchronizes the notes to be synchronized;
[0190] In response to the synchronization completion information returned by the server, the second temporary storage space is deleted.
[0191] Optionally, as shown in FIG10 , the note synchronization device 1 further includes a note modification unit 17 for:
[0192] When a first modification operation occurs on the second note in the local note directory, the modified content corresponding to the first modification operation is stored in the third temporary storage space, and the modified content is uploaded to the server so that the server synchronizes the modified content;
[0193] In response to the modification completion information returned by the server, deleting the third temporary storage space;
[0194] The modified content includes the notebook with the modification and the notebook identifier corresponding to the modified notebook, or the shorthand page with the modification and the shorthand page identifier corresponding to the modified shorthand page.
[0195] Optionally, as shown in FIG10 , the note synchronization device 1 further includes:
[0196] The note deletion unit 18 is used to upload the deletion content corresponding to the deletion operation to the server when a deletion operation occurs on the second note in the local note directory, so that the server deletes the deletion content of the first note in the server based on the deletion content.
[0197] Optionally, the instruction response unit 15 is further configured to:
[0198] If the note application is in a non-logged-in state and a second modification operation occurs on a second note in the local note directory, then in response to the note synchronization instruction when the note application is in a logged-in state, the second modification operation is a modification operation in a non-mandatory state;
[0199] If the note application is in a non-logged-in state and a third modification operation occurs on the second note in the local note directory, the note application will not respond to the note synchronization instruction when it is in a logged-in state, and the third modification operation is a forced execution state modification operation.
[0200] Optionally, as shown in FIG10 , the note synchronization device 1 further includes:
[0201] The data loading unit 19 is configured to add the target record data and the target note identifier to the note application interface, so as to display the target record data based on the application interface of the note application.
[0202] In an embodiment of the present specification, by verifying the note identifier of the server and the local note identifier in the temporary storage space, notes that are present on the server but not locally are determined and synchronized to the local note directory and the note application interface to complete the synchronization and display of local data; further, the unsynchronized data as well as the modified and deleted content in the local note directory are uploaded to the server through the temporary storage space to achieve synchronization of local data to the server, and then by processing the data in the temporary storage space and determining the data on the server that needs to be synchronized to the local according to the identifier, and uploading the local data to the server, the synchronization of data downloading and uploading is achieved while ensuring the security of local data, thereby improving the reliability and security of synchronized notes.
[0203] The embodiments of this specification also provide a computer storage medium, which can store multiple program instructions. The program instructions are suitable for being loaded by a processor and executing the method steps of the embodiments shown in Figures 1 to 8 above. The specific execution process can be found in the specific description of the embodiments shown in Figures 1 to 8, which will not be repeated here.
[0204] Please refer to Figure 11, which provides a structural diagram of an electronic device according to an embodiment of this specification. As shown in Figure 11, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As shown in Figure 11, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input / output interface module, and a note synchronization application.
[0205] In the electronic device 1000 shown in FIG11 , the input / output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.
[0206] In one embodiment, the processor 1001 may be configured to call a note synchronization application stored in the memory 1005 and specifically perform the following operations:
[0207] In response to a note synchronization instruction, creating a first temporary storage space, the note synchronization instruction being triggered by a note application in a logged-in state;
[0208] Obtaining from the server a first note identifier set corresponding to the user account currently logged into the note application, and storing the first note identifier set and the second note identifier set in a first temporary storage space, wherein the second note identifier set includes all second note identifiers corresponding to the local note directory of the ink screen;
[0209] Obtaining a target note identifier of the first temporary storage space, where the target note identifier is a note identifier that belongs to the first note identifier set but does not belong to the second note identifier set;
[0210] Obtain target record data corresponding to the target note identifier from the server, and store the target record data in the first temporary storage space;
[0211] The target record data and the target note identifier in the first temporary storage space are synchronized to the note application.
[0212] Optionally, the note application includes multiple different notebooks, each notebook has a unique note identifier, and each notebook includes at least one record page; the target record data is a target notebook, and the target note identifier is a target notebook identifier; when synchronizing the target record data and the target note identifier in the first temporary storage space to the note application, the processor 1001 specifically performs the following operations:
[0213] The target notebook and the target notebook identifier in the first temporary storage space are added to the note-taking application.
[0214] Optionally, after synchronizing the target record data and the target note identifier in the first temporary storage space to the note application, the processor 1001 further performs the following operations:
[0215] Obtain the target note page identifier of the target notebook from the server. The target note page identifier is a note page identifier that belongs to the first note page identifier set but does not belong to the second note page identifier set. The first note page identifier set includes the note page identifiers of all notes in the server, and the second note page identifier set includes the note page identifiers of all notes in the local note directory of the ink screen.
[0216] Merging the target note page in the target notebook with the target note page corresponding to the target note page identifier to obtain an updated notebook;
[0217] Replace the target notebook in the note application with the updated notebook in the first temporary storage space.
[0218] Optionally, the note application includes at least one shorthand page, each shorthand page having a unique note identifier; the target record data is the target shorthand page, and the target note identifier is the target shorthand page identifier; when synchronizing the target record data and the target note identifier in the first temporary storage space to the note application, the processor 1001 specifically performs the following operations:
[0219] Merging the target shorthand page and the target shorthand page identifier with the local shorthand data obtained from the local shorthand directory to obtain updated shorthand data;
[0220] The updated shorthand data in the first temporary storage space replaces the local shorthand data in the note application.
[0221] Optionally, when executing the operation of replacing the local shorthand data in the note application with the updated shorthand data in the first temporary storage space, the processor 1001 specifically performs the following operations:
[0222] When the local shorthand data is not modified during the process of obtaining the updated shorthand data, replacing the local shorthand data in the note application with the updated shorthand data in the first temporary storage space;
[0223] When local shorthand data is modified during the process of obtaining updated shorthand data, the updated shorthand data is deleted.
[0224] Optionally, the processor 1001 further performs the following operations:
[0225] Searching for a to-be-synchronized note identifier in the local data record, obtaining a to-be-synchronized note corresponding to the to-be-synchronized note identifier in the local note directory, and copying the to-be-synchronized note and the to-be-synchronized note identifier to a second temporary storage space, where the to-be-synchronized note is the second note in the local note directory indicated by the local data record that has not been synchronized to the server;
[0226] Uploading the notes to be synchronized and the identifiers of the notes to be synchronized in the second temporary storage space to the server, so that the server synchronizes the notes to be synchronized;
[0227] In response to the synchronization completion information returned by the server, the second temporary storage space is deleted.
[0228] Optionally, the processor 1001 further performs the following operations:
[0229] When a first modification operation occurs on the second note in the local note directory, the modified content corresponding to the first modification operation is stored in the third temporary storage space, and the modified content is uploaded to the server so that the server synchronizes the modified content;
[0230] In response to the modification completion information returned by the server, deleting the third temporary storage space;
[0231] The modified content includes the notebook with the modification and the notebook identifier corresponding to the modified notebook, or the shorthand page with the modification and the shorthand page identifier corresponding to the modified shorthand page.
[0232] Optionally, the processor 1001 further performs the following operations:
[0233] When a deletion operation occurs on the second note in the local note directory, the deleted content corresponding to the deletion operation is uploaded to the server, so that the server deletes the deleted content of the first note in the server based on the deleted content.
[0234] Optionally, the processor 1001 further performs the following operations:
[0235] If the note application is in a non-logged-in state and a second modification operation occurs on a second note in the local note directory, then in response to the note synchronization instruction when the note application is in a logged-in state, the second modification operation is a modification operation in a non-mandatory state;
[0236] If the note application is in a non-logged-in state and a third modification operation occurs on the second note in the local note directory, the note application will not respond to the note synchronization instruction when it is in a logged-in state, and the third modification operation is a forced execution state modification operation.
[0237] Optionally, after synchronizing the target record data in the temporary storage space to the local note directory, the processor 1001 further performs the following operations:
[0238] The target record data and the target note identifier are added to the note application interface to display the target record data based on the application interface of the note application.
[0239] In an embodiment of the present specification, by verifying the note identifier of the server and the local note identifier in the temporary storage space, notes that are present on the server but not locally are determined and synchronized to the local note directory and the note application interface to complete the synchronization and display of local data; further, the unsynchronized data as well as the modified and deleted content in the local note directory are uploaded to the server through the temporary storage space to achieve synchronization of local data to the server, and then by processing the data in the temporary storage space and determining the data on the server that needs to be synchronized to the local according to the identifier, and uploading the local data to the server, the synchronization of data downloading and uploading is achieved while ensuring the security of local data, thereby improving the reliability and security of synchronized notes.
[0240] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0241] The above disclosure is only a preferred embodiment of this specification, and certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.
Claims
1. A note synchronization method, characterized in that: The method is applied to an ink screen installed with a note application, and includes: creating a first temporary storage space in response to a note synchronization instruction, wherein the note synchronization instruction is triggered by the note application in a logged-in state; Obtaining from the server a first note identifier set corresponding to the user account currently logged into the note application, and storing the first note identifier set and the second note identifier set in the first temporary storage space, wherein the second note identifier set includes all second note identifiers corresponding to the local note directory of the ink screen; Obtaining a target note identifier in the first temporary storage space, where the target note identifier is a note identifier that belongs to the first note identifier set but does not belong to the second note identifier set; Obtain target record data corresponding to the target note identifier from the server, and store the target record data in the first temporary storage space; The target record data and the target note identifier in the first temporary storage space are synchronized into the note application.
2. The method according to claim 1, characterized in that The note application includes a plurality of different notebooks, each notebook having a unique note identifier, and one notebook including at least one record page; the target record data is a target notebook, and the target note identifier is a target notebook identifier; The step of synchronizing the target record data and the target note identifier in the first temporary storage space to the note application includes: The target notebook and the target notebook identifier in the first temporary storage space are added to the note application.
3. The method according to claim 2, characterized in that After synchronizing the target record data and the target note identifier in the first temporary storage space into the note application, the method further includes: Obtaining a target note page identifier of a target notebook from the server, wherein the target note page identifier is a note page identifier that belongs to a first note page identifier set but does not belong to a second note page identifier set, wherein the first note page identifier set includes the note page identifiers of all notes in the server, and the second note page identifier set includes the note page identifiers of all notes in the local note directory of the ink screen; merging the target note page in the target notebook and the target note page corresponding to the target note page identifier to obtain an updated notebook; The updated notebook in the first temporary storage space replaces the target notebook in the note application.
4. The method according to claim 1, wherein The note application includes at least one shorthand page, each shorthand page having a unique note identifier; The target record data is a target shorthand page, and the target note identifier is a target shorthand page identifier; The step of synchronizing the target record data and the target note identifier in the first temporary storage space to the note application includes: Merging the target shorthand page and the target shorthand page identifier with the local shorthand data obtained from the local shorthand directory to obtain updated shorthand data; The updated shorthand data in the first temporary storage space replaces the local shorthand data in the note application.
5. The method according to claim 4, characterized in that The replacing the local shorthand data in the note application with the updated shorthand data in the first temporary storage space includes: When the local shorthand data is not modified during the process of obtaining the updated shorthand data, replacing the local shorthand data in the note application with the updated shorthand data in the first temporary storage space; When the local shorthand data is modified during the process of obtaining the updated shorthand data, the updated shorthand data is deleted.
6. The method according to claim 1, characterized in that The method further comprises: Searching for a to-be-synchronized note identifier in the local data record, obtaining a to-be-synchronized note corresponding to the to-be-synchronized note identifier in the local note directory, and copying the to-be-synchronized note and the to-be-synchronized note identifier to a second temporary storage space, where the to-be-synchronized note is a second note in the local note directory indicated by the local data record that has not been synchronized to the server; Uploading the notes to be synchronized and the identifiers of the notes to be synchronized in the second temporary storage space to the server, so that the server synchronizes the notes to be synchronized; In response to the synchronization completion information returned by the server, the second temporary storage space is deleted.
7. The method according to claim 1, characterized in that The method further comprises: When a first modification operation occurs on a second note in the local note directory, storing the modified content corresponding to the first modification operation in a third temporary storage space, and uploading the modified content to the server, so that the server synchronizes the modified content; In response to modification completion information returned by the server, deleting the third temporary storage space; The modified content is the notebook with the modification and the notebook identifier corresponding to the modified notebook, or the shorthand page with the modification and the shorthand page identifier corresponding to the modified shorthand page.
8. The method according to claim 1, characterized in that The method further comprises: When a deletion operation occurs on the second note in the local note directory, the deletion content corresponding to the deletion operation is uploaded to the server, so that the server deletes the deletion content of the first note in the server based on the deletion content.
9. The method according to claim 1, characterized in that The method further comprises: If the note application is in a non-login state and a second modification operation occurs on a second note in the local note directory, then responding to the note synchronization instruction while the note application is in a logged-in state, the second modification operation is a modification operation in a non-mandatory state; If the note application is in a non-logged-in state and a third modification operation occurs on the second note in the local note directory, the note application will not respond to the note synchronization instruction when it is in a logged-in state, and the third modification operation is a forced execution state modification operation.
10. The method according to claim 1, characterized in that After synchronizing the target record data and target note identifier in the first temporary storage space to the note application, the method further includes: The target record data and the target note identifier are added to the note application interface, so as to display the target record data based on the application interface of the note application.
11. A note synchronization device, characterized in that: The device comprises: a first space creation unit, configured to create a first temporary storage space in response to a note synchronization instruction, wherein the note synchronization instruction is triggered by the note application in a logged-in state; an identification set acquisition unit, configured to acquire, from a server, a first note identification set corresponding to a user account currently logged into the note application, and store the first note identification set and a second note identification set in the first temporary storage space, wherein the second note identification set includes all second note identifications corresponding to the local note directory of the ink screen; an identifier determining unit, configured to obtain a target note identifier from the first temporary storage space, wherein the target note identifier is a note identifier that belongs to the first note identifier set but does not belong to the second note identifier set; A data acquisition unit, configured to acquire target record data corresponding to the target note identifier from the server, and store the target record data in the first temporary storage space; A note synchronization unit is used to synchronize the target record data and the target note identifier in the first temporary storage space to the local note directory.
12. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 10.
13. An electronic device comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 10.