Synchronization method of electronic equipment and electronic equipment

By delaying and batch sending write requests, the problem of increased power consumption in the accessed device under long working conditions is solved, and the dual effects of power consumption reduction and information timeliness are achieved.

CN119513044APending Publication Date: 2025-02-25HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311066886.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The accessed device needs to maintain a long working state under multiple interaction requirements, resulting in an increase in power consumption.

Method used

By delaying and batch sending write requests to the accessed device, the time when the accessed device is in a non-operating state is increased, thereby reducing power consumption.

Benefits of technology

It effectively reduces the power consumption of the accessed device, while ensuring the timeliness of electronic devices sending synchronization requests to the accessed device, and avoiding information delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513044A_ABST
    Figure CN119513044A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a synchronization method of electronic equipment and the electronic equipment, and in the method, the electronic equipment can display the content of a first file. Afterwards, if the electronic device receives a first write operation on the first file, the electronic device can send a synchronization request comprising at least one write request to the accessed end device in the non-working state after waiting for a first duration. Wherein the first write operation is used for requesting to modify the content of the first file. A second file associated with the first file is stored in the accessed end equipment. The at least one write request comprises a request for requesting synchronous modification of the content of the second file according to the first file. According to the method provided by the embodiment of the invention, the time of the accessed end equipment in the non-working state can be prolonged by delaying and sending the write requests to the accessed end equipment in batches, so that the power consumption of the accessed end equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a synchronization method of an electronic device and the electronic device. Background Art

[0002] With the development of electronic technology and mobile Internet, users may have multiple electronic devices, and multiple electronic devices may interact with each other to achieve data synchronization. For example, an access end device may send a synchronization request for obtaining a target file to an accessed end device to obtain the target file.

[0003] However, the accessed device can only respond to the received synchronization request when it is in working state (e.g., online state). Therefore, if there are multiple interaction requirements between the accessing device and the accessed device, the accessed device needs to maintain a long working state, which increases the power consumption of the accessed device. Summary of the invention

[0004] The embodiments of the present application provide a synchronization method of an electronic device and an electronic device, which can reduce the power consumption of an accessed terminal device that interacts with the electronic device.

[0005] In a first aspect, an embodiment of the present application provides a synchronization method for an electronic device, which is applied to an electronic device. In the method, the electronic device can display the content of a first file. Afterwards, the electronic device can receive a first write operation on the first file. The first write operation is used to request to modify the content of the first file. In response to the first write operation, the electronic device can send a synchronization request including at least one write request to an accessed end device in a non-working state after waiting for a first period of time. A second file associated with the first file is stored in the accessed end device, and the at least one write request includes a request for requesting to synchronously modify the content of the second file based on the first file.

[0006] In the method of the present application, the association of the second file with the first file means that the content of the second file is the same as the content of the source file to which the content of the first file corresponds respectively. The electronic device can determine the timing of sending the first write request to the accessed device based on the state of the accessed device storing the second file. If the accessed device is in a non-working state, the electronic device sends a synchronization request including at least one write request to the accessed device after waiting for a first period of time. Among them, the at least one write request includes the first write request. This method of sending write requests to the accessed device by delaying and batching can increase the time that the accessed device is in a non-working state, thereby reducing the power consumption of the accessed device.

[0007] In combination with the first aspect, in a possible design, the first duration includes the duration of the time period from when the electronic device receives the first write operation to when it is determined that the accessed end device switches from a non-working state to a working state. Alternatively, the first duration includes the duration of the time period from when the electronic device receives the first write operation to when the number of the at least one write request reaches a first value. Alternatively, the write request carries modification data for the content of the first file, and the first duration includes the duration of the time period from when the electronic device receives the first write operation to when the size of the modification data carried by the generated write request reaches a second value. Alternatively, the first duration includes a preset duration.

[0008] In this solution, multiple possible implementations of the first duration are provided. After waiting for the first duration, the electronic device sends a synchronization request including at least one write request to the accessed end device in a non-working state. On the one hand, the time during which the accessed end device is in a non-working state can be increased. On the other hand, the timeliness of the synchronization request sent by the electronic device to the accessed end device can be guaranteed to avoid information delay.

[0009] In conjunction with the first aspect, in a possible design, before the electronic device displays the content of the first file of the electronic device, the electronic device may also display an associated page associated with the content of the first file of the electronic device. The electronic device may receive a first read operation on the first file on the associated page. The first read operation is used to request to read the content of the first file. In response to the first read operation, if it is determined that the content of the first file is stored, the electronic device reads the content of the first file.

[0010] In this solution, if the electronic device determines that the first file is stored locally, the electronic device can directly read the first file locally, which can improve the reading speed.

[0011] In conjunction with the first aspect, in a possible design, the electronic device determines that the content of the first file is stored in the memory, and reads the content of the first file in the memory of the electronic device. Alternatively, the electronic device determines that the content of the first file is not stored in the memory, and the content of the first file is stored in the flash memory of the electronic device, and reads the content of the first file in the flash memory of the electronic device.

[0012] In this solution, since the memory is a temporary cache space for temporarily storing data, the data stored in the memory is usually data recently acquired by the electronic device (for example, within 3 hours), and the data version is relatively new. Therefore, if the content of the first file is stored in the memory of the electronic device, the electronic device can directly read the content of the first file in the memory, thereby improving the reading speed.

[0013] It should be understood that for a distributed file system, when an electronic device synchronizes a local file to an access terminal device, the file can be in memory or flash memory. For a scenario where a file is in memory, for example, a user opens the file through an application. Accordingly, the file will be loaded into memory. In such a scenario, the electronic device can directly obtain the file from memory without having to obtain the file from flash memory, thereby increasing the access speed to the file and reducing the power consumption of the device.

[0014] In combination with the first aspect, in one possible design, the electronic device may determine that the content of the first file is not stored in response to the first read operation, and send a synchronization request including a request for obtaining the content of the first file to the accessed device.

[0015] In this solution, if the first file is not stored in the memory and flash memory of the electronic device, the electronic device can directly send a synchronization request for obtaining the content of the first file to the accessed end device to request to obtain the first file. After the accessed end device sends the first file to the electronic device, the electronic device can receive and display the first file.

[0016] In combination with the first aspect, in a possible design, the synchronization request also includes a read request for requesting the accessed end device to obtain a third file. The third file is a file that the electronic device is predicted to request the accessed end device to obtain in the future. The third file is associated with the first file. The third file is different from the first file. The third file is not stored in the electronic device, and the third file is stored in the accessed end device.

[0017] In this solution, the electronic device can obtain the third file from the accessed end device in advance by sending a synchronization request including a read request for requesting to obtain the third file to the accessed end device. When the electronic device actually receives the trigger operation for requesting to read the third file, the content of the third file can be directly read and displayed in the electronic device, which not only reduces the interaction with the accessed end device and saves the power consumption of the accessed end device, but also improves the speed at which the electronic device reads and displays the third file.

[0018] In combination with the first aspect, in a possible design, the third file is determined based on the number of times the electronic device has historically received the first target trigger operation to satisfy a preset condition. The first target trigger operation includes inputting a first sub-trigger operation and a second sub-trigger operation to the electronic device within a second time period. The first sub-trigger operation includes a write operation and a read operation on the first file, and the second sub-trigger operation includes a write operation and a read operation on the fourth file. The fourth file is different from the first file. If the electronic device determines that the number of times the electronic device has historically received the first target trigger operation to satisfy a preset condition, and determines that the fourth file is not stored in the electronic device, and the fourth file is stored in the accessed end device, the electronic device determines the fourth file as the third file.

[0019] In this scheme, the more times the electronic device has received the first target trigger operation in history, the higher the possibility that the electronic device will receive the trigger operation for the corresponding fourth file after receiving the trigger operation for the first file. Therefore, the electronic device can predict at least one trigger operation received after receiving the trigger operation for the first file this time based on the number of times the electronic device has received the first target trigger operation in history. When the number of times the electronic device has received the first target trigger operation in history meets the preset condition, the electronic device can predict the second sub-trigger operation included in the first target trigger operation as the trigger operation received by the electronic device after receiving the trigger operation this time. Afterwards, the electronic device can determine whether the fourth file is stored in the electronic device, and determine whether the fourth file is stored in the accessed end device. If the electronic device determines that the fourth file is not stored in the electronic device, and determines that the fourth file is stored in the accessed end device, the fourth file is determined as the third file. Based on the determined third file, the electronic device can generate a request for requesting the accessed end device to obtain the third file.

[0020] In combination with the first aspect, in one possible design, the preset condition includes that the number of times the electronic device has historically received the first target trigger operation is greater than a number threshold.

[0021] In combination with the first aspect, in a possible design, the electronic device may receive the content of a response file sent by the accessed end device. The content of the response file is the content of a file sent by the accessed end device to the electronic device in response to a synchronization request sent by the electronic device. The target response content in the content of the response file is stored in the flash memory of the electronic device. The number of times the electronic device has historically received trigger operations on the target response content is greater than or equal to a quantity threshold. The trigger operations on the target response content include a write operation on the target response content and a read operation on the target response content.

[0022] In this scheme, after the electronic device receives the response content sent by the accessed end device, it can determine the number of times the electronic device has historically received the trigger operation for the response content. Since the more times the electronic device has historically received the trigger operation, the greater the possibility that the electronic device will receive the trigger operation in the future. Therefore, the electronic device can determine whether to store the response content in the flash memory of the electronic device based on the number of times the trigger operation has been received historically. If the electronic device stores the response content (the target response content in the embodiment of the present application) in the flash memory of the electronic device, when the electronic device receives the trigger operation again, it does not need to obtain the target response content from the accessed end device, but can directly read the target response content from the local flash memory, reducing the interaction between the electronic device and the accessed end device, thereby saving power consumption of the electronic device and the accessed end device.

[0023] In combination with the first aspect, in a possible design, an electronic device receives status information sent by a visited device. The status information is used to characterize the status of the visited device. The status includes a working state and a non-working state. The power consumption of the visited device in the working state is greater than the power consumption of the visited device in the non-working state. The synchronization request is used to switch the visited device from the non-working state to the working state, or to keep the visited device in the working state. The electronic device can determine the status of the visited device based on the status information generated by the visited device.

[0024] In this scheme, when the state of an electronic device switches, state information can be sent to other electronic devices in the same interactive system as the electronic device. The electronic device can also receive state information sent by other electronic devices when the state switches. Among them, the state of the electronic device includes a working state and a non-working state. For electronic devices such as televisions and desktop computers that mainly rely on power supply, the working state of the power-powered electronic device can be the state of playing the corresponding media, or the state of displaying an interactive interface for interacting with the user, etc. The non-working state of the power-powered electronic device can be the state of displaying the screen saver, or the standby state (the state of turning off the screen but not shutting down), etc. For electronic devices such as mobile phones and tablets that mainly rely on battery power, the working state of the battery-powered electronic device can be the state of displaying an interactive interface for interacting with the user, etc. The non-working state of the battery-powered electronic device can be the standby state (the state of turning off the screen but not shutting down), etc. The electronic device can determine the state of other electronic devices in the same interactive system based on the acquired state information.

