WO2023202640A1 - 一种数据同步方法、介质、程序产品及电子设备 - Google Patents

一种数据同步方法、介质、程序产品及电子设备 Download PDF

Info

Publication number
WO2023202640A1
WO2023202640A1 PCT/CN2023/089305 CN2023089305W WO2023202640A1 WO 2023202640 A1 WO2023202640 A1 WO 2023202640A1 CN 2023089305 W CN2023089305 W CN 2023089305W WO 2023202640 A1 WO2023202640 A1 WO 2023202640A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
electronic device
time
mobile phone
synchronization
Prior art date
Application number
PCT/CN2023/089305
Other languages
English (en)
French (fr)
Inventor
龚阿世
刘文慧
李有福
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023202640A1 publication Critical patent/WO2023202640A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • This application relates to the field of Internet technology, and in particular to a data synchronization method, medium, program product and electronic equipment.
  • Cross-device data synchronization technology refers to the realization of electronic devices by sharing their respective stored information resources.
  • Technology that enables devices to share information resources For example, users can use the distributed gallery function to view photo albums shared by mobile phones on their tablets.
  • the electronic device at the data requesting end responds to the user's operation and sends a detailed data information request to the electronic device at the data source end.
  • the data source After the electronic device at the data requesting end responds to the detailed data information request, it needs to perform multiple operations, such as data processing, data transmission, data writing, etc., in order to display the detailed data information on the display screen of the electronic device at the data requesting end for the user to browse. , each of the aforementioned operations takes a long time, and when the data to be transmitted is large, it takes even longer.
  • Embodiments of the present application provide a data synchronization method, medium, program product, and electronic device.
  • embodiments of the present application provide a data synchronization method applied to a first electronic device.
  • the method may include: the first electronic device receiving a data synchronization request sent by a second electronic device; In response to the data synchronization request, an electronic device determines the first time required to send the first data requested by the data synchronization request to the second electronic device; corresponding to the first time being greater than the preset time threshold, the first electronic device adjusts the first data into second data, wherein the data amount of the second data is smaller than the data amount of the first data; the first electronic device adjusts the data amount to the third data.
  • Two electronic devices send the second data; the second time required for the first electronic device to send the second data to the second electronic device is less than the preset time threshold.
  • the first time may refer to the estimated time and total time consumption in the following embodiments.
  • the first electronic device can dynamically adjust the data transmitted first, and first send the data transmitted first to the second electronic device to be displayed by the second electronic device, so that the user can view the data transmitted first, and then Sending the subsequent transmitted partial data or total data to be displayed by the second electronic device to the second electronic device reduces the user's perception of the time-consuming data receiving process, improves the consistency of the user's data browsing, and enhances the user experience.
  • the method further includes: after the first electronic device sends the second data to the second electronic device, sending all the information to be displayed by the second electronic device. Describe the first data.
  • the first electronic device adjusts the first data corresponding to the data synchronization request into second data, including: corresponding to the first data being a preset
  • the second data is obtained by reducing the preset resolution of the first data to a picture or video with a certain resolution.
  • the first electronic device sends the second data to the second electronic device.
  • the third data to be displayed by the second electronic device is sent, wherein the first data is full data and the third data is incremental data.
  • the type of the third data and the type of the second data are different.
  • T p represents the data processing time for the first electronic device to process the first data
  • T b represents the data transmission required for the first electronic device to send the first data to the first electronic device
  • Time, Tw represents the writing time for the second electronic device to write the first data into the second electronic device.
  • embodiments of the present application provide a data synchronization method applied to a second electronic device.
  • the method includes: the second electronic device sends a data synchronization request to the first electronic device, wherein the data synchronization The requested data is the first data; the second electronic device receives the second data sent electronically by the first electronic device, wherein the data amount of the second data is smaller than the data amount of the first data; The first time required for the first electronic device to send the first data to the second electronic device, and the first time required for the first electronic device to send the second data to the second electronic device. The second time is less than the first time.
  • the second electronic device can first receive the first transmitted data sent by the first electronic device and display the first transmitted data, so that the user can first view the first transmitted data and then receive the subsequent data sent by the second electronic device.
  • the transmitted partial data or total data displays the subsequent transmitted partial data or total data, which reduces the user's perception of the time-consuming data receiving process, improves the consistency of the user's data browsing, and enhances the user experience.
  • the method further includes: the second electronic device receives the first data sent by the first electronic device, and the second electronic device displays the First data.
  • the second electronic device synchronously refreshes the page content to avoid the user's undesirable experience of stuck data display, making the user feel the smoothness of the data display. Improve user experience.
  • the first data is a picture or video with a preset resolution
  • the second data is a picture or video with a resolution lower than the preset resolution
  • the second electronic device after receiving the second data sent by the first electronic device, receives the third data sent by the first electronic device, and displays The third data, wherein the first data is full data, and the third data is incremental data.
  • the second electronic device synchronously refreshes the page content to avoid the user's undesirable experience of stuck data display, making the user feel the smoothness of the data display. Improve user experience.
  • the type of the third data and the type of the second data are different.
  • T p represents the data processing time for the first electronic device to process the first data
  • T b represents the data transmission required for the first electronic device to send the first data to the first electronic device
  • Time, Tw represents the writing time for the second electronic device to write the first data into the second electronic device.
  • embodiments of the present application provide a computer-readable storage medium. Instructions are stored on the computer-readable storage medium. When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform any of the first aspect or the second aspect. An implementation method of data synchronization.
  • embodiments of the present application provide an electronic device, including: an internal memory used to store instructions executed by one or more processors of the electronic device, and the processor is one of the processors of the electronic device, A data synchronization method used to perform any implementation of the first aspect or the second aspect.
  • embodiments of the present application provide a computer program product, which is characterized in that it includes a computer program/instruction, and the When the computer program/instruction is executed by the processor, the data synchronization method of any implementation of the first aspect or the second aspect is implemented.
  • embodiments of the present application provide a data synchronization method.
  • the method includes: the first electronic device receives a data synchronization request sent by a second electronic device; the first electronic device responds to the data synchronization request. Synchronization request, determining the address book synchronization time required to send the address book information entry requested by the data synchronization request to the second electronic device, where the address book information entry includes contact information and contact avatar, the The contact information includes the contact name and mobile phone number; corresponding to the first time being greater than the preset time threshold, the first electronic device adjusts the address book information entry to the contact information; the first electronic device The device sends the contact information to the second electronic device; the contact information synchronization time required for the first electronic device to send the contact information to the second electronic device is less than the preset time threshold.
  • the first electronic device may be a watch or a bracelet
  • the second electronic device may be a mobile phone.
  • the default avatar of the first electronic device may be transmitted or not transmitted.
  • the data synchronization request may be a call synchronization request.
  • the second electronic device when the second electronic device receives a call request with another device or contact, the second electronic device can synchronize the call request to the first electronic device.
  • the user can directly view the call request interface corresponding to the call request on the first electronic device.
  • the call request interface may include contact information corresponding to other devices or contacts.
  • the first electronic device may first display contact information corresponding to other devices or contacts, and then display contact avatars corresponding to other devices or contacts.
  • embodiments of the present application provide a data synchronization method.
  • the method includes: the first electronic device receives a data synchronization request sent by a second electronic device; the first electronic device responds to the data synchronization request. Synchronization request, determine the first time required to send the picture or video of the preset resolution requested by the data synchronization request to the second electronic device; corresponding to the first time being greater than the preset time threshold, the The first electronic device adjusts the picture or video with a preset resolution to a picture or video with a resolution lower than the preset resolution; the first electronic device sends the picture or video with a resolution lower than the preset resolution to the second electronic device.
  • the second time required for the first electronic device to send the picture or video lower than the preset resolution to the second electronic device is less than the preset time threshold.
  • Figure 1 is a schematic diagram of an application scenario of a data synchronization method in the prior art
  • Figures 2A to 2F are schematic diagrams of interface changes in the prior art for a user to view a photo album shared by a mobile phone on a tablet through a distributed gallery function;
  • FIG. 3 is a schematic diagram of the software architecture of tablets and mobile phones provided by embodiments of the present application.
  • Figure 4 is a schematic flow chart of a data synchronization method provided by an embodiment of the present application.
  • Figure 5 is a schematic flow chart of a data synchronization method provided by an embodiment of the present application.
  • Figure 6 is a fitting curve of I/O capacity provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of a flat plate provided by an embodiment of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, a data synchronization method, media, program products, and electronic devices.
  • the entire operation process of the data source displaying detailed data information on the display screen of the data requester takes a long time, and the user may not be able to browse the requested data in time, resulting in a poor user experience.
  • Figure 1 shows a schematic diagram of an application scenario of a data synchronization method according to some embodiments of the present application, taking a mobile phone and a tablet to share a photo album as an example.
  • the application scenario includes a tablet 100 and a mobile phone 200 , after forming a super terminal system between the tablet 100 and the mobile phone 200, an association relationship can be established between the tablet 100 and the mobile phone 200 to realize the sharing of photo album resources stored respectively.
  • the user can view the photo album shared by the mobile phone 200 in the gallery application on the tablet 100 through the distributed gallery function in the HyperTerminal (which can also be called multi-device gallery browsing).
  • FIG. 2A to FIG. 2F show a schematic diagram of interface changes for a user to view the photo album shared by the mobile phone 200 on the tablet 100 through the distributed gallery function, according to some embodiments of the present application.
  • the user first opens the gallery application 10 as shown in Figure 2A, and displays the album interface as shown in Figure 2B.
  • the album interface includes local controls and other device controls 11.
  • the tablet 100 displays the photo album 12 of the mobile phone 200, and the photo album 12 includes multiple pictures.
  • the tablet 100 displays thumbnails of multiple pictures in the photo album 12 . For example, as shown in FIG.
  • thumbnails of pictures 12-1 to 12-12 are exemplarily shown in FIG. 2C.
  • thumbnails are of lower resolution and size, while large images are of higher resolution and size.
  • tablet 100 sends a large image data request for picture 12-12 to mobile phone 200.
  • the mobile phone 200 decompresses the large image source file of the picture 12-12, sends the decompressed large image data of the picture 12-12 to the tablet 100 through the network, and sends the decompressed large picture data of the picture 12-12 to the tablet 100.
  • the large image data is written into the tablet 100, and then the electronic device displays the large image based on the decompressed large image data of pictures 12-12.
  • the tablet 100 displays a loading state with no pictures and only the loading icon 13 rotating in a circle as shown in Figure 2D for a certain period of time, and the user cannot view the pictures quickly. 12-12 large pictures, the user experience is poor.
  • this application provides a data synchronization method.
  • the following embodiments may be exemplarily described using two electronic devices, one of which serves as the data source and the other serves as the data requesting end.
  • the method includes: when the data source receives the synchronization data request sent by the data requester, the data source determines the estimated time required to transmit the data corresponding to the synchronization data request to the synchronization data requester, where the estimated time includes The processing time for the data source to process the target data corresponding to the synchronization data request, the transmission time of the target data, and the time for the data source to write the target data to the synchronization data requester.
  • the data source determines that the estimated time is greater than the preset time threshold, it will obtain the non-full information data corresponding to the target data according to the type of the target data, and first send the adjusted non-full information data to the data requesting end for display.
  • the non-full information data is low-resolution data of the target data or part of the core data of the target data. Specifically, when the data type of the target data is a picture type or a video type, the incomplete information data is low-quality data. When the data type of the target data is a combination of multiple types, the non-full information data is the core data corresponding to the target data.
  • low-quality data refers to data that is consistent with the display content of the target data but has inconsistent resolution or resolution.
  • the core data of the target data refers to the display content that is consistent with part of the target data, and the display content of this part is preset data that matches the user's core needs. For example, if the target data is contact information, and the contact information includes the contact name, mobile phone number, and avatar picture, the preset data that matches the user's core needs can be the contact name and mobile phone number.
  • the non-full information data is low-quality data of the target data
  • the low-quality data is sent to the data requesting end for display, and then the target data is sent, and the target data is sent to the data The requester displays it.
  • the data source sends the partial core data of the target data, and then sends the partial core data of the target data to the data requesting end for display. Then send the data in the target data except the core data to The data requester displays the data.
  • the data in the target data other than the core data is the incremental information data of the target data. For example: if the target data is contact information, and the contact information includes the contact name, mobile phone number and avatar picture, then the preset data that matches the user's core needs can be the contact name and mobile phone number, and the incremental information data is Avatar picture.
  • the data requesting end can give priority to display the low-quality data of the target data when the estimated time is greater than the preset time threshold, and then the data requesting end obtains synchronization from the data source.
  • the target data corresponding to the data request is requested, and the display page is refreshed based on the final target data to display higher quality display content.
  • the data requesting end can give priority to display part of the core data of the target data when the estimated time is greater than the preset time threshold, and then the data requesting end obtains the synchronization data request response from the data source. incremental information data, and refresh the display page based on the final incremental information data to display the remaining display content.
  • the data requesting end can send data to the data source end within less than the preset time threshold, which improves the data transmission rate and user experience to a certain extent.
  • the data requesting end synchronously refreshes the page content to avoid the user's focus on the bad experience of stuck data display, making the user feel the smoothness of the data display. Improve user experience.
  • the tablet 100 After the tablet 100 responds to the user's operation of clicking the thumbnail of the selected target picture 12 - 12 , it sends a request for the large image data of the selected target picture 12 - 12 to the mobile phone 200 .
  • the mobile phone 200 calculates and obtains that the estimated time for transmitting the picture data of the preset resolution corresponding to the target picture 12-12 requested from the mobile phone 200 to the tablet 100 is greater than the preset time threshold. It is determined that the type of the target data is a picture, and the target is The large image data of Picture 12-12 is adjusted to image data with a lower resolution than the preset resolution. In some embodiments, the picture data lower than the preset resolution may be called incomplete information data.
  • the mobile phone 200 can first send the lower resolution image data to the tablet 100, and the tablet 100 can first display the target image 12-12 with a lower resolution than the preset resolution, for example, the low-resolution target image 12 as shown in Figure 2F -12.
  • the dotted line in Figure 2F can indicate low definition, but it does not limit the low-definition display form of the picture.
  • the mobile phone 200 then sends the image data of the preset resolution of the target image 12-12 to the tablet 100, and the tablet 100 refreshes the display page and displays the target image 12-12 of the preset resolution, for example, as shown in Figure 2E. Clear Target Picture 12-12.
  • the tablet 100 can first display unclear pictures and then synchronously refresh clearer pictures during the browsing process, so that users can feel the smoothness of displayed data and improve user experience.
  • the watch can synchronize contact information in batches from the mobile phone.
  • a hyper terminal system can be formed between a watch and a mobile phone.
  • the watch 100 responds to the user's click on the operation of synchronizing contact information in batches, it sends a request to synchronize contact information in batches to the mobile phone.
  • the watch can synchronize contact information in batches from the mobile phone.
  • the watch calculates that the estimated time for transmitting the contact information corresponding to the request from the mobile phone to the watch is greater than the preset time threshold. It determines that the type of contact information is a data type such as pictures, text, etc., and then adjusts the contact information to part of the core data. For example, if the contact information is 100 pieces of contact information, the 100 pieces of contact information include the names, mobile phone numbers, avatars and other information of the 100 contacts.
  • the core data can be the names and corresponding mobile phone numbers of 100 contacts, and the incremental information data can be the avatars of the contacts.
  • the mobile phone first sends the name and mobile phone number data of 100 contacts to the watch for display. Then, the mobile phone sends the contact avatar data in the contact information to the watch for display. For example, the incremental information data can be 100 contacts. Human avatar.
  • the watch can first present the contact's name, mobile phone number and other information required by the user, and then present the contact's avatar and other additional information to the user, allowing the user to feel the smoothness of batch data transmission and improving the user experience. .
  • the data requesting end can be a mobile phone, tablet, large screen, personal computer (PC), watch, augmented reality (Augmented Reality, AR), virtual reality (Virtual Reality, VR) and other devices.
  • the data source can also be a mobile phone, tablet, large screen, personal computer (PC), watch, augmented reality (Augmented Reality, AR), virtual reality (Virtual Reality, VR) and other devices, but is not limited to these.
  • the operating system installed on the tablet 100 and the mobile phone 200 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the tablet 100 and the mobile phone 200 use a layered architecture operating system as an illustrative example, which is not limited here.
  • Figure 3 shows a schematic diagram of the software architecture of the tablet 100 and mobile phone 200 suitable for the present application according to some embodiments of the present application.
  • the operating systems installed on the tablet 100 and the mobile phone 200 adopt a layered architecture.
  • the layered architecture divides the operating system into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the operating system is divided into three layers, which are the application layer, the framework layer and the kernel layer from top to bottom.
  • the operating systems installed on the tablet 100 and the mobile phone 200 can also be divided into other numbers of hierarchical structures, which are not limited here.
  • the tablet 100 and the mobile phone 200 form a super terminal system, and the tablet 100 and the mobile phone 200 are interconnected through the underlying network.
  • the underlying network includes but is not limited to distributed soft bus, Wireless-Fidelity (WIFI), Wireless Local Area Network (WLAN), Bluetooth (BT), Near Field Communication (Near Field Communication) , NFC), etc., there are no restrictions here.
  • the above-mentioned tablet 100 and mobile phone 200 have undergone unified user authorization and authentication, that is, the tablet 100 and the mobile phone 200 are mutually trustworthy devices.
  • the tablet 100 and the mobile phone 200 can perform PIN code authentication and face recognition through users. Authentication, fingerprint authentication, voiceprint authentication, account password, etc. complete unified authorization authentication and are not limited here.
  • the application layer of the tablet 100 may include a series of application programs (applications, apps) 101 such as system applications, extension applications or third-party applications.
  • System applications include gallery 1011, contacts 1012, desktop, settings, camera, wireless LAN, Bluetooth, navigation, etc.; extended applications include software applications developed by third parties such as camera applications, navigation applications, and music applications.
  • the application layer of the mobile phone 200 may include a series of application programs 201 such as system applications, extension applications or third-party applications.
  • System applications include Gallery 2011, Contacts 2012, desktop, settings, camera, Wireless Local Area Networks (WLAN), Bluetooth, navigation, etc.; extended applications include software applications developed by third parties such as camera applications, navigation applications, and music applications. program.
  • WLAN Wireless Local Area Networks
  • the framework layer of the tablet 100 can provide a multi-language framework for the application layer.
  • the framework layer can include a data management service module 102.
  • the data management service module 102 can include a data synchronization component 1021, a data description analysis module 1022, a platform reading and writing (Input/Output, I/O) capability module 1023 and transmission optimization strategy decision module 1024.
  • the framework layer of the mobile phone 200 can also provide a multi-language framework for the application layer.
  • the framework layer can also include a data management service module 202.
  • the data management service module 202 can include a data synchronization component 2021, a data description analysis module 2022, and a platform read and write I/O. Capability module 2023 and transmission optimization strategy decision module 2024.
  • the functions of the platform I/O capability module 1023 and the transmission optimization strategy decision module 1024 are the same or basically the same.
  • the data synchronization component 1021 can interact with instructions and share information with the data synchronization component 2021 through the soft bus of the system service layer.
  • the soft bus can enable instant interconnection between the tablet 100 and the mobile phone 200 on the same local area network or through Bluetooth connection.
  • the soft bus can also enable the tablet 100 and the mobile phone 200 to share files between heterogeneous networks such as Bluetooth and Wireless-Fidelity (Wireless-Fidelity, WIFI).
  • Bluetooth and WIFI Wireless-Fidelity
  • one electronic device can receive files via Bluetooth and on the other hand can transfer files via WIFI.
  • the tablet 100 can send synchronization data to the data synchronization component 2021 of the mobile phone 200 through the data synchronization component 1021.
  • the mobile phone 200 can feed back the target data corresponding to the synchronization data request and/or the adjusted target data to the data synchronization component 1021 through the data synchronization component 2021.
  • the data description analysis module 1022 is used to grade the data descriptions in the synchronization data requests according to the synchronization data requests, where different data descriptions correspond to different data processing complexity and time overhead, thereby obtaining data synchronization The data volume of the corresponding target data requested and the time to process the target data.
  • the data description may refer to the attribute information of the data.
  • the data description may refer to the resolution of the picture.
  • the data description can be the resolution of the picture, the font of the text, etc.
  • the data description analysis module 1022 After obtaining the data volume of the target data corresponding to the data synchronization request and the time to process the target data, the data description analysis module 1022 provides the data volume of the target data corresponding to the data synchronization request and the time to process the target data to the transmission optimization strategy decision-making module 1024.
  • the platform I/O capability module 1023 is used to locally save read and write performance indicators. After forming a hyper terminal system between the tablet 100 and the mobile phone 200, the platform I/O capability module 1023 and the platform I/O capability module 2023 can exchange and write data. Capability data.
  • the writing capability may include the speed at which the mobile phone 200 writes data to the tablet 100, and the unit may be milliseconds per megabyte, but is not limited to this.
  • the kernel layer of tablet 100 may be a layer between hardware and software.
  • the kernel layer may include a data storage module 1025, a data transceiver module 1026, and a network environment analysis module 1027.
  • the kernel layer of the mobile phone 200 is the layer between hardware and software.
  • the kernel layer includes a data storage module 2025, a data transceiver module 2026, and a network environment analysis module 2027.
  • the functions of the data storage module 2025, the data transceiver module 2026, and the network environment analysis module 2027 are the same as the functions of the data storage module 1025, the data transceiver module 1026, and the network environment analysis module 1027.
  • the network environment analysis module 1027 is used to store the available network bandwidth or network transmission capability of the tablet 100.
  • the network transmission capability may be the speed of network data transmission, and the unit may be milliseconds per megabyte, but is not limited thereto.
  • the network transmission capability data can be synchronized between the network environment analysis module 1027 and the network environment analysis module 2027.
  • the network environment analysis module 1027 is used to provide network transmission capabilities for the transmission optimization strategy decision-making module 1024.
  • the network environment analysis module 1027 and the network environment analysis module 2027 can share network transmission capability data of respective devices through soft bus technology.
  • Data sharing can be achieved between the data transceiver module 1026 and the data transceiver module 2026 through soft bus technology.
  • the data transceiver module 1026 and the data transceiver module 2026 can share the target data corresponding to the synchronization data request through soft bus technology.
  • the transmission optimization strategy decision module 1024 is used to generate a data transmission strategy.
  • the transmission optimization strategy decision-making module 2024 in the mobile phone 200 will request the data amount of the target data corresponding to the synchronization data provided by the data description analysis module 2022.
  • the writing capability of the tablet 100 provided by the platform I/O capability module and the network transmission capability provided by the network environment analysis module 2027, the data processing time, data transmission time and writing time of the target data are calculated.
  • the writing time, as well as the total estimated time of data processing time, data transmission time and writing time to the tablet 100 if the mobile phone 200 determines that the estimated time is greater than the preset time threshold, it will eventually be sent to the mobile phone 200
  • the target data is adjusted to lower quality level data. If the estimated time corresponding to the adjusted target data is less than or equal to the preset time threshold, the adjusted target data is first sent to the tablet 100 for display, and then the target data or The incremental information of the target data is sent to the mobile phone 200, the data display page is refreshed, and the display content corresponding to the target data is displayed.
  • FIG. 4 shows a schematic flowchart of a data synchronization method according to some embodiments of the present application. As shown in Figure 4, the process includes the following steps:
  • the tablet 100 responds to the user operation and sends a data request to the mobile phone 200.
  • APP101 sequentially sends data to the data through the data synchronization component 1021 and the data synchronization component 2021.
  • the description analysis module 2022 sends a synchronization data request.
  • the tablet 100 responds to this operation and sends the selected target picture 12 - 12 to the mobile phone 200 .
  • Request for large image data the user can use a preset voice command (such as "request synchronization data" voice) or gesture command (such as shaking the mobile phone 200 for 5 seconds continuously). , triggering the tablet 100 to send a request for the large picture data of the selected target picture 12-12 to the mobile phone 200.
  • the mobile phone 200 responds to the data request and determines the total time it takes for the data corresponding to the data request to be sent from the mobile phone 200 to the tablet 100.
  • the mobile phone 200 determines the data transmission time and data writing time based on the data volume, writing capability and network transmission capability determined by the data request, and determines the total time consumption of data processing time, data transmission time and data writing time.
  • data processing refers to decompressing the data corresponding to the data request of the mobile phone 200
  • data transmission refers to the process of the mobile phone 200 sending the data corresponding to the data request to the tablet 100
  • data writing refers to the tablet 100 receiving the data corresponding to the data request. After the data is obtained, the process of writing the data into the memory of the tablet 100 is performed.
  • the total time T is the time it takes for the mobile phone 200 to transmit the data corresponding to the synchronization data request to the mobile phone 200 .
  • T p represents the data processing time
  • T b represents the data transmission time
  • T w represents the data writing time
  • the unit of the write capability W may be milliseconds per megabyte (ms/MB), and the unit of the target data volume S may be megabytes (MB), but is not limited thereto.
  • the relationship between the data writing time T w and the writing capability and the target data amount is not limited to the linear relationship in the above formula.
  • the data writing time Tw can be simulated with the writing capability and target data volume.
  • a fitting formula between the data writing time Tw , the writing capability and the target data amount is obtained, and the fitting formula is configured in the platform I/O capability module 2023.
  • the unit of the I/O capability B may be milliseconds per megabyte (ms/MB), and the unit of the target data volume S may be megabytes (MB), but is not limited thereto.
  • the above-mentioned I/O capability B can be obtained in the following manner: drawing a curve based on a large amount of test data of the target data volume and I/O capability, and fitting according to the curve to obtain the corresponding I/O capability.
  • B s data model (formula).
  • Figure 6 is a fitting curve of I/O capacity provided by an embodiment of the present application. As shown in Figure 6, the abscissa in Figure 6 represents the target data volume, and the ordinate represents the I/O capacity B.
  • B represents the I/O capability
  • S represents the target data volume
  • the unit of the target data volume S can be megabytes (MB).
  • ⁇ , c, and ⁇ B are all constants, but are not limited to.
  • the data model of the I/O capability can be shared through the network environment analysis module 1027 and the network environment analysis module 2027 to obtain the data model of the other party's I/O capability.
  • the mobile phone 200 can calculate the data transmission time based on the data volume of the target data obtained from the data description analysis module 2022 and the data model of the I/O capability of the tablet 100 obtained from the network environment analysis module 2027 , get the data transmission time corresponding to the synchronization data request.
  • the data model of the I/O capability can be shared through the network environment analysis module 1027 and the network environment analysis module 2027 to obtain the data model of the other party's I/O capability.
  • the mobile phone 200 can calculate the data transmission time based on the data volume of the target data obtained from the data description analysis module 2022 and the data model of the I/O capability of the tablet 100 obtained from the network environment analysis module 2027 , get the data transmission time corresponding to the synchronization data request.
  • the mobile phone 200 determines whether the total time spent sending the data corresponding to the data request from the mobile phone 200 to the tablet 100 is greater than the preset time threshold.
  • step 406 if the total time consumption is greater than the preset time threshold, go to step 406. If not, go to step 404.
  • the preset time threshold can be determined based on actual conditions.
  • the preset time threshold can be based on a basic time that is consistent with user experience and obtained through human factors engineering experiments.
  • the preset time threshold may be in a range less than or equal to the preset time threshold.
  • the preset time threshold may be 700 milliseconds, 600 milliseconds, 500 milliseconds, 400 milliseconds, 300 milliseconds, 200 milliseconds, or 100 milliseconds.
  • the mobile phone 200 sends the target data to the tablet 100.
  • the tablet 100 displays target data.
  • the tablet 100 refreshes the data display page based on the picture data of the preset resolution and displays the picture of the preset resolution. For example, as shown in FIG. 2E , the tablet 100 refreshes the display page and displays the large image of the target picture 12-12.
  • this application can determine that cross-device synchronization of data requires different data based on different network environments, different data volumes, and the reading, writing and processing capabilities of different electronic devices based on data transmission efficiency. processing strategies. By building a dynamic data processing and transmission strategy and taking the above factors into consideration, we can achieve better coordination of network transmission, data processing and data writing, and improve user experience.
  • the mobile phone 200 adjusts the target data corresponding to the data request to non-full information data whose data amount is smaller than the target data.
  • the transmission optimization strategy decision module 2024 needs to be based on the principle of reducing the order of magnitude of the data. Generate data processing strategies to reduce the data volume of transmitted data and thereby reduce transmission latency.
  • the delay in data transmission from the tablet 100 to the mobile phone 200 can be reduced by reducing the order of magnitude of the target data.
  • Table 1 is an exemplary table calculating the data amount, data processing time, data transmission time and writing time obtained during the test phase.
  • the data transmission rate of the tablet 100 can be reduced by reducing the order of magnitude of the target data.
  • the delay to the mobile phone is 200.
  • the mobile phone 200 can adjust the picture data of the preset resolution to the picture data with a resolution lower than the preset resolution to obtain the final result.
  • the target data sent to the tablet 100 is adjusted to non-full information data. For example, as shown in Figure 2C, the mobile phone 200 calculates that the estimated time to transmit the large image data of the target picture 12-12 corresponding to the request from the mobile phone 200 to the tablet 100 is greater than the preset time threshold, then the target picture 12-12 is The large image data is adjusted to lower resolution image data.
  • the mobile phone 200 sends incomplete information data to the tablet 100.
  • Tablet 100 displays incomplete information data.
  • the tablet 100 may first display a low-resolution picture based on the low-resolution picture data. For example, as shown in FIG. 2F , the tablet 100 first displays the low-definition target picture 12-12 based on the lower-resolution picture data.
  • the mobile phone 200 sends target data or incremental information data to the tablet 100.
  • the mobile phone 200 sends the low-quality data, then sends the low-quality data to the tablet 100 for display, and then sends the target data.
  • the mobile phone 200 sends the partial core data of the target data, and then sends the partial core data of the target data to the tablet 100 for display. Then send the data in the target data except the core data (referred to as the incremental information data of the target data).
  • the tablet 200 displays target data or incremental information data.
  • the tablet 100 refreshes the data display page based on the image data of the preset resolution and displays the image of the preset resolution. For example, as shown in FIG. 2E , the tablet 100 refreshes the display page and displays the large image of the target picture 12-12.
  • this application can be based on different network environments, different data volumes, and the reading, writing and processing capabilities of different electronic devices, which determines the need for cross-device synchronization of data based on human factors engineering and user experience.
  • Adopt different data processing strategies By building a dynamic data processing and transmission strategy and taking the above factors into consideration, we can achieve better coordination of network transmission, data processing and data writing, and improve user experience.
  • Figure 5 shows a schematic flowchart of a data synchronization method according to some embodiments of the present application. As shown in Figure 5, the process includes the following steps:
  • the gallery 1011 In response to the user's operation, the gallery 1011 sends a synchronization data request to the data description analysis module 2022 through the data synchronization component 1021 and the data synchronization component 2021 in sequence.
  • the tablet 100 responds to this operation and sends the selected target picture 12 - 12 to the mobile phone 200 .
  • Request for large image data the user can use a preset voice command (such as "request synchronization data" voice) or gesture command (such as shaking the mobile phone 200 for 5 seconds continuously). , triggering the tablet 100 to send a request for the large picture data of the selected target picture 12-12 to the mobile phone 200.
  • the data description analysis module 2022 determines the requested data amount and data processing time according to the synchronization data request.
  • the data description analysis module 2022 is used to classify the data description in the synchronization data request according to the synchronization data request, where different data descriptions correspond to different data processing complexity and time overhead, and then obtain the target data corresponding to the data synchronization request. The amount of data and the time it takes to process the target data.
  • the data description may refer to the attribute information of the data.
  • the data description may refer to the resolution of the picture.
  • the data description can be the resolution of the picture, the font of the text, etc.
  • the data description analysis module 2022 After obtaining the data volume of the target data corresponding to the data synchronization request and the time to process the target data, the data description analysis module 2022 provides the data volume of the target data corresponding to the data synchronization request and the time to process the target data to the transmission optimization strategy decision-making module 2024.
  • the platform I/O capability module 2023 is used to locally save read and write performance indicators. After a hyper terminal system is formed between the mobile phone 200 and the mobile phone 200, the platform I/O capability module 2023 and the platform I/O capability module 2023 can exchange and write data. Capability data.
  • the writing capability may include the speed at which the mobile phone 200 writes data to the mobile phone 200, and the unit may be milliseconds per megabyte, but is not limited to this.
  • the data description analysis module 2022 sends the determined data amount and data processing time to the transmission optimization strategy decision module 2024.
  • the transmission optimization strategy decision module 2024 obtains the write capability from the platform I/O capability module 2023.
  • the transmission optimization strategy decision module 2024 obtains the writing capability of the tablet 100 from the platform I/O capability module 2023 .
  • the transmission optimization strategy decision module 2024 obtains the network transmission capability from the network environment analysis module 2027.
  • the transmission optimization strategy decision module 2024 determines the data transmission time and data writing time based on the determined data volume, writing capacity and network transmission capacity, and determines the total time consumption of data processing time, data transmission time and data writing time.
  • the total time T is the time it takes for the mobile phone 200 to transmit the data corresponding to the synchronization data request to the tablet 100 .
  • T p represents the data processing time
  • T b represents the data transmission time
  • T w represents the data writing time
  • the unit of the write capability W may be milliseconds per megabyte (ms/MB), and the unit of the target data volume S may be megabytes (MB), but is not limited thereto.
  • the relationship between the data writing time T w and the writing capacity and the target data amount is not limited to the linear relationship in the above formula. It can also be determined according to a certain amount of data writing time T w during the testing phase. , writing ability, and target data amount test data, fit the data writing time T w with the writing ability and the target data amount, and obtain the fitting formula between the data writing time T w and the writing ability and the target data amount. And the fitting formula is configured in the platform I/O capability module 2023.
  • the unit of the I/O capability B may be milliseconds per megabyte (ms/MB), and the unit of the target data volume S may be megabytes (MB), but is not limited thereto.
  • the above-mentioned I/O capability B can be obtained in the following manner: drawing a curve based on a large amount of test data of the target data volume and I/O capability, and fitting according to the curve to obtain the corresponding I/O capability.
  • the data model (formula) of B such as the curve fitting of I/O capability B, is shown in Figure 6.
  • the abscissa in Figure 5 represents the target data volume, and the ordinate represents I/O capability B.
  • B represents the I/O capability
  • S represents the target data volume
  • the unit of the target data volume S can be megabytes (MB)
  • ⁇ , c and ⁇ B are all Constant, but not limited to.
  • the data model of the I/O capability can be shared through the network environment analysis module 1027 and the network environment analysis module 2027 to obtain the data model of the other party's I/O capability.
  • the mobile phone 200 can calculate the data transmission time based on the data volume of the target data obtained from the data description analysis module 2022 and the data model of the I/O capability of the tablet 100 obtained from the network environment analysis module 2027 , get the data transmission time corresponding to the synchronization data request.
  • the transmission optimization strategy decision module 2024 determines whether the total time consumption is greater than the preset time threshold. If so, go to 408; if not, go to 409.
  • the preset time threshold can be determined based on actual conditions.
  • the preset time threshold can be based on a basic time that is consistent with user experience and obtained through human factors engineering experiments.
  • the preset time threshold can be 700 milliseconds (ms).
  • the transmission optimization strategy decision module 2024 generates a data processing strategy based on the principle of reducing the order of magnitude of data.
  • the data processing strategy is that the mobile phone 200 can adjust the picture data of the preset resolution to the picture data with a resolution lower than the preset resolution. .
  • the transmission optimization strategy decision module 2024 reads the target data corresponding to the synchronization data request.
  • the transmission optimization strategy decision module 2024 processes the read target data based on the generated data processing strategy.
  • the transmission optimization strategy decision-making module 2024 sends the processed non-full information data to the data transceiver module 1026 through the data transceiver module 2026.
  • the data transceiving module 1026 writes the processed incomplete information data to the data storage module 1022.
  • the mobile phone 200 can adjust the picture data of the preset resolution to the picture data with a resolution lower than the preset resolution to obtain the final result.
  • the target data sent to the tablet 100 is adjusted to non-full information data. For example, as shown in Figure 2C, the mobile phone 200 calculates that the estimated time to transmit the large image data of the target picture 12-12 corresponding to the request from the mobile phone 200 to the tablet 100 is greater than the preset time threshold, then the target picture 12-12 is The large image data is adjusted to lower resolution image data.
  • the data transceiving module 1026 sends the target data update notification to the data synchronization component 1021.
  • the data synchronization component 1021 reads the processed incomplete information data from the data storage module 1026.
  • the data synchronization component 1021 sends the processed incomplete information data to the APP101.
  • APP101 displays the incomplete information data obtained after processing.
  • the transmission optimization strategy decision module 2024 sends the target data or incremental information data to the APP 101 through the data synchronization component 2021 and the data synchronization component 1021 in sequence.
  • APP101 displays target data or incremental information data.
  • the target data is image data with a preset resolution
  • the tablet 100 refreshes the data display page based on the image data with the preset resolution, and displays the image with the preset resolution. For example, as shown in FIG. 2E , the tablet 100 refreshes the display page and displays the large image of the target picture 12-12.
  • this application can determine the steps required for cross-device synchronization of data based on different network environments, different data volumes, and the reading, writing and processing capabilities of different electronic devices based on human factors engineering and user experience.
  • Different data processing strategies By building a dynamic data processing and transmission strategy and taking the above factors into consideration, we can achieve better coordination of network transmission, data processing and data writing, and improve user experience.
  • Figure 7 shows a schematic structural diagram of a flat panel 100 according to some embodiments of the present application.
  • the tablet 100 may include a processor 110, an external memory interface 120, an internal memory 121, a sensor module 180, buttons 190, a camera 193, a display screen 194, etc.
  • the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the flat panel 100 .
  • the flat panel 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait.
  • application processor application processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the processor 110 is configured to execute the data synchronization method in the embodiment of the present application.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • 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 tablet 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the tablet 100 .
  • the internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store the operating system and at least one application program required for a function (such as a video shooting function, a video playback function, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • non-volatile memory such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the internal memory may store a computer program for implementing the data synchronization method provided by the embodiment of the present application.
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A there are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The plate 100 determines the intensity of the pressure based on changes in capacitance.
  • the tablet 100 detects the strength of the touch operation according to the pressure sensor 180A. The tablet 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the tablet 100 in a position different from that of the display screen 194 .
  • the electronic device can detect the user's operation on the display screen through a pressure sensor and a touch sensor, for example, the user's operation of clicking on a control.
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the tablet 100 can receive key inputs and generate key signal inputs related to user settings and function control of the tablet 100 .
  • the tablet 100 implements display functions through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include a One or more GPUs execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the tablet 100 may include 1 or M display screens 194, where M is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the tablet 100 may include 1 or P cameras 193, where P is a positive integer greater than 1.
  • the embodiments of the present application do not specifically limit the specific structure of the execution body of a data synchronization method. As long as the code recorded in the data synchronization method of the embodiment of the present application can be run to obtain a data according to the embodiment of the present application. Just use synchronous method to communicate.
  • the execution subject of a data synchronization method provided by the embodiment of the present application may be a functional module in the tablet 100 that can call and execute a program, or a processing device, such as a chip, applied in the tablet 100 .
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium includes computer instructions.
  • the electronic device When the computer instructions are run on the above-mentioned electronic device, the electronic device causes the electronic device to execute the tablet 100 (in the above-mentioned method embodiment).
  • the mobile phone 200 such as each device in the tablet 100
  • the mobile phone 200 such as each device in the mobile phone 200.
  • Embodiments of the present application also provide a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to perform various functions performed by the mobile phone 20 (such as each component in the mobile phone 200) in the above method embodiment, or step.
  • Embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • Embodiments of the present application may be implemented as a computer program or program code executing on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements) , at least one input device and at least one output device.
  • Program code may be applied to input instructions to perform the functions described herein and to generate output information.
  • Output information can be applied to one or more output devices in a known manner.
  • a processing system includes any processor having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor. system.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • Program code may be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system.
  • assembly language or machine language can also be used to implement program code.
  • the mechanisms described in this application are not limited to the scope of any particular programming language. In either case, the language may be a compiled or interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments may also be implemented as instructions carried on or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be operated by one or more processors Read and execute.
  • instructions may be distributed over a network or through other computer-readable media.
  • machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disc, Read Only Memory (ROM), Random Access Memory (RAM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Memory Read memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic or optical card, flash memory, or used to use the Internet to transmit information through electrical, optical, acoustic or other forms of propagation signals (for example, carrier waves, infrared signals, digital signals etc.) tangible machine-readable storage.
  • machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, computer).
  • each unit/module mentioned in each device embodiment of this application is a logical unit/module.
  • a logical unit/module can be a physical unit/module, or it can be a physical unit/module.
  • Part of the module can also be implemented as a combination of multiple physical units/modules.
  • the physical implementation of these logical units/modules is not the most important.
  • the combination of functions implemented by these logical units/modules is what solves the problem of this application. Key technical issues raised.
  • the above-mentioned equipment embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems raised by this application. This does not mean that the above-mentioned equipment embodiments do not exist. Other units/modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及互联网技术领域,公开了一种数据同步方法、介质、程序产品及电子设备,该方法包括:第一电子设备响应于数据同步请求,确定将数据同步请求所请求的第一数据发送至第二电子设备所需要的第一时间;对应于第一时间大于预设时间阈值,第一电子设备将第一数据调整为第二数据,其中,第二数据的数据量小于第一数据的数据量;第一电子设备向第二电子设备发送第二数据;第一电子设备将第二数据发送至第二电子设备所需要的第二时间小于预设时间阈值。如此,基于本申请技术方案,第一电子设备可以在小于预设时间阈值的情况下,将数据发送至第二电子设备,在一定程度上提高了数据传输速率,提升了用户体验。

