Clipboard content synchronization method and device of all-in-one machine equipment, equipment and storage medium
By determining the synchronization status and compression parameters in the all-in-one device, cross-device synchronization of clipboard content is achieved, the problem of inconvenience between devices is solved, the stability and convenience of synchronization is improved, and it is suitable for multi-device scenarios.
Patent Information
- Application Number
- CN202411271336.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-13
AI Technical Summary
The existing electronic whiteboard all-in-one equipment cannot directly synchronize clipboard content between different devices, resulting in inconvenience in cross-device office and teaching scenarios.
By determining the clipboard content and preset synchronization status of the all-in-one device, selecting the target synchronization method, and determining the compression parameters according to the content type, generating compressed data, realizing synchronous transmission of data, supporting server synchronization and direct synchronization, ensuring that the data is different Availability between devices.
It realizes cross-device synchronization of clipboard content, reduces transmission consumption, improves the stability and convenience of synchronization, and is suitable for cross-device office and teaching scenarios.
Smart Images

Figure CN119135664A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of all-in-one machines, and in particular to a method, device, equipment and storage medium for synchronizing clipboard content of an all-in-one machine. Background Art
[0002] At present, all-in-one electronic whiteboard devices on the market can usually only copy and paste clipboard contents on the same device or platform. When users need to use the clipboard contents of the device, they cannot use them directly. They need to copy the clipboard contents to social software or cloud disk, and then log in to the social software or cloud disk on other devices to paste the clipboard contents. This is very inconvenient in cross-device office and teaching scenarios. Summary of the invention
[0003] The embodiment of the present application provides a method, apparatus, device and storage medium for synchronizing clipboard content of an all-in-one device to solve at least one problem existing in the related art. The technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a method for synchronizing clipboard content of an all-in-one device, including:
[0005] Determine the clipboard contents and preset synchronization status of the all-in-one device;
[0006] Determining a target synchronization mode according to the preset synchronization state;
[0007] Determining a target compression parameter according to the content type of the clipboard content, and obtaining compressed data according to the target compression parameter and the clipboard content;
[0008] The compressed data is synchronized to the target device through the target synchronization mode, so that the clipboard content is utilized after the compressed data is decompressed by the target device.
[0009] In one implementation, determining the target synchronization mode according to the preset synchronization state includes:
[0010] When the preset synchronization state indicates that there is a preset synchronization mode, determining a target synchronization mode according to the preset synchronization mode;
[0011] When the preset synchronization state indicates that there is no preset synchronization mode, the network stability of the connection network of the all-in-one device is detected. When the network stability is characterized as stable, the target synchronization mode is determined to be server synchronization. When the network stability is characterized as unstable, the target synchronization mode is determined to be synchronization with a direct connection.
[0012] In one implementation, synchronizing the compressed data to the target device through the target synchronization method includes:
[0013] When the target synchronization mode is server synchronization, the compressed data is synchronized to the server, and the compressed data is synchronized to the target device through the server;
[0014] When the target synchronization mode is direct synchronization, a P2P connection between the integrated device and the target device is established via Bluetooth or WiFi, and the compressed data is directly synchronized from the integrated device to the target device via the P2P connection.
[0015] In one implementation, determining the target compression parameter according to the content type of the clipboard content includes:
[0016] When the content type includes text, determining a text compression algorithm;
[0017] When the content type includes pictures, determining a lossless compression algorithm or a lossy compression algorithm according to different types of pictures;
[0018] When the content type includes files, a target compression algorithm corresponding to the target compression format is determined.
[0019] In one implementation, obtaining compressed data according to the target compression parameter and the clipboard content includes:
[0020] Encoding the clipboard content, and encrypting the encoded clipboard content by using an encryption algorithm to obtain encrypted data;
[0021] The encrypted data is compressed using the target compression parameter to obtain compressed data.
[0022] In one embodiment, the method further comprises:
[0023] When the target device acquires the clipboard content, semantic analysis is performed on the text of the clipboard content, and the clipboard content is automatically classified and stored according to the content type;
[0024] According to the semantic analysis result, other clipboard contents related to the clipboard contents and related operations on the clipboard contents are recommended.
[0025] In one embodiment, the method further comprises:
[0026] If the target device includes several sub-devices, when the all-in-one device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated respectively, and the clipboard version is synchronized to the server, wherein the clipboard version includes the changed clipboard content and the timestamp of the change;
[0027] When the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, determining a conflict situation;
[0028] When a conflict is determined, the user is prompted to perform manual operations to select a target clipboard version, or to merge the changed clipboard content to determine the target clipboard version;
[0029] The target clipboard version is retained in the server.
[0030] In a second aspect, an embodiment of the present application provides a clipboard content synchronization device of an all-in-one device, comprising:
[0031] A first determination module, used to determine the clipboard content and preset synchronization status of the all-in-one device;
[0032] A second determination module, used to determine a target synchronization mode according to the preset synchronization state;
[0033] A compression module, used to determine a target compression parameter according to the content type of the clipboard content, and obtain compressed data according to the target compression parameter and the clipboard content;
[0034] The synchronization module is used to synchronize the compressed data to the target device through the target synchronization mode, so as to utilize the clipboard content after decompressing the compressed data through the target device.
[0035] In one implementation, the clipboard content synchronization apparatus of the all-in-one device further includes an analysis module, and the analysis module is used to:
[0036] When the target device acquires the clipboard content, semantic analysis is performed on the text of the clipboard content, and the clipboard content is automatically classified and stored according to the content type;
[0037] According to the semantic analysis result, other clipboard contents related to the clipboard contents and related operations on the clipboard contents are recommended.
[0038] In one embodiment, the analysis module is further used for:
[0039] If the target device includes several sub-devices, when the all-in-one device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated respectively, and the clipboard version is synchronized to the server, wherein the clipboard version includes the changed clipboard content and the timestamp of the change;
[0040] When the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, determining a conflict situation;
[0041] When a conflict is determined, the user is prompted to perform manual operations to select a target clipboard version, or to merge the changed clipboard content to determine the target clipboard version;
[0042] The target clipboard version is retained in the server.
[0043] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement a method in any one of the above-mentioned embodiments.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, the method in any one of the above-mentioned embodiments is implemented.
[0045] The beneficial effects of the above technical solution include at least:
[0046] By determining the clipboard content of the all-in-one device and the preset synchronization status, the target synchronization method is determined according to the preset synchronization status to meet the synchronization requirements and synchronization stability; according to the content type of the clipboard content, the target compression parameters are determined, and according to the target compression parameters and the clipboard content, the compressed data is obtained to ensure the compression effect, which is conducive to reducing transmission consumption; through the target synchronization method, the compressed data is synchronized to the target device, and after the compressed data is decompressed by the target device, the clipboard content is used to automatically realize the sharing and synchronization of the clipboard content, which is very convenient.
[0047] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.
[0049] Figure 1 A schematic diagram of the steps of a method for synchronizing clipboard content of an all-in-one device according to an embodiment of the present application;
[0050] Figure 2 This is a structural block diagram of a clipboard content synchronization device of an all-in-one device according to an embodiment of the present application;
[0051] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0053] Reference Figure 1 , a flowchart of a clipboard content synchronization method of an all-in-one device according to an embodiment of the present application is shown. The clipboard content synchronization method of the all-in-one device may at least include steps S100-S400:
[0054] S100: Determine the clipboard content and preset synchronization status of the all-in-one device.
[0055] S200: Determine a target synchronization mode according to a preset synchronization state.
[0056] S300: Determine a target compression parameter according to the content type of the clipboard content, and obtain compressed data according to the target compression parameter and the clipboard content.
[0057] S400, synchronizing the compressed data to the target device through a target synchronization method, so that the compressed data can be decompressed by the target device and the clipboard content can be used.
[0058] The clipboard content synchronization method of the all-in-one device in the embodiment of the present application can be executed by the processor of the all-in-one device, or by one or more of the processor of the all-in-one device, the cloud server and the target device; the target device can be a terminal or an all-in-one device.
[0059] The technical solution of the embodiment of the present application determines the clipboard content and preset synchronization status of the all-in-one device, and determines the target synchronization method according to the preset synchronization status to meet the synchronization requirements and synchronization stability; determines the target compression parameters according to the content type of the clipboard content, and obtains compressed data according to the target compression parameters and the clipboard content to ensure the compression effect, which is beneficial to reducing transmission consumption; synchronizes the compressed data to the target device through the target synchronization method, and after the compressed data is decompressed by the target device, the clipboard content is used to automatically realize the sharing and synchronization of the clipboard content, which is very convenient.
[0060] In one embodiment, the all-in-one device includes but is not limited to an all-in-one electronic whiteboard. When a user uses the clipping function on the all-in-one device, corresponding clipboard content is generated on the clipboard, and the clipboard content includes but is not limited to text, pictures, files, etc. It should be noted that a clipboard monitor can be set in the server or the all-in-one electronic whiteboard to call the system API to obtain the clipboard content and monitor in real time whether the clipboard content changes.
[0061] In one implementation, the user may pre-set a preset synchronization mode in the system of the all-in-one device in advance, and the system generates a corresponding preset synchronization state based on whether the preset synchronization mode is set or not.
[0062] In one implementation, step S200 includes steps S210-S220:
[0063] S210: When the preset synchronization state indicates that a preset synchronization mode exists, determine a target synchronization mode according to the preset synchronization mode.
[0064] Optionally, the user can preset the synchronization mode on the system, for example, the preset synchronization modes include but are not limited to direct synchronization, server synchronization, rate priority, etc.; wherein, direct synchronization means that the all-in-one device directly connects to the target device that needs to synchronize the clipboard content, and synchronizes the clipboard content to the target device; server synchronization means that the all-in-one device uploads the clipboard content to the server, and the server then transmits the clipboard content to the target device; rate priority means that the all-in-one device analyzes the current network status, Bluetooth connection status, etc., and automatically selects the mode with the best rate. Therefore, when the user sets any of the above preset synchronization modes, the preset synchronization mode is determined as the target synchronization mode.
[0065] S220. When the preset synchronization state indicates that there is no preset synchronization mode, the network stability of the network connected to the all-in-one device is detected. When the network stability is stable, the target synchronization mode is determined to be server synchronization. When the network stability is unstable, the target synchronization mode is determined to be synchronization with a direct connection.
[0066] Optionally, if the user has not set a preset synchronization mode in advance, the preset synchronization state indicates that there is no preset synchronization mode. The all-in-one device will automatically detect the network stability of the network to which it is connected, such as the strength of the network signal, the transmission rate, etc. to determine the network stability. When the network stability is characterized as stable, the target synchronization mode is determined to be server synchronization, and the server is used as a transfer of the clipboard content to transfer the clipboard content to the target device. When the network stability is characterized as unstable, the target synchronization mode is determined to be synchronization with direct connection, and a P2P connection between the all-in-one device and the target device is established through Bluetooth or WiFi.
[0067] In one implementation, determining the target compression parameter according to the content type of the clipboard content in step S300 includes steps S310-S330:
[0068] S310: When the content type includes text, determine a text compression algorithm.
[0069] Optionally, when the content type includes text, a text compression algorithm for compressing the text is determined; the text compression algorithm includes but is not limited to GZIP, Huffman coding, PPM algorithm, RLE algorithm, etc.
[0070] S320: When the content type includes pictures, determine a lossless compression algorithm or a lossy compression algorithm according to different types of pictures.
[0071] Optionally, when the content type includes pictures, different types of pictures can be analyzed to determine a lossless compression algorithm or a lossy compression algorithm. For example, lossless compression algorithms include Haffyan coding, dictionary coding, and predictive coding, and lossy compression algorithms include transform coding, quantization model-based compression, etc.; when the picture type is a high-definition picture (for example, the resolution is greater than the resolution threshold), a lossy compression algorithm can be determined to control the compressed data size as much as possible, and when the picture type is a non-high-definition picture, a lossless compression algorithm can be determined. In some embodiments, if the picture type is a high-definition picture, the user can also be prompted to select a lossless compression algorithm or a lossy compression algorithm, and the lossless compression algorithm or the lossy compression algorithm is determined based on the user's selection.
[0072] S330: When the content type includes file, determine a target compression algorithm corresponding to the target compression format.
[0073] Optionally, when the content type includes a file, a corresponding target compression format is determined according to the file type, and then a target compression algorithm corresponding to the target compression format is determined. For example, the target compression format may be zip or rar, and if the file type is a large file (the size of the file is greater than a size threshold), rar is determined as the target compression format, otherwise zip is determined as the target compression format.
[0074] In the embodiment of the present application, the target compression parameters are the content required for subsequent compression, including the various algorithms mentioned above; and for different content types, using corresponding compression algorithms is beneficial to improving the compression effect, effectively reducing the bandwidth of transmitted data, and increasing the data transmission rate.
[0075] In one embodiment, obtaining compressed data according to the target compression parameter and the clipboard content in step S300 includes steps S340-S350:
[0076] S340, encode the clipboard content, and encrypt the encoded clipboard content using an encryption algorithm to obtain encrypted data.
[0077] Optionally, in order to improve security in the embodiment of the present application, the clipboard content is encoded, specifically, the text is Base64 encoded, and the pictures and files are binary encoded; then the encoded clipboard content is encrypted using an encryption algorithm (such as the symmetric encryption algorithm AES) using a key to obtain encrypted data. It is understandable that decryption is performed by using a corresponding key.
[0078] S350: compress the encrypted data using the target compression parameter to obtain compressed data.
[0079] Then, the encrypted data is compressed using the target compression parameters determined above to obtain compressed data, making the transmission process more secure and reducing the amount of data transmitted.
[0080] In one embodiment, after obtaining the compressed data, the all-in-one device can also monitor changes in network status in real time, detect the bandwidth of the current network and device performance (such as CPU processing power and memory, etc.). For example, if the bandwidth of the current network is less than the bandwidth threshold, it is determined that the transmission needs to be further optimized or the target synchronization mode needs to be adjusted. The optimized transmission can be to process the compressed data in blocks and obtain several data blocks for block transmission to increase the transmission speed; if the CPU processing power and memory are insufficient, a lower compression rate is selected to compress to obtain new compressed data or delay the synchronization operation; a window can be displayed in the system to prompt the user whether to switch the target synchronization mode.
[0081] In one implementation, in step S400, the compressed data is synchronized to the target device by target synchronization, including steps S410-S420:
[0082] S410: When the target synchronization mode is server synchronization, the compressed data is synchronized to the server, and the compressed data is synchronized to the target device through the server.
[0083] In an embodiment of the present application, when the target synchronization mode is server synchronization, the all-in-one device synchronizes the compressed data to the server through the network, and then synchronizes the compressed data to the target device through the server.
[0084] S420: When the target synchronization mode is direct synchronization, a P2P connection is established between the integrated device and the target device via Bluetooth or WiFi, and the compressed data is directly synchronized from the integrated device to the target device via the P2P connection.
[0085] In an embodiment of the present application, when the target synchronization mode is direct synchronization, the all-in-one device establishes a P2P connection between the all-in-one device and the target device via Bluetooth or WiFi, and then the all-in-one device directly synchronizes the compressed data from the all-in-one device to the target device via the P2P connection. It is suitable for temporary, local area network or short-range fast synchronization of devices without relying on an intermediate server, and can be used to transmit larger or more sensitive data content, ensuring the security of direct data transmission between devices.
[0086] In the embodiment of the present application, during synchronization, transmission is performed through a cross-platform network communication protocol (such as WebSocket or HTTP), and the network connection is initialized and authenticated before sending to ensure the legitimacy of the data recipient. At the same time, when the target device is incompatible with certain data types, the incompatible data types are converted to a common format for transmission, and then encrypted and compressed. For example, convert text in RTF format to plain text or HTML format, convert SVG graphics to PNG images, or convert images in a certain format to a compatible image format, etc.
[0087] In an embodiment of the present application, when the target device receives the compressed data, it will decompress and decrypt the compressed data to obtain the clipboard content. At this time, the clipboard content can be used in the target device to realize the application of the clipboard content across devices, which is very convenient and easy to use and suitable for cross-device office and teaching scenarios.
[0088] It should be noted that before synchronization, the system of the all-in-one device will check the online status, power, storage space, etc. of the target device. If the target device is not available, the system will prompt the user to check the device or switch to other synchronization methods.
[0089] In one implementation, the clipboard content synchronization method of the all-in-one device in the embodiment of the present application may further include steps S510-S520:
[0090] S510: When the target device obtains the clipboard content, semantic analysis is performed on the text of the clipboard content, and the clipboard content is automatically classified and stored according to the content type.
[0091] In an embodiment of the present application, when the target device obtains the clipboard content, an intelligent analysis and recommendation function is provided. Artificial intelligence technology (such as natural language processing technology) can be used to automatically perform semantic analysis on the text of the clipboard content and analyze the content type of the clipboard content. The clipboard content is automatically classified and stored according to the clipboard content, making it convenient for users to find and use the clipboard content.
[0092] S520: Recommend other clipboard contents related to the clipboard contents and related operations on the clipboard contents according to the semantic analysis result.
[0093] In an embodiment of the present application, other clipboard contents related to the clipboard contents can be recommended to the user through notifications or pop-up windows based on the semantic analysis results obtained by the above semantic analysis, such as clipboard contents that have been synchronized with history or clipboard contents with history stored on the server. Based on the semantic analysis results or the context content displayed by the current user on the target device, a search can be performed to match other related clipboard contents from the historical clipboard contents for quick use and association by the user. In addition, related operations on the clipboard contents can be recommended through notifications or pop-up windows, such as copying, pasting, editing, screenshots, or merging the current clipboard contents with other clipboard contents, etc.
[0094] In one implementation, the clipboard content synchronization method of the all-in-one device of the embodiment of the present application may further include steps S610-S640:
[0095] S610. If the target device includes several sub-devices, when the all-in-one device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated and synchronized to the server. The clipboard version includes the changed clipboard content and the timestamp of the change.
[0096] Optionally, if the target device includes several sub-devices, when the server is used for synchronization, for the clipboard content, the clipboard content may be changed on the integrated device, or the target device includes several sub-devices that may also change the clipboard content, and no matter whether the changes are made on the integrated device or the sub-device, the final changed clipboard content will be synchronized to the server to maintain the latest clipboard content. In an embodiment of the present application, each time the clipboard content is transmitted to the server, a unique version identifier is recorded and generated in the server, including the clipboard version (such as version number) of the clipboard content at this time, the timestamp of the upload, and the device ID of the upload. Therefore, when the integrated device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated respectively, and the clipboard version is synchronized to the server, and the server compares the version identifier to determine the latest clipboard version of the content. It can be understood that the clipboard version includes the changed clipboard content and the changed timestamp (i.e., the timestamp of the uploaded version).
[0097] S620: When the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, determine a conflict situation.
[0098] Optionally, when the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, that is, when different users change the clipboard content in the integrated device and at least one of the sub-devices, or when different users change the clipboard content in at least two of the sub-devices and upload the clipboard versions of the changed clipboard content, the server will detect that there are at least two clipboard versions with the same timestamp, and it is considered that there is a conflict. In some embodiments, the server will further detect the content differences between different clipboard versions. If only one of the clipboard versions has updated content, it is considered that there is no conflict, and the clipboard version with the changed content is used as the final target clipboard version.
[0099] S630: When a conflict is determined, the user is prompted to perform manual operation to select a target clipboard version, or to merge the changed clipboard contents to determine the target clipboard version.
[0100] Optionally, when a conflict is determined, the user is prompted to perform manual operations through a notification or a pop-up window to select a target clipboard version. For example, the clipboard version changed by the user himself and the clipboard version changed by other users will be displayed at this time, allowing the user to determine which clipboard version to use as the final target clipboard version. In some embodiments, a server can store several clipboard versions, and a preset number of historical clipboard versions are saved in a certain time sequence for the user to choose to synchronize. The user can choose to restore to the previous version, so as to avoid data loss caused by misoperation. If different users select different clipboard versions as the final target clipboard version, different clipboard versions are stored in the server at this time, or the user is prompted whether to perform a merge operation to decide whether to merge different clipboard versions as the final target clipboard version. In some embodiments, when a conflict is determined, the user can be directly prompted whether to merge the contents of the clipboard contents after the changes of multiple different clipboard versions. If the user agrees, the merge is performed to obtain the target clipboard version.
[0101] S640: Save the target clipboard version in the server.
[0102] Optionally, the finalized target clipboard version is retained in the server so that the user can select the required target clipboard version for synchronization when synchronization is required.
[0103] In some embodiments, a user authentication and permission management mechanism is also set up in the all-in-one device or server. When uploading clipboard content, the user can set authorized users to ensure that only authorized users can transfer clipboard content across platforms. For example, authentication technologies such as OAuth or JWT can be used to ensure identity authentication and authorization management during the transmission process.
[0104] Reference Figure 2 , shows a structural block diagram of a clipboard content synchronization device of an all-in-one device according to an embodiment of the present application, and the device may include:
[0105] A first determination module, used to determine the clipboard content and preset synchronization status of the all-in-one device;
[0106] A second determination module, used to determine a target synchronization mode according to a preset synchronization state;
[0107] A compression module, used to determine a target compression parameter according to the content type of the clipboard content, and obtain compressed data according to the target compression parameter and the clipboard content;
[0108] The synchronization module is used to synchronize the compressed data to the target device through the target synchronization mode, so as to utilize the clipboard content after decompressing the compressed data through the target device.
[0109] In one embodiment, the clipboard content synchronization device of the all-in-one device further includes an analysis module, and the analysis module is used to:
[0110] When the target device obtains the clipboard content, the text of the clipboard content is semantically analyzed and automatically classified and stored according to the content type of the clipboard content;
[0111] Based on the semantic analysis result, other clipboard contents related to the clipboard contents and related operations on the clipboard contents are recommended.
[0112] In one embodiment, the analysis module is further configured to:
[0113] If the target device includes several sub-devices, when the all-in-one device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated and synchronized to the server. The clipboard version includes the changed clipboard content and the timestamp of the change;
[0114] When the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, determining a conflict situation;
[0115] When a conflict is determined, the user is prompted to perform manual operations to select a target clipboard version, or to merge the changed clipboard content to determine the target clipboard version;
[0116] Keep a version of the target clipboard on the server.
[0117] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and will not be repeated here.
[0118] Reference Figure 3 , shows a structural block diagram of an electronic device according to an embodiment of the present application, the electronic device includes: a memory 310 and a processor 320, the memory 310 stores instructions that can be run on the processor 320, and the processor 320 loads and executes the instructions to implement the clipboard content synchronization method of the all-in-one device in the above embodiment. The number of the memory 310 and the processor 320 can be one or more.
[0119] In one embodiment, the electronic device also includes a communication interface 330 for communicating with external devices and performing data exchange transmission. If the memory 310, the processor 320 and the communication interface 330 are implemented independently, the memory 310, the processor 320 and the communication interface 330 can be interconnected through a bus and complete mutual communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0120] Optionally, in a specific implementation, if the memory 310, the processor 320 and the communication interface 330 are integrated on a chip, the memory 310, the processor 320 and the communication interface 330 can communicate with each other through an internal interface.
[0121] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the clipboard content synchronization method of the all-in-one device provided in the above embodiment.
[0122] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.
[0123] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.
[0124] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.
[0125] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the described specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0128] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0129] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0131] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0132] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for synchronizing clipboard content of an all-in-one device, characterized in that: include: Determine the clipboard contents and preset synchronization status of the all-in-one device; Determining a target synchronization mode according to the preset synchronization state; Determining a target compression parameter according to the content type of the clipboard content, and obtaining compressed data according to the target compression parameter and the clipboard content; The compressed data is synchronized to the target device through the target synchronization mode, so that the clipboard content is utilized after the compressed data is decompressed by the target device.
2. The method for synchronizing clipboard contents of an all-in-one device according to claim 1, characterized in that: Determining the target synchronization mode according to the preset synchronization state includes: When the preset synchronization state indicates that there is a preset synchronization mode, determining a target synchronization mode according to the preset synchronization mode; When the preset synchronization state indicates that there is no preset synchronization mode, the network stability of the connection network of the all-in-one device is detected. When the network stability is characterized as stable, the target synchronization mode is determined to be server synchronization. When the network stability is characterized as unstable, the target synchronization mode is determined to be synchronization with a direct connection.
3. The method for synchronizing clipboard contents of an all-in-one device according to claim 2, characterized in that: The step of synchronizing the compressed data to the target device by means of the target synchronization method includes: When the target synchronization mode is server synchronization, the compressed data is synchronized to the server, and the compressed data is synchronized to the target device through the server; When the target synchronization mode is direct synchronization, a P2P connection between the integrated device and the target device is established via Bluetooth or WiFi, and the compressed data is directly synchronized from the integrated device to the target device via the P2P connection.
4. The method for synchronizing clipboard contents of an all-in-one device according to any one of claims 1 to 3, characterized in that: Determining the target compression parameter according to the content type of the clipboard content includes: When the content type includes text, determining a text compression algorithm; When the content type includes pictures, determining a lossless compression algorithm or a lossy compression algorithm according to different types of pictures; When the content type includes files, a target compression algorithm corresponding to the target compression format is determined.
5. The method for synchronizing clipboard contents of an all-in-one device according to claim 4, characterized in that: The obtaining of compressed data according to the target compression parameter and the clipboard content includes: Encoding the clipboard content, and encrypting the encoded clipboard content by using an encryption algorithm to obtain encrypted data; The encrypted data is compressed using the target compression parameter to obtain compressed data.
6. The method for synchronizing clipboard contents of an all-in-one device according to any one of claims 1 to 3, characterized in that: The method further comprises: When the target device acquires the clipboard content, semantic analysis is performed on the text of the clipboard content, and the clipboard content is automatically classified and stored according to the content type; According to the semantic analysis result, other clipboard contents related to the clipboard contents and related operations on the clipboard contents are recommended.
7. The method for synchronizing clipboard contents of an all-in-one device according to any one of claims 1 to 3, characterized in that: The method further comprises: If the target device includes several sub-devices, when the all-in-one device or each sub-device changes the clipboard content, a clipboard version of the changed clipboard content is generated respectively, and the clipboard version is synchronized to the server, wherein the clipboard version includes the changed clipboard content and the timestamp of the change; When the timestamps of the clipboard versions corresponding to the integrated device and at least one of the sub-devices or at least two of the sub-devices are the same, determining a conflict situation; When a conflict is determined, the user is prompted to perform manual operations to select a target clipboard version, or to merge the changed clipboard content to determine the target clipboard version; The target clipboard version is retained in the server.
8. A clipboard content synchronization device for an all-in-one device, characterized in that: include: A first determination module, used to determine the clipboard content and preset synchronization status of the all-in-one device; A second determination module, used to determine a target synchronization mode according to the preset synchronization state; A compression module, used to determine a target compression parameter according to the content type of the clipboard content, and obtain compressed data according to the target compression parameter and the clipboard content; The synchronization module is used to synchronize the compressed data to the target device through the target synchronization mode, so as to utilize the clipboard content after decompressing the compressed data through the target device.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