[0025] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes a memory and one or more processors, the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect and any possible design thereof.

[0026] In a third aspect, an embodiment of the present application provides a chip system. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line, and the interface circuit is used to receive a signal from a memory of an electronic device and send a signal to the processor, the signal including a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in the first aspect and any possible design thereof.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible design thereof.

[0028] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the method described in the first aspect and any possible design thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of the interaction of multiple electronic devices;

[0030] Figure 2 It is a schematic diagram of the structure of a distributed file system;

[0031] Figure 3 This is a schematic diagram of the structure of a recently used linked list;

[0032] Figure 4 A schematic diagram of the structure of an electronic device provided by the prior art;

[0033] Figure 5 A schematic diagram of a management strategy for files stored in an electronic device provided by the prior art;

[0034] Figure 6 The present invention provides a flow chart of interaction of multiple electronic devices according to the prior art.

[0035] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0036] Fig. 8AA schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0037] Figure 8B A schematic diagram of the structure of a distributed file system provided in an embodiment of the present application;

[0038] Fig.9A A schematic diagram of the structure of an interactive system provided in an embodiment of the present application;

[0039] Fig. 9B A schematic diagram of an interface of an electronic device provided in an embodiment of the present application;

[0040] Fig.10 A schematic diagram of a flow chart of a first electronic device synchronization method provided in an embodiment of the present application;

[0041] Fig.11 A schematic diagram of a process for determining a timing for an electronic device to send a synchronization request provided in an embodiment of the present application;

[0042] Fig.12 A schematic diagram of a flow chart of a second electronic device synchronization method provided in an embodiment of the present application;

[0043] Fig.13 A schematic diagram of a bitmap provided in an embodiment of the present application;

[0044] Fig.14 A schematic flow chart of a third electronic device synchronization method provided in an embodiment of the present application;

[0045] Fig.15 A schematic diagram of a process for determining whether to store response content in a flash memory provided in an embodiment of the present application;

[0046] Fig.16A A schematic diagram of a process for assigning a file identifier to a file provided in an embodiment of the present application;

[0047] Fig. 16B A schematic diagram of a process for recycling document identification provided in an embodiment of the present application;

[0048] Fig.17A A schematic diagram of experimental data provided in an embodiment of the present application;

[0049] Fig. 17B A schematic diagram of another experimental data provided for an embodiment of the present application;

[0050] Fig.18A A schematic diagram of the module structure of an electronic device provided in an embodiment of the present application;

[0051] Fig.18B A functional diagram of the persistence module provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0053] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0054] For ease of understanding, some examples of concepts related to the embodiments of the present application are provided for reference, as shown below:

[0055] Temporary memory: A temporary cache space used to temporarily store the calculation data in the central processing unit (CPU) and the data exchanged with the external memory such as the hard disk (also referred to as a file in the embodiment of the present application). The data cannot be stored in the temporary memory for a long time and will disappear after a period of time or after a power failure. Temporary memory includes random access memory (RAM), cache, registers, etc., which are not limited in the embodiment of the present application.

[0056] Non-volatile memory: A storage space used to store data for a long time, and the data will not disappear after power failure. Non-volatile memory includes disk storage, flash memory, universal flash storage (UFS), read-only memory (ROM), hard disk, mobile hard disk, read-only compact disk (CD-ROM), etc., and the embodiments of this application are not limited thereto.

[0057] With the development of electronic technology and mobile Internet, users can own more electronic devices such as mobile phones, tablet computers, smart home devices (such as TVs), etc. Multiple electronic devices can be connected to each other to achieve synchronization functions such as cross-device file sharing, screen projection, and multi-device collaboration. For example, see Figure 1After the electronic device 101 is connected to the electronic device 102, the electronic device 101 can request to obtain the file 103 stored in the electronic device 102. The electronic device 102 can retrieve the file 103 from the storage space of the electronic device 102 and send the file 103 to the electronic device 101. After receiving the file 103, the electronic device 101 can read and store the file 103.

[0058] In the embodiment of the present application, an electronic device used to send a synchronization request to other electronic devices may also be referred to as an access terminal device. An electronic device used to receive a synchronization request sent by other electronic devices may also be referred to as a visited terminal device. The same electronic device may serve as both an access terminal device and a visited terminal device. The synchronization request may include a synchronization request of a data signaling type and a synchronization request of an instruction signaling type.

[0059] The electronic device can access files stored in the accessed end device based on the built-in distributed file system. Figure 2 , a distributed file system can include local source shared directories and mounted directories.

[0060] The local source shared directory includes file indexes corresponding to files stored in the electronic device. The file index corresponding to the file is used to indicate the storage location of the file in the electronic device. When the electronic device needs to access a target file, it can query whether there is a file index of the target file in the local source shared directory. If the file index of the target file exists in the local source shared directory, the electronic device can access the target file at the corresponding location locally.

[0061] If the file index of the target file does not exist in the local source shared directory, the electronic device can also determine all accessed devices that are connected to the electronic device based on the device view directory connected to the mount directory. And, the electronic device can obtain the remote shared directory in any accessed device. Among them, the remote shared directory in the accessed device includes the file index of the files in the accessed device that are allowed to be accessed by other electronic devices. The electronic device can determine whether the target file is stored in the accessed device based on whether the remote shared directory includes the file index of the target file. If the target file is stored in the accessed device, the electronic device can generate an access request for requesting to obtain the target file, and send the access request to the corresponding accessed device to request to obtain the target file.

[0062] If the electronic device successfully obtains the target file in the accessed device, the electronic device can store the target file locally, and can generate a corresponding file index based on the local storage location of the target file, and add the generated file index to the local source shared directory, so that when the electronic device needs to access the target file again, the electronic device can access the target file at the corresponding local location based on the file index corresponding to the target file.

[0063] In some embodiments, the electronic device can dynamically manage files stored locally based on a least recently used list (LRU list for short). The LRU list includes file information of a fixed number of files recently accessed by the electronic device (e.g., file name information, file storage location information, the size of the storage space occupied by the file on the electronic device, etc.). When the file information of a file is deleted from the LRU list, the electronic device will also delete the corresponding file, thereby reducing the storage pressure of the electronic device.

[0064] For example, see Figure 3 , the LRU linked list 300 in the electronic device includes file information of multiple files, namely, file information of file 1, file information of file (n-1), file information of file n, etc. Among them, the file information of file 1 is located in the first node 301 of the LRU linked list 300, the file information of file (n-1) is located in the (N-1)th node 302 of the LRU linked list 300, and the file information of file n is located in the Nth node 303 of the LRU linked list 300. Before the electronic device accesses file 2, the LRU linked list 300 does not include the file information of file 2. After the electronic device accesses file 2, the electronic device can update the LRU linked list 300 based on the file information of file 2. Since the LRU linked list 300 can only include the file information of a fixed number of files recently accessed by the electronic device, when the file information of file 2 is added to the LRU linked list 300, the file information of file n will be deleted from the LRU linked list 300, and the LRU linked list 310 is obtained. The file information of file 2 is located in the first node 311 of the LRU linked list 310, the file information of file 1 is located in the second node 312 of the LRU linked list 310, and the file information of file (n-1) is located in the Nth node 313 of the LRU linked list 310. Before the electronic device accesses file 2, the LRU linked list 300 includes the file information of file 2.

[0065] In some embodiments, see Figure 4, the electronic device includes a file filter, a storage space manager, a temporary storage device, and a non-volatile storage device. After the electronic device obtains the target file, the file filter in the electronic device can perform a hot and cold evaluation on the target file to determine whether the target file is a file that the electronic device will access frequently. If the file filter determines that the target file is a file that the electronic device will access frequently, the storage space manager in the electronic device can detect whether the remaining space in the temporary storage device can store the target file. If the remaining space in the temporary storage device is sufficient to store the target file, the storage space manager can store the target file in the temporary storage device. If the remaining space in the temporary storage device is insufficient to store the target file, the storage space manager can store the target file in the non-volatile storage device in the electronic device. If the file filter determines that the target file is not a file that the electronic device will access frequently, the storage space manager will delete the target file, thereby reducing the storage pressure of the electronic device.

[0066] In some embodiments, after the electronic device obtains the target file, it can classify the target file. And adopt a corresponding storage strategy for the target file based on the category of the target file, thereby reducing the storage pressure of the electronic device. For example, see Figure 5 If the target file is a self-destructing file, the target file can be stored in a temporary memory of the electronic device. The user can input an operation to the electronic device to instruct the display of the target file. After the electronic device displays the target file in response to the operation input by the user, if the electronic device receives an operation input by the user to instruct the closing of the target file, the electronic device can close and delete the target file. If the target file is a transient file, the target file can be stored in a temporary memory of the electronic device, and the target file can be managed using an LRU linked list. If the target file is a persistent file, the target file can be stored in a non-volatile memory to retain the target file for a long time.

[0067] However, no matter which of the above methods is used by the electronic device to store the target file, the electronic device can modify the target file, and the accessed device that sends the target file to the electronic device can also modify the target file. This results in that when the electronic device needs to access the target file again, the version of the target file accessed locally by the electronic device may be inconsistent with the version of the target file stored in the accessed device. Figure 6 When the electronic device needs to access the target file again, the electronic device will send a verification request to the accessed device that previously sent the target file to the accessing device to verify whether the target file stored in the electronic device is the latest version.

[0068] If the accessed device detects that the version of the target file stored in the electronic device is the latest version, the accessed device can send information indicating that the verification is successful to the electronic device. After receiving the information indicating that the verification is successful, the electronic device can access the target file at the corresponding location locally.

[0069] If the accessed end device detects that the version of the target file stored in the electronic device is not the latest version, the accessed end device may send information indicating verification failure to the electronic device. After receiving the information indicating verification failure, the electronic device may send a request to the accessed end device for obtaining the latest version of the target file, so as to update the target file stored in the electronic device and access the latest version of the target file after receiving the latest version of the target file sent by the accessed end device.

[0070] It can be seen that, whether in the scenario where the electronic device accesses the target file stored in the accessed device for the first time, or in the scenario where the electronic device stores the target file previously obtained from the accessed device but has the need to access the target file again, the electronic device will send a synchronization request (for example, a read request, a write request, a verification request, etc.) to the accessed device. If the accessed device is in a non-working state, the accessed device will release the non-working state and enter the working state after receiving the synchronization request from the electronic device. Afterwards, the accessed device can respond to the synchronization request. However, if the electronic device frequently sends synchronization requests to the accessed device, it may cause the accessed device to frequently switch between the non-working state and the working state, or cause the accessed device to always be in the working state, increasing the power consumption of the accessed device.