Description

一种数据同步方法、介质、程序产品及电子设备
本申请要求于2022年04月22日提交中国专利局、申请号为202210431213.4、发明名称为“一种数据同步方法、介质、程序产品及电子设备”的中国专利申请的优先权,上述专利的全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网技术领域,特别涉及一种数据同步方法、介质、程序产品及电子设备。
背景技术
随着移动互联网技术的不断发展,为了实现信息资源的有效共享,一般情况下会采用跨设备数据同步技术进行数据同步,跨设备数据同步技术是指电子设备间通过分享各自存储的信息资源实现电子设备可以共享信息资源的技术。例如,用户通过分布式图库功能在平板上查看手机共享的相册。
在跨设备数据同步过程中,若用户在数据请求端的电子设备点击查看更详细数据信息,则数据请求端的电子设备响应于用户的该操作,向数据源端的电子设备发送详细数据信息请求,数据源端的电子设备响应于该详细数据信息请求后,需要执行多个操作,例如数据处理、数据传输、数据写入等操作,才能将详细数据信息显示在数据请求端的电子设备的显示屏上以便用户浏览,前述各操作过程需要耗费较长时间,且在传输数据较大的情况下,耗费时间更长。
发明内容
本申请实施例提供了一种数据同步方法、介质、程序产品及电子设备。
第一方面,本申请实施例提供了一种数据同步方法,应用于第一电子设备,所述方法可以包括:所述第一电子设备接收到第二电子设备发送的数据同步请求;所述第一电子设备响应于所述数据同步请求,确定将所述数据同步请求所请求的第一数据发送至所述第二电子设备所需要的第一时间;对应于所述第一时间大于预设时间阈值,所述第一电子设备将所述第一数据调整为第二数据,其中,所述第二数据的数据量小于所述第一数据的数据量;所述第一电子设备向所述第二电子设备发送所述第二数据;所述第一电子设备将所述第二数据发送至所述第二电子设备所需要的第二时间小于所述预设时间阈值。可以理解,第一时间可以指下文实施例中的预估时间和总耗时。基于本申请技术方案,第一电子设备可以动态地调整先传输的数据,先向第二电子设备发送待第二电子设备显示的先传输的数据,以便于用户先查看到先传输的数据,再向第二电子设备发送待第二电子设备显示的后续传输的部分数据或者总数据,降低用户对数据接收过程耗时的感知程度,提高用户浏览数据的连贯性,提升用户体验。
在上述第一方面的一种可能的实现中,该方法还包括:所述第一电子设备向所述第二电子设备发送所述第二数据之后,发送待所述第二电子设备显示的所述第一数据。
在上述第一方面的一种可能的实现中,所述第一电子设备将所述数据同步请求对应的所述第一数据调整为第二数据,包括:对应于所述第一数据为预设分辨率的图片或者视频,将所述第一数据的预设分辨率降低后得到所述第二数据。
在上述第一方面的一种可能的实现中,所述第一电子设备向所述第二电子设备发送所述第二数据之 后,发送待所述第二电子设备显示的第三数据,其中,所述第一数据为全量数据,第三数据为增量数据。
在上述第一方面的一种可能的实现中,所述第三数据的类型和第二数据的类型不同。
在上述第一方面的一种可能的实现中,所述第一时间通过以下公式计算得到:
T=Tp+Tb+Tw
其中,Tp表示所述第一电子设备对所述第一数据进行处理的数据处理时间,Tb表示所述第一电子设备将所述第一数据发送至第一电子设备所需要的数据传输时间,Tw表示所述第二电子设备将所述第一数据写入第二电子设备的写入时间。
第二方面,本申请实施例提供了一种数据同步方法,应用于第二电子设备,所述方法包括:所述第二电子设备向第一电子设备发送数据同步请求,其中,所述数据同步请求所请求的数据为第一数据;所述第二电子设备接收到所述第一电子发送的第二数据,其中,所述第二数据的数据量小于所述第一数据的数据量;所述第一电子将所述第一数据发送至所述第二电子设备所需要的时间第一时间,所述第一电子设备将所述第二数据发送至所述第二电子设备所需要的第二时间小于所述第一时间。基于本申请技术方案,第二电子设备可以先接收第一电子设备发送的先传输的数据,显示先传输的数据,以便于用户先查看到先传输的数据,再接收第二电子设备发送的后续传输的部分数据或者总数据,显示后续传输的部分数据或者总数据,降低用户对数据接收过程耗时的感知程度,提高用户浏览数据的连贯性,提升用户体验。
在上述第二方面的一种可能的实现中,该方法还包括:所述第二电子设备接收到所述第一电子设备发送的所述第一数据,所述第二电子设备显示的所述第一数据。如此,在用户在第二电子设备浏览显示内容的过程中,第二电子设备同步刷新页面内容,避免用户的关注点在于数据显示卡顿的不良体验中,使得用户感觉到数据显示的流畅感,提高用户体验。
在上述第二方面的一种可能的实现中,所述第一数据为预设分辨率的图片或者视频,所述第二数据为低于预设分斌率的图片或者视频。
在上述第二方面的一种可能的实现中,所述第二电子设备接收到所述第一电子设备发送所述第二数据之后,接收到所述第一电子设备发送第三数据,并显示所述第三数据,其中,所述第一数据为全量数据,第三数据为增量数据。如此,在用户在第二电子设备浏览显示内容的过程中,第二电子设备同步刷新页面内容,避免用户的关注点在于数据显示卡顿的不良体验中,使得用户感觉到数据显示的流畅感,提高用户体验。
在上述第二方面的一种可能的实现中,所述第三数据的类型和第二数据的类型不同。
在上述第二方面的一种可能的实现中,所述第一时间通过以下公式计算得到:
T=Tp+Tb+Tw
其中,Tp表示所述第一电子设备对所述第一数据进行处理的数据处理时间,Tb表示所述第一电子设备将所述第一数据发送至第一电子设备所需要的数据传输时间,Tw表示所述第二电子设备将所述第一数据写入第二电子设备的写入时间。
第三方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行第一方面或第二方面任一种实现方式的数据同步方法。
第四方面,本申请实施例提供了一种电子设备,包括:内部存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及处理器,是电子设备的处理器之一,用于执行第一方面或第二方面任一种实现方式的数据同步方法。
第五方面,本申请实施例提供了一种计算机程序产品,其特征在于,包括计算机程序/指令,所述 计算机程序/指令被处理器执行时实现第一方面或第二方面任一种实现方式的数据同步方法。
第六方面,本申请实施例提供了一种数据同步方法,所述方法包括:所述第一电子设备接收到第二电子设备发送的数据同步请求;所述第一电子设备响应于所述数据同步请求,确定将所述数据同步请求所请求的通信录信息条目发送至所述第二电子设备所需要的通信录同步时间,所述通信录信息条目包括联系人信息和联系人头像,所述联系人信息包括联系人姓名和手机号;对应于所述第一时间大于预设时间阈值,所述第一电子设备将所述通信录信息条目调整为所述联系人信息;所述第一电子设备向所述第二电子设备发送所述联系人信息;所述第一电子设备将所述联系人信息发送至所述第二电子设备所需要的联系人信息同步时间小于所述预设时间阈值。
在上述第六方面的一种可能的实现中,所述第一电子设备可以为手表或者手环,所述第二电子设备可以为手机。
在上述第六方面的一种可能的实现中,当所述通信录信息条目中联系人信息没有与之对应的联系人头像时,可以传输第一电子设备的默认头像或者不传输。
在上述第六方面的一种可能的实现中,所述数据同步请求可以为通话同步请求。例如,当第二电子设备接收到与其他设备或者联系人的通话请求,第二电子设备可以将该通话请求同步到第一电子设备。用户可以直接在第一电子设备上查看到对应该通话请求的通话请求界面。其中,通话请求界面可以包括对应其他设备或者联系人的联系人信息。
在上述第六方面的一种可能的实现中,所述第一电子设备可以先显示对应其他设备或者联系人的联系人信息,再显示对应其他设备或者联系人的联系人头像。
第七方面,本申请实施例提供了一种数据同步方法,所述方法包括:所述第一电子设备接收到第二电子设备发送的数据同步请求;所述第一电子设备响应于所述数据同步请求,确定将所述数据同步请求所请求的预设分辨率的图片或者视频发送至所述第二电子设备所需要的第一时间;对应于所述第一时间大于预设时间阈值,所述第一电子设备将所述预设分辨率的图片或者视频调整为低于预设分辨率的图片或者视频;所述第一电子设备向所述第二电子设备发送所述低于预设分辨率的图片或者视频;所述第一电子设备将所述低于预设分辨率的图片或者视频发送至所述第二电子设备所需要的第二时间小于所述预设时间阈值。
附图说明
图1为现有技术的一种数据同步方法的应用场景示意图;
图2A至图2F为现有技术的一种用户通过分布式图库功能在平板上查看手机共享的相册的界面变化示意图;
图3为本申请实施例提供的平板和手机的软件架构示意图;
图4为本申请实施例提供的一种数据同步方法的流程示意图;
图5为本申请实施例提供的一种数据同步方法的流程示意图;
图6为本申请实施例提供的一种I/O能力的拟合曲线;
图7为本申请实施例提供的一种平板的结构示意图。
具体实施方式
本申请的说明性实施例包括但不限于一种数据同步方法、介质、程序产品及电子设备。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一 步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
在跨设备数据同步过程中,数据源端将详细数据信息显示在数据请求端的显示屏上的整个操作过程需要耗费较长时间,用户可能无法及时浏览到请求的数据,用户体验较差。
例如,图1根据本申请的一些实施例,以手机和平板共享相册为例,示出了一种数据同步方法的应用场景示意图,如图1所示,该应用场景中包括平板100和手机200,在平板100和手机200之间组成超级终端***后,平板100和手机200之间便可以建立关联关系以实现共享各自存储的相册资源。然后,用户可以通过超级终端中的分布式图库功能(也可以叫做多设备图库浏览)在平板100上的图库应用程序中查看手机200共享的相册。
例如,图2A至图2F根据本申请的一些实施例,示出了一种用户通过分布式图库功能在平板100上查看手机200共享的相册的界面变化示意图。如图2A所示,用户首先打开如图2A所示的图库应用程序10,显示如图2B所示的相册界面,该相册界面包括本机控件和其他设备控件11,当用户点击其他设备控件11后,平板100显示手机200的相册12,相册12包括多张图片。当用户点击相册12的情况下,平板100显示相册12中的多张图片的缩略图。例如,如图2C所示,图2C中示例性示出图片12-1至图片12-12的缩略图。当用户想查看目标图片12-12的大图的情况下,点击图片12-12。应当理解,缩略图的分辨率和尺寸均较低,而大图的分辨率和尺寸均较高。然后,平板100响应于用户的点击图片12-12的操作,向手机200发送图片12-12的大图数据请求,
手机200响应于此请求,对图片12-12的大图源文件进行解压处理,将解压后的图片12-12的大图数据通过网络发送至平板100,并将解压后的图片12-12的大图数据写入平板100,然后,电子设备基于解压后的图片12-12的大图数据,显示大图。在图片12-12的大图数据未写入平板100过程中,平板100在一定时间内显示无图片且只有如图2D所示的加载图标13转圈的加载状态,用户无法较快的查看到图片12-12的大图,用户体验较差。
为了解决上述技术问题,本申请提供了一种数据同步方法。为便于理解,以下各实施例可以通过两个电子设备来示例性描述,其中一个电子设备作为数据源端,另一个电子设备作为数据请求端。该方法包括:当数据源端接收到数据请求端发送的同步数据请求时,数据源端确定将同步数据请求对应的数据传输至同步数据请求端所需要的预估时间,其中,预估时间包括数据源端对同步数据请求对应的目标数据进行处理的处理时间、目标数据的传输时间以及数据源端将目标数据写入同步数据请求端的时间。
若数据源端判断出预估时间大于预设时间阈值,则根据目标数据的类型获取目标数据对应的非全量信息数据,并先将调整后的非全量信息数据发送至数据请求端进行显示。其中,非全量信息数据为目标数据的低分辨率数据或目标数据的部分核心数据。具体的,当目标数据的数据类型为图片类型或视频类型,则非全量信息数据为低质量级数据。当目标数据的数据类型为多种类型的组合,则非全量信息数据为目标数据对应的核心数据。
在一些实施例中,低质量级数据是指与目标数据显示内容一致,但分辨率或者解析度不一致的数据。目标数据的核心数据是指与目标数据的部分显示内容一致,且该部分显示内容为预先设置的与用户核心需求匹配的数据。例如,若目标数据为联系人信息,联系人信息中包括联系人姓名,手机号码和头像图片,则预先设置的与用户核心需求匹配的数据可以为联系人姓名和手机号码。
当非全量信息数据为目标数据的低质量级数据时,数据源端发送低质量级数据后,把低质量级数据发送至数据请求端进行显示,然后再发送目标数据,把目标数据发送至数据请求端进行显示。
当非全量信息数据为目标数据的部分核心数据时,数据源端发送目标数据的部分核心数据后,把目标数据的部分核心数据发送至数据请求端进行显示。然后再将目标数据中除核心数据之外的数据发送至 数据请求端进行显示。其中,目标数据中除核心数据之外的数据为目标数据的增量信息数据。例如:若目标数据为联系人信息,联系人信息中包括联系人姓名,手机号码和头像图片,则预先设置的与用户核心需求匹配的数据可以为联系人姓名和手机号码,增量信息数据为头像图片。
基于上述方案,在一些实施例中,数据请求端可以在预估时间大于预设时间阈值的情况下,可以优先显示目标数据的低质量级数据,然后,数据请求端再从数据源端获取同步数据请求对应的目标数据,并基于最终的目标数据刷新显示页面,显示质量较高的显示内容。
在其他的一些实施例中,数据请求端可以在预估时间大于预设时间阈值的情况下,可以优先显示目标数据的部分核心数据,然后,数据请求端再从数据源端获取同步数据请求对应的增量信息数据,并基于最终的增量信息数据刷新显示页面,显示剩余的显示内容。
如此,一方面,数据请求端可以在小于预设时间阈值的情况下,将数据发送至数据源端,在一定程度上提高了数据传输速率,提升了用户体验。另一方面,在用户在数据请求端浏览显示内容的过程中,数据请求端同步刷新页面内容,避免用户的关注点在于数据显示卡顿的不良体验中,使得用户感觉到数据显示的流畅感,提高用户体验。
下面结合具体场景对方案进行说明。
例如,如图2C所示,在平板100响应于用户点击所选择的目标图片12-12的缩略图的操作后,向手机200发送所选择的目标图片12-12的大图数据的请求。
手机200计算得到请求对应的目标图片12-12的预设分辨率的图片数据的从手机200传输至平板100的预估时间大于预设时间阈值,确定出目标数据的类型为图片,则将目标图片12-12的大图数据调整为低于预设分辨率的图片数据。在一些实施例中,该低于预设分辨率的图片数据可以称为非全量信息数据。
手机200可以将较低分辨率的图片数据先发送至平板100,平板100可以先显示低于预设分辨率的目标图片12-12,例如,如图2F所示的低清晰度的目标图片12-12,可以理解,图2F中的虚线可以表示低清晰度,但并不对图片的低清晰度的显示形式进行限制。手机200再将目标图片12-12的预设分辨率的图片数据发送至平板100,平板100刷新显示页面,显示预设分辨率的目标图片12-12,例如,如图2E所示的较高清晰的目标图片12-12。
基于上述方案,平板100可以先呈现不清晰的图片,在浏览的过程中再同步刷新较清晰的图片,让用户感觉到显示数据的流畅感,提高用户体验。
又如,在手机和手表之间同步联系人信息的场景中,手机和手表建立关联关系后,手表便可以从手机批量同步联系人信息。例如,手表和手机之间可以组成超级终端***,在手表100响应于用户点击批量同步联系人信息的操作后,向手机发送批量同步联系人信息的请求。
在手机和手表之间同步联系人信息的场景中,手机和手表建立关联关系后,手表便可以从手机批量同步联系人信息。手表计算得到请求对应的联系人信息从手机传输至手表的预估时间大于预设时间阈值,确定出联系人信息的类型为图片、文本等数据类型,则将联系人信息调整为部分核心数据,例如,若联系人信息为100条联系人信息,100条联系人信息包括100条联系人的姓名、手机号、头像等信息。核心数据可以为100条联系人的姓名和对应的手机号,增量信息数据为联系人的头像。手机先将100条联系人的姓名和手机号数据发送至手表进行显示,然后,手机再将联系人信息中的联系人头像数据发送至手表进行显示,例如,增量信息数据可以为100条联系人的头像。
基于上述方案,手表可以先向用户呈现联系人的姓名、手机号等用户所需要的信息,再向用户呈现联系人的头像等附加信息,让用户感觉到批量传输数据的流畅感,提高用户体验。
可以理解,数据请求端可以是手机、平板、大屏、个人计算机(personal computer,PC)、手表、增强现实(Augmented Reality,AR)、虚拟现实(Virtual Reality,VR)等设备。数据源端也可以是手机、平板、大屏、个人计算机(personal computer,PC)、手表、增强现实(Augmented Reality,AR)、虚拟现实(Virtual Reality,VR)等设备,但并不限于此。
下面以数据请求端为平板100,以及数据源端为手机200,以及应用场景为同步相册为例,结合附图对本申请的实施例进行示例性描述。
可以理解,平板100和手机200上安装的操作***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。平板100和手机200以分层架构的操作***作为说明示例,在此不做限制。
图3根据本申请的一些实施例,示出了一种适用于本申请的平板100和手机200的软件架构示意图。如图3所示,平板100和手机200上安装的操作***采用分层架构。分层架构将操作***分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作***分为三层,从上至下分别为应用层、框架层以及内核层。在另一些实施例中,平板100和手机200上安装的操作***也可以分为其他数量的层级结构,在此不做限制。
平板100和手机200之间组成超级终端***,平板100和手机200之间通过底层网路实现互联。其中,底层网路包括但不限于分布式软总线、无线保真(Wireless-Fidelity,WIFI)、无线局域网(Wireless Local Area Network,WLAN)、蓝牙(Bluetooth,BT)、近场通信(Near Field Communication,NFC)等,在此不做限制。另外,上述平板100和手机200之间经过用户统一授权认证,即平板100和手机200之间互为可信任设备,例如,平板100和手机200之间可以通过用户进行PIN码认证、人脸识别认证、指纹认证、声纹认证、账户密码等完成统一授权认证,在此不做限制。
平板100的应用层可以包括***应用、扩展应用或第三方应用等一系列应用程序(application,app)101。***应用包括图库1011、联系人1012、桌面、设置、相机、无线局域网、蓝牙、导航等;扩展应用包括拍照应用、导航应用、音乐应用等第三方开发的软件应用程序。手机200的应用层可以包括***应用、扩展应用或第三方应用等一系列应用程序201。***应用包括图库2011、联系人2012、桌面、设置、相机、无线局域网(Wireless Local Area Networks,WLAN)、蓝牙、导航等;扩展应用包括拍照应用、导航应用、音乐应用等第三方开发的软件应用程序。
平板100的框架层可以为应用层提供多语言框架,框架层可以包括数据管理服务模块102,数据管理服务模块102可以包括数据同步组件1021、数据描述分析模块1022、平台读写(Input/Output,I/O)能力模块1023和传输优化策略决策模块1024。手机200的框架层也可以为应用层提供多语言框架,框架层也可以包括数据管理服务模块202,数据管理服务模块202可以包括数据同步组件2021、数据描述分析模块2022、平台读写I/O能力模块2023和传输优化策略决策模块2024。数据管理服务模块202中的数据同步组件2021、数据描述分析模块2022、平台I/O能力模块2023和传输优化策略决策模块2024与数据管理服务模块102中的数据同步组件1021、数据描述分析模块1022、平台I/O能力模块1023和传输优化策略决策模块1024的功能相同或者基本相同。
在一些实施例中,数据同步组件1021可以通过***服务层的软总线与数据同步组件2021进行指令的交互和信息的共享。可以理解,平板100和手机200可以通过软总线技术实现数据的共享。软总线可以使平板100和手机200之间在同一局域网络或通过蓝牙连接实现即时互联。软总线还可以使平板100和手机200之间在蓝牙、无线保真(Wireless-Fidelity,WIFI)等异构网络之间共享文件。例如,一个电子设备可以通过蓝牙接收文件,另一方面可以通过WIFI传输文件。
本申请实施例中,平板100可以通过数据同步组件1021向手机200的数据同步组件2021发送同步 数据请求,手机200可以通过数据同步组件2021向数据同步组件1021反馈同步数据请求对应的目标数据和/或调整后的目标数据。
在一些实施例中,数据描述分析模块1022用于根据同步数据请求,对同步数据请求中的数据描述进行分级,其中,不同的数据描述对应不同的数据处理复杂度和时间开销,进而得到数据同步请求对应的目标数据的数据量以及处理目标数据的时间。
可以理解,数据描述可以是指数据的属性信息,例如,若数据为图片,则数据描述可以为图片的分辨率。若数据为图片和文字,则数据描述可以为图片的分辨率,文字的字体等。
数据描述分析模块1022在得到数据同步请求对应的目标数据的数据量以及处理目标数据的时间后,向传输优化策略决策模块1024提供数据同步请求对应的目标数据的数据量以及处理目标数据的时间。
平台I/O能力模块1023用于本地保存读写性能指标,在平板100和手机200之间组成超级终端***后,平台I/O能力模块1023和平台I/O能力模块2023之间可以交换写能力数据。写能力可以包括手机200将数据写入平板100的速度,单位可以为毫秒每兆,但并不限于此。
平板100的内核层可以是硬件和软件之间的层。内核层可以包括数据存储模块1025、数据收发模块1026和网络环境分析模块1027。手机200的内核层是硬件和软件之间的层。内核层包括数据存储模块2025、数据收发模块2026和网络环境分析模块2027。数据存储模块2025、数据收发模块2026和网络环境分析模块2027的功能和数据存储模块1025、数据收发模块1026和网络环境分析模块1027的功能相同。
在一些实施例中,网络环境分析模块1027用于存储平板100的可用网络带宽或者网络传输能力,网络传输能力可以是网络传输数据的速度,单位可以为毫秒每兆,但并不限于此。
在平板100和手机200之间组成超级终端***后,网络环境分析模块1027和网络环境分析模块2027之间可以同步网络传输能力数据。网络环境分析模块1027用于为传输优化策略决策模块1024提供网络传输能力。在一些实施例中,网络环境分析模块1027和网络环境分析模块2027之间可以通过软总线技术共享各自设备的网络传输能力数据。
数据收发模块1026和数据收发模块2026之间可以通过软总线技术实现数据共享。本申请实施例中,数据收发模块1026和数据收发模块2026之间可以通过软总线技术实现共享同步数据请求对应的目标数据。
传输优化策略决策模块1024用于生成数据传输策略。本申请实施例中,若平板100作为数据请求端向手机200发送同步数据请求,则手机200中的传输优化策略决策模块2024根据数据描述分析模块2022提供的同步数据请求对应的目标数据的数据量以及处理目标数据的时间、平台I/O能力模块提供的平板100的写能力和网络环境分析模块2027提供的网络传输能力,计算得到目标数据的数据处理时间、数据传输时间以及写入平板100的写入时间,以及数据处理时间、数据传输时间以及写入平板100的写入时间的总的预估时间,若手机200判断出预估时间大于预设时间阈值,则将最终发送至手机200的目标数据调整为较低质量级的数据,若调整后的目标数据对应的预估时间小于等于预设时间阈值,则先将调整后的目标数据发送至平板100显示,然后,再将目标数据或目标数据的增量信息发送至手机200,刷新数据显示页面,显示目标数据对应的显示内容。
图4根据本申请的一些实施例,示出了一种数据同步方法的流程示意图。如图4所示,该流程包括如下步骤:
401:平板100响应于用户操作,向手机200发送数据请求。
参见图3,APP101响应于用户的操作,依次通过数据同步组件1021和数据同步组件2021向数据 描述分析模块2022发送同步数据请求。
例如,如图2C所示,在平板100响应于用户点击所选择的目标图片12-12的缩略图的操作后,平板100响应于此操作,向手机200发送所选择的目标图片12-12的大图数据的请求。在另一些实施例中,在一些语音交互场景或手势交互场景中,用户可以通过预设的语音指令(如“请求同步数据”语音)或者手势指令(如对手机200连续5秒的晃动手势),触发平板100向手机200发送所选择的目标图片12-12的大图数据的请求。
402:手机200响应于数据请求,判断数据请求对应的数据从手机200发送至平板100的总耗时。
可以理解,手机200根据数据请求确定的数据量、写能力和网络传输能力确定数据传输时间和数据写入时间,确定数据处理时间、数据传输时间和数据写入时间的总耗时。
例如,数据处理是指对手机200数据请求对应的数据进行解压等处理,数据传输是指手机200将数据请求对应的数据发送至平板100的过程,数据写入是指平板100接收到数据请求对应的数据后,将该数据写入平板100的存储器的过程。
可以理解,总耗时T为手机200将同步数据请求对应的数据传输至手机200所耗费的时间。
总耗时T可以通过以下公式计算得到:
T=Tp+Tb+Tw
其中,Tp表示数据处理时间,Tb表示数据传输时间,Tw表示数据写入时间。
在一些实施例中,上述数据写入时间Tw可以通过写能力和目标数据量的乘积得到。若写能力用符号W表示,目标数据量用符号S表示,则数据写入时间Tw可以通过以下公式得到:
Tw=W*S
其中,写能力W的单位可以是毫秒每兆(ms/MB),目标数据量S的单位可以是兆(MB),但不限于此。
数据写入时间Tw与写能力和目标数据量之间的关系并不限于上述公式中的线性关系。在其他一些实施例中,还可以在测试阶段,根据一定量的数据写入时间Tw、写能力、目标数据量的测试数据,将数据写入时间Tw与写能力和目标数据量进行拟合,得到数据写入时间Tw与写能力和目标数据量之间的拟合公式,并将该拟合公式配置于平台I/O能力模块2023中。如此,手机200便可以在需要写入时间的情况下,基于从数据描述分析模块2022得到的目标数据的数据量和从平台I/O能力模块2023得到的手机200的写入时间数据模型,得到同步数据请求对应的写入时间。
在一些实施例中,上述数据传输时间Tb可以通过I/O能力和目标数据量的乘积得到。若写能力用符号B表示,目标数据量用符号S表示,则数据传输时间Tb可以通过以下公式得到:
Tb=B*S
其中,I/O能力B的单位可以是毫秒每兆(ms/MB),目标数据量S的单位可以是兆(MB),但不限于此。
在一些实施例中,上述I/O能力B可以通过以下方式得到:基于目标数据量和I/O能力的大量测试数据,绘制曲线,并根据曲线进行拟合,求出相应的I/O能力B的数据模型(公式)。图6为本申请实施例提供的一种I/O能力的拟合曲线,如图6所示,图6中的横坐标代表目标数据量,纵坐标代表I/O能力B。可求出I/O能力的数据模型如下:
B=φ*log(S+c)+ΔB
其中,B表示I/O能力,S表示目标数据量,目标数据量S的单位可以是兆(MB),φ、c和ΔB均为常数,但不限于。
可以理解,I/O能力的数据模型可以在平板100和手机200组网的情况下,通过网络环境分析模块1027和网络环境分析模块2027共享得到对方的I/O能力的数据模型。如此,手机200便可以在需要计算数据传输时间的情况下,基于从数据描述分析模块2022得到的目标数据的数据量,以及从网络环境分析模块2027得到的平板100的I/O能力的数据模型,得到同步数据请求对应的数据传输时间。
可以理解,I/O能力的数据模型可以在平板100和手机200组网的情况下,通过网络环境分析模块1027和网络环境分析模块2027共享得到对方的I/O能力的数据模型。如此,手机200便可以在需要计算数据传输时间的情况下,基于从数据描述分析模块2022得到的目标数据的数据量,以及从网络环境分析模块2027得到的平板100的I/O能力的数据模型,得到同步数据请求对应的数据传输时间。
403:手机200判断数据请求对应的数据从手机200发送至平板100的总耗时是否大于预设时间阈值。
在一些实施例中,若是总耗时大于预设时间阈值,则转至步骤406。若否,则转至步骤404。
可以理解,预设时间阈值可以根据实际情况确定,例如,预设时间阈值可以根据人因工程实验得到的符合用户体验的基本时间。预设时间阈值可以在小于等于预设时间阈值的范围内,例如,预设时间阈值可以为700毫秒、600毫秒、500毫秒、400毫秒、300毫秒、200毫秒、100毫秒。
404:手机200向平板100发送目标数据。
405:平板100显示目标数据。
在一些实施例中,平板100基于预设分辨率的图片数据刷新数据显示页面,显示预设分辨率的图片。例如,如图2E所示,平板100刷新显示页面,显示目标图片12-12的大图。
可以理解,基于上述方案,本申请可以基于不同网络环境、不同的数据量、不同电子设备的读写与处理能力,在基于数据传输效率的前提下,确定数据的跨设备同步需要采取不同的数据处理策略。通过构建动态数据处理与传输策略,综合考虑以上因素,实现网络传输、数据处理和数据写入的较佳协同,提高用户体验。
406:手机200将数据请求对应的目标数据调整为数据量小于目标数据的非全量信息数据。
可以理解,若总耗时大于预设时间阈值,则表明平板100将数据传输至手机200的时间让用户有显示不流畅的体验,因此,需要传输优化策略决策模块2024基于降低数据的数量级的原则生成数据处理策略,以降低传输的数据的数据量,进而降低传输时延。
可以理解,由于传输的数据量越大,数据传输时间和写入时间越大,平板100将数据传输至手机200的时延越大。所以,可以通过降低目标数据的数量级来降低平板100将数据传输至手机200的时延。
表1为在测试阶段得到的数据量、数据处理时间、数据传输时间与写入时间计算的一个示例性表格。
表1:
基于表1,传输的数据量越大,数据传输时间和写入时间越大,平板100将数据传输至手机200的时延越大。对于本申请提供的各个实施例,可以通过降低目标数据的数量级来降低平板100将数据传输 至手机200的时延。
在一些实施例中,若同步数据请求对应的请求数据的数据类型为图片,则手机200可以通过将预设分辨率的图片数据调整为分辨率低于预设分辨率的图片数据,以将最终发送至平板100的目标数据调整为非全量信息数据。例如,如图2C所示,手机200计算得到请求对应的目标图片12-12的大图数据的从手机200传输至平板100的预估时间大于预设时间阈值,则将目标图片12-12的大图数据调整为分辨率较低的图片数据。
407:手机200向平板100发送非全量信息数据。
408:平板100显示非全量信息数据。
可以理解,在一些实施例中,若同步数据请求对应的请求数据的数据类型为图片,平板100可以先基于低分辨率的图片数据显示低清晰度的图片。例如,如图2F所示,平板100先基于较低分辨率的图片数据显示低清晰度的目标图片12-12。
409:手机200向平板100发送目标数据或增量信息数据。
当非全量信息数据为目标数据的低质量级数据时,手机200发送低质量级数据后,把低质量级数据发送至平板100进行显示,然后再发送目标数据。
当非全量信息数据为目标数据的部分核心数据时,手机200发送目标数据的部分核心数据后,把目标数据的部分核心数据发送至平板100进行显示。然后再发送目标数据中除核心数据之外的数据(简称目标数据的增量信息数据)。
410:平板200显示目标数据或增量信息数据。
可以理解,在一些实施例中,平板100基于预设分辨率的图片数据刷新数据显示页面,显示预设分辨率的图片。例如,如图2E所示,平板100刷新显示页面,显示目标图片12-12的大图。
可以理解,基于上述方案,本申请可以基于不同网络环境、不同的数据量、不同电子设备的读写与处理能力,决定了在基于人因工程与用户体验的前提下,数据的跨设备同步需要采取不同的数据处理策略。通过构建动态数据处理与传输策略,综合考虑以上因素,实现网络传输、数据处理和数据写入的较佳协同,提高用户体验。
基于上述图3所示的操作***,下面进一步结合附图及数据同步方法的流程示意图详细介绍本申请的技术方案。
对应于图3,图5根据本申请的一些实施例,示出了一种数据同步方法的流程示意图。如图5所示,该流程包括如下步骤:
501:图库1011响应于用户的操作,依次通过数据同步组件1021和数据同步组件2021向数据描述分析模块2022发送同步数据请求。
例如,如图2C所示,在平板100响应于用户点击所选择的目标图片12-12的缩略图的操作后,平板100响应于此操作,向手机200发送所选择的目标图片12-12的大图数据的请求。在另一些实施例中,在一些语音交互场景或手势交互场景中,用户可以通过预设的语音指令(如“请求同步数据”语音)或者手势指令(如对手机200连续5秒的晃动手势),触发平板100向手机200发送所选择的目标图片12-12的大图数据的请求。
502:数据描述分析模块2022根据同步数据请求确定请求的数据量和数据处理时间。
数据描述分析模块2022用于根据同步数据请求,对同步数据请求中的数据描述进行分级,其中,不同的数据描述对应不同的数据处理复杂度和时间开销,进而得到数据同步请求对应的目标数据的数据量以及处理目标数据的时间。
可以理解,数据描述可以指数据的属性信息,例如,若数据为图片,则数据描述可以为图片的分辨率。若数据为图片和文字,则数据描述可以为图片的分辨率,文字的字体等。
数据描述分析模块2022在得到数据同步请求对应的目标数据的数据量以及处理目标数据的时间后,向传输优化策略决策模块2024提供数据同步请求对应的目标数据的数据量以及处理目标数据的时间。
平台I/O能力模块2023用于本地保存读写性能指标,在手机200和手机200之间组成超级终端***后,平台I/O能力模块2023和平台I/O能力模块2023之间可以交换写能力数据。写能力可以包括手机200将数据写入手机200的速度,单位可以为毫秒每兆,但并不限于此。
503:数据描述分析模块2022向传输优化策略决策模块2024发送确定的数据量和数据处理时间。
504:传输优化策略决策模块2024从平台I/O能力模块2023获取写能力。
传输优化策略决策模块2024从平台I/O能力模块2023获取平板100的写能力。
505:传输优化策略决策模块2024从网络环境分析模块2027获取网络传输能力。
506:传输优化策略决策模块2024根据确定的数据量、写能力和网络传输能力确定数据传输时间和数据写入时间,确定数据处理时间、数据传输时间和数据写入时间的总耗时。
可以理解,总耗时T为手机200将同步数据请求对应的数据传输至平板100所耗费的时间。
总耗时T可以通过以下公式计算得到:
T=Tp+Tb+Tw
其中,Tp表示数据处理时间,Tb表示数据传输时间,Tw表示数据写入时间。
在一些实施例中,上述数据写入时间Tw可以通过写能力和目标数据量的乘积得到。若写能力用符号W表示,目标数据量用符号S表示,则数据写入时间Tw可以通过以下公式得到:
Tw=W*S
其中,写能力W的单位可以是毫秒每兆(ms/MB),目标数据量S的单位可以是兆(MB),但不限于此。
在其他一些实施例中,数据写入时间Tw与写能力和目标数据量之间的关系并不限于上述公式中的线性关系,还可以在测试阶段,根据一定量的数据写入时间Tw、写能力、目标数据量的测试数据,将数据写入时间Tw与写能力和目标数据量进行拟合,得到数据写入时间Tw与写能力和目标数据量之间的拟合公式,并将该拟合公式配置于平台I/O能力模块2023中。如此,手机200便可以在需要写入时间的情况下,基于从数据描述分析模块2022得到的目标数据的数据量和从平台I/O能力模块2023得到的手机200的写入时间数据模型,得到同步数据请求对应的写入时间。
在一些实施例中,上述数据传输时间Tb可以通过I/O能力和目标数据量的乘积得到。若写能力用符号B表示,目标数据量用符号S表示,则数据传输时间Tb可以通过以下公式得到:
Tb=B*S
其中,I/O能力B的单位可以是毫秒每兆(ms/MB),目标数据量S的单位可以是兆(MB),但不限于此。
在一些实施例中,上述I/O能力B可以通过以下方式得到:基于目标数据量和I/O能力的大量测试数据,绘制曲线,并根据曲线进行拟合,求出相应的I/O能力B的数据模型(公式),如I/O能力B的曲线拟合情况如图6所示,图5中的横坐标代表目标数据量,纵坐标代表I/O能力B。可求出I/O能力的数据模型如下:
B=φ*log(S+c)+ΔB
其中,B表示I/O能力,S表示目标数据量,目标数据量S的单位可以是兆(MB),φ、c和ΔB均为 常数,但不限于。
可以理解,I/O能力的数据模型可以在平板100和手机200组网的情况下,通过网络环境分析模块1027和网络环境分析模块2027共享得到对方的I/O能力的数据模型。如此,手机200便可以在需要计算数据传输时间的情况下,基于从数据描述分析模块2022得到的目标数据的数据量,以及从网络环境分析模块2027得到的平板100的I/O能力的数据模型,得到同步数据请求对应的数据传输时间。
507:传输优化策略决策模块2024判断总耗时是否大于预设时间阈值,若是,则转至408,若否,则转至409。
可以理解,预设时间阈值可以根据实际情况确定,例如,预设时间阈值可以根据人因工程实验得到的符合用户体验的基本时间。预设时间阈值可以为700毫秒(ms)。
508:传输优化策略决策模块2024基于降低数据的数量级的原则生成数据处理策略。
在一些实施例中,若同步数据请求对应的请求数据的数据类型为图片,则数据处理策略为手机200可以通过将预设分辨率的图片数据调整为分辨率低于预设分辨率的图片数据。
509:传输优化策略决策模块2024读取同步数据请求对应的目标数据。
510:传输优化策略决策模块2024基于生成的数据处理策略处理读取的目标数据。
511:传输优化策略决策模块2024通过数据收发模块2026向数据收发模块1026发送处理后得到的非全量信息数据。
512:数据收发模块1026向数据存储模块1022写入处理后得到的非全量信息数据。
在一些实施例中,若同步数据请求对应的请求数据的数据类型为图片,则手机200可以通过将预设分辨率的图片数据调整为分辨率低于预设分辨率的图片数据,以将最终发送至平板100的目标数据调整为非全量信息数据。例如,如图2C所示,手机200计算得到请求对应的目标图片12-12的大图数据的从手机200传输至平板100的预估时间大于预设时间阈值,则将目标图片12-12的大图数据调整为分辨率较低的图片数据。
513:数据收发模块1026向数据同步组件1021发送目标数据更新通知。
514:数据同步组件1021从数据存储模块1026读取处理后得到的非全量信息数据。
515:数据同步组件1021向APP101发送处理后得到的非全量信息数据。
516:APP101显示处理后得到的非全量信息数据。
517:传输优化策略决策模块2024依次通过数据同步组件2021、数据同步组件1021向APP101发送目标数据或增量信息数据。
518:APP101显示目标数据或增量信息数据。
可以理解,在本实施例中,目标数据为预设分辨率的图片数据,平板100基于预设分辨率的图片数据刷新数据显示页面,显示预设分辨率的图片。例如,如图2E所示,平板100刷新显示页面,显示目标图片12-12的大图。
可以理解,基于上述方案,本申请可以基于不同网络环境、不同的数据量、不同电子设备的读写与处理能力,在基于人因工程与用户体验的前提下,确定数据的跨设备同步需要采取不同的数据处理策略。通过构建动态数据处理与传输策略,综合考虑以上因素,实现网络传输、数据处理和数据写入的较佳协同,提高用户体验。
图7根据本申请的一些实施例,示出了一种平板100的结构示意图。如图7所示,平板100可以包括处理器110,外部存储器接口120,内部存储器121,传感器模块180,按键190,摄像头193,显示屏194等。其中,传感器模块180可以包括压力传感器180A,触摸传感器180K等。
可以理解的是,本申请实施例示意的结构并不构成对平板100的具体限定。在本申请另一些实施例中,平板100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110用于执行本申请实施例中的数据同步方法。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展平板100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行平板100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如视频拍摄功能,视频播放功能等)。
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
作为示例,内部存储器可以存储用于实现本申请实施例提供的数据同步方法的计算机程序。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。平板100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,平板100根据压力传感器180A检测触摸操作强度。平板100也可以根据压力传感器180A的检测信号计算触摸的位置。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于平板100的表面,与显示屏194所处的位置不同。
作为示例,电子设备通过压力传感器和触摸传感器可以检测到用户作用在显示屏上的操作,例如,用户点击控件的操作等。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。平板100可以接收按键输入,产生与平板100的用户设置以及功能控制有关的键信号输入。
平板100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一 个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。在一些实施例中,平板100可以包括1个或M个显示屏194,M为大于1的正整数。
摄像头193用于捕获静态图像或视频。在一些实施例中,平板100可以包括1个或P个摄像头193,P为大于1的正整数。
本申请实施例并未特别限定一种数据同步方法的执行主体的具体结构,只要可以通过运行记录有本申请实施例的一种数据同步方法的代码,以根据本申请实施例提供的一种数据同步方法进行通信即可。例如,本申请实施例提供的一种数据同步方法的执行主体可以是平板100中能够调用程序并执行程序的功能模块,或者为应用于平板100中的处理装置,例如,芯片。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中平板100(如平板100中的各个器件)或手机200(如手机200中的各个器件)执行的各个功能或者步骤。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中手机20(如手机200中的各个器件)执行的各个功能或者步骤。
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程***上执行的计算机程序或程序代码,该可编程***包括至少一个处理器、存储***(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理***包括具有诸如例如数字信号处理器(Digital Signal Processor,DSP)、微控制器、专用集成电路(Application Specific Integrated Circuit,ASIC)或微处理器之类的处理器的任何***。
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理***通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。

Claims (15)

  1. 一种数据同步方法,其特征在于,应用于第一电子设备,所述方法包括:
    所述第一电子设备接收到第二电子设备发送的数据同步请求;
    所述第一电子设备响应于所述数据同步请求,确定将所述数据同步请求所请求的第一数据发送至所述第二电子设备所需要的第一时间;
    对应于所述第一时间大于预设时间阈值,所述第一电子设备将所述第一数据调整为第二数据,其中,所述第二数据的数据量小于所述第一数据的数据量;
    所述第一电子设备向所述第二电子设备发送所述第二数据;所述第一电子设备将所述第二数据发送至所述第二电子设备所需要的第二时间小于所述预设时间阈值。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备向所述第二电子设备发送所述第二数据之后,发送待所述第二电子设备显示的所述第一数据。
  3. 根据权利要求2所述的方法,其特征在于,所述第一电子设备将所述数据同步请求对应的所述第一数据调整为第二数据,包括:
    所述第一数据为预设分辨率的图片或者视频;
    所述第一电子设备调整所述第一数据的预设分辨率或者尺寸,以得到所述第二数据。
  4. 根据权利要求1所述的方法,其特征在于,在所述第一电子设备向所述第二电子设备发送所述第二数据之后,所述方法还包括:
    所述第一电子设备发送待所述第二电子设备显示的第三数据,其中,所述第一数据为全量数据,第三数据为增量数据。
  5. 根据权利要求4所述的方法,其特征在于,所述第三数据的类型和第二数据的类型不同。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一时间T通过以下公式计算得到:
    T=Tp+Tb+Tw
    其中,Tp表示所述第一电子设备对所述第一数据进行处理的数据处理时间,Tb表示所述第一电子设备将所述第一数据发送至第一电子设备所需要的数据传输时间,Tw表示所述第二电子设备将所述第一数据写入第二电子设备的写入时间。
  7. 一种数据同步方法,其特征在于,应用于第二电子设备,所述方法包括:
    所述第二电子设备向第一电子设备发送数据同步请求,其中,所述数据同步请求所请求的数据为第一数据;
    所述第二电子设备接收到所述第一电子发送的第二数据,其中,所述第二数据的数据量小于所述第一数据的数据量;所述第一电子将所述第一数据发送至所述第二电子设备所需要的第一时间;所述第一电子设备将所述第二数据发送至所述第二电子设备所需要的第二时间小于所述第一时间。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备接收到所述第一电子设备发送的所述第一数据,所述第二电子设备显示的所述第一数据。
  9. 根据权利要求8所述的方法,其特征在于,
    所述第一数据为预设分辨率的图片或者视频,所述第二数据为低于预设分辨率或尺寸的图片或者视频。
  10. 根据权利要求7所述的方法,其特征在于,所述第二电子设备接收到所述第一电子设备发送所述第二数据之后,接收到所述第一电子设备发送第三数据,并显示所述第三数据,其中,所述第一数据为全量数据,第三数据为增量数据。
  11. 根据权利要求10所述的方法,其特征在于,所述第三数据的类型和第二数据的类型不同。
  12. 根据权利要求7至11中任一项所述的方法,其特征在于,所述第一时间T通过以下公式计算得到:
    T=Tp+Tb+Tw
    其中,Tp表示所述第一电子设备对所述第一数据进行处理的数据处理时间,Tb表示所述第一电子设备将所述第一数据发送至第一电子设备所需要的数据传输时间,Tw表示所述第二电子设备将所述第一数据写入第二电子设备的写入时间。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行权利要求1至6中任一项所述的数据同步方法;或者,执行权利要求7至12任一项所述的数据同步方法。
  14. 一种电子设备,其特征在于,包括:
    内部存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及
    处理器,用于执行权利要求1至6中任一项所述的数据同步方法;或者,执行权利要求7至12任一项所述的数据同步方法。
  15. 一种计算机程序产品,其特征在于,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现权利要求1至6中任一项所述的数据同步方法;或者,执行权利要求7至12任一项所述的数据同步方法。
PCT/CN2023/089305 2022-04-22 2023-04-19 一种数据同步方法、介质、程序产品及电子设备 WO2023202640A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210431213.4 2022-04-22
CN202210431213.4A CN116980431A (zh) 2022-04-22 2022-04-22 一种数据同步方法、介质、程序产品及电子设备

Publications (1)

Publication Number Publication Date
WO2023202640A1 true WO2023202640A1 (zh) 2023-10-26

Family

ID=88419244

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/089305 WO2023202640A1 (zh) 2022-04-22 2023-04-19 一种数据同步方法、介质、程序产品及电子设备

Country Status (2)

Country Link
CN (1) CN116980431A (zh)
WO (1) WO2023202640A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140292720A1 (en) * 2011-12-15 2014-10-02 Uc Mobile Limited Method, device, and system of cross-device data transfer
CN108270852A (zh) * 2017-01-04 2018-07-10 三星电子株式会社 电子设备及其应用共享方法
CN111586452A (zh) * 2020-04-30 2020-08-25 北京盛世辉科技有限公司 用于跨设备互动的方法及装置、播放设备
CN112486363A (zh) * 2020-10-30 2021-03-12 华为技术有限公司 一种跨设备的内容分享方法、电子设备及***
CN114329020A (zh) * 2020-03-26 2022-04-12 华为技术有限公司 一种数据共享的方法、电子设备和***

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140292720A1 (en) * 2011-12-15 2014-10-02 Uc Mobile Limited Method, device, and system of cross-device data transfer
CN108270852A (zh) * 2017-01-04 2018-07-10 三星电子株式会社 电子设备及其应用共享方法
CN114329020A (zh) * 2020-03-26 2022-04-12 华为技术有限公司 一种数据共享的方法、电子设备和***
CN111586452A (zh) * 2020-04-30 2020-08-25 北京盛世辉科技有限公司 用于跨设备互动的方法及装置、播放设备
CN112486363A (zh) * 2020-10-30 2021-03-12 华为技术有限公司 一种跨设备的内容分享方法、电子设备及***

Also Published As

Publication number Publication date
CN116980431A (zh) 2023-10-31

Similar Documents

Publication Publication Date Title
WO2021227770A1 (zh) 应用窗口显示方法和电子设备
US10372238B2 (en) User terminal device and method for controlling the user terminal device thereof
WO2021057830A1 (zh) 一种信息处理方法及电子设备
JP5628300B2 (ja) アニメーションに使用するための望ましい物理的特徴を伴うグラフィックオブジェクトを生成する方法、装置及びコンピュータプログラム製品
WO2021244443A1 (zh) 分屏显示方法、电子设备及计算机可读存储介质
US11853526B2 (en) Window display method, window switching method, electronic device, and system
US20160077620A1 (en) Method and apparatus for controlling electronic device using touch input
US20180329589A1 (en) Contextual Object Manipulation
WO2023010903A1 (zh) 终端设备的桌面管理方法和终端设备
WO2019128193A1 (zh) 移动终端及浮屏操作控制方法、装置
US9823819B1 (en) Method for launching remote applications from a mobile device using cloud cache
KR102221034B1 (ko) 컨텐츠 표시 제어 방법 및 그 전자 장치
US7949708B2 (en) Using a remote handheld device as a local device
US20170139554A1 (en) Electronic apparatus and display control method
WO2023226455A1 (zh) 应用图标的显示方法、电子设备及可读存储介质
US20160210769A1 (en) System and method for a multi-device display unit
JP2020537794A (ja) アイコン表示方法、デバイス、およびシステム
WO2021057203A1 (zh) 一种操作方法和电子设备
WO2023051111A1 (zh) 多个应用组合且同时启动多个应用的方法及电子设备
WO2023040666A1 (zh) 键盘显示方法、折叠屏设备和计算机可读存储介质
WO2023179742A1 (zh) 数据访问方法及***、硬件卸载设备、电子设备及介质
US20220374146A1 (en) Extensions to global keyboard shortcuts for computing devices having multiple display regions
WO2023202640A1 (zh) 一种数据同步方法、介质、程序产品及电子设备
WO2021052488A1 (zh) 一种信息处理方法及电子设备
WO2024032124A1 (zh) 卷轴屏开合方法及相关产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23791294

Country of ref document: EP

Kind code of ref document: A1