Information synchronization method, electronic equipment and storage medium
By sending a state wake-up request and synchronization information file to the second client in the intelligent automobile system, the problem of information synchronization delay in the vehicle side hibernation state is solved, the timeliness of information synchronization is improved, and the user experience and driving safety are guaranteed.
Patent Information
- Application Number
- CN202411842961.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-18
AI Technical Summary
In the process of the development of smart cars and autonomous driving technologies, the seamless synchronization of vehicle multimedia functions and mobile phone content is affected, especially when the vehicle end is in a dormant state, information cannot be synchronized in time, affecting user experience and driving safety.
By sending a state wake-up request to the second client when the first client responds to the information operation, adjusting its status to the reply state, and sending the edited information file to the second client, information synchronization is achieved.
The timeliness of information synchronization between the first client and the second client is improved, ensuring user experience and driving safety.
Smart Images

Figure CN119652905A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data synchronization, and in particular, to an information synchronization method, an electronic device, and a storage medium. Background Art
[0002] With the development of smart cars and autonomous driving technology, vehicles are gradually becoming another mobile multimedia center. Users have higher expectations for the multimedia functions of vehicles, including seamless synchronization with mobile phone content.
[0003] When the user edits and saves information on the mobile phone, if the vehicle is in sleep mode, the information on the mobile phone and vehicle cannot be synchronized in time, which may affect the user experience and even the user's driving safety. How to improve the timeliness of multi-terminal information synchronization has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, the embodiments of the present application provide an information synchronization method, an electronic device, and a storage medium, which improve the timeliness of information synchronization to a certain extent.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] According to a first aspect of an embodiment of the present application, there is provided an information synchronization method, which is applied to a first client, and the method includes:
[0007] In response to an information operation on an information file in the first client, a state awakening request is sent to the second client, so that the second client adjusts the state to a response state in response to the state awakening request; the information operation is an operation for editing the information file; the response state is an information receiving state;
[0008] The information file after the information operation is performed is sent to the second client in the response state, so as to realize information synchronization between the second client and the first client.
[0009] In some embodiments, before sending the information file after the information operation to the second client in the response state, the method further includes:
[0010] In response to the completion of the information operation on the first client, an update mark is set in the information file after the information operation is performed; the update mark is used to indicate that the information file is obtained after the information operation is performed.
[0011] In some embodiments, the first client and the second client establish an association relationship through a user account or through a preset association device code; sending a status wake-up request to the second client includes:
[0012] Determine a client having the same user account as the first client as the second client, or determine an associated device code according to the device code of the first client, and determine a client corresponding to the associated device code as the second client;
[0013] Send a status wake-up request to the second client.
[0014] In some embodiments, sending a status wake-up request to the second client includes:
[0015] When the first client and the second client are both in a network online state and an association relationship between the first client and the second client is successfully established, a status awakening request is sent to the second client.
[0016] According to a second aspect of an embodiment of the present application, there is provided an information synchronization method, which is applied to a second client, and the method includes:
[0017] In response to receiving a status wake-up request for the second client, adjusting the status to a response status; the response status is an information receiving status;
[0018] An information file sent by a first client is received and stored to achieve information synchronization between the second client and the first client; the information file sent by the first client is an information file after an information operation is performed, and the information operation is an operation for editing an information file.
[0019] In some embodiments, storing the information file sent by the first client includes:
[0020] Determine whether there is an update identifier in the information file sent by the first client; the update identifier is used to indicate that the information file is obtained after performing the information operation;
[0021] When the update identifier exists in the information file sent by the first client, the information file sent by the first client is stored.
[0022] In some embodiments, the update identifier includes a timestamp; and the storing the information file sent by the first client includes:
[0023] Determine whether there is an update identifier in the information file of the second client;
[0024] In a case where the update identifier exists in the information file of the second client, determining whether to store the information file sent by the first client according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client;
[0025] When the update identifier does not exist in the information file of the second client, the information file sent by the first client is stored.
[0026] In some embodiments, determining whether to store the information file sent by the first client according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client includes:
[0027] According to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client, determining a target update identifier with the latest timestamp from the update identifier of the second client and the update identifier of the first client;
[0028] When the target update identifier is the update identifier of the first client, storing the information file sent by the first client, and replacing the information file in the second client with the information file sent by the first client;
[0029] When the target update identifier is the update identifier of the second client, the information file sent by the first client is discarded.
[0030] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:
[0031] A memory for storing executable instructions;
[0032] The processor is used to implement the information synchronization method described in the first aspect and the second aspect when executing the executable instructions stored in the memory.
[0033] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, storing executable instructions for implementing the information synchronization method as described in the first and second aspects above when executed by a processor.
[0034] In an embodiment of the present application, in response to an information operation on an information file in a first client, a status wake-up request is sent to a second client, so that the second client adjusts the state to a response state in response to the status wake-up request; the information operation is an operation for editing an information file; the response state is an information receiving state; the information file after the information operation is sent to the second client in the response state, thereby realizing information synchronization between the second client and the first client.
[0035] In the embodiment of the present application, the first client adjusts the state of the second client to the response state, so that the second client in the response state can promptly receive the information file sent by the first client, thereby improving the timeliness of information synchronization between the first client and the second client.
[0036] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0038] Figure 1 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 1 ;
[0039] Figure 2 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 2 ;
[0040] Figure 3 A schematic diagram of the structure of an information synchronization device applicable to an embodiment of the present application Figure 1 ;
[0041] Figure 4 A schematic diagram of the structure of an information synchronization device applicable to an embodiment of the present application Figure 2 ;
[0042] Figure 5 A schematic diagram of the structure of an information synchronization system applicable to an embodiment of the present application;
[0043] Figure 6 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 3 ;
[0044] Figure 7 A schematic diagram of a hardware entity of an electronic device applicable to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0046] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in the embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0047] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0048] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0049] In addition, the term "and / or" in the embodiments of the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0050] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.
[0051] The specific implementation of the embodiment of the present application is described below in conjunction with the accompanying drawings of the embodiment of the present application.
[0052] See also Figure 1 , Figure 1 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 1The information synchronization method of the embodiment of the present application is applied to the first client, and includes the following steps:
[0053] Step S101: In response to an information operation on an information file in a first client, a state awakening request is sent to a second client, so that the second client adjusts its state to a reply state in response to the state awakening request.
[0054] Among them, the information operation is an operation for editing an information file; the response status is an information receiving status.
[0055] Specifically, information operations include operations for changing, adding or deleting content in information files. The state of the client includes a response state and a dormant state. In the response state, the client can receive information in real time; in the dormant state, the client may not be able to receive information in real time. In the embodiment of the present application, there may be multiple second clients.
[0056] For example, taking the case where the first client is located on a mobile device and the second client is located on a vehicle-side device, the information operation on the information file in the first client may be an operation for changing a vehicle-side wallpaper image, adjusting a seat in the vehicle, etc. In response to the user's information operation on the information file in the first client, the first client on the mobile device sends a state awakening request to the second client on the vehicle-side device, so that the second client responds to the state awakening request and adjusts the state to the answering state.
[0057] Step S102: Send the information file after the information operation to the second client in the response state, so as to achieve information synchronization between the second client and the first client.
[0058] For example, taking the case where the first client is located on a mobile device and the second client is located on a vehicle-side device, in response to the completion of the information operation on the first client on the mobile device, the first client sends the information file after the information operation to the second client in a response state, thereby realizing information synchronization between the second client on the vehicle-side device and the first client.
[0059] Optionally, in some embodiments, before sending the information file after the information operation to the second client in the response state, an update mark can be set in the information file after the information operation in response to the completion of the information operation on the first client. The update mark is used to indicate that the information file is obtained after the information operation. The update mark is set in the information file after the information operation, so as to determine whether the information operation is performed on the information file according to the update mark, thereby determining whether the information file needs to be synchronized to other clients, which can avoid missing the information file after the synchronization information operation.
[0060] In the embodiment of the present application, the first client adjusts the state of the second client to the response state, so that the second client in the response state can promptly receive the information file sent by the first client, thereby improving the timeliness of information synchronization between the first client and the second client.
[0061] Optionally, in some of the embodiments, the first client and the second client establish an association relationship through a user account or through a preset associated device code; before sending a status wake-up request to the second client, a client whose user account is the same as that of the first client can also be determined as the second client, or an associated device code can be determined based on the device code of the first client, and the client corresponding to the associated device code can be determined as the second client.
[0062] Specifically, the preset associated device code refers to a device code preset according to the device code of each client and associated with the device code of the first client. The device code of the first client may have multiple associated device codes.
[0063] Exemplarily, each client has a user account logged in. Taking the example of the first client and the second client establishing an association relationship through the user account, before the first client sends a status wake-up request to the second client, the client with the same user account as the first client can be determined as the second client. Taking the example of the first client and the second client establishing an association relationship through a preset associated device code, before the first client sends a status wake-up request to the second client, each associated device code can be determined according to the device code of the first client, and the client corresponding to each associated device code can be determined as the second client.
[0064] Optionally, in some embodiments, sending a status awakening request to the second client includes: sending a status awakening request to the second client when both the first client and the second client are in a network online state and an association relationship between the first client and the second client is successfully established.
[0065] Exemplarily, before the first client sends a status wake-up request to the second client, the network status and the establishment status of the association relationship between the first client and the second client can be checked. When the first client and the second client are both online and the association relationship between the first client and the second client is successfully established, the first client sends a status wake-up request to the second client.
[0066] In an embodiment of the present application, before the first client sends a status wake-up request to the second client, the network status and the establishment status of the association relationship between the first client and the second client are checked. This can avoid the failure of the first client to send a status wake-up request to the second client due to the network status or the establishment status of the association relationship not meeting the requirements, thereby ensuring the timeliness of subsequent information synchronization operations.
[0067] See also Figure 2 , Figure 2 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 2 The information synchronization method of the embodiment of the present application is applied to the second client, and includes the following steps:
[0068] Step S201: In response to receiving a status wake-up request for a second client, adjusting the status to a response status.
[0069] Among them, the response state is the information receiving state.
[0070] Specifically, in the response state, the client can receive information in real time.
[0071] Exemplarily, the second client adjusts the state to a response state in response to the state awakening request sent by the first client to the second client. The response state is an information receiving state.
[0072] Step S202: receiving an information file sent by the first client, and storing the information file sent by the first client, so as to achieve information synchronization between the second client and the first client.
[0073] The information file sent by the first client is an information file after an information operation is performed, and the information operation is an operation for editing the information file.
[0074] Exemplarily, the second client receives the information file sent by the first client after performing information operations, and stores the information file sent by the first client, thereby achieving information synchronization between the second client and the first client.
[0075] In the embodiment of the present application, the first client adjusts the state of the second client to the response state, so that the second client in the response state can promptly receive the information file sent by the first client, thereby improving the timeliness of information synchronization between the first client and the second client.
[0076] Optionally, in some embodiments, storing the information file sent by the first client includes: determining whether there is an update identifier in the information file sent by the first client; if there is an update identifier in the information file sent by the first client, storing the information file sent by the first client.
[0077] The update flag is used to indicate that the information file is obtained after performing information operation.
[0078] Exemplarily, after receiving the information file sent by the first client, the second client may first determine whether there is an update identifier in the information file sent by the first client. If there is an update identifier in the information file sent by the first client, it indicates that the information file sent by the first client is obtained after performing an information operation, and the second client stores the information file sent by the first client.
[0079] In the embodiment of the present application, the second client stores the information file obtained after performing the information operation according to the update identifier, which can avoid the second client from repeatedly storing the existing information file on which the information operation has not been performed.
[0080] Optionally, in some embodiments, the update identifier includes a timestamp; storing the information file sent by the first client includes: determining whether the update identifier exists in the information file of the second client; if the update identifier exists in the information file of the second client, determining whether to store the information file sent by the first client based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; if the update identifier does not exist in the information file of the second client, storing the information file sent by the first client.
[0081] Exemplarily, when both the information file sent by the first client and the information file of the second client have update identifiers, the second client determines whether to store the information file sent by the first client based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client.
[0082] Optionally, in some of the embodiments, determining whether to store the information file sent by the first client is performed based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client, including: determining a target update identifier with the latest timestamp from the update identifier of the second client and the update identifier of the first client based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; when the target update identifier is the update identifier of the first client, storing the information file sent by the first client and replacing the information file in the second client with the information file sent by the first client; when the target update identifier is the update identifier of the second client, discarding the information file sent by the first client.
[0083] Exemplarily, if the target update identifier with the latest timestamp is the update identifier of the first client, it means that the information file in the first client is the latest one, and the second client can store the information file sent by the first client and replace the information file in the second client with the information file sent by the first client; if the target update identifier with the latest timestamp is the update identifier of the second client, it means that the information file in the second client is the latest one, and the second client can discard the information file sent by the first client.
[0084] In addition, when there is no update mark in the information file of the second client, it means that there is no information file in the second client, and the second client stores the information file sent by the first client.
[0085] In an embodiment of the present application, whether to store the information file sent by the first client is determined based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client. This can avoid the second client from repeatedly storing existing information files that have not undergone information operations, thereby improving the accuracy of information synchronization.
[0086] Optionally, in some of the embodiments, during the process of receiving the information file sent by the first client, if it is detected that the network between the first client and the second client is disconnected, and / or the association relationship between the first client and the second client is not successfully established, the information file receiving process is suspended, and the network connection status and association relationship detection is performed according to a preset rule; when it is detected again that the network connection is established between the first client and the second client, and the association relationship between the first client and the second client is successfully established, the target update identifier is determined from the update identifier of the second client and the update identifier of the first client according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; when the target update identifier is the update identifier of the first client, the information file sent by the first client is received; when the target update identifier is the update identifier of the second client, the information file in the second client is sent to the first client.
[0087] Exemplarily, during the process of receiving the information file sent by the first client, if the network is disconnected or the association relationship between the first client and the second client is disconnected, the second client suspends the process of receiving the information file and performs network connection status and association relationship detection according to preset rules. When a network connection is established between the first client and the second client and the association relationship between the first client and the second client is successfully established, the latest information file is determined according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client.
[0088] If the target update identifier with the latest timestamp is the update identifier of the first client, it means that the information file in the first client is the latest one, and the second client re-receives the information file sent by the first client; if the target update identifier with the latest timestamp is the update identifier of the second client, it means that the information file in the second client is the latest one, and the second client sends the information file in the second client to the first client, so that the first client can synchronize the information file sent by the second client in time.
[0089] In some embodiments, the first client and the second client may periodically detect the network connection status and the establishment status of the association relationship according to a preset period, so as to re-establish the network connection between the first client and the second client after a network disconnection or an association disconnection occurs, and when the association relationship between the first client and the second client is successfully re-established, determine the latest information file based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client, and synchronize the latest information file.
[0090] In an embodiment of the present application, after detecting that the network disconnection between the first client and the second client is detected, and / or that the association relationship between the first client and the second client is not successfully established, the network connection between the first client and the second client is re-established, and when the association relationship between the first client and the second client is successfully established, the latest information file is determined based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client, and the latest information file is synchronized, thereby reducing the impact of network disconnection or association disconnection on information synchronization and improving the timeliness of information synchronization.
[0091] See also Figure 3 , Figure 3 A schematic diagram of the structure of an information synchronization device applicable to an embodiment of the present application Figure 1 The information synchronization device of the embodiment of the present application is applied to the first client and includes the following modules:
[0092] The state awakening module 301 is used to send a state awakening request to the second client in response to an information operation on an information file in the first client, so that the second client adjusts the state to a response state in response to the state awakening request; the information operation is an operation for editing the information file; the response state is an information receiving state;
[0093] The information transmission module 302 is used to send the information file after the information operation to the second client in the response state, so as to realize the information synchronization between the second client and the first client.
[0094] Optionally, in some embodiments, before sending the information file after the information operation to the second client in the response state, the state awakening module 301 is specifically used to: in response to the completion of the information operation on the first client, set an update flag in the information file after the information operation; the update flag is used to represent that the information file is obtained after the information operation is performed.
[0095] Optionally, in some of the embodiments, the first client and the second client establish an association relationship through a user account or through a preset associated device code; the state wake-up module 301 is specifically used to: determine a client whose user account is the same as that of the first client as the second client, or determine an associated device code based on the device code of the first client, and determine the client corresponding to the associated device code as the second client; send a state wake-up request to the second client.
[0096] Optionally, in some of the embodiments, the state awakening module 301 is specifically used to send a state awakening request to the second client when the first client and the second client are both in a network online state and the association relationship between the first client and the second client is successfully established.
[0097] See also Figure 4 , Figure 4 A schematic diagram of the structure of an information synchronization device applicable to an embodiment of the present application Figure 2 The information synchronization device of the embodiment of the present application is applied to the second client and includes the following modules:
[0098] The request response module 401 is used to adjust the state to a response state in response to receiving a state wake-up request for the second client; the response state is an information receiving state;
[0099] The information synchronization module 402 is used to receive the information file sent by the first client and store the information file sent by the first client to achieve information synchronization between the second client and the first client; the information file sent by the first client is the information file after the information operation is performed, and the information operation is an operation for editing the information file.
[0100] Optionally, in some embodiments, the information synchronization module 402 is specifically used to: determine whether there is an update identifier in the information file sent by the first client; the update identifier is used to characterize that the information file is obtained after performing an information operation; when there is an update identifier in the information file sent by the first client, store the information file sent by the first client.
[0101] Optionally, in some of the embodiments, the update identifier includes a timestamp; the information synchronization module 402 is specifically used to: determine whether there is an update identifier in the information file of the second client; if there is an update identifier in the information file of the second client, determine whether to store the information file sent by the first client based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; if there is no update identifier in the information file of the second client, store the information file sent by the first client.
[0102] Optionally, in some of the embodiments, the information synchronization module 402 is specifically used to: determine a target update identifier with the latest timestamp from the update identifier of the second client and the update identifier of the first client based on the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; when the target update identifier is the update identifier of the first client, store the information file sent by the first client and replace the information file in the second client with the information file sent by the first client; when the target update identifier is the update identifier of the second client, discard the information file sent by the first client.
[0103] The information synchronization device of this embodiment is used to implement the corresponding information synchronization method in the aforementioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here. In addition, the functional implementation of each module in the information synchronization device of this embodiment can refer to the description of the corresponding part in the aforementioned method embodiment, which will not be repeated here.
[0104] See also Figure 5 , Figure 5 Schematic diagram of the structure of the information synchronization system applicable to the embodiment of the present application. The information synchronization system of the embodiment of the present application includes a first client 501, a cloud 502 and a second client 503.
[0105] The first client 501 includes a first awakening module 5011 , a first response module 5012 , a first synchronization module 5013 and a first storage module 5014 .
[0106] The first wake-up module 5011 is used to send a status wake-up request to the second client 503 through the cloud 502 in response to the information operation on the information file in the first client 501. In some embodiments, the first wake-up module 5011 is also used to set an update mark in the information file after the information operation is performed in response to the completion of the information operation on the first client 501, and to update the update mark in the information file after the information operation is performed, and the update mark is used to indicate that the information file is obtained after the information operation is performed.
[0107] The first response module 5012 is used for adjusting the state of the first client 501 to the response state in response to receiving a state wake-up request for the first client 501 .
[0108] The first synchronization module 5013 is used to send the information file after the information operation to the second client 503 through the cloud 502, or to receive the information file sent by the second client 503.
[0109] The first storage module 5014 is used to store the information file sent by the second client 503.
[0110] In some embodiments, the first storage module 5014 is further used to store the information file sent by the second client 503 according to the update identifier of the first client 501 and the update identifier of the second client 503: when there is an update identifier in the information file of the first client 501, determine whether to store the information file sent by the second client 503 according to the timestamp of the update identifier of the second client 503 and the timestamp of the update identifier of the first client 501. If the target update identifier with the latest timestamp is the update identifier of the second client 503, it indicates that the information file in the second client 503 is the latest one, and the first client 501 can store the information file sent by the second client 503, and replace the information file in the first client 501 with the information file sent by the second client 503; if the target update identifier with the latest timestamp is the update identifier of the first client 501, it indicates that the information file in the first client 501 is the latest one, and the first client 501 can discard the information file sent by the second client 503. In addition, when there is no update identifier in the information file of the first client 501, the information file sent by the second client 503 is stored.
[0111] The second client 503 includes a second awakening module 5031 , a second answering module 5032 , a second synchronization module 5033 and a second storage module 5034 .
[0112] The second wake-up module 5031 is used to send a status wake-up request to the first client 501 through the cloud 502 in response to the information operation on the information file in the second client 503. In some embodiments, the second wake-up module 5031 is also used to set an update mark in the information file after the information operation is performed in response to the completion of the information operation on the second client 503, and to update the update mark in the information file after the information operation is performed, and the update mark is used to indicate that the information file is obtained after the information operation is performed.
[0113] The second answering module 5032 is configured to adjust the state of the second client 503 to the answering state in response to receiving a state awakening request for the second client 503 .
[0114] The second synchronization module 5033 is used to send the information file after the information operation to the first client 501 through the cloud 502, or to receive the information file sent by the first client 501.
[0115] The second storage module 5034 is used to store the information file sent by the first client 501.
[0116] In some embodiments, the second storage module 5034 is further used to store the information file sent by the first client 501 according to the update identifier of the first client 501 and the update identifier of the second client 503: when there is an update identifier in the information file of the second client 503, determine whether to store the information file sent by the first client 501 according to the timestamp of the update identifier of the second client 503 and the timestamp of the update identifier of the first client 501. If the target update identifier with the latest timestamp is the update identifier of the first client 501, it indicates that the information file in the first client 501 is the latest one, and the second client 503 can store the information file sent by the first client 501, and replace the information file in the second client 503 with the information file sent by the first client 501; if the target update identifier with the latest timestamp is the update identifier of the second client 503, it indicates that the information file in the second client 503 is the latest one, and the second client 503 can discard the information file sent by the first client 501. In addition, when there is no update identifier in the information file of the second client 503, the information file sent by the first client 501 is stored.
[0117] The information synchronization system of this embodiment is used to implement the corresponding information synchronization method in the aforementioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here. In addition, the functional implementation of each module in the information synchronization system of this embodiment can refer to the description of the corresponding part in the aforementioned method embodiment, which will not be repeated here.
[0118] See also Figure 6 , Figure 6 The following is a schematic diagram of the implementation process of the information synchronization method applicable to the embodiment of the present application. Figure 3 The information synchronization method of the embodiment of the present application is applied to the above-mentioned information synchronization system, and includes the following steps:
[0119] In the case where the information file of the first client 501 is updated (corresponding to the completion of the information operation on the first client 501 in the above embodiment), the information file after the information operation is sent to the first wake-up module 5011 through the first synchronization module 5013, and the second client 503 is awakened by the first wake-up module 5011. Specifically, a status wake-up request for the second client 503 can be initiated through the cloud 502. The second response module 5032 of the second client 503 responds to the status wake-up request for the second client 503 and adjusts the status of the second client 503 to the response status. The information file sent by the first client 501 is received from the cloud 502 through the second synchronization module 5033. The information file sent by the first client 501 is stored according to the verification rule through the second storage module 5034.
[0120] The verification rule of the second storage module 5034 is as follows: when there is an update identifier in the information file of the second client 503, determine whether to store the information file sent by the first client 501 according to the timestamp of the update identifier of the second client 503 and the timestamp of the update identifier of the first client 501. If the target update identifier with the latest timestamp is the update identifier of the first client 501, it indicates that the information file in the first client 501 is the latest one, and the second client 503 can store the information file sent by the first client 501, and replace the information file in the second client 503 with the information file sent by the first client 501; if the target update identifier with the latest timestamp is the update identifier of the second client 503, it indicates that the information file in the second client 503 is the latest one, and the second client 503 can discard the information file sent by the first client 501. In addition, when there is no update identifier in the information file of the second client 503, the information file sent by the first client 501 is stored.
[0121] In the case where the information file of the second client 503 is updated (corresponding to the completion of the information operation on the second client 503 in the above embodiment), the information file after the information operation is sent to the second wake-up module 5031 through the second synchronization module 5033, and the first client 501 is awakened through the second wake-up module 5031. Specifically, a status awakening request for the first client 501 can be initiated through the cloud 502. The first response module 5012 of the first client 501 adjusts the status of the first client 501 to the response status in response to the status awakening request for the first client 501. The information file sent by the second client 503 is received from the cloud 502 through the first synchronization module 5013. The information file sent by the second client 503 is stored according to the verification rule through the first storage module 5014.
[0122] The verification rule of the first storage module 5014 is as follows: when there is an update identifier in the information file of the first client 501, determine whether to store the information file sent by the second client 503 according to the timestamp of the update identifier of the second client 503 and the timestamp of the update identifier of the first client 501. If the target update identifier with the latest timestamp is the update identifier of the second client 503, it indicates that the information file in the second client 503 is the latest one, and the first client 501 can store the information file sent by the second client 503, and replace the information file in the first client 501 with the information file sent by the second client 503; if the target update identifier with the latest timestamp is the update identifier of the first client 501, it indicates that the information file in the first client 501 is the latest one, and the first client 501 can discard the information file sent by the second client 503. In addition, when there is no update identifier in the information file of the first client 501, the information file sent by the second client 503 is stored.
[0123] In the embodiment of the present application, when there is an update to the information file of the first client, the state of the second client is adjusted to the response state by the first client, so that the second client in the response state can promptly receive the information file sent by the first client; when there is an update to the information file of the second client, the state of the first client is adjusted to the response state by the second client, so that the first client in the response state can promptly receive the information file sent by the second client, thereby improving the timeliness of information synchronization between the first client and the second client.
[0124] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.
[0125] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as an SDK, etc.
[0126] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above computer program and computer program product embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the computer program and computer program product embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0127] Figure 7 A schematic diagram of a hardware entity of an electronic device applicable to an embodiment of the present application is shown in FIG. Figure 7 As shown, the hardware entity of the electronic device 700 includes: a processor 701 and a memory 702, wherein the memory 702 stores a computer program that can be run on the processor 701, and the processor 701 implements the steps in the method of any of the above embodiments when executing the program.
[0128] The memory 702 stores computer programs that can be run on the processor. The memory 702 is configured to store instructions and applications executable by the processor 701. It can also cache data to be processed or processed by the processor 701 and various modules in the electronic device 700 (for example, image data, audio data, voice communication data, and video communication data). This can be achieved through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0129] When the processor 701 executes the program, the steps of any of the above information synchronization methods are implemented. The processor 701 generally controls the overall operation of the electronic device 700.
[0130] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the information synchronization method of any of the above embodiments.
[0131] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0132] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.
[0133] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0134] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0136] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0137] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0138] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0139] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0140] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
Claims
1. An information synchronization method, characterized in that: Applied to a first client, the method includes: In response to an information operation on an information file in the first client, a state awakening request is sent to the second client, so that the second client adjusts the state to a response state in response to the state awakening request; the information operation is an operation for editing the information file; the response state is an information receiving state; The information file after the information operation is performed is sent to the second client in the response state, so as to realize information synchronization between the second client and the first client.
2. The method according to claim 1, characterized in that Before sending the information file after the information operation to the second client in the response state, the method further includes: In response to the completion of the information operation on the first client, an update mark is set in the information file after the information operation is performed; the update mark is used to indicate that the information file is obtained after the information operation is performed.
3. The method according to claim 1, characterized in that The first client and the second client establish an association relationship through a user account or through a preset association device code; the sending a status wake-up request to the second client includes: Determine a client having the same user account as the first client as the second client, or determine an associated device code according to the device code of the first client, and determine a client corresponding to the associated device code as the second client; Send a status wake-up request to the second client.
4. The method according to claim 1, characterized in that: The sending a status awakening request to the second client includes: When the first client and the second client are both in a network online state and an association relationship between the first client and the second client is successfully established, a status awakening request is sent to the second client.
5. An information synchronization method, characterized in that: Applied to the second client, the method includes: In response to receiving a status wake-up request for the second client, adjusting the status to a response status; the response status is an information receiving status; An information file sent by a first client is received and stored to achieve information synchronization between the second client and the first client; the information file sent by the first client is an information file after an information operation is performed, and the information operation is an operation for editing an information file.
6. The method according to claim 5, characterized in that The storing the information file sent by the first client includes: Determine whether there is an update identifier in the information file sent by the first client; the update identifier is used to indicate that the information file is obtained after performing the information operation; When the update identifier exists in the information file sent by the first client, the information file sent by the first client is stored.
7. The method according to claim 6, characterized in that The update identifier includes a timestamp; the information file storing the information sent by the first client includes: Determine whether there is an update identifier in the information file of the second client; In a case where the update identifier exists in the information file of the second client, determining whether to store the information file sent by the first client according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client; When the update identifier does not exist in the information file of the second client, the information file sent by the first client is stored.
8. The method according to claim 7, characterized in that The determining whether to store the information file sent by the first client according to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client includes: According to the timestamp of the update identifier of the second client and the timestamp of the update identifier of the first client, determining a target update identifier with the latest timestamp from the update identifier of the second client and the update identifier of the first client; When the target update identifier is the update identifier of the first client, storing the information file sent by the first client, and replacing the information file in the second client with the information file sent by the first client; When the target update identifier is the update identifier of the second client, the information file sent by the first client is discarded.
9. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor, used to implement the information synchronization method described in any one of claims 1 to 8 when executing the executable instructions stored in the memory.
10. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to implement the information synchronization method described in any one of claims 1 to 8 when executed by a processor.