[0071] The embodiment of the present application provides a synchronization method of an electronic device and an electronic device. In the method, the electronic device can display the content of a first file. Afterwards, if the electronic device receives a first write operation for requesting to modify the content of the first file, it can determine the timing of sending a synchronization request including at least one request for modifying the content of the first file to the accessed end device. By sending the synchronization request to the accessed end device at this timing, the electronic device can reduce the interaction between the electronic device and the accessed end device, thereby reducing the power consumption of the accessed end device.

[0072] Figure 7 A schematic structural diagram of an electronic device 100 is shown.

[0073] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0074] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0075] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0076] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0077] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0078] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0079] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0080] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0081] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0082] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0083] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0084] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0085] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0086] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0087] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0088] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0089] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.

[0090] In addition, the internal memory 121 may include a temporary memory, such as a high-speed random access memory. The internal memory 121 may also include a non-volatile memory, such as a disk storage device, a flash memory device, UFS, etc.

[0091] Among them, data can be stored permanently in the non-volatile memory, and the storage of data in the temporary memory has a time limit (for example, data can only be stored in the temporary memory for a maximum of 3 hours, etc.).

[0092] The electronic device 100 can implement audio functions such as music playing and recording through an audio module, a speaker, a receiver, a microphone, an earphone interface, and an application processor.

[0093] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0094] Fig. 8A 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0095] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0096] The application layer can include a series of application packages.

[0097] like Fig. 8A As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0098] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0099] like Fig. 8A As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0100] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0101] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0102] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0103] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0104] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, virtual file system, distributed file system, specific backend storage file system and backup persistent flash storage.

[0105] The virtual file system is an abstraction layer of different file systems in an electronic device, and is a storage medium for enabling applications stored in the electronic device and functions for retrieving data (eg, POSIX API) to access different files in a consistent manner.

[0106] See also Figure 8B The distributed file system may include a unified file view, a local access interface, a remote access interface, and a data persistence cache architecture. The electronic device may establish a communication connection with other electronic devices in the interactive system by joining the interactive system. The unified file view includes a file index of files that the electronic device allows to be accessed by other electronic devices in the interactive system, and includes a file index of files that other electronic devices in the interactive system allow to be accessed by the electronic device.

[0107] The local access interface is used to provide an interface for an electronic device to retrieve local files. The remote access interface is used to provide an electronic device with an interface for sending synchronization requests to other electronic devices. For example, an electronic device can send a write request to other electronic devices through a remote access interface.

[0108] The specific backend storage file system may be a system such as EXT4 or F2FS, which is used to execute a request received by the electronic device, for example, to execute a trigger operation on a file or file information received by the electronic device.

[0109] Backup persistent flash memory storage (also referred to as non-volatile memory in the embodiments of the present application) is a storage medium that can store data for a long time.

[0110] Continue to see Figure 8B,The data persistence cache architecture includes a persistence module, an identification module and a synchronization module.

[0111] The persistence module is used to determine whether to send a synchronization request corresponding to the content of the target file to the accessed end device when the electronic device receives a write operation or a read operation on the target file. Accordingly, when the electronic device receives a read operation on the target file, the synchronization request corresponding to the content of the target file may include a read request for requesting the accessed end device to obtain the content of the target file. When the electronic device receives a write operation on the target file, the synchronization request corresponding to the content of the target file may include a write request for requesting the accessed end device to modify the content of the target file.

[0112] The identification module is used to predict the target operation received in the future after the electronic device receives the write operation or read operation on the target file, and determine whether to send a corresponding synchronization request to the accessed end device based on the predicted trigger operation received in the future.

[0113] The synchronization module is used to determine the state of the accessed device. If the persistence module determines that the synchronization request sent by the electronic device to the accessed device includes a write request, the synchronization module can send a synchronization request including at least one write request to the accessed device after a period of time if it determines that the accessed device is in a non-working state.

[0114] In some embodiments, after the electronic device receives the content of the response file sent by the accessed device (for example, the response file or file information of the response file), the persistence module can also be used to determine whether to store the content of the response file in the non-volatile memory of the electronic device.

[0115] Illustratively, the technical solutions involved in the following embodiments can all be implemented in an electronic device having the above hardware architecture and / or software architecture.

[0116] For ease of description, in the embodiment of the present application, the non-volatile memory is a flash memory and the temporary memory is a memory. For example, the synchronization method of the electronic device provided in the embodiment of the present application is described in detail in combination with the accompanying drawings and application scenarios. It should be noted that the non-volatile memory in the embodiment of the present application is not limited to flash memory, but can also be a non-volatile memory such as a disk memory, UFS, ROM, hard disk, mobile hard disk, CD-ROM, etc., which is not limited in the embodiment of the present application. The temporary memory in the embodiment of the present application is also not limited to memory, but can also be a cache, register, etc., which is not limited in the embodiment of the present application.

[0117] The synchronization method of the electronic device provided in the embodiment of the present application can be applied to Fig.9AIn the interactive system shown, the interactive system may include multiple electronic devices, for example, electronic device 901, electronic device 902, electronic device 903, etc.

[0118] In some embodiments, each electronic device can be switched between a non-working state and a working state. The electronic device in the working state and the electronic device in the non-working state are both in a powered-on state. The power consumption of the electronic device in the non-working state is less than the power consumption of the electronic device in the working state.

[0119] For example, if the electronic device is an electronic device such as a television or a desktop computer that mainly relies on power supply (it may also be referred to as a power supply device in the embodiments of the present application), the working state of the power supply device may be a state of playing the corresponding media asset, or a state of displaying an interactive interface for interacting with the user, etc. The non-working state of the power supply device may be a state of displaying a screen saver, or a standby state (a state where the screen is off but the device is not turned off). Since the power supply device is directly powered by the power supply, the power supply device will not be shut down due to power exhaustion. However, the CPU operating speed of the power supply device in the working state is much higher than the CPU operating speed of the power supply device in the non-working state.

[0120] For another example, for the same power-type device, the CPU operating speed when the power-type device is in a working state is tens or even hundreds of times higher than the CPU operating speed when the power-type device is in a non-working state. Moreover, as the CPU operating speed increases, the power consumed by the power-type device will also increase, resulting in the power-type device in a working state consuming more power than the power-type device in a non-working state. That is, the power consumption of the power-type device in a non-working state is less than the power consumption of the power-type device in a working state.

[0121] For another example, if the electronic device is an electronic device such as a mobile phone or a tablet computer that mainly relies on battery power (it may also be referred to as a battery-powered device in the embodiment of the present application), the working state of the battery-powered device may be a state of displaying an interactive interface for interacting with a user. For example, displaying a lock screen interface, a negative one screen interface, a desktop, an application interface, and the like. The non-working state of the battery-powered device may be a standby state (a state in which the screen is turned off but not turned off). Since the battery-powered device is powered by a battery, the amount of power that the battery can store without an external power supply is limited. The amount of power consumed by the battery-powered device when displaying a picture is greater than the amount of power consumed by the battery-powered device when the screen is turned off. Therefore, the battery-powered device will aggravate power depletion when displaying a picture. That is, the power consumption of a battery-powered device in a non-working state is less than the power consumption of a battery-powered device in a working state. Moreover, for the same battery-powered device, the CPU operating rate of the battery-powered device when it is in a working state is greater than the CPU operating rate of the battery-powered device when it is in a non-working state, that is, the battery-powered device consumes more power in a working state than in a non-working state. That is, the power consumption of a battery-powered device in a non-working state is less than the power consumption of a battery-powered device in a working state.

[0122] In some embodiments, the electronic device can be set to enter a non-working state if no event that triggers the electronic device to enter a working state is detected within a period of time, for example, the electronic device receives data, requests, and other events, so as to reduce the power consumption of the electronic device. After the electronic device enters the non-working state, if an event that triggers the electronic device to enter a working state is detected, it enters a working state.

[0123] In some embodiments, when the state of an electronic device switches, state information may be sent to other electronic devices in the same interactive system as the electronic device. The state information may include non-working state information and working state information. The non-working state information is used to indicate that the electronic device switches from a working state to a non-working state. The working state information is used to indicate that the electronic device switches from a non-working state to a working state. After receiving the state information sent by the electronic device, other electronic devices may record the state of the electronic device.

[0124] Exemplarily, if electronic device A is in a non-working state, the state of electronic device A can be recorded as "0" in electronic device B. "0" means that electronic device A is in a non-working state. If the state of electronic device A switches from a non-working state to a working state, electronic device A can send working state information to electronic device B. After electronic device B receives the working state information sent by electronic device A, it can update the state of electronic device A in the historical record to record the state of electronic device A as "1". "1" means that electronic device A is in a working state.

[0125] In some embodiments, each electronic device in the interactive system may store a state table. The state table records the state of each electronic device in the interactive system. For example, the interactive system includes electronic device A, electronic device B, electronic device C, electronic device D, etc. Among them, the state table stored in electronic device A may be as shown in Table 1. Since "0" indicates that the corresponding electronic device is in a non-working state, "1" indicates that the corresponding electronic device is in a working state. Therefore, electronic device A can obtain the states of electronic device B, electronic device C, and electronic device D based on Table 1.

[0126] Table 1

[0127] Device ID Device Status Electronic equipment A 1 Electronic equipment B 0 Electronic equipment C 1 Electronic equipment D 1 … …

[0128] In some embodiments, each electronic device in the interactive system can establish a communication connection to interact with each other. Each electronic device can act as an access end device to send a synchronization request to other electronic devices, or act as an accessed end device to receive a synchronization request sent by other electronic devices.

[0129] For example, see Fig.9A , electronic device 902 and electronic device 903 can both request to access files stored in electronic device 901. In the process that electronic device 902 and electronic device 903 request to access files stored in electronic device 901, electronic device 901 is the accessed end device, and electronic device 902 and electronic device 903 are the accessing end devices.

[0130] For example, see Fig.9A , electronic device 901 may also request to access files stored in electronic device 902 and electronic device 903. In the process that electronic device 901 requests to access files stored in electronic device 902 and electronic device 903, electronic device 901 is the accessing end device, and electronic device 902 and electronic device 903 are the accessed end devices.

[0131] In some embodiments, an electronic device may receive an input trigger operation on a file. The trigger operation may include a read operation for requesting to read the content of the file. The trigger operation may also include a write operation for requesting to modify the content of the file. The content of the file may include the file, and may also include file information of the file. The file information is information for describing the attributes of the file. The file information may include information such as file name information, file storage location information, and the size of the storage space that the file will occupy in the electronic device, which is not limited by the embodiments of the present application.

[0132] In the following embodiments, the synchronization method of the electronic device provided in the embodiments of the present application is described in detail by taking the content of the above-mentioned file as the content of the first file, where the content of the first file includes the first file or the file information of the first file (also referred to as the first file information in the embodiments of the present application) as an example.

