Data storage sharing optimization method and device, equipment and storage medium
By comparing the data activity of opposite devices and local devices in the device network and transmitting stored data to low-activity devices, the problem of insufficient storage space for high-frequency use devices is solved, and more efficient data storage and network system stability is achieved.
Patent Information
- Application Number
- CN202411998312.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-30
AI Technical Summary
In the case of equipment networking, high-frequency equipment used in high-frequency results in performance degradation and affects the stable operation and service quality of the entire network system.
By obtaining the data activity of the opposite device connected to the network, and comparing it with the local device, if the activity of the opposite device is low, the local storage data is transmitted to the opposite device for storage, making full use of the idle storage space.
It effectively avoids the problem of insufficient storage capacity of high-activity devices, makes full use of the idle storage space of low-activity devices, improves data storage efficiency, and ensures device performance and network system stability.
Smart Images

Figure CN120066405A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data storage, and particularly to a method, device, equipment and storage medium for optimizing data storage and sharing. Background Art
[0002] When devices are networked for use, it usually involves multiple devices working together to achieve specific functions or services. Each device undertakes different functions according to its design purpose and application scenario, so the communication volume (i.e., usage frequency) between them will also vary. For example, the usage frequency of a neck massager is low, while a smart ring collects data at a high frequency for a long time. Due to the limited storage space of the smart ring, the device faces the problem of insufficient data storage space. This will not only affect the performance of the device itself, but may also further affect the stable operation and service quality of the entire network system.
[0003] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for optimizing data storage and sharing, aiming to solve the technical problem of insufficient storage space of devices with high frequency usage in networking in the prior art.
[0005] To achieve the above purpose, this application proposes a method for optimizing data storage and sharing, and the method for optimizing data storage and sharing includes:
[0006] Obtain the first data activity of the opposite device connected to the network, and compare the level of the first data activity with the local data activity;
[0007] When the first data activity is lower than the local data activity, transmit the locally stored data to the opposite device connected to the network for storage.
[0008] In one embodiment, the step of transmitting the locally stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity includes:
[0009] When the first data activity is lower than the local data activity, obtain the first storage space status of the opposite device;
[0010] Judge whether the first storage space status exceeds the first preset storage threshold;
[0011] If so, transmit the locally stored data to the opposite device connected to the network for storage.
[0012] In one embodiment, after the step of determining whether the state of the first storage space exceeds a first preset storage threshold, the following steps are further included:
[0013] If not, obtain the state of the local storage space;
[0014] Determine whether the state of the local storage space exceeds a second preset storage threshold;
[0015] If not, use the currently read / written data to overwrite the local stored data with an earlier time.
[0016] In one embodiment, after the step of determining whether the state of the first storage space exceeds a first preset storage threshold, the following steps are further included:
[0017] If not, generate a prompt message, transmit the prompt message to the communication terminal, and drive the communication terminal to send a data cleaning reminder.
[0018] In one embodiment, after the step of transmitting the local stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity, the following steps are further included:
[0019] Obtain the opposite stored data sent by the opposite device;
[0020] Compare the opposite stored data with the local stored data, and obtain the same data information that coincides between the local stored data and the opposite stored data;
[0021] Delete the same data information from the local stored data.
[0022] In one embodiment, the step of comparing the opposite stored data with the local stored data and obtaining the same data information that coincides between the local stored data and the opposite stored data includes:
[0023] Compare the opposite stored data with the local stored data, and obtain the same type of data included in both the opposite stored data and the local stored data;
[0024] Determine the first sampling time of the same type of data in the opposite stored data and the second sampling time of the same type of data in the local stored data;
[0025] Obtain the same type of data within a preset time range between the first sampling time and the second sampling time as the same data information.
[0026] In one embodiment, before the step of obtaining the first data activity of the opposite device connected to the network and comparing the levels of the first data activity and the local data activity, the following steps are further included:
[0027] Obtain the first sampling frequency of the opposite device within a preset sampling time and the second sampling frequency of the local stored data;
[0028] Use the first sampling frequency as the first data activity level and use the second sampling frequency as the local data activity level.
[0029] In addition, to achieve the above object, the present application also proposes a data storage and sharing optimization device, which includes:
[0030] A data acquisition module, configured to obtain the first data activity level of an opposite device connected to a network, and compare the high and low of the first data activity level and the local data activity level;
[0031] A storage allocation module, configured to transfer local stored data to the opposite device connected to the network for storage when the first data activity level is lower than the local data activity level.
[0032] In addition, to achieve the above object, the present application also proposes a data storage and sharing optimization device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the data storage and sharing optimization method as described above.
[0033] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the data storage and sharing optimization method as described above.
[0034] The present application provides a data storage and sharing optimization method. First, the present application obtains the first data activity level of an opposite device connected to a network, and compares the high and low of the first data activity level and the local data activity level; when the first data activity level is lower than the local data activity level, transfer local stored data to the opposite device connected to the network for storage. By transferring the stored data of a device with high activity level to the memory of a device with low activity level for storage, the problem of insufficient storage capacity of a device with high activity level is avoided, and the idle storage space is fully utilized, so that as much data as possible can be stored. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 It is a schematic flowchart of the first embodiment of the data storage sharing optimization method of the present application;
[0038] Figure 2 It is a schematic flowchart provided by the second embodiment of the data storage sharing optimization method of the present application;
[0039] Figure 3 It is a schematic flowchart of the overwriting workflow provided by the second embodiment of the data storage sharing optimization method of the present application;
[0040] Figure 4 It is a schematic flowchart provided by the third embodiment of the data storage sharing optimization method of the present application;
[0041] Figure 5 It is a schematic flowchart of the same type data judgment provided by the third embodiment of the data storage sharing optimization method of the present application;
[0042] Figure 6 It is a schematic module structure diagram of the data storage sharing optimization device in the embodiment of the present application;
[0043] Figure 7 It is a schematic structure diagram of the data storage sharing optimization device for the hardware operating environment involved in the data storage sharing optimization method in the embodiment of the present application.
[0044] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0046] To better understand the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings of the specification and the specific implementation manners.
[0047] The main solution of the embodiment of the present application is: obtaining the first data activity of the opposite device connected to the network, comparing the level of the first data activity with the local data activity; when the first data activity is lower than the local data activity, transmitting the locally stored data to the opposite device connected to the network for storage.
[0048] Since each device undertakes different functions according to its design purpose and application scenario, the communication volume (i.e., usage frequency) between them will also vary. For example, the usage frequency of a neck massager is low, while a smart ring collects data at a high frequency for a long time. Due to the limited storage space of the smart ring, the device faces the problem of insufficient data space storage. This will not only affect the performance of the device itself, but may also further affect the stable operation and service quality of the entire network system.
[0049] This application provides a solution. By transferring the stored data of high-activity devices to the memory of low-activity devices for storage, the problem of insufficient storage capacity of high-activity devices can be avoided, and the idle storage space can be fully utilized to store as much data as possible.
[0050] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a data storage sharing optimization device that can implement the above functions. The following takes the data storage sharing optimization device as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the embodiment of this application provides a data storage sharing optimization method, referring to Figure 1 , Figure 1 which is the schematic flowchart of the first embodiment of the data storage sharing optimization method of this application.
[0052] In this embodiment, the data storage sharing optimization method includes steps S10 to S20:
[0053] Step S10: Obtain the first data activity of the peer device connected to the network, and compare the level of the first data activity with the local data activity.
[0054] It should be noted that the peer device and the local device are both data storage sharing optimization devices. Multiple data storage sharing optimization devices can be networked through wireless or wired communication methods. Wired communication uses physical connection media for data transmission, such as Ethernet, optical fiber, and telephone lines. Wireless communication uses media such as electromagnetic waves for data transmission, such as Bluetooth and WIFI. This embodiment takes the networking of multiple data storage sharing optimization devices through Bluetooth as an example.
[0055] It should be understood that the first data activity level can be the activity level of data reading and writing in the peer device that is Bluetooth networked with the local device. The local data activity level can be the activity level of data reading and writing in the local device. The first sampling frequency of the peer device and the second sampling frequency of the locally stored data can be obtained within a preset sampling time; the first sampling frequency is used as the first data activity level, and the second sampling frequency is used as the local data activity level. For example, the smart ring automatically collects data basically every 1 minute, while the neck massager generally only collects data when the user is using it (possibly once a day according to the user's usage habits). Therefore, it can be judged that the data activity level of the smart ring is higher than that of the neck massager.
[0056] Step S20: When the first data activity level is lower than the local data activity level, transmit the locally stored data to the peer device connected by the network for storage.
[0057] It should be noted that when the first data activity level is lower than the local data activity level, it means that the activity level (usage frequency) of the local device in the Bluetooth networked devices exceeds that of the peer device. The local device is more likely to have a situation of insufficient storage space. Therefore, it is necessary to transmit the locally stored data of the local device to the peer device and use the idle storage space of the peer device for storage.
[0058] In this embodiment, the data storage sharing optimization method obtains the first data activity level of the peer device connected by the network, compares the first data activity level with the local data activity level; when the first data activity level is lower than the local data activity level, transmits the locally stored data to the peer device connected by the network for storage. By transferring the stored data of the device with high activity level to the memory of the device with low activity level for storage, the problem of insufficient storage capacity of the device with high activity level is avoided, and the idle storage space is fully utilized, so that more data can be stored as much as possible.
[0059] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as that in the above-mentioned embodiment one can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 2 , Figure 2 is the flowchart provided for the second embodiment of the data storage sharing optimization method of the present application. In step S20, the data storage sharing optimization method includes:
[0060] Step S201: When the first data activity level is lower than the local data activity level, obtain the first storage space status of the peer device.
[0061] It should be understood that although the activity of the first data is lower than that of the local data, due to the different hardware of different devices, the different internal storage space sizes and different service lives. Therefore, the opposite device with lower data activity may also have a problem of insufficient storage space. Therefore, before transferring the locally stored data to the opposite device, it is necessary to first determine whether the storage space of the opposite device is sufficient. The first storage space state may be the proportion state of the space for un-stored data outside the occupied space of the data already stored in the opposite device to the total storage space.
[0062] Step S202: Determine whether the first storage space state exceeds a first preset storage threshold.
[0063] It should be noted that the memory of a general device will not be completely filled with data, and a certain amount of storage space needs to be reserved for the function of reading, writing and storing data. For example, 20% of the storage space can be set aside for reading, writing and storing data, and the first preset storage threshold can be set to 20%. Among them, the first preset storage threshold can also be set according to actual usage requirements. In this embodiment, 20% is used as an example for illustration and is not specifically limited. When the first storage space state exceeds the first preset storage threshold, that is, the proportion of the remaining un-stored space in the opposite device exceeds 20%, and the occupied space does not reach 80%, so the opposite device still has the ability to store data. When the first storage space state does not exceed the first preset storage threshold, that is, the proportion of the remaining un-stored space in the opposite device does not exceed 20%, and the occupied space reaches 80%, so the opposite device does not have the ability to store data at this time.
[0064] Step S203: If so, transfer the locally stored data to the opposite device connected to the network for storage.
[0065] It should be noted that when the first storage space state exceeds the first preset storage threshold, the opposite device still has the ability to store data and can directly transfer the locally stored data in the local device to the storage space of the opposite device for storage.
[0066] Refer to Figure 3 , Figure 3 , which is a schematic diagram of the overwriting workflow provided by the second embodiment of the data storage sharing optimization method of this application. After step S202, it further includes:
[0067] Step S301: If not, obtain the local storage space state.
[0068] It should be noted that after determining that the first storage space status of the peer device does not exceed the first preset storage threshold, that is, the peer device does not have data storage capacity at this time, the storage space status of the local device is judged. The local storage space status may be the proportion status of the un-stored data space to the total storage space excluding the occupied space of the data already stored in the local device.
[0069] Step S302: Determine whether the local storage space status exceeds the second preset storage threshold.
[0070] Step S303: If not, use the currently read / written data to overwrite the locally stored data with an earlier time.
[0071] Similar to the judgment method of the peer device above, the second preset storage threshold can also be set according to actual usage requirements, and can be set the same as the threshold of the peer device (both are 20%), or can be set differently (for example, 25% for the local device and 20% for the peer device).
[0072] It should be noted that after determining that the peer device does not have data storage capacity at this time, the locally stored data will not be transferred to an external device for storage anymore. If the storage space of the local device itself is also insufficient, the currently read / written data will circularly overwrite the data with an earlier time (the earliest time) in the locally stored data.
[0073] Furthermore, after determining that the peer device does not have data storage capacity at this time, a prompt message can also be generated, and the prompt message is transmitted to the communication terminal to drive the communication terminal to send a data cleaning reminder. Among them, the prompt message can be a communication signal for prompting that the space of the peer device is insufficient and space cleaning is required. The communication terminal can be a mobile terminal (such as an app of a mobile phone or a computer) communicatively connected to the local device. After receiving the prompt message, the terminal can prompt the peer terminal to perform memory cleaning through message notification push. The user can link the device to the terminal or the cloud to transfer the data to the terminal or the cloud to complete the data cleaning. Similarly, when it is determined that the local storage space is insufficient, information can also be sent to the terminal for reminder.
[0074] In this embodiment, when the first data activity is lower than the local data activity, the first storage space status of the peer device is obtained; it is judged whether the first storage space status exceeds the first preset storage threshold; if so, the locally stored data is transmitted to the peer device connected by networking for storage. If not, the local storage space status is obtained; it is judged whether the local storage space status exceeds the second preset storage threshold; if not, the currently read / written data is used to overwrite the locally stored data with an earlier time. While not interfering with the normal operation of the device, the idle space is fully utilized to store as much corresponding data as possible.
[0075] Based on the first and second embodiments of the present application, in the third embodiment of the present application, for the same or similar content as in the above-mentioned first and second embodiments, reference may be made to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 4 , Figure 4 which is a schematic flowchart provided for the third embodiment of the data storage and sharing optimization method of the present application. After step S10, the data storage and sharing optimization method includes:
[0076] Step S401: Obtain the peer storage data sent by the peer device.
[0077] Step S402: Compare the peer storage data with the local storage data, and obtain the same data information that coincides between the local storage data and the peer storage data.
[0078] Step S403: Delete the same data information from the local storage data.
[0079] It should be noted that the peer storage data may be the data stored in the peer device. The same data information may be the same data information in the local storage data and the peer storage data. Among multiple data storage and sharing optimization devices in a network, different devices may store duplicate same data. For example, blood oxygen data or heart rate data is stored in both a neck massager and a smart ring. Only the data provided by one device is needed, so the data stored in the other device occupies storage space and can be cleared.
[0080] It should be understood that the local device can obtain the peer storage data of the peer device and determine that the data information that exists in the peer storage data and is the same as the local storage data is the same data information.
[0081] Refer to Figure 5 , Figure 5 which is a schematic flowchart for determining the same type of data provided for the third embodiment of the data storage and sharing optimization method of the present application. Refer to Figure 5 , in step S402, the data storage and sharing optimization method includes:
[0082] Step S501: Compare the peer storage data with the local storage data, and obtain the same type of data included in both the peer storage data and the local storage data.
[0083] Step S502: Determine the first sampling time of the same type of data in the peer storage data and the second sampling time of the same type of data in the local storage data.
[0084] Step S503: Obtain the same type of data within the preset time range of the first sampling time and the second sampling time as the same data information.
[0085] It should be noted that the same data information in the data stored on the opposite side and the data stored locally can be the same type of data with a highly overlapping time period. For example, the blood oxygen data of a neck massager and a smart ring between 1 o'clock and 3 o'clock can be regarded as the same data information. However, if the sampling times of the blood oxygen data differ greatly, the blood oxygen data stored in the two devices is not the same data information.
[0086] It should be understood that the same type of data can be the data with the same type in the data stored on the opposite side and the data stored locally, such as blood oxygen data, heart rate data, etc. The time when the same type of data is sampled in the data stored on the opposite side is recorded as the first sampling time, and the time when it is sampled in the locally stored data is recorded as the second sampling time. If the first sampling time and the second sampling time are within a preset time range (such as 2 hours), the same type of data is determined to be the same data information. The preset time range can be set according to actual needs and will not be specifically limited here.
[0087] In this embodiment, after the step of transmitting the locally stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity, the opposite stored data sent by the opposite device is obtained; the opposite stored data is compared with the locally stored data to obtain the same data information that overlaps between the locally stored data; and the same data information is deleted from the locally stored data. This can improve the storage efficiency of data and avoid the same data occupying different spaces.
[0088] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the data storage sharing optimization method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0089] The present application also provides a data storage sharing optimization device. Please refer to Figure 6 , the data storage sharing optimization device includes:
[0090] A data acquisition module 10, configured to obtain the first data activity of an opposite device connected to the network and compare the level of the first data activity with the local data activity.
[0091] A storage allocation module 20, configured to transmit the locally stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity.
[0092] Optionally, the storage allocation module 20 is further configured to obtain the first storage space status of the peer device when the first data activity is lower than the local data activity; determine whether the first storage space status exceeds a first preset storage threshold; if so, transmit the local stored data to the peer device connected to the network for storage.
[0093] Optionally, after determining whether the first storage space status exceeds the first preset storage threshold, if the result is negative, the storage allocation module 20 is further configured to obtain the local storage space status; determine whether the local storage space status exceeds a second preset storage threshold; if not, use the currently read / written data to overwrite the local stored data with an earlier time.
[0094] Optionally, after determining whether the first storage space status exceeds the first preset storage threshold, if the result is negative, the storage allocation module 20 is further configured to generate a prompt message, transmit the prompt message to the communication terminal, and drive the communication terminal to send a data cleaning reminder.
[0095] Optionally, the storage allocation module 20 is further configured to obtain the peer stored data sent by the peer device; compare the peer stored data with the local stored data to obtain the same data information that overlaps between the local stored data and the peer stored data; delete the same data information from the local stored data.
[0096] Optionally, the storage allocation module 20 is further configured to compare the peer stored data with the local stored data to obtain the same type of data included in both the peer stored data and the local stored data; determine the first sampling time of the same type of data in the peer stored data and the second sampling time of the same type of data in the local stored data; obtain the same type of data within a preset time range between the first sampling time and the second sampling time as the same data information.
[0097] Optionally, the storage allocation module 20 is further configured to obtain the first sampling frequency of the peer device and the second sampling frequency of the local stored data within a preset sampling time; use the first sampling frequency as the first data activity and use the second sampling frequency as the local data activity.
[0098] The data storage and sharing optimization device provided in this application adopts the data storage and sharing optimization method in the above embodiment, and can solve the technical problem of insufficient storage space of devices frequently used in the network. Compared with the prior art, the beneficial effects of the data storage and sharing optimization device provided in this application are the same as those of the data storage and sharing optimization method provided in the above embodiment, and other technical features in the data storage and sharing optimization device are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0099] The present application provides a data storage and sharing optimization device. The data storage and sharing optimization device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data storage and sharing optimization method in the first embodiment above.
[0100] Reference is made below Figure 7 , which shows a schematic structural diagram of a data storage and sharing optimization device suitable for implementing the embodiments of the present application. The data storage and sharing optimization device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The data storage and sharing optimization device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0101] As Figure 7As shown, the data storage sharing optimization device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the data storage sharing optimization device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the data storage sharing optimization device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a data storage sharing optimization device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.
[0102] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0103] The data storage sharing optimization device provided by the present application adopts the data storage sharing optimization method in the above embodiments, and can solve the technical problem of insufficient storage space of devices frequently used in networking. Compared with the prior art, the beneficial effects of the data storage sharing optimization device provided by the present application are the same as those of the data storage sharing optimization method provided by the above embodiments, and other technical features in the data storage sharing optimization device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0104] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0105] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0106] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the data storage sharing optimization method in the above embodiments.
[0107] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0108] The above computer-readable storage medium can be included in the data storage sharing optimization device; it can also exist separately without being assembled into the data storage sharing optimization device.
[0109] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0111] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0112] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned data storage sharing optimization method, and can solve the technical problem of insufficient storage space of frequently used devices in networking. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the data storage sharing optimization method provided by the above embodiments, and will not be elaborated here.
[0113] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A data storage sharing optimization method, characterized in that: The data storage sharing optimization method comprises: Acquire a first data activity of a peer device connected to the network, and compare the first data activity with a local data activity; When the first data activity is lower than the local data activity, the locally stored data is transmitted to the opposite device connected by the network for storage.
2. The data storage sharing optimization method according to claim 1, characterized in that: The step of transmitting the locally stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity includes: When the first data activity is lower than the local data activity, obtaining a first storage space state of the opposite device; Determining whether the first storage space state exceeds a first preset storage threshold; If so, the locally stored data is transmitted to the opposite device connected by the network for storage.
3. The data storage sharing optimization method according to claim 2, characterized in that: After the step of determining whether the first storage space state exceeds a first preset storage threshold, the method further includes: If not, obtain the local storage space status; Determining whether the local storage space status exceeds a second preset storage threshold; If not, the currently read and written data is used to overwrite the locally stored data with an earlier time.
4. The data storage sharing optimization method according to claim 3, characterized in that: After the step of determining whether the first storage space state exceeds a first preset storage threshold, the method further includes: If not, a prompt message is generated, and the prompt message is transmitted to the communication terminal, driving the communication terminal to issue a data cleaning reminder.
5. The data storage sharing optimization method according to claim 1, characterized in that: After the step of transmitting the locally stored data to the opposite device connected to the network for storage when the first data activity is lower than the local data activity, the method further includes: Obtain the opposite side storage data sent by the opposite side device; Comparing the opposite-side stored data with the local stored data, and acquiring identical data information in the local stored data that overlaps with the opposite-side stored data; The same data information is deleted from the local storage data.
6. The data storage sharing optimization method according to claim 5, characterized in that: The step of comparing the opposite-side stored data with the local stored data to obtain the same data information in the local stored data that overlaps with the opposite-side stored data includes: Comparing the opposite-side stored data with the local stored data, and acquiring the same data contained in both the opposite-side stored data and the local stored data; Determine a first sampling time of the same type of data in the opposite-side stored data and a second sampling time of the locally stored data; The same data obtained at the first sampling time and the second sampling time within a preset time range is the same data information.
7. The data storage sharing optimization method according to claim 1, characterized in that: Before the step of obtaining the first data activity of the opposite device connected to the network and comparing the first data activity with the local data activity, the method further includes: Acquire a first sampling frequency of the opposite device and a second sampling frequency of the locally stored data within a preset sampling time; The first sampling frequency is used as the first data activity, and the second sampling frequency is used as the local data activity.
8. A data storage sharing optimization device, characterized in that: The device comprises: A data acquisition module, used for acquiring first data activity of a network-connected opposite-side device, and comparing the first data activity with local data activity; The storage allocation module is used to transmit the locally stored data to the opposite-side device connected to the network for storage when the first data activity is lower than the local data activity.
9. A data storage sharing optimization device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data storage sharing optimization method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data storage sharing optimization method according to any one of claims 1 to 7 are implemented.