[0133] In some embodiments, the electronic device may display the content of the first file. Fig. 9B In (a), the content of the first file displayed by the electronic device is the text page 910 in the first file. Fig. 9B In (b), the content of the first file displayed by the electronic device is the file information page 920 of the first file. When the electronic device receives the input trigger operation on the first file, if the trigger operation is a write operation for requesting to modify the content of the first file (also referred to as the first write operation in the embodiment of the present application), the electronic device can respond to the first write operation and execute the following steps: Fig.10 Steps S1000-S1040 are shown to modify the content of the second file stored in the accessed terminal device.

[0134] S1000: Based on the modification of the content of the first file, generate a write request for requesting the accessed terminal device to synchronously modify the content of the second file according to the content of the first file.

[0135] The second file is associated with the first file. The second file is associated with the first file in that the content of the second file is the same as the content of the source file corresponding to the content of the first file.

[0136] For example, the content of file 1 is stored in both electronic device 1 and electronic device 2, and the content of file 1 is not obtained by modifying the content of other files, but is directly created in electronic device 1 and / or electronic device 2. Alternatively, the content of file 1 is obtained by electronic device 1 and electronic device 2 from other electronic device 3 that directly creates the content of file 1. A first modification to the content of file 1 stored in electronic device 1 can obtain the content of file 2. A second modification to file 1 stored in electronic device 2 can obtain the content of file 3. The content of the source file corresponding to the content of file 2 is the content of file 1. The content of the source file corresponding to the content of file 3 is also the content of file 1. If the first modification is the same as the second modification, the content of file 2 is also the same as the content of file 3. If the first modification is different from the second modification, the content of file 2 is also different from the content of file 3.

[0137] Furthermore, for ease of description, in an embodiment of the present application, the write request for requesting the accessed end device to synchronously modify the content of the second file based on the content of the first file may be referred to as a first write request, and the first write request carries at least modification data for the content of the first file.

[0138] For example, the content of the first file includes the first file, which is a file including 5 pages of content. After the electronic device modifies the content of page 3, it can generate a write request for requesting the accessed terminal device to modify the second file. The write request carries at least the content of page 3 in the first file. In other examples, the write request can also carry the content of pages 3-4 or 3-5 of the first file.

[0139] For another example, the content of the first file includes first file information, and the first file information may include file name information, file size information, file format information, etc. of the first file. After the electronic device modifies the file name information of the first file, it may generate a write request for requesting the accessed terminal device to modify the file name information of the second file. The write request at least carries the modified file name information of the first file.

[0140] S1010: Determine the status of the accessed device.

[0141] The accessed device is different from the electronic device, and the accessed device stores the content of the second file.

[0142] In some embodiments, since the second file is associated with the first file, the electronic device may determine the electronic device that has historically sent the content of the second file to the electronic device as the accessed end device. For example, if the file 1 in the electronic device 1 is obtained from the electronic device 2, the electronic device 1 may determine the electronic device 2 as the accessed end device.

[0143] In some embodiments, since the content of the first file includes the first file or the first file information, and the second file is associated with the first file. Therefore, based on the content of the first file, the electronic device can search for the file index of the second file in the remote shared directories corresponding to each electronic device that has established a communication connection with the first file. The remote shared directory includes the file index of the files in the corresponding electronic device that are allowed to be accessed by other electronic devices. If the file index of the second file exists in the target remote shared directory among the remote shared directories, it means that the second file is stored in the electronic device that stores the target remote shared directory.

[0144] Correspondingly, the electronic device storing the target remote shared directory also stores the file information of the second file. The electronic device storing the target remote shared directory can be determined as the accessed end device.

[0145] In combination with the above-mentioned embodiment, since the electronic device stores the status of each electronic device with which the electronic device establishes a communication connection, after the electronic device determines the visited end device, it can determine the status of the visited end device.

[0146] S1020: If the accessed device is in a non-working state, after waiting for a first period of time, send a synchronization request including at least one write request to the accessed device.

[0147] The at least one write request includes a first write request.

[0148] In combination with the above-mentioned embodiments, when the state of the accessed end device is a non-working state, if the accessed end device receives a synchronization request, the state of the accessed end device will be switched from a non-working state to a working state, thereby increasing the power consumption of the accessed end device. The synchronization request includes a synchronization request of a data signaling type and a synchronization request of an instruction signaling type. The first write request is a synchronization request of an instruction signaling type. If the state of the accessed end device is switched to a working state and then continues to receive synchronization requests, the time for the accessed end device to switch back to a non-working state will be extended, that is, the time for the accessed end device to be in a working state will be extended, thereby further increasing the power consumption of the accessed end device.

[0149] Therefore, after generating the first write request, if the electronic device determines that the accessed device is in a non-working state, the first write request can be delayed to be sent to the accessed device. Furthermore, if the electronic device needs to send a second write request different from the first write request to the accessed device during the waiting period of the first time length, the electronic device can delay sending the second write request until the first time length ends, and then send a synchronization request including the first write request and at least one second write request to the accessed device, which can delay the time when the state of the accessed device switches, thereby reducing the power consumption of the accessed device.

[0150] In some embodiments, the first duration is the duration from when the electronic device receives the first write operation to when the electronic device determines that the accessed end device switches from a non-working state to a working state.

[0151] Exemplarily, the time when the electronic device receives the first write operation is 6:00:00 on June 14, 2023. After 6:00:00 on June 14, 2023, the electronic device may generate multiple write requests. If at 6:00:30 on June 14, 2023, the electronic device determines that the accessed end device is switched from a non-working state to a working state, then at 6:00:30 on June 14, 2023, the electronic device may send these generated write requests together to the accessed end device.

[0152] For the visited device, if the visited device is in a non-working state, the electronic device will not send a write request to the visited device. Therefore, the visited device will not be awakened by receiving a write request sent by the electronic device. The time that the visited device is in a non-working state is increased, and the power consumption of the visited device is reduced. In addition, when the electronic device determines that the visited device is in a working state, it can send a synchronization request including at least one write request to the visited device. After the visited end receives the synchronization request sent by the electronic device, the write requests included in the synchronization request can be batch processed. Compared with the electronic device sending a write request to the visited device in real time, frequently interrupting the non-working state of the visited device, and / or delaying the visited device from re-entering the non-working state, this can save the power consumption of the visited device.

[0153] In some embodiments, the first duration includes the duration from when the electronic device receives the first write operation to when the number of write requests generated by the electronic device reaches the first value. Those skilled in the art can set the first value according to actual conditions, for example, the first value is 10 or 20, etc., which is not limited in the embodiments of the present application.

[0154] Exemplarily, if the first value is 10, the time when the electronic device receives the first write operation is 6:00:00 on June 14, 2023. After 6:00:00 on June 14, 2023, the electronic device may generate multiple write requests. Among them, the time when the electronic device generates the 10th write request is 6:00:30 on June 14, 2023. If the accessed device is always in a non-working state before the electronic device generates 10 write requests, then at 6:00:30 on June 14, 2023, the electronic device may send a synchronization request including these 10 write requests to the accessed device.

[0155] After the accessed device receives the synchronization request including the 10 write requests sent by the electronic device at 6:00:30 on June 14, 2023, it will switch from the non-working state to the working state, and batch process the 10 write requests included in the received synchronization request. Compared with the electronic device sending write requests to the accessed device in real time, frequently interrupting the non-working state of the accessed device, and delaying the accessed device from re-entering the non-working state, this can save power consumption of the accessed device.

[0156] In some embodiments, the first duration includes the duration from when the electronic device receives the first write operation to when the size of the modified data carried by the generated write request reaches the second value. Among them, those skilled in the art can set the second value according to actual conditions, for example, the second value is 300kb or 500kb, etc., which is not limited in the embodiments of the present application.

[0157] Exemplarily, if the second value is 300kb, the time when the electronic device receives the first write operation is 6:00:00 on June 14, 2023. After 6:00:00 on June 14, 2023, the electronic device can generate multiple write requests. Among them, the modification data carried by the first write request generated by the electronic device is 20kb, the modification data carried by the second write request generated by the electronic device is 150kb, the modification data carried by the third write request generated by the electronic device is 50kb, and the modification data carried by the fourth write request generated by the electronic device is 100kb. Since the size of the modification data carried by the first write request to the fourth write request generated by the electronic device is greater than 300kb, if the time when the electronic device generates the fourth write request is 6:00:30 on June 14, 2023. Then at 6:00:30 on June 14, 2023, the electronic device can send a synchronization request including these four write requests to the accessed end device.

[0158] After the accessed device receives the synchronization request including the four write requests sent by the electronic device at 6:00:30 on June 14, 2023, it will switch from the non-working state to the working state, and batch process the four write requests included in the synchronization request. Compared with the electronic device sending write requests to the accessed device in real time, frequently interrupting the non-working state of the accessed device, and delaying the accessed device from re-entering the non-working state, this can save power consumption of the accessed device.

[0159] In some embodiments, the first duration includes a preset duration, wherein those skilled in the art may set the preset duration according to actual conditions, for example, the preset duration is 30 seconds or 50 seconds, etc., which is not limited in the embodiments of the present application.

[0160] Exemplarily, if the preset duration is 30 seconds, the time when the electronic device receives the first write operation is 6:00:00 on June 14, 2023. If the electronic device generates at least one write request for sending to the accessed device in the time period from 6:00:00 on June 14, 2023 to 6:00:30 on June 14, 2023, the electronic device will not send the generated write request to the accessed device before 6:00:30 on June 14, 2023. Instead, it will send a synchronization request including the generated write request to the accessed device at 6:00:30 on June 14, 2023.

[0161] After the accessed device receives the synchronization request sent by the electronic device at 6:00:30 on June 14, 2023, it will switch from the non-working state to the working state and batch process the write requests included in the synchronization request. Compared with the electronic device sending write requests to the accessed device in real time, frequently interrupting the non-working state of the accessed device, and delaying the accessed device from re-entering the non-working state, this can save power consumption of the accessed device.

[0162] In some embodiments, participating Fig.11 After waiting for the first time period, the electronic device may send a synchronization request including at least one write request to the accessed device, and the steps S1100-S1103 may also be included:

[0163] S1100: Determine whether the state of the accessed device is switched from a non-working state to a working state.

[0164] In combination with the above-mentioned embodiment, since the electronic device stores the status of each electronic device with which the electronic device has established a communication connection, the electronic device can determine the status of the accessed terminal device.

[0165] If the electronic device determines that the accessed device is switched from a non-operating state to an operating state, the electronic device may send a synchronization request including at least one write request to the accessed device.

[0166] If the electronic device determines that the accessed device is still in a non-working state, the electronic device may continue to execute the following step S1101.

[0167] S1101: Determine whether the number of write requests generated after receiving a first write operation is greater than or equal to a first value.

[0168] The description of the first value can refer to the description in the aforementioned embodiment and will not be repeated here.

[0169] If the electronic device determines that the number of write requests generated after receiving the first write operation is greater than or equal to the first value, the electronic device may send a synchronization request including at least one write request to the accessed device.

[0170] If the electronic device determines that the number of write requests generated after receiving the first write operation is less than the first value, the electronic device may continue to execute the following step S1102.

[0171] S1102: Determine whether the size of the modified data carried in the write request generated after receiving the first write operation is greater than or equal to a second value.

[0172] If the electronic device determines that the size of the modified data carried by the write request generated after receiving the first write operation is greater than or equal to the second value, the electronic device can send a synchronization request including at least one write request to the accessed end device.

[0173] If the electronic device determines that the size of the modified data carried by the write request generated after receiving the first write operation is smaller than the second value, the electronic device may continue to execute the following step S1103.

[0174] S1103: Determine whether the time elapsed after receiving the first write operation is greater than or equal to a preset time length.

[0175] If the electronic device determines that the time elapsed after receiving the first write operation is greater than or equal to the preset duration, the electronic device may send a synchronization request including at least one write request to the accessed device.

[0176] If the electronic device determines that the time after receiving the first write operation is less than the preset time, the electronic device can re-execute steps S1100-S1103 to determine the timing of sending a synchronization request including at least one write request to the accessed device. And, the electronic device can send a synchronization request including at least one write request to the accessed device at this timing.

[0177] The first duration is the duration from when the electronic device receives the first write operation to when the electronic device sends a synchronization request including at least one write request to the accessed end device.

[0178] S1030: If the accessed device is in working state, send a synchronization request including at least one write request to the accessed device.

[0179] The at least one write request includes a first write request. If the accessed device is in working state, the electronic device can directly send a synchronization request including the first write request to the accessed device to request synchronous modification of the content of the second file in the accessed device.

[0180] S1040: Update the version information of the first file.

[0181] In some embodiments, after the electronic device modifies the content of the first file, the version information of the content of the first file can be updated. The version information of the content of the first file can include the version number of the content of the first file. For example, if the version number of the content of the first file is 1.0 before the electronic device modifies the content of the first file, then after the electronic device modifies the content of the first file, the version number of the content of the first file can be updated to 1.1.

[0182] Accordingly, after receiving the modification request, the accessed end device can modify the content of the stored second file based on the modification data of the content of the first file carried in the first write request, and update the version information of the content of the stored second file so that the version information of the content of the stored second file is consistent with the version information of the content of the first file stored in the electronic device.

[0183] In some embodiments, the electronic device may display an associated page associated with the content of the first file. For example, the electronic device may display a page including a control for indicating that the content of the first file is displayed. When the user inputs a trigger operation for the first file in the associated page, if the trigger operation is a read operation for requesting to read the content of the first file (also referred to as a first read operation in the embodiment of the present application), the electronic device may determine whether the content of the first file is stored in the memory of the electronic device in response to the first read operation.

[0184] Among them, since the memory is a temporary cache space for temporarily storing data, the data stored in the memory is usually data recently acquired by the electronic device (for example, within 3 hours), and the data version is relatively new. Therefore, if the content of the first file is stored in the memory of the electronic device, the electronic device can directly read the content of the first file in the memory, thereby improving the reading speed.

[0185] In some embodiments, if the content of the first file is not stored in the memory of the electronic device, and if the content of the first file includes the first file, the electronic device may execute the following steps: Fig.12 Steps S1200-S1240 are shown to read and display the first file.

[0186] S1200: Determine whether a first file is stored in a flash memory of the electronic device.

[0187] In some embodiments, a bitmap (also referred to as a bitmap in the embodiments of the present application) for indicating whether each file stored in the electronic device is located in the flash memory of the electronic device may be maintained in the electronic device. The bitmap includes a plurality of bits, and each bit included in the bitmap corresponds to a file stored in the electronic device. The value corresponding to each bit in the bitmap is used to indicate whether the corresponding file is stored in the flash memory of the electronic device.

[0188] For example, see Fig.13, the first bit 1301 in the bitmap corresponds to file 1, and the value corresponding to the first bit 1301 is 0, which can indicate that file 1 is not stored in the flash memory of the electronic device. The second bit 1302 in the bitmap corresponds to file 2, and the value corresponding to the second bit 1302 is 1, which can indicate that file 2 is stored in the flash memory of the electronic device. That is, the i-th bit in the bitmap corresponds to file i. If the value corresponding to the i-th bit is 0, it indicates that file i is not stored in the flash memory of the electronic device. In this case, file i may be stored in the memory of the electronic device. If the value corresponding to the i-th bit is 1, it indicates that file i is stored in the flash memory of the electronic device.

[0189] In some embodiments, the electronic device may determine whether a first file is stored in the flash memory of the electronic device based on a bitmap. Wherein, when determining whether a first file is stored in the flash memory of the electronic device, the electronic device may first determine whether there is a bit corresponding to the first file in the bitmap. If the bit corresponding to the first file does not exist in the bitmap, it can be determined that the first file is not stored in the flash memory of the electronic device. If the bit corresponding to the first file exists in the bitmap, it can be determined whether the first file is stored in the flash memory of the electronic device based on the value corresponding to the bit corresponding to the first file. For example, if the value corresponding to the bit corresponding to the first file is 0, it can be determined that the first file is not stored in the flash memory of the electronic device. If the value corresponding to the bit corresponding to the first file is 1, it can be determined that the first file is stored in the flash memory of the electronic device.

[0190] In some embodiments, if it is determined that the first file is not stored in the flash memory of the electronic device, a request for requesting the accessed end device to obtain the first file may be generated. For ease of description, in the embodiments of the present application, the request for requesting the accessed end device to obtain the first file may be referred to as a first access request.

[0191] In some embodiments, if it is determined that the first file is stored in the flash memory of the electronic device, a request for requesting the accessed end device to verify whether the first file stored in the flash memory of the electronic device is the latest version can be generated. For ease of description, in the embodiments of the present application, the request for requesting the accessed end device to verify whether the first file stored in the flash memory of the electronic device is the latest version can be referred to as a first verification request.

[0192] In some embodiments, if it is determined that the first file is not stored in the flash memory of the electronic device, the electronic device may perform the following step S1210. If it is determined that the first file is stored in the flash memory of the electronic device, the electronic device may perform the following steps S1220-S1240.

[0193] S1210: Send a synchronization request including at least a first access request to the accessed device.

[0194] In combination with the above-mentioned embodiment, the first access request is used to request the accessed device to obtain the first file. If the first file is not stored in the flash memory of the electronic device, the electronic device can directly send a synchronization request including the first access request to the accessed device to request to obtain the first file. After the accessed device sends the first file to the electronic device, the electronic device can receive and display the first file.

[0195] S1220: Determine the status of the accessed device.

[0196] The accessed end device is different from the electronic device, and a second file is stored in the accessed end device. The second file is the same as the first file, or the second file is a modified first file.

[0197] In some embodiments, if the first file is stored in the flash memory of the electronic device, the electronic device that has historically sent the first file to the electronic device can be determined as the accessed end device. For example, if the first file in electronic device 1 is obtained from electronic device 2, electronic device 1 can determine electronic device 2 as the accessed end device.

[0198] In some embodiments, if the first file is not stored in the flash memory of the electronic device, the electronic device may search for a file index of the first file in the remote shared directories corresponding to each electronic device with which the communication connection is established. The remote shared directory includes file indexes of files in the corresponding electronic device that are allowed to be accessed by other electronic devices. If the file index of the first file exists in the target remote shared directory among the remote shared directories, the electronic device storing the target remote shared directory may be determined as the accessed end device.

[0199] In combination with the above-mentioned embodiment, since the electronic device stores the status of each electronic device with which the electronic device establishes a communication connection, after the electronic device determines the visited end device, it can determine the status of the visited end device.

[0200] In some embodiments, if the electronic device determines that the accessed end device is in a non-working state, the following step S1230 may be executed. If the electronic device determines that the accessed end device is in a working state, the following step S1240 may be executed.

[0201] S1230: Read a first file stored in a flash memory of the electronic device.

[0202] In combination with the above-mentioned embodiment, since the power consumption of the accessed terminal device in a non-working state is less than that of the accessed terminal device in a working state, if the accessed terminal device is in a non-working state and the first file is stored in the flash memory of the electronic device, the electronic device can directly read the first file stored in the flash memory.

[0203] That is, if the accessed device is in a non-working state and the first file is stored in the flash memory of the electronic device, the electronic device may not interact with the accessed device but directly read the first file from the flash memory of the electronic device. This can avoid the problem that the state of the accessed device switches due to the interaction between the electronic device and the accessed device, thereby increasing the power consumption of the accessed device.

[0204] S1240: Send a synchronization request including at least a first verification request to the accessed device.

[0205] In combination with the above-mentioned embodiment, the first verification request is used to request the accessed device to verify whether the first file stored in the flash memory of the electronic device is the latest version.

[0206] In some embodiments, the first verification request carries first version information. The first version information is version information of the first file stored in the flash memory of the electronic device. After receiving the first verification request, the accessed end device can determine whether the first file stored in the flash memory of the electronic device is the latest version based on whether the first version information and the second version information are consistent. The second version information is version information of the second file stored in the accessed end device.

[0207] If the accessed device detects that the first version information and the second version information are consistent, it can be determined that the first file stored in the flash memory of the electronic device is the latest version. The accessed device can send first verification information to the electronic device to indicate that the first file stored in the flash memory of the electronic device is the latest version. After receiving the first verification information sent by the accessed device, the electronic device can directly read the first file stored in the flash memory.

[0208] If the visited device detects that the first version information and the second version information are inconsistent, it can be determined that the first file stored in the flash memory of the electronic device is not the latest version. The visited device can send second verification information to the electronic device to characterize that the first file stored in the flash memory of the electronic device is not the latest version. After the electronic device receives the second verification information sent by the visited device, it can generate a request for requesting the visited device to obtain the second file. The electronic device can send a request to the visited device to request the visited device to obtain the second file. After the visited device receives the request sent by the electronic device to request the visited device to obtain the second file, it can send the second file to the electronic device. The electronic device can receive and display the second file.

[0209] In some embodiments, if the content of the first file is not stored in the memory of the electronic device, and the content of the first file includes the first file information, the electronic device may execute the following steps: Fig.14 Steps S1400-S1420 are shown to read and display the first file information.

[0210] S1400: Determine whether first file information is stored in a flash memory of the electronic device.

[0211] In some embodiments, if it is determined that the first file information is not stored in the flash memory of the electronic device, a request for requesting the accessed end device to obtain the first file information may be generated. For ease of description, in the embodiments of the present application, the request for requesting the accessed end device to obtain the first file information may be referred to as a second access request.

[0212] In some embodiments, if it is determined that the first file is stored in the flash memory of the electronic device, the electronic device may perform the following step S1410. If it is determined that the first file is not stored in the flash memory of the electronic device, the electronic device may perform the following step S1420.

[0213] S1410: Read first file information in a flash memory of the electronic device.

[0214] Among them, if the first file information is stored in the flash memory of the electronic device, the electronic device can directly read the first file information in the local flash memory, which can not only improve the reading speed, but also avoid the problem of increased power consumption of the accessed device due to the state switching of the accessed device caused by the interaction between the electronic device and the accessed device.

[0215] S1420: Send a synchronization request including at least a second access request to the accessed device.

[0216] In combination with the above-mentioned embodiment, the second access request is used to request the accessed end device to obtain the first file information. If the first file information is not stored in the flash memory of the electronic device, the electronic device can directly send a synchronization request including at least the second access request to the accessed end device to request to obtain the first file information. After the accessed end device sends the first file information to the electronic device, the electronic device can receive and display the first file information.

[0217] In some embodiments, the synchronization request sent by the electronic device to the accessed end device may also include a read request for requesting the accessed end device to obtain a third file. The synchronization request may include at least one of a first access request, a second access request, a first verification request, a first write request, and a second write request. The third file is content that the electronic device is predicted to request the accessed end device to obtain in the future. The third file is not stored in the electronic device, but is stored in the accessed end device. The third file is different from the first file.

[0218] The electronic device can obtain the third file from the accessed end device in advance by sending a synchronization request including a read request for requesting to obtain the third file to the accessed end device. When the electronic device actually receives the trigger operation for requesting to read the third file, the content of the third file can be directly read and displayed in the electronic device, which not only reduces the interaction with the accessed end device and saves the power consumption of the accessed end device, but also improves the speed at which the electronic device reads and displays the third file.

[0219] In some embodiments, the electronic device can predict at least one trigger operation that will be received after receiving the trigger operation this time based on the number of times the first target trigger operation has been received in history. The electronic device can determine the third file based on the predicted at least one trigger operation that will be received after receiving the trigger operation this time. Among them, the first target trigger operation includes inputting a first sub-trigger operation and a second sub-trigger operation to the electronic device within a second time length. The first sub-trigger operation includes a write operation and a read operation on the first file. The second sub-trigger operation includes a write operation and a read operation on the fourth file. The fourth file is a file corresponding to any trigger operation received by the electronic device after receiving the trigger operation on the first file in history. The fourth file is different from the first file.

[0220] In some embodiments, the number of times the electronic device has historically received the first target trigger operation can be determined based on a file operation sequence, wherein the file operation sequence records file identifiers of files corresponding to each trigger operation arranged in order of the time when the electronic device has historically received each trigger operation.

[0221] In some embodiments, when the electronic device receives a trigger operation on a file, it can detect whether the file has a file identifier historically assigned by the electronic device. The trigger operation on the file may include a read operation on the file, a write operation on the file, a read operation on the file information of the file, and a write operation on the file information of the file.

[0222] If the file has a corresponding file identifier, the electronic device can update the file operation sequence based on the file identifier corresponding to the file. For example, if the file identifier corresponding to the file is id1, and the file operation sequence before the update is (id2, id1, ..., id3, id4), then the file operation sequence after the update is (id1, id2, id1, ..., id3, id4). Different files have different corresponding file identifiers.

[0223] If the file does not have a corresponding file identifier, the electronic device may assign a corresponding file identifier to the file, and then update the file operation sequence based on the file identifier assigned to the file.

[0224] In some embodiments, in order to save storage space of the electronic device, the number of file identifiers in the electronic device can be limited. For example, the number of file identifiers in the electronic device can be set to a second number. Each time the electronic device receives a trigger operation on a file, it can detect whether the file has a file identifier historically allocated by the electronic device.

[0225] If there is a corresponding file identifier for the file, the electronic device can update the file operation sequence based on the file identifier corresponding to the file.

[0226] If there is no corresponding file identifier for the file, the electronic device can detect whether an unassigned file identifier is stored.

[0227] If the electronic device detects that an unallocated file identifier is stored, the electronic device may allocate a corresponding file identifier for the file from the unallocated file identifiers.

[0228] If the electronic device detects that all stored file identifiers have been allocated, the electronic device can release the correspondence between at least one file and the corresponding file identifier based on the recycling strategy, thereby recycling at least one allocated file identifier. Furthermore, the electronic device can allocate a corresponding file identifier to the file to be allocated a file identifier from the recycled file identifiers. Afterwards, the electronic device can update the file operation sequence based on the file identifier allocated to the file.

[0229] In some embodiments, the recycling strategy can be determined based on factors such as the number of times each file identifier appears in the file operation sequence, the time when each file identifier is recorded in the file operation sequence, etc., which is not limited in the embodiments of the present application.

[0230] In some embodiments, in order to save storage space of the electronic device, a maximum of a preset number of file identifiers can be recorded in the file operation sequence. Each time the electronic device receives a trigger operation on a file, the file identifier corresponding to the file can be recorded in the file operation sequence to update the file operation sequence.

[0231] In some embodiments, if the number of file identifiers recorded in the file operation sequence reaches a preset number, the electronic device may delete at least one of the earliest recorded file identifiers when it receives a trigger operation on a file next time. Afterwards, the electronic device may record the file identifier of the file corresponding to the trigger operation received next time into the file operation sequence to update the file operation sequence.

[0232] Exemplarily, the file operation sequence is (id2, id1, ..., id3, id4), and the number of file identifiers recorded in the file operation sequence is a preset number. If the electronic device receives a trigger operation on file 1, and the electronic device detects that the file identifier corresponding to file 1 is id1, since the number of file identifiers recorded in the file operation sequence reaches the preset number, the electronic device can delete the earliest recorded file identifier id4 in the file operation sequence, and add the file identifier corresponding to file 1 as id1 to the file operation sequence to update the file operation sequence. The updated file operation sequence is (id1, id2, id1, ..., id3).

[0233] In some embodiments, the electronic device may allocate corresponding association counters for the first file and the fourth file. The number of times the electronic device has historically received the first target triggering operation may be obtained based on the values ​​of the association counters corresponding to the first file and the fourth file.

[0234] Exemplarily, the correlation counters corresponding to the first file and the fourth file can be represented by Correlation[idy][idx]. Wherein, idy represents the file identifier corresponding to the first file, and idx represents the file identifier corresponding to the fourth file. Correlation[idy][idx]=21 means that the number of times the electronic device has received the first target trigger operation in history is 21. For another example, the correlation counters corresponding to the first file and the fourth file can be represented by Correlation[idy][idz]. Wherein, idy represents the file identifier corresponding to the first file, and idz represents the file identifier corresponding to the fourth file different from idx. Correlation[idy][idz]=15 means that the number of times the electronic device has received the first target trigger operation in history is 15.

[0235] In some embodiments, as the file operation sequence is updated, the value of at least one associated counter may also change.

[0236] Each time the electronic device receives a trigger operation on a file, the electronic device may record the file identifier corresponding to the file in the file operation sequence. Also, the electronic device may obtain the file identifier of the file corresponding to the trigger operation received last time before receiving this trigger operation. If the file identifier of the file corresponding to the trigger operation received last time by the electronic device is different from the file identifier of the file corresponding to the trigger operation received this time, the electronic device may obtain the associated counter corresponding to the file corresponding to the trigger operation received last time and the file corresponding to the trigger operation received this time. The electronic device may increase the value of the associated counter.

[0237] Exemplarily, after the electronic device receives a trigger operation on file 1, if it is detected that the file corresponding to the trigger operation received by the electronic device last time is file 2 which is different from file 1, the electronic device can obtain the association counter corresponding to file 1 and file 2, and increase the value of the association counter. If the value of the association counter corresponding to file 1 and file 2 is 2 before the update, the value of the association counter corresponding to file 1 and file 2 can be changed to 3 after the update.

[0238] In some embodiments, after the electronic device deletes the earliest recorded file identifier in the file operation sequence, the electronic device can determine the first file identifier deleted from the file operation sequence, and the electronic device can determine the second file identifier that was earliest added to the file operation sequence from among the remaining file identifiers in the file operation sequence. The file corresponding to the first file identifier is the first historical file, and the file corresponding to the second file identifier is the second historical file. If the first file identifier and the second file identifier are different, the electronic device can reduce the value of the associated counter corresponding to the first historical file and the second historical file. If the value of the associated counter corresponding to the first historical file and the second historical file is reduced to the initial value, the electronic device can recycle the associated counter to wait for allocation to other files.

[0239] In some embodiments, if the electronic device receives a delete operation for a locally stored file, the electronic device may recycle an associated counter associated with the file, and the electronic device may reduce the value of the recycle associated counter to an initial value to wait for allocation to other files.

[0240] Since the electronic device has received the first target trigger operation more times in history, it indicates that after receiving the trigger operation on the first file, the electronic device is more likely to receive the trigger operation on the corresponding fourth file. Therefore, the electronic device can predict at least one trigger operation received after receiving the trigger operation on the first file this time based on the number of times the electronic device has received the first target trigger operation in history.

[0241] When the number of times the electronic device has received the first target trigger operation in the past meets a preset condition, the electronic device may predict the second sub-trigger operation included in the first target trigger operation as the trigger operation received by the electronic device after receiving the trigger operation this time.

[0242] Afterwards, the electronic device can determine whether the fourth file is stored in the electronic device, and determine whether the fourth file is stored in the accessed end device. If the electronic device determines that the fourth file is not stored in the electronic device, and determines that the fourth file is stored in the accessed end device, the fourth file is determined as the third file described in the above embodiment. Based on the determined third file, the electronic device can generate a request for requesting the accessed end device to obtain the third file.

[0243] In some embodiments, the preset condition may include that the number of times the electronic device has received the first target trigger operation in history is greater than a number threshold. Among them, those skilled in the art may set the number threshold according to actual conditions, and the embodiments of the present application are not limited thereto.

[0244] For example, if the number threshold is 10, the number of times the electronic device has received trigger operations on content 1 and content 2 consecutively in history is 10. The number of times the electronic device has received trigger operations on content 1 and content 3 consecutively in history is 12. The number of times the electronic device has received trigger operations on content 1 and content 4 consecutively in history is 4. The electronic device can predict that after receiving the trigger operations of the four files this time, the received trigger operations are the trigger operations on content 2 and the trigger operations on content 3.

[0245] In some embodiments, the preset condition may include that the number of times the electronic device has historically continuously received a trigger operation on the first file and a trigger operation on the fourth file is within a first number of maximum times.

[0246] For example, if the first number is 2, the number of times the electronic device has received trigger operations on content 1 and content 2 continuously in history is 10. The number of times the electronic device has received trigger operations on content 1 and content 3 continuously in history is 12. The number of times the electronic device has received trigger operations on content 1 and content 4 continuously in history is 4. The electronic device can predict that after receiving the trigger operation on the content of the first file this time, the received trigger operations are trigger operations on content 2 and content 3.

[0247] Based on the foregoing embodiments, it can be known that the electronic device can send a synchronization request including a request for obtaining a file or file information to the accessed device. After the accessed device receives the synchronization request sent by the electronic device, it can send the content of the corresponding response file to the electronic device. The content of the response file includes the file (also referred to as a response file in the embodiments of the present application) that the electronic device requests the accessed device to obtain or the file information of the response file. The content of the response file can be the same as the content of the first file, and the content of the response file can also be the same as the content of the third file.

[0248] In some embodiments, if the electronic device receives the content of the response file sent by the access terminal device, it can continue to execute the following steps: Fig.15 Steps S1510-S1520 are shown to determine whether to store the content of the response file in the flash memory.

[0249] S1510: Determine the number of times the electronic device has historically received the second target triggering operation.

[0250] The second target trigger operation includes a trigger operation for requesting to read the content of the response file and a trigger operation for requesting to modify the content of the response file.

[0251] In some embodiments, the number of times the electronic device has historically received the second target triggering operation can be obtained based on the value of the access counter corresponding to the response file. The value of the access counter corresponding to the response file is the number of times the file identifier corresponding to the response file appears in the file operation sequence.

[0252] In some embodiments, when the electronic device assigns a corresponding file identifier to a file, it also assigns a corresponding access counter to the file. That is, if a file has a corresponding file identifier, it means that the file also has a corresponding access counter. The description of the electronic device assigning a file identifier to a file can refer to the description in the above embodiment, and will not be repeated here.

[0253] In some embodiments, after the electronic device assigns a corresponding access counter to a file, the value of the access counter corresponding to the file may be increased (for example, the value of the access counter corresponding to the file is set from 0 to 1). Furthermore, each time the electronic device receives a trigger operation on the file, the electronic device will update the value of the access counter corresponding to the file.

[0254] In some embodiments, in order to save storage space of the electronic device, the number of file identifiers and access counters in the electronic device may be limited. The number of file identifiers in the electronic device may be set to a second number, and correspondingly, the number of access counters in the electronic device may also be set to the second number. Fig.16A Every time the electronic device receives a trigger operation on a file, it can detect whether the file has a file identifier historically allocated by the electronic device.

[0255] If the file has a corresponding file identifier, it means that the file also has a corresponding access counter, and the electronic device can increase the value of the access counter corresponding to the file (for example, add 1 to the value of the access counter corresponding to the file).

[0256] Exemplarily, the electronic device receives a trigger operation on file 1. If it is detected that file 1 has a corresponding file identifier id1, it means that the electronic device has historically received a trigger operation on file 1 and has assigned file identifier id1 and an access counter to file 1. The electronic device can obtain the access counter corresponding to file 1 and increase the value of the access counter corresponding to file 1. Among them, AccessCount[id1] can be used to represent the access counter corresponding to file 1. If AccessCount[id1] = 3 before the update, it means that the electronic device has historically received trigger operations on file 1 three times. After the electronic device accesses file 1 this time, the value of AccessCount[id1] can be increased. The updated AccessCount[id1] = 4, which means that the electronic device has received trigger operations on file 1 four times.

[0257] If the file does not have a corresponding file identifier, the electronic device can detect whether an unallocated file identifier is stored in the electronic device. If it is detected that an unallocated file identifier is stored in the electronic device, an unallocated access counter is also stored in the electronic device. Therefore, the electronic device can allocate a corresponding file identifier to the file in the unallocated file identifier, and allocate a corresponding access counter to the file in the unallocated access counter. Afterwards, the electronic device can increase the value of the access counter corresponding to the file.

[0258] If the electronic device detects that all stored file identifiers have been allocated, the electronic device can recycle at least one allocated file identifier based on the recycling strategy. Correspondingly, as at least one file identifier is recycled, at least one allocated access counter will also be recycled. And, after the electronic device recycles the access counter, the value of the recycled access counter can be set to an initial value (for example, 0). Afterwards, the electronic device can assign a corresponding file identifier to the file in the recycled file identifier. And, the electronic device can assign a corresponding access counter to the file in at least one recycled access counter. Afterwards, the electronic device can increase the value of the access counter corresponding to the file.

[0259] The description of the electronic device recycling at least one allocated file identifier based on the recycling policy can be found in the description of the aforementioned embodiment, which will not be repeated here.

[0260] In some embodiments, as the file operation sequence is updated, the value of the access counter corresponding to at least one file will also change. The description of the file operation sequence can refer to the description in the above embodiment, and will not be repeated here.

[0261] Every time the electronic device receives a trigger operation on a file, the electronic device may record the file identifier corresponding to the file in the file operation sequence, and the electronic device may increase the value of the access counter corresponding to the file.

[0262] If the number of file identifiers recorded in the file operation sequence reaches a preset number, the electronic device may delete at least one of the earliest recorded file identifiers in the file operation sequence when it receives a trigger operation on a file next time. Afterwards, the electronic device may record the file identifier of the file corresponding to the trigger operation received next time into the file operation sequence to update the file operation sequence.

[0263] As the electronic device deletes at least one file identifier recorded earliest in the file operation sequence, the electronic device may reduce the value of the access counter corresponding to the at least one file identifier deleted from the file operation sequence.

[0264] In some embodiments, if the value of the access counter corresponding to the file is set to an initial value, the electronic device can recycle the file identifier corresponding to the file. And, as the file identifier corresponding to the file is recycled, the access counter corresponding to the file will also be recycled. Afterwards, the electronic device can detect whether the file is stored in the flash memory of the electronic device. If the file is stored in the flash memory of the electronic device, the file can be deleted from the flash memory of the electronic device to save the flash memory space of the electronic device.

[0265] In some embodiments, see Fig. 16BIf an electronic device receives a deletion operation for a file stored locally, the electronic device can detect whether the file has a file identifier historically assigned by the electronic device. If the file has a file identifier historically assigned by the electronic device, the electronic device can recycle the file identifier and access counter corresponding to the file, and set the value of the recycle access counter to an initial value (e.g., 0). In addition, the electronic device can delete the file identifier corresponding to the file included in the file operation sequence to update the file operation sequence. Afterwards, the electronic device can delete the file locally. If the file does not have a file identifier historically assigned by the electronic device, the electronic device can directly delete the file locally.

[0266] S1520: Determine whether to store the target response content in the received response file into the flash memory based on the number of times the electronic device has received the second target trigger operation in history.

[0267] Among them, the second target trigger operation is an operation for requesting to read or modify the response content. The more times the electronic device has received the second target trigger operation in history, the greater the possibility that the electronic device will receive the second target trigger operation in the future. Therefore, it can be determined whether to store the target response content in the content of the received response file into the flash memory based on the number of times the electronic device has received the second target trigger operation in history.

[0268] In some embodiments, the electronic device may determine the type of content of the response file based on the number of times the second target trigger operation is received historically. The type of content of the response file may include a first type and a second type. The electronic device may determine the type of content of the response file based on the relationship between the number of times the second target trigger operation is received historically and a quantity threshold.

[0269] If the number of times the electronic device history receives the second target trigger operation is greater than or equal to the quantity threshold, it can be determined that the type of the content of the response file corresponding to the second target trigger operation is the first type. If the number of times the electronic device history receives the second target trigger operation is less than the quantity threshold, it can be determined that the type of the content of the response file corresponding to the second target trigger operation is the second type. Among them, those skilled in the art can set the quantity threshold according to the actual application scenario, for example, the quantity threshold is 20, 30, etc., and the embodiments of the present application are not limited.

[0270] In some embodiments, if the electronic device determines that the type of the content of the response file corresponding to the second target trigger operation is the first type, it means that the electronic device has received the second target trigger operation more times in history, and therefore, the electronic device is more likely to receive the second target trigger operation in the future. The electronic device can determine the content of the response file corresponding to the second target trigger operation as the target response content, and store the target response content in the flash memory, so that when the electronic device receives the second target trigger operation again, it does not need to obtain the target response content from the accessed end device, but can directly read the target response content from the local flash memory, thereby reducing the interaction between the electronic device and the accessed end device, thereby saving power consumption of the electronic device and the accessed end device.

[0271] If the electronic device determines that the type of the content of the response file corresponding to the second target trigger operation is the second type, it means that the electronic device has received the second target trigger operation less times in history, and therefore, the possibility of the electronic device receiving the second target trigger operation in the future is also less. In order to save storage space of the electronic device, the electronic device can delete the content of the response file corresponding to the second target trigger operation after reading the content of the response file corresponding to the second target trigger operation.

[0272] The synchronization method of the electronic device provided in the embodiment of the present application can determine whether to send a synchronization request to the accessed end device based on whether the content of the first file is stored in the electronic device when the electronic device receives a trigger operation on the first file. If the electronic device needs to send a synchronization request to the accessed end device, the timing of sending the synchronization request to the accessed end device can be determined based on the state of the accessed end device, and the synchronization request can be sent to the accessed end device at that time. Not only can the interaction between the electronic device and the accessed end device be reduced, but also the time that the accessed end device is in a non-working state can be increased, thereby reducing the power consumption of the accessed end device.

[0273] For example, when the electronic device receives a trigger operation for a certain type of file, and the trigger operation is an operation for requesting to read the file of the same type, see Fig.17A , which is a comparison chart of the number of interactions between an electronic device and a visited end device through the method provided by an embodiment of the present application and the number of interactions between an electronic device and a visited end device through the prior art within a period of time.

[0274] It can be seen that since the method provided in the embodiment of the present application can minimize the number of read requests included in the synchronization request sent to the accessed device when the accessed device is in a non-working state, the number of interactions between the electronic device and the accessed device can be reduced.

[0275] For example, when an electronic device receives a trigger operation for a certain type of file, and the trigger operation is an operation for requesting to read file information of the file of the same type, see Fig. 17B , which is a comparison chart of the number of interactions between an electronic device and a visited end device through the method provided by an embodiment of the present application and the number of interactions between an electronic device and a visited end device through the prior art within a period of time.

[0276] It can be seen that since the method provided in the embodiment of the present application can minimize the number of read requests included in the synchronization request sent to the accessed device when the accessed device is in a non-working state, the number of interactions between the electronic device and the accessed device can be reduced.

[0277] In some schemes, multiple embodiments of the present application can be combined, and the combined scheme can be implemented. Optionally, some operations in the process of each method embodiment are optionally combined, and / or the order of some operations is optionally changed. In addition, the execution order between the steps of each process is only exemplary and does not constitute a restriction on the execution order between the steps. There can also be other execution orders between the steps. It is not intended to indicate that the execution order is the only order in which these operations can be performed. A person of ordinary skill in the art will think of a variety of ways to reorder the operations described herein. In addition, it should be noted that the process details involved in a certain embodiment of this article are also applicable to other embodiments in a similar manner, or different embodiments can be used in combination.

[0278] In addition, some steps in the method embodiment may be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiment may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiment.

[0279] Furthermore, the various method embodiments may be implemented separately or in combination.

[0280] It is understandable that in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0281] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0282] For example, see Fig.18A The electronic device provided in the embodiment of the present application may include a persistence module and a synchronization module.

[0283] In some embodiments, when the electronic device receives a trigger operation on the first file input by the user, Fig.18B The persistence module may determine the content of the trigger operation, wherein the trigger operation may include any one of a write request to the first file, a write request to the first file information, a read request to the first file, and a read request to the first file information.

[0284] In some embodiments, if the persistence module determines that the trigger operation input by the user is a write operation to the first file, the synchronization module can determine the timing of the electronic device sending the first write request to the accessed end device based on the state of the accessed end device storing the second file. The first write request is used to request synchronous modification of the content of the second file included in the accessed end device according to the first file. The second file is associated with the first file. If the synchronization module determines that the accessed end is in a working state, the electronic device can directly send a synchronization request including the first write request to the accessed end device. Since the accessed end device is already in a working state before receiving the synchronization request sent by the electronic device. Therefore, even if the synchronization request sent by the electronic device is received, it will not have much impact on the power consumption of the accessed end device. If the synchronization module determines that the accessed end device is in a non-working state, the electronic device sends a synchronization request including at least one write request to the accessed end device after waiting for a first time period. Among them, at least one write request includes the first write request. This method of sending write requests to the accessed end device by delaying and batching can increase the time when the accessed end device is in a non-working state, thereby reducing the power consumption of the accessed end device.

[0285] In some embodiments, if the persistence module determines that the trigger operation input by the user is a write operation to the first file information, the synchronization module can determine the timing of the electronic device sending a third write request to the accessed end device based on the state of the accessed end device storing the second file information (file information of the second file). The third write request is used to request synchronous modification of the second file information included in the accessed end device according to the first file information. If the synchronization module determines that the accessed end is in a working state, the electronic device can directly send a synchronization request including the first write request to the accessed end device. Since the accessed end device is already in a working state before receiving the synchronization request sent by the electronic device. Therefore, even if the synchronization request sent by the electronic device is received, it will not have much impact on the power consumption of the accessed end device. If the synchronization module determines that the accessed end device is in a non-working state, the electronic device sends a synchronization request including at least one write request to the accessed end device after waiting for the first time length. Among them, at least one write request includes a third write request. This method of sending write requests to the accessed end device by delaying and batching can increase the time when the accessed end device is in a non-working state, thereby reducing the power consumption of the accessed end device.

[0286] In some embodiments, if the persistence module determines that the trigger operation input by the user is a read operation of the first file, the persistence module can determine whether the first file is stored in the memory of the electronic device. If the persistence module determines that the first file is stored in the memory of the electronic device, the electronic device can directly read the first file in the memory to improve the reading speed.

[0287] If the persistence module determines that the first file is not stored in the memory of the electronic device, the persistence module can continue to determine whether the first file is stored in the flash memory of the electronic device. If the first file is stored in the flash memory of the electronic device, the synchronization module can determine whether the electronic device sends a synchronization request to the accessed device based on the state of the accessed device, and, if it is determined that the electronic device needs to send a synchronization request to the accessed device, determine the content of the synchronization request sent by the electronic device to the accessed device. The number of interactions between the electronic device and the accessed device can be reduced, thereby reducing the power consumption of the accessed device.

[0288] In some embodiments, if the persistence module determines that the trigger operation input by the user is a read operation for the first file information, the persistence module can determine whether the electronic device sends a synchronization request to the accessed end device based on whether the first file information is stored in the electronic device. If the persistence module determines that the first file information is not stored in the electronic device, the electronic device can send a synchronization request including a second access request to the accessed end device to obtain the first file information. If the persistence module determines that the first file information is stored in the electronic device, the electronic device can directly read the first file information locally. Not only can the reading speed be improved, but also the interaction between the electronic device and the accessed end device can be reduced, and the power consumption of the accessed end device can be reduced.

[0289] In some embodiments, see Fig.18A , the electronic device provided in the embodiment of the present application may further include an identification module. After the electronic device receives the trigger operation input by the user, the identification module may determine a read request for requesting the accessed end device to obtain a third file. Among them, the third file is the content that the identification module predicts that the electronic device will request the accessed end device to obtain in the future. The third file is not stored in the electronic device, and the third file is stored in the accessed end device. The third file is different from the first file. The electronic device can obtain the third file from the accessed end device in advance by sending a synchronization request including a read request for requesting to obtain the third file to the accessed end device. When the electronic device actually receives the trigger operation for requesting to read the third file, the content of the third file can be directly read and displayed in the electronic device, which not only reduces the interaction with the accessed end device and saves the power consumption of the accessed end device, but also improves the speed at which the electronic device reads and displays the third file.

[0290] In some embodiments, after the electronic device receives the response content sent by the accessed end device, the identification module can determine the number of times the electronic device has historically received the second target trigger operation for the response content. Since the more times the electronic device has historically received the second target trigger operation, the greater the possibility that the electronic device will receive the second target trigger operation in the future. Therefore, the persistence module can determine whether to store the response content in the flash memory of the electronic device based on the number of times the electronic device has historically received the second target trigger operation. If the persistence module stores the response content in the flash memory of the electronic device, when the electronic device receives the second target trigger operation again, it is not necessary to obtain the response content from the accessed end device, but can directly read the response content from the local flash memory, thereby reducing the interaction between the electronic device and the accessed end device, thereby saving power consumption of the electronic device and the accessed end device.

[0291] An embodiment of the present application also provides an electronic device, which may include one or more processors, a memory, and a communication interface.

[0292] The memory, the communication interface and the processor are coupled, for example, the memory, the communication interface and the processor may be coupled together via a bus.

[0293] The communication interface is used for data transmission with other devices. The memory stores computer program code. The computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method in the embodiment of the present application.

[0294] Among them, the processor can be a processor or a controller, for example, it can be a CPU, a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the contents of this disclosure. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, and so on. The processor can be used to support electronic devices to execute the method steps provided in the above embodiments. For example, the processor can be used to support electronic devices to execute Fig.10 S1000-S1040 in FIG. ... Fig.11 S1100-S1103 in FIG. 1100-1103 in FIG. 1101-1103 in FIG. 1102-1103 in FIG. 1103-1104 in FIG. 1105-1106 in FIG. 1107-1108 in FIG. 1108-1109 in FIG. 1110 Fig.12 S1200-S1240 in FIG. ... Fig.14 S1400-S1420 in FIG. ...1-S1420 in FIG. 1402-S1420 in FIG. 1403-S1420 in FIG. 1404-S1420 in FIG. 1405-S1420 in FIG. 1406-S1420 in FIG. 1407-S1420 in FIG. Fig.15 S1510-S1520, etc.

[0295] The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The above bus may be divided into an address bus, a data bus, a control bus, etc.

[0296] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.

[0297] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0298] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0299] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0300] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0301] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the method embodiment.

[0302] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the relevant method steps in the above method embodiment.

[0303] In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device performs the scene configuration method in the above-mentioned method embodiments.

[0304] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0305] The steps of the method or algorithm described in conjunction with the disclosed content of the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).

[0306] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0307] 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. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

Claims

1. A synchronization method for an electronic device, characterized in that: Applied to electronic equipment, the method comprises: displaying the content of the first file of the electronic device; receiving a first write operation on the first file; the first write operation is used to request to modify the content of the first file; In response to the first write operation, after waiting for a first period of time, a synchronization request including at least one write request is sent to an accessed end device that is in a non-working state; wherein a second file associated with the first file is stored in the accessed end device; and the at least one write request includes a request for synchronously modifying the content of the second file based on the first file.

2. The method according to claim 1, characterized in that The first duration includes the duration from when the electronic device receives the first write operation to when it is determined that the accessed end device switches from the non-working state to the working state; or The first duration includes the duration from when the electronic device receives the first write operation to when the number of the at least one write request reaches a first value; or, The write request carries modification data of the content of the first file; the first duration includes the duration from when the electronic device receives the first write operation to when the size of the modification data carried in the generated write request reaches a second value; or, The first duration includes a preset duration.

3. The method according to claim 1 or 2, characterized in that: Before displaying the content of the first file of the electronic device, the method further includes: displaying an associated page associated with the content of the first file of the electronic device; receiving a first read operation on the associated page for the first file; the first read operation being used to request to read content of the first file; In response to the first reading operation, the electronic device determines that the content of the first file is stored, and reads the content of the first file.

4. The method according to claim 3, characterized in that: The electronic device determines that the content of the first file is stored, and reads the content of the first file, including: The electronic device determines that the content of the first file is stored in a memory, and reads the content of the first file from the memory; or The electronic device determines that the content of the first file is not stored in the memory, the content of the first file is stored in the flash memory of the electronic device, and the content of the first file is read from the flash memory.

5. The method according to claim 3 or 4, characterized in that: After receiving the first read operation of the associated page on the first file, the method further includes: In response to the first reading operation, the electronic device determines that the content of the first file is not stored, and sends a synchronization request including a message for obtaining the content of the first file to the accessed end device.

6. The method according to any one of claims 1 to 5, characterized in that: The synchronization request also includes a read request for requesting the accessed end device to obtain a third file; the third file is a file that the electronic device is predicted to request the accessed end device to obtain in the future; The third file is associated with the first file; The third file is different from the first file; the third file is not stored in the electronic device, but is stored in the accessed device.

7. The method according to claim 6, characterized in that The third file is determined based on the number of times the electronic device has received the first target trigger operation in history and meets the preset condition; the first target trigger operation includes inputting a first sub-trigger operation and a second sub-trigger operation to the electronic device within a second time period; the first sub-trigger operation includes a write operation and a read operation on the first file; the second sub-trigger operation includes a write operation and a read operation on a fourth file; The fourth file is different from the first file; The third file is determined based on the number of times that the electronic device has received the first target triggering operation in history and meets a preset condition, including: Determining that the number of times the electronic device has historically received the first target triggering operation meets a preset condition; Determining that the fourth file is not stored in the electronic device and the fourth file is stored in the accessed terminal device; The fourth file is determined as the third file.

8. The method according to claim 7, characterized in that The preset condition includes that the number of times the electronic device has historically received the first target triggering operation is greater than a number threshold.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: receiving the content of the response file sent by the accessed end device; the content of the response file is the content of the file sent by the accessed end device to the electronic device in response to the synchronization request sent by the electronic device; The target response content in the response file is stored in the flash memory of the electronic device; the number of times the electronic device has historically received a trigger operation on the target response content is greater than or equal to a quantity threshold; the trigger operation on the target response content includes a write operation on the target response content and a read operation on the target response content.

10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: receiving status information sent by the visited end device; the status information is used to characterize the status of the visited end device; the status includes a working state and the non-working state; the power consumption of the visited end device in the working state is greater than the power consumption of the visited end device in the non-working state; the synchronization request is used to switch the visited end device from the non-working state to the working state; or, to keep the visited end device in the working state; Based on the status information, the status of the accessed device is determined.

11. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-10.

12. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 10.

13. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 10.