File storage method, system, device and electronic equipment

By pre-stored target files on the client device, the problem of network lag caused by excessive server bandwidth during peak user usage periods is solved, and the operating efficiency of the server is improved.

CN115834697BActive Publication Date: 2024-09-06BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211436404.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2024-09-06
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

During the peak period when users use the video app, excessive server bandwidth causes network lag, affecting server operating efficiency.

Method used

Based on the historical interaction records of the client device, the target client device is determined and a pre-storage instruction is sent to it so that it can store the target file in advance, thus avoiding the client from intensively requesting files within the same time period and reducing server bandwidth.

Benefits of technology

It effectively avoids server freezes caused by excessive bandwidth and improves server operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834697B
    Figure CN115834697B
Patent Text Reader

Abstract

The embodiment of the present invention provides a file storage method, system, device and electronic device for the field of file storage technology. The method is applied to a file management system, which includes a server and multiple client devices, and the method includes: the server determines at least one target client device based on the historical interaction records of multiple client devices, and determines the target file corresponding to each target client device; the server generates a pre-storage instruction carrying a target identifier of the target file, and sends the pre-storage instruction to the target client device; the target client device receives the pre-storage instruction and sends a file acquisition request carrying the target identifier to the server; the server receives the file acquisition request and sends the target file to the target client device; the target client device receives the target file and stores the target file. Compared with the prior art, the solution provided by the embodiment of the present application can improve the efficiency of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of file storage technology, and in particular to a file storage method, system, device and electronic equipment. Background Art

[0002] With the continuous development of electronic technology, more and more users choose to obtain various multimedia files through video apps (Applications, mobile software) installed on various electronic devices, for example, watching videos, reading books, etc.

[0003] According to statistics, the peak time period for users to use apps in a day is closely related to the users' rest time and the update period of various multimedia files. For each day in a statistical cycle, the peak time period is relatively stable.

[0004] However, during the peak period when users use the App, the bandwidth used by the server providing services for the App is relatively large. When the bandwidth is relatively large, network freezes and slow network speeds may occur, resulting in server freezes or reduced response speeds, which in turn affects the operating efficiency of the server. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a file storage method, system, device and electronic device to improve the operating efficiency of the server. The specific technical solution is as follows:

[0006] In a first aspect of the present invention, a file storage method is provided, which is applied to a file management system, wherein the system includes a server and a plurality of client devices, and the method includes:

[0007] The server determines at least one target client device based on the historical interaction records of the multiple client devices, and determines a target file corresponding to each target client device; wherein the target file is a file whose specified historical interaction record of the set meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses to the operation instructions of each file in the set to which the target file belongs;

[0008] The server generates a pre-stored instruction carrying a target identifier of the target file, and sends the pre-stored instruction to the target client device;

[0009] The target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server;

[0010] The server receives the file acquisition request and sends the target file to the target client device;

[0011] The target client device receives the target file and stores the target file.

[0012] Optionally, in a specific implementation, the method further includes:

[0013] The target client device determines whether the current time is earlier than the file publishing time of the target file;

[0014] If not, the target client device reads the target file from the local storage space based on the operation instruction for the target file, and performs the operation indicated by the operation instruction on the target file.

[0015] Optionally, in a specific implementation manner, the server sending the pre-stored instruction to the target client includes:

[0016] If the current time is earlier than the file publishing time, the target client device sets the display state of the target file to an invisible state.

[0017] Optionally, in a specific implementation, the server determines at least one target client based on historical interaction records of the multiple clients, including:

[0018] When the server meets the preset conditions at the current moment, the server determines the target number of target client devices according to the current bandwidth used by the server at the current moment, and determines the target number of target client devices based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

[0019] Optionally, in a specific implementation, the server sends the pre-stored instruction to the target client device, including:

[0020] When the server detects that the target client device turns on a preset push function, the server pushes the pre-stored instruction to the target client device.

[0021] Optionally, in a specific implementation, the method further includes:

[0022] The client device sends an instruction acquisition request to the server according to a preset period;

[0023] The server receives the instruction acquisition request;

[0024] The server sends the pre-stored instruction to the target client device, including:

[0025] After generating the pre-stored instruction, the server sends the pre-stored instruction to the target client device upon receiving the instruction acquisition request.

[0026] Optionally, in a specific implementation, the target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server, including:

[0027] The target client device receives the pre-stored instruction, and when the device state of the target client device meets a preset state condition, sends a file acquisition request carrying the target identifier to the server;

[0028] The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

[0029] Optionally, in a specific implementation, the target client device is in an online state.

[0030] In a second aspect of the present invention, a file storage method is provided, which is applied to a server in a file management system, wherein the system further includes a plurality of client devices, and the method includes:

[0031] Based on the historical interaction records of the multiple client devices, at least one target client device is determined, and a target file corresponding to each target client device is determined; wherein the target file is a file whose specified historical interaction record of the set meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses to the operation instructions of each file in the set to which the target file belongs;

[0032] Generate a pre-stored instruction carrying a target identifier of the target file, and send the pre-stored instruction to the target client device, so that the target client receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server;

[0033] The file acquisition request is received, and the target file is sent to the target client device, so that the target client device receives the target file and stores the target file.

[0034] Optionally, in a specific implementation, the determining at least one target client device based on historical interaction records of the multiple client devices includes:

[0035] When the preset conditions are met at the current moment, the target number of target client devices is determined according to the current bandwidth used by itself at the current moment, and the target number of target client devices is determined based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

[0036] Optionally, in a specific implementation manner, the sending the pre-stored instruction to the target client device includes:

[0037] When it is detected that the target client device turns on a preset push function, the pre-stored instruction is pushed to the target client device.

[0038] Optionally, in a specific implementation, the method further includes:

[0039] Receiving a request for obtaining a command sent by the client device according to a preset period;

[0040] The sending the pre-stored instruction to the target client device includes:

[0041] After the pre-stored instruction is generated, upon receiving the instruction acquisition request, the pre-stored instruction is sent to the target client device.

[0042] Optionally, in a specific implementation, the target client device is in an online state.

[0043] In a third aspect of the implementation of the present invention, there is also provided a file storage method, which is applied to at least one target client device among a plurality of client devices in a file management system, the system further comprising a server, the method comprising:

[0044] Receive a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and send a file acquisition request carrying the target identifier to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on historical interaction records of the multiple client devices; the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0045] The target file is received and stored.

[0046] Optionally, in a specific implementation, the method further includes:

[0047] Determine whether the current time is earlier than the file release time of the target file;

[0048] If not, based on the operation instruction for the target file, the target file is read from the local storage space, and the operation indicated by the operation instruction is performed on the target file.

[0049] Optionally, in a specific implementation, the method further includes:

[0050] If the current time is earlier than the file publishing time, the display state of the target file is set to an invisible state.

[0051] Optionally, in a specific implementation, the method further includes:

[0052] According to a preset cycle, an instruction acquisition request is sent to the server so that the server receives the instruction acquisition request, and after generating the pre-stored instruction, when receiving the instruction acquisition request, the server sends the pre-stored instruction to the target client device.

[0053] Optionally, in a specific implementation manner, the receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server includes:

[0054] receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server when the device state meets a preset state condition;

[0055] The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

[0056] Optionally, in a specific implementation, the target client device is in an online state.

[0057] In a fourth aspect of the implementation of the present invention, there is also provided a file management system, the system comprising a server and a plurality of client devices;

[0058] The server is used to determine at least one target client device based on the historical interaction records of the multiple client devices, and determine the target file corresponding to each target client device; generate a pre-stored instruction carrying the target identifier of the target file, and send the pre-stored instruction to the target client device; receive a file acquisition request carrying the target identifier sent by the client, and send the target file to the target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0059] The client device is used to receive the pre-storage instruction, send the file acquisition request to the server, receive the target file, and store the target file.

[0060] In a fifth aspect of the present invention, there is also provided a file storage device, which is applied to a server in a file management system, wherein the system further comprises a plurality of client devices, and the device comprises:

[0061] A determination module, configured to determine at least one target client device based on the historical interaction records of the plurality of client devices, and determine a target file for each target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: a response time and a response number of operation instructions for each file in the set to which the target file belongs;

[0062] An instruction generation module is used to generate a pre-stored instruction carrying a target identifier of the target file, and send the pre-stored instruction to the target client device, so that the target client receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server;

[0063] The request receiving module is used to receive the file acquisition request and send the target file to the target client device, so that the target client device receives the target file and stores the target file.

[0064] Optionally, in a specific implementation, the determining module is specifically used to:

[0065] When the preset conditions are met at the current moment, the target number of target client devices is determined according to the current bandwidth used by itself at the current moment, and the target number of target client devices is determined based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

[0066] Optionally, in a specific implementation, the instruction generation module is specifically used to:

[0067] When it is detected that the target client device turns on a preset push function, the pre-stored instruction is pushed to the target client device.

[0068] Optionally, in a specific implementation, the device further includes:

[0069] A request receiving module, used to receive a request for obtaining a sending instruction from the client device according to a preset period;

[0070] The instruction generation module is specifically used for:

[0071] After the pre-stored instruction is generated, upon receiving the instruction acquisition request, the pre-stored instruction is sent to the target client device.

[0072] Optionally, in a specific implementation, the target client device is in an online state.

[0073] In a sixth aspect of the implementation of the present invention, there is also provided a file storage device, which is applied to at least one target client device among a plurality of client devices in a file management system, wherein the system further comprises a server, and the device comprises:

[0074] The instruction receiving module is used to receive a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and send a file acquisition request carrying the target identifier to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on historical interaction records of the multiple client devices; the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0075] The storage module is used to receive the target file and store the target file.

[0076] Optionally, in a specific implementation, the device further includes:

[0077] A judgment module, used to judge whether the current time is earlier than the file release time of the target file; if not, triggering the execution module;

[0078] The execution module is used to read the target file from the local storage space based on the operation instruction for the target file, and execute the operation indicated by the operation instruction on the target file.

[0079] Optionally, in a specific implementation, the device further includes:

[0080] A setting module is used to set the display state of the target file to an invisible state if the current time is earlier than the file publishing time.

[0081] Optionally, in a specific implementation, the device further includes:

[0082] The sending module is used to send an instruction acquisition request to the server according to a preset period, so that the server receives the instruction acquisition request, and after generating the pre-stored instruction, when receiving the instruction acquisition request, sends the pre-stored instruction to the target client device.

[0083] Optionally, in a specific implementation, the instruction receiving module is specifically used to:

[0084] receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server when the device state meets a preset state condition;

[0085] The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

[0086] Optionally, in a specific implementation, the target client device is in an online state.

[0087] In a seventh aspect of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0088] Memory, used to store computer programs;

[0089] The processor is used to implement any of the above-mentioned method steps when executing the program stored in the memory.

[0090] In another aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned method steps is implemented.

[0091] In yet another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-described method steps.

[0092] Beneficial effects of the embodiments of the present invention:

[0093] As can be seen from the above, an embodiment of the present invention provides a file storage method, which is applied to a file management system, and the system includes a server and multiple client devices. The server can first determine at least one target client device based on the historical interaction records of multiple client devices, and determine the target file whose specified historical interaction record of the set corresponding to each target client device meets the preset storage condition; in this way, the server can generate a pre-storage instruction carrying the target identifier of the target file, and send the pre-storage instruction to the target client device; thereafter, the target client device can receive the above pre-storage instruction and send a file acquisition request carrying the target identifier to the server, so that the server can receive the above file acquisition request and send the target file to the target client device, so that the target client device can receive the target file and store the target file.

[0094] Based on this, a file storage method provided by an embodiment of the present invention is applied, and the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device, so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and then improving the operation efficiency of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0096] Figure 1 A schematic diagram of a process flow of a file storage method provided by an embodiment of the present invention;

[0097] Figure 2 A schematic diagram of a file management system provided by an embodiment of the present invention;

[0098] Figure 3 A schematic diagram of a flow chart of another file storage method provided by an embodiment of the present invention;

[0099] Figure 4 A specific example diagram of a file storage method provided by an embodiment of the present invention;

[0100] Figure 5 A flowchart of another file storage method provided by an embodiment of the present invention;

[0101] Figure 6 A flowchart of another file storage method provided by an embodiment of the present invention;

[0102] Figure 7 A schematic diagram of the structure of a file storage device provided by an embodiment of the present invention;

[0103] Figure 8 A schematic diagram of the structure of another file storage device provided by an embodiment of the present invention;

[0104] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0105] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0106] During the peak period when users use the App, the bandwidth used by the server providing services for the App is relatively large. When the bandwidth is large, network freezes and slow network speeds may occur, causing server freezes or reduced response speeds, thereby affecting the server's operating efficiency.

[0107] In order to solve the above technical problems, an embodiment of the present invention provides a file storage method, which can be applied to a file management system, which may include a server and multiple client devices.

[0108] The server in the method can be a cloud server or a local server; and the server can be a single electronic device or a device cluster consisting of multiple electronic devices. Furthermore, each client device in the method can be a variety of electronic devices that can carry an App, such as a mobile phone, a laptop computer, a tablet computer, etc.

[0109] Based on this, the embodiment of the present invention does not specifically limit the execution subject of the method.

[0110] A file storage method provided by an embodiment of the present invention may include the following steps:

[0111] The server determines at least one target client device based on the historical interaction records of the multiple client devices, and determines a target file corresponding to each target client device; wherein the target file is a file whose specified historical interaction record of the set meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses to the operation instructions of each file in the set to which the target file belongs;

[0112] The server generates a pre-stored instruction carrying a target identifier of the target file, and sends the pre-stored instruction to the target client device;

[0113] The target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server;

[0114] The server receives the file acquisition request and sends the target file to the target client device;

[0115] The target client device receives the target file and stores the target file.

[0116] As can be seen from the above, an embodiment of the present invention provides a file storage method, which is applied to a file management system, and the system includes a server and multiple client devices. The server can first determine at least one target client device based on the historical interaction records of multiple client devices, and determine the target file whose specified historical interaction record of the set corresponding to each target client device meets the preset storage condition; in this way, the server can generate a pre-storage instruction carrying the target identifier of the target file, and send the pre-storage instruction to the target client device; thereafter, the target client device can receive the above pre-storage instruction and send a file acquisition request carrying the target identifier to the server, so that the server can receive the above file acquisition request and send the target file to the target client device, so that the target client device can receive the target file and store the target file.

[0117] Based on this, a file storage method provided by an embodiment of the present invention is applied, and the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device, so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for its corresponding target files in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and further improving the operation efficiency of the server.

[0118] A file storage method provided by an embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.

[0119] Figure 1 A schematic diagram of a file storage method provided by an embodiment of the present invention, the method is applied to Figure 2 The file management system shown may include a server 100 and a plurality of client devices 200 .

[0120] The server 100 is used to determine at least one target client device 200 based on the historical interaction records of the multiple client devices 200, and determine the target file corresponding to each target client device 200; generate a pre-stored instruction carrying the target identifier of the target file, and send the pre-stored instruction to the target client device 200; receive a file acquisition request carrying the target identifier sent by the target client device 200, and send the target file to the target client device 200; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets the preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0121] The client device 200 is used to receive the pre-storage instruction, send the file acquisition request to the server 100, receive the target file, and store the target file.

[0122] like Figure 1 As shown, the method may include the following steps S101-S105:

[0123] S101: The server 100 determines at least one target client device 200 based on historical interaction records of multiple client devices 200, and determines a target file corresponding to each target client device 200;

[0124] The target file is a file whose specified historical interaction record of the set to which it belongs meets the preset storage conditions; the specified historical interaction record includes: the response time and response number of the operation instructions for each file in the set to which the target file belongs;

[0125] Typically, a client device 200 can interact with a server 100 that provides services for the client device 200, so that the server 100 can record the interaction records with each client device 200 as historical interaction records of the client device 200, wherein the historical interaction records can record data such as each file obtained by the client device 200, the response time in response to the user's operating instructions for each file, the number of responses in response to the user's operating instructions for each file, and the duration of displaying each file.

[0126] Therefore, in order to avoid bandwidth peaks caused by users sending file acquisition requests in a concentrated manner during a certain period of time, the server 100 can select some client devices 200 from multiple client devices 200, and push files that users of the client devices 200 may want to obtain to the selected client devices 200 in advance. In this way, the selected client devices 200 can pre-store the above files.

[0127] Based on this, the server 100 may determine at least one target client device 200 based on historical interaction records of multiple client devices 200 , and for each target client device 200 , may determine a target file corresponding to the target client device 200 .

[0128] The target file is a file whose specified historical interaction record in the collection meets the preset storage conditions.

[0129] Usually, different users have different viewing habits. For example, user A likes to watch the latest updated video in the recently updated video set B; user C likes to listen to the audios in the updated audio set D in the order of playback; and user E likes to repeatedly watch the video G in the updated video set F, etc. Based on this, for different target client devices 200, the sets to which the above target files belong can be different, and the update degree of the set and the type of the set can be set according to actual needs. For example, the set can be an updated set or an updated set; for another example, the set can be a TV series set, an audio set, or a book set, etc., which are all reasonable and are not specifically limited in the embodiments of the present invention.

[0130] Correspondingly, the number of target files belonging to the set, the degree of update and the type of the target files can be set according to actual needs. For example, the target file can be one file or three files; the target file can be a file that is about to be updated or a file that has been updated; the target file can be a video, an audio, or a book. This is all reasonable. In the embodiments of the present invention, no specific limitation is made to the number, degree of update and type of the above-mentioned target files.

[0131] Optionally, for the updated target file, the target file may be a specified number of files to be played based on the response time and the number of responses of the target client device 200 to the operation instructions of each file in the set to which the target file belongs. For example, the target client device 200 usually plays three videos in the video set in the video arrangement order every day, and the target files may be the three videos to be played in the video arrangement order.

[0132] Optionally, for a target file that has not been updated, a video to be updated is determined based on the response time and number of responses of the target client device 200 to the operation instructions of each file in the set to which the target file belongs.

[0133] Optionally, the server 100 may determine the number of the above target files based on the storage capacity of the target client device 200 and the file size of the target file. For example, when the storage capacity of the target client device 200 is not greater than a preset capacity threshold, the target file may be one file; and when the storage capacity of the target client device 200 is greater than a preset capacity threshold, the target file may be three files. In this way, by dynamically estimating the number of pre-stored target files based on the storage capacity of the target client device 200, the target files may be stored while occupying less storage space of the target client device 200, so as to avoid the target client device 200 from being stuck due to the small remaining storage capacity, thereby avoiding affecting the user experience.

[0134] The above-mentioned specified historical interaction records may include: the response time and number of responses of the target client device 200 to the operation instructions of each file in the collection to which the target file belongs; for example, for the video collection P, the target client device 200 responds to the user's operation instructions for the video files in the video collection P at 8 pm for three consecutive days; for another example, for the audio collection Q, the target client device 200 responds to the user's operation instructions for the updated audio files after the audio files in the audio collection Q are updated for five consecutive days, etc.

[0135] Correspondingly, for different target files and the collections to which the target files belong, the above preset storage conditions may also be different.

[0136] Optionally, for the updated target file, the preset storage condition may be that the number of responses of the target client device 200 to the operation instructions for the files in a file set in the previous day is greater than a preset number threshold, and the response time of the operation instructions for each file in the file set is in a time period when the bandwidth used by the server 100 is at a bandwidth peak;

[0137] Among them, the above-mentioned preset quantity threshold can be set according to actual needs, for example, 3, 5, etc., which are all reasonable and are not specifically limited in the embodiments of the present invention; and, the above-mentioned number of responses to the operation instructions for the files in the file set can be the number of responses to different files in the file set, or the number of responses to the operation instructions for a certain file in the file set, which are all reasonable and are not specifically limited in the embodiments of the present invention.

[0138] Optionally, for target files that have not been updated, the preset storage condition may be that the target client device 200 responds to operation instructions for files updated on the same day in the file set to which the target file belongs within a specified number of consecutive update days, and the response time is in a time period when the bandwidth used by the server 100 is at a bandwidth peak, wherein the above-mentioned specified number may be set according to actual needs, for example, 6, 10, etc., which are all reasonable and are not specifically limited in the embodiments of the present invention; and for the updated files in the file set that have not been updated, the preset storage condition may be the same as the preset storage condition of the above-mentioned file set that has been updated.

[0139] Of course, the above are merely examples of preset storage conditions and are not limitations.

[0140] Optionally, in a specific implementation, the above step S101 may include the following step 11:

[0141] Step 11: When the server 100 meets the preset conditions at the current moment, the server 100 determines the target number of target client devices 200 according to the current bandwidth used by the server 100 at the current moment, and determines the target number of target client devices 200 based on the historical interaction records of the plurality of client devices 200;

[0142] The preset condition includes that the current bandwidth is less than a preset bandwidth threshold.

[0143] In this specific implementation, the server 100 may, when the pressure on the bandwidth used by itself is relatively small, send in advance to a part of the client devices 200 the files that the user using the client device 200 may wish to obtain.

[0144] Based on this, in order to facilitate the determination of the bandwidth pressure of the server 100, a preset bandwidth threshold can be set according to the configuration parameters of the server 100, the operation status of the server 100 under different bandwidths and the actual application requirements. Thus, when the current bandwidth of the server 100 is less than the above-mentioned preset bandwidth threshold, it can be considered that the bandwidth pressure of the current bandwidth used by the server 100 is relatively small. Conversely, when the current bandwidth of the server 100 is not less than the above-mentioned preset bandwidth threshold, it can be considered that the bandwidth pressure of the current bandwidth used by the server 100 is relatively large.

[0145] The preset bandwidth threshold may be set according to actual needs, and may be 100 Mbps (Million bits per second) or 1000 Mbps, which are both reasonable and are not specifically limited in the embodiments of the present invention.

[0146] Furthermore, based on the above-mentioned preset bandwidth threshold, the server 100 can determine the time period with greater bandwidth pressure in each cycle based on the historical data of its own bandwidth usage. In this way, the server 100 can determine each client device 200 that has a file whose specified historical interaction record of the collection meets the preset storage condition within the above-mentioned time period, and further, select a target client device 200 from the above-mentioned client devices 200, and determine the target file corresponding to each target client device 200.

[0147] In this way, when the above-mentioned preset conditions are met at the current moment, the server 100 can determine the target number of target client devices 200 to be determined based on the current bandwidth used by itself at the current moment, and then, based on the historical interaction records of the above-mentioned multiple client devices 200, determine the target number of target client devices 200.

[0148] Among them, the above-mentioned preset condition can be that the current bandwidth is less than the preset bandwidth threshold; or the current time is within the preset specified time period, which is reasonable and is not specifically limited in the embodiment of the present invention. In addition, the above-mentioned specified time period is a time period when the bandwidth of the server 100 is less than the preset bandwidth threshold determined based on the historical data of the bandwidth used by the server 100, for example, from 3 am to 8 am every day, from 1 pm to 3 pm every day, etc., which is still reasonable and is not specifically limited in the embodiment of the present invention.

[0149] That is to say, when the current bandwidth of the server 100 is less than the above-mentioned preset bandwidth threshold, the server 100 can determine a target number of target client devices 200 among multiple client devices 200 based on the current bandwidth used by itself at the current moment and the historical interaction records of each client device 200.

[0150] Optionally, the correspondence between the current bandwidth used by the server 100 and the target number of selected target client devices 200 may be preset based on the configuration parameters of the server 100, the operation of the server 100 under different bandwidths, and actual application requirements. For example, when the current bandwidth of the server 100 is 60 Mbps, the target number may be determined to be 10,000, and when the current bandwidth of the server 100 is 80 Mbps, the target number may be determined to be 8,000. Thereafter, when the current bandwidth is less than the preset bandwidth threshold, the server 100 may determine the target number based on the current bandwidth and the above correspondence, and determine the target number of target client devices 200 based on the historical interaction records of the plurality of client devices 200.

[0151] In this way, the server 100 can determine the target number of target client devices 200 corresponding to the current bandwidth based on its own current bandwidth, thereby avoiding the increase of bandwidth pressure on the server 100 due to the excessive number of determined target client devices 200, and further avoiding the impact on the operating efficiency of the server 100 due to the excessive number of target client devices 200.

[0152] S102: The server 100 generates a pre-storage instruction carrying a target identifier of a target file, and sends the pre-storage instruction to the target client device 200;

[0153] After determining the target client device 200 and the target file corresponding to each target client device 200 , for each target client device 200 , the server 100 may generate a pre-stored instruction carrying the target identifier of the target file and send the pre-stored instruction to the target client device 200 .

[0154] The target identifier is used to uniquely identify the target file, and may be a file number or a file name, both of which are reasonable and are not specifically limited in the embodiments of the present invention.

[0155] For the sake of clarity, the execution method of the above step S102, in which the server 100 sends the above pre-stored instruction to the target client device 200, will be described by example later.

[0156] S103: The target client device 200 receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server 100;

[0157] S104: The server 100 receives the file acquisition request and sends the target file to the target client device 200;

[0158] S105: The target client device 200 receives the target file and stores the target file.

[0159] The target client device 200 can receive the above-mentioned pre-storage instruction sent by the server 100, and send a file acquisition request carrying the target identifier of the target file to the server 100. In this way, the above-mentioned server 100 can receive the above-mentioned file acquisition request, determine the target file based on the above-mentioned target identifier, and send the above-mentioned target file to the target client device 200. Thus, the target client device 200 can receive the above-mentioned target file and store the above-mentioned target file.

[0160] Optionally, the server 100 may obtain a target file corresponding to the target identifier in a preset file database based on the target identifier, and send the target file to the target client device 200;

[0161] Optionally, the target client device 200 can call its own storage function and send a file address acquisition request carrying the above-mentioned target identifier to the server 100. In this way, the server 100 can receive the above-mentioned file address acquisition request, and based on the above-mentioned target identifier, determine the file address of the target file, and send the above-mentioned file address to the target client device 200. In this way, the target client device 200 can receive the above-mentioned file address, and obtain the above-mentioned target file according to the above-mentioned file address, and store the obtained target file.

[0162] Generally, the user can make storage settings in the client device 200, and then, in order to ensure that the client device 200 can store the above-mentioned target file according to the user's storage settings, or the electronic device will not be in an unusable state due to the client device 200 storing files, for example, the electronic device runs out of power and shuts down due to the client device 200 storing files. When receiving the pre-storage instruction, the target client device 200 can determine its own device state, and based on its own device state, request the target file and store the target file.

[0163] Optionally, in a specific implementation, the above step S103 may include the following step 21:

[0164] Step 21: The target client device 200 receives the pre-stored instruction, and when the device state of the target client device 200 meets the preset state condition, sends a file acquisition request carrying the target identifier to the server 100;

[0165] The preset status condition may include: the remaining power of the device is greater than a preset power threshold and / or the network status is a preset status.

[0166] In the present implementation, a preset status condition can be set based on the user's storage settings or actual storage needs, so that when the target client device 200 receives the above-mentioned pre-storage instruction, it can further determine its own device status, and thus, when its own device status meets the above-mentioned preset status condition, it sends a file acquisition request carrying the target identifier to the server 100.

[0167] Among them, the above-mentioned preset status condition can be that the remaining power of the device is greater than the preset power threshold, or that the network status is the preset state, or that the remaining power of the device is greater than the preset power threshold and the above-mentioned network status is the preset state. These are all reasonable and are not specifically limited in the embodiments of the present invention.

[0168] And the above-mentioned preset power threshold can be set according to actual needs, for example: 20, 40, etc.; the above-mentioned preset state can be connected to WiFi (WIreless-Fidelity, wireless Internet access), or it can be connected to any specified WiFi, which is reasonable and is not specifically limited in the embodiments of the present invention.

[0169] After storing the target file, the target client device 200 can perform the operation indicated by the operation instruction on the stored target file based on the user's operation instruction for the target file. For the target file that has not been updated, all users can only obtain the target file after the file release time of the target file. However, since the target client device 200 has obtained and stored the target file before the file release time of the target file, in order to prevent the user from obtaining the target file before the file release time of the target file, the target client device 200 can hide the target file before the file release time, and can respond to the user's operation instruction for the target file after the file release time.

[0170] Optionally, in a specific implementation, such as Figure 3 As shown, the file storage method provided by the embodiment of the present invention may further include the following steps S106-S107:

[0171] S106: The target client device 200 determines whether the current time is earlier than the file publishing time of the target file; if not, execute step S107;

[0172] S107: The target client device 200 reads the target file from the local storage space based on the operation instruction for the target file, and performs the operation indicated by the operation instruction on the target file.

[0173] In this specific implementation, after storing the above-mentioned target file, the target client device 200 can determine whether the current time is earlier than the file release time of the target file. If the current time is not earlier than the file release time of the above-mentioned target file, when the target client device 200 detects the user's operation instruction for the target file, it can read the target file from the local storage space based on the above-mentioned operation instruction, and perform the operation indicated by the above-mentioned operation instruction on the target file.

[0174] Optionally, in a specific implementation, if the current time is earlier than the above file publishing time, the target client device 200 sets the display state of the target file to an invisible state.

[0175] In this specific implementation, if the current time is earlier than the file release time of the above-mentioned target file, the target client device 200 can set the stored target file to an invisible state, thereby avoiding responding to the user's operation instructions for the target file before the file release time of the target file.

[0176] In this way, the target client device 200 can respond to the user's operation instruction for the target file after the file release time of the target file, which can prevent the user from obtaining the above target file before the file release time of the target file.

[0177] Furthermore, when responding to the above-mentioned operation instructions, reading the stored target file can eliminate the process of obtaining and storing the above-mentioned target file, can better respond to user instructions, and improve user experience. In addition, there is no need to obtain the above-mentioned target file from the server 100, which can avoid the target client device 200 requesting the target file from the server 100 during the bandwidth peak period of the server 100, thereby increasing the current bandwidth of the server 100 and further affecting the operating efficiency of the server 100.

[0178] As can be seen from the above, by applying a file storage method provided by an embodiment of the present invention, the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and thus improving the operation efficiency of the server.

[0179] Next, an example is given to illustrate the execution manner of the above step S102 , in which the server 100 sends the above pre-stored instruction to the target client device 200 .

[0180] Usually, each client device 200 is provided with a preset push function, and the user can set the preset push function in the client device 200 used, that is, the user can turn on the preset push function so that the server 100 can directly send a push message to the client device 200; or the preset push function can be turned off so that the server 100 cannot directly send a push message to the client device 200, but can only send a message to the client device 200 in the form of message feedback when receiving a request sent by the client device 200. Based on this, according to different settings of the user, the way in which the server 100 sends the pre-stored instruction to the target client device 200 can be different.

[0181] Optionally, in a specific implementation, the above step S102, in which the server 100 sends the pre-stored instruction to the target client device 200, may include the following step 31:

[0182] Step 31 : when the server 100 detects that the target client device 200 turns on the preset push function, the server 100 pushes the pre-stored instruction to the target client device 200 .

[0183] In this specific implementation, when the server 100 detects that the target client device 200 turns on the preset push function, it can push the pre-stored instruction to the target client device 200 through the push function.

[0184] In the case where the user has not turned on the preset push function of the client device 200, or in order to avoid the situation where the message pushed by the server 100 is not delivered to the client device 200 due to network unavailability or other reasons, an instruction acquisition task can be set in advance on the client device 200 so that the client device 200 can obtain the above-mentioned pre-stored instructions from the server 100.

[0185] Optionally, in a specific implementation, the file storage method provided by the embodiment of the present invention may further include the following steps 41-43:

[0186] Step 41: The client device 200 sends a command acquisition request to the server 100 according to a preset period;

[0187] Step 42: The server 100 receives the instruction acquisition request;

[0188] The above step S102, in which the server 100 sends the pre-stored instruction to the target client device 200, may include the following step 43:

[0189] Step 43: After generating the pre-stored instruction, the server 100 sends the pre-stored instruction to the target client device 200 when receiving the instruction acquisition request.

[0190] In this specific implementation, a preset period can be sent to each client device 200 in advance, so that each client device 200 can send an instruction acquisition request to the server 100 according to the above preset period, and thus, the server 100 can receive the instruction acquisition request sent by each client device 200.

[0191] In this way, after generating the pre-stored instruction for each target client device 200 , the server 100 may send the pre-stored instruction to the target client device 200 upon receiving an instruction acquisition request sent by the target client device 200 .

[0192] Furthermore, for the same pre-stored instruction of the target client device 200, the server 100 sends the pre-stored instruction to the target client device 200 only when it receives the instruction acquisition request sent by the target client device 200 for the first time after generating the pre-stored instruction, and does not repeatedly send the above-mentioned pre-stored instruction every time it receives the instruction acquisition request sent by the target client device 200. In this way, the target client device 200 can be prevented from receiving and executing repeated pre-stored instructions.

[0193] Among them, the above-mentioned preset period can be set according to actual needs, for example, 10 minutes as a period, 30 minutes as a period, etc., which are all reasonable and are not specifically limited in the embodiments of the present invention.

[0194] Based on this, no matter whether the target client device 200 has enabled the preset push function, the server 100 can send the above-mentioned pre-stored instruction to the target client device 200 .

[0195] Optionally, a scheduled task may be written in advance in each client device 200 so that the client device 200 sends an instruction acquisition request to the server 100 according to a preset period indicated by the scheduled task.

[0196] Optionally, the task request time can be written in each client device 200 in advance so that each client device 200 can send a task request to the server 100 according to the above task request time. In this way, after receiving the task request, the server 100 can send a scheduled task to each client device 200 to instruct each client device 200 to send an instruction acquisition request to the server 100 according to a preset period. After that, each client device 200 can receive the above scheduled task and send an instruction acquisition request to the server 100 according to the preset period indicated by the above scheduled task.

[0197] The task request time may be set according to actual needs, and may be any specified time in each hour, or may be several fixed time points in each day, which are all reasonable and are not specifically limited in the embodiments of the present invention.

[0198] When determining the target client device 200, the status of each client device 200 may also be considered. Optionally, in a specific implementation, the target client device 200 is in an online state.

[0199] In this specific implementation, the server 100 may determine at least one target client device 200 that is online based on the historical interaction records of each client device 200 .

[0200] The online status refers to that the process of the client device 200 is alive and can communicate with the server 100 , for example, the client device 200 is in use, the client device 200 is in the background, etc.

[0201] The heartbeat mechanism is a mechanism for ensuring the validity of a connection by sending heartbeat messages. It can usually be used by any of two communicating devices to notify the other device that it is still online, or to detect whether the other device is online.

[0202] Optionally, in a specific implementation, the method provided in the embodiment of the present invention may further include the following steps 51-54:

[0203] Step 51: When the client device 200 goes online, it sends an online notification to the server 100;

[0204] Step 52: The server 100 receives the online notification sent by the client device 200, updates the online state of the client device 200 to the online state, and sends a preset heartbeat sending interval to the client device 200;

[0205] Step 53: The client device 200 receives the preset heartbeat sending interval, and sends a heartbeat message to the server 100 according to the preset heartbeat sending interval;

[0206] Step 54: The server 100 receives the heartbeat message. If the server 100 does not receive the heartbeat message sent by the client device 200 within the preset heartbeat sending interval, the online state of the client device 200 is updated to the offline state.

[0207] In this specific implementation, when the client device 200 goes online, an online notification is sent to the server 100. In this way, after receiving the online notification sent by the client device, the server 100 can update the online state of the client device 200 to the online state. At the same time, a preset heartbeat sending interval is sent to the client device 200. Among them, the preset heartbeat sending interval can be set according to actual needs, which can be 5 seconds or 1 minute, which is reasonable and is not specifically limited in the embodiment of the present invention.

[0208] After receiving the preset heartbeat sending interval sent by the server 100, the client device 200 sends a heartbeat message to the server 100 according to the preset heartbeat sending interval. Among them, the heartbeat message can be set according to actual needs, and can be a device online message or a subscription update message, which is reasonable and is not specifically limited in the embodiment of the present invention.

[0209] When the client device 200 is online, the client device 200 may send a heartbeat message to the server 100 according to a preset heartbeat sending interval.

[0210] For example, the heartbeat transmission interval is 5 seconds, and the heartbeat message is a subscription update message. The client device 200 can send a subscription update message to the server 100 every 5 seconds, and the server 100 receives the subscription update message sent by the client device 200 and determines that the online state of the client device 200 is online.

[0211] The server 100 receives the heartbeat message sent by the client device 200, and determines the online state of the client device 200 based on the preset heartbeat sending interval. If the heartbeat message sent by the client device 200 according to the heartbeat sending interval is received, the online state of the client device 200 can be considered to be the online state; if the heartbeat message sent by the client device 200 according to the heartbeat sending interval is not received, the online state of the client device 200 can be considered to be the offline state, and then the online state of the client device 200 is updated to the offline state.

[0212] In this way, the server 100 can determine the online status of the client device 200 by whether the heartbeat message sent by the client device 200 is received within the preset heartbeat sending interval, so that when the online status of the client device 200 changes, the online status of the client device 200 can be updated in time.

[0213] Furthermore, the server 100 may determine at least one target client device 200 that is online based on the historical interaction records of each client device 200 .

[0214] When determining the target client device 200, the usage of the client device 200 can also be considered. When the client device 200 is playing a video, the client device 200 is determined as the target client device 200, and a pre-storage instruction is sent to the target client device 200 so that the target client device 200 stores the above-mentioned target file. This may cause the target client device 200 to experience network lag, thereby affecting the viewing experience of the user who is using the target client device 200.

[0215] Based on this, optionally, the server 100 may select at least one client device 200 that is online and not in use as a target client device 200 based on historical interaction records of multiple client devices 200 .

[0216] Typically, the server 100 can pre-determine, based on the historical interaction records of users of each client device 200, a specified client device 200 having a file whose specified historical interaction record of the collection meets a preset storage condition. In this way, the server 100 can determine a target client device 200 that is online from the above-mentioned specified client devices 200.

[0217] Optionally, in a specific implementation, in the above step S101, the server 100 determines at least one target client device 200 based on historical interaction records of multiple client devices 200, which may include the following steps 61-62:

[0218] Step 61: The server 100 determines, based on the historical interaction records of the plurality of client devices 200, at least one designated client device 200 having a file of a designated historical interaction record of the set to which it belongs that satisfies a preset storage condition;

[0219] Step 62: Determine at least one target client device 200 that is online among the designated client devices 200 .

[0220] In this specific implementation, the server 100 can predetermine at least one designated client device 200 among multiple client devices 200 based on historical interaction data of each client device 200, which has a file whose designated historical interaction record of the set belongs to meets preset storage conditions.

[0221] Thus, when it is desired to select a portion of the client devices 200 and to pre-send the target file corresponding to each client device 200 to the selected client devices 200, the server 100 may determine the target client devices 200 that are online from among the designated client devices 200.

[0222] Since the designated client device 200 is determined by the server 100 based on the historical interaction records of each client device 200 , as the historical interaction records of each client device 200 are updated, the designated client device 200 is also updated accordingly.

[0223] Optionally, in a specific implementation, the file storage method provided by the embodiment of the present invention may further include the following step 71:

[0224] Step 71: For each preset update period, the server 100 updates each designated client device 200 based on the historical interaction records of the multiple client devices 200 in the update period.

[0225] In this specific implementation, an update cycle may be preset, so that for each preset update cycle, the server 100 may update each designated client device 200 based on the historical interaction records of the above-mentioned multiple client devices 200 within the update cycle.

[0226] The update cycle may be different for different target files.

[0227] Based on this, optionally, the above-mentioned update cycle can be set according to the update cycle of the set to which the target file belongs. For example, if each file in the set to which the target file belongs is updated every Saturday, then the above-mentioned update cycle can be set to one week; if each file in the set to which the target file belongs is updated every day, then the above-mentioned update cycle can be set to one day. This is all reasonable and is not specifically limited in the embodiments of the present invention.

[0228] That is to say, for each update cycle, the server 100 can use the historical interaction records of each client device 200 within the update cycle to update the above-mentioned specified client device 200. In this way, when the specified historical interaction records of each file in the set to which the target file belongs within this cycle are changed, the determined specified client device 200 can be increased or decreased based on the above changes.

[0229] For example, if the designated historical interaction records of client device B in the designated client devices 200 for each file in the set to which the corresponding target file belongs during the update cycle do not meet the preset storage conditions, then the client device B will no longer be included in the designated client devices during the next update cycle.

[0230] In order to facilitate understanding of the specific implementation of the above file storage method, Figure 4 A specific example is given to illustrate.

[0231] like Figure 4 As shown, in this specific example, the following steps S401-S409 may be included:

[0232] S401: The server determines a target client device and a target video corresponding to the target client device based on historical interaction records of each client device;

[0233] S402: For each target client device, the server generates a pre-stored instruction carrying a video identifier of a target video;

[0234] S403: The server determines whether the target client device has enabled push; if so, execute step S404; otherwise, execute step S405;

[0235] S404: The server sends a pre-storage instruction;

[0236] S405: After the target client device is started, it requests a pre-stored instruction;

[0237] S406: The target client device determines whether the instruction is received; if so, execute step S407; otherwise, execute step S408;

[0238] S407: The target client device calls a storage function;

[0239] S408: The target client device continues to request the pre-stored instruction;

[0240] S409: The target client device obtains the target video and stores the target video.

[0241] When the bandwidth at the current moment is less than the preset bandwidth threshold, the server determines, based on the historical interaction records of each client device, a target client device whose specified historical interaction record for the set to which the target video belongs meets the preset storage condition and is in an online state among multiple client devices, and determines the target video corresponding to each target client device. Afterwards, a pre-storage instruction carrying the video identifier of the target video is generated for each target client device.

[0242] Then, the server can determine whether the target client device has enabled push, and if so, send the above-mentioned pre-stored instructions to the target client device; otherwise, the target client device requests the above-mentioned pre-stored instructions from the server after startup, so that the server can determine whether to send the above-mentioned pre-stored instructions to the target client device based on the bandwidth at the current moment, and if the bandwidth at the current moment is less than the preset bandwidth threshold, send the above-mentioned pre-stored instructions to the target client device.

[0243] The target client device can determine whether it has received the pre-storage instruction. If it has not received the pre-storage instruction, it can continue to request the pre-storage instruction from the server; if it has received the pre-storage instruction, it can call the storage function to obtain the target video from the server based on the video identifier, and store the target video when the target video is obtained.

[0244] Figure 5 A file storage method provided by an embodiment of the present invention is applied to a server in a file management system; the above system may also include: a plurality of client devices; Figure 5 As shown, the method may include the following steps S501-S503:

[0245] S501: Based on historical interaction records of multiple client devices, determine at least one target client device, and determine a target file corresponding to each target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0246] S502: Generate a pre-storage instruction carrying a target identifier of a target file, and send the pre-storage instruction to a target client device, so that the target client receives the pre-storage instruction and sends a file acquisition request carrying the target identifier to the server;

[0247] S503: receiving a file acquisition request, and sending a target file to a target client device, so that the target client device receives the target file and stores the target file.

[0248] As can be seen from the above, by applying a file storage method provided by an embodiment of the present invention, the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and thus improving the operation efficiency of the server.

[0249] Optionally, in a specific implementation, the above step S502 may include:

[0250] When the preset conditions are met at the current moment, the target number of target client devices is determined according to the current bandwidth used by itself at the current moment, and the target number of target client devices is determined based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

[0251] Optionally, in a specific implementation, the above step S502 may include:

[0252] When it is detected that the target client device turns on a preset push function, the pre-stored instruction is pushed to the target client device.

[0253] Optionally, in a specific implementation, a file storage method provided by an embodiment of the present invention may further include:

[0254] Receiving a request for obtaining a command sent by the client device according to a preset period;

[0255] The above step S502 may include:

[0256] After the pre-stored instruction is generated, upon receiving the instruction acquisition request, the pre-stored instruction is sent to the target client device.

[0257] Optionally, in a specific implementation, the target client device is in an online state.

[0258] Figure 6 A file storage method provided by an embodiment of the present invention is applied to at least one target client device among multiple client devices in a file management system, and the system may also include a server; Figure 6As shown, the method may include the following steps S601-S602:

[0259] S601: receiving a pre-stored instruction sent by a server and carrying a target identifier of a target file corresponding to a target client device, and sending a file acquisition request carrying the target identifier to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on historical interaction records of multiple client devices; the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0260] S602: Receive a target file and store the target file.

[0261] As can be seen from the above, by applying a file storage method provided by an embodiment of the present invention, the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and thus improving the operation efficiency of the server.

[0262] Optionally, in a specific implementation, a file storage method provided by an embodiment of the present invention may further include:

[0263] Determine whether the current time is earlier than the file release time of the target file;

[0264] If not, based on the operation instruction for the target file, the target file is read from the local storage space, and the operation indicated by the operation instruction is performed on the target file.

[0265] Optionally, in a specific implementation, a file storage method provided by an embodiment of the present invention may further include:

[0266] If the current time is earlier than the file publishing time, the display state of the target file is set to an invisible state.

[0267] Optionally, in a specific implementation, a file storage method provided by an embodiment of the present invention may further include:

[0268] According to a preset cycle, an instruction acquisition request is sent to the server so that the server receives the instruction acquisition request, and after generating the pre-stored instruction, when receiving the instruction acquisition request, the server sends the pre-stored instruction to the target client device.

[0269] Optionally, in a specific implementation, the above step S601 may include:

[0270] receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server when the device state meets a preset state condition;

[0271] The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

[0272] Optionally, in a specific implementation, the target client device is in an online state.

[0273] Based on the same inventive concept, corresponding to the above-mentioned embodiment of the present invention, Figure 5 A file storage method is shown, and an embodiment of the present invention also provides Figure 7 A file storage device is shown, which is applied to a server in a file management system; the system may also include: multiple client devices.

[0274] Figure 7 The present invention provides a schematic diagram of a file storage device for a server in a file management system. Figure 7 As shown, the device may include the following modules:

[0275] The determination module 710 is used to determine at least one target client device based on the historical interaction records of the multiple client devices, and determine the target file of each target client device; wherein the target file is a file whose specified historical interaction record of the set meets the preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0276] The instruction generation module 720 is used to generate a pre-stored instruction carrying a target identifier of the target file, and send the pre-stored instruction to the target client device, so that the target client receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server;

[0277] The request receiving module 730 is used to receive the file acquisition request and send the target file to the target client device, so that the target client device receives the target file and stores the target file.

[0278] As can be seen from the above, by applying a file storage method provided by an embodiment of the present invention, the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and thus improving the operation efficiency of the server.

[0279] Optionally, in a specific implementation, the determining module 710 is specifically configured to:

[0280] When the preset conditions are met at the current moment, the target number of target client devices is determined according to the current bandwidth used by itself at the current moment, and the target number of target client devices is determined based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

[0281] Optionally, in a specific implementation, the instruction generation module 720 is specifically used to:

[0282] When it is detected that the target client device turns on a preset push function, the pre-stored instruction is pushed to the target client device.

[0283] Optionally, in a specific implementation, the device further includes:

[0284] A request receiving module, used to receive a request for obtaining a sending instruction from the client device according to a preset period;

[0285] The instruction generation module 720 is specifically used for:

[0286] After the pre-stored instruction is generated, upon receiving the instruction acquisition request, the pre-stored instruction is sent to the target client device.

[0287] Optionally, in a specific implementation, the target client device is in an online state.

[0288] Based on the same inventive concept, corresponding to the above-mentioned embodiment of the present invention, Figure 6 A file storage method is shown, and an embodiment of the present invention also provides Figure 8 A file storage device is shown, which is applied to a target client device among multiple client devices in a file management system; the system may also include: a server.

[0289] Figure 8 The present invention provides a schematic diagram of a file storage device for a target client device among multiple client devices in a file management system. The device is applied to electronic devices such as Figure 8 As shown, the device may include the following modules:

[0290] The instruction receiving module 810 is used to receive a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and send a file acquisition request carrying the target identifier to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on the historical interaction records of the multiple client devices; the target file is a file whose specified historical interaction record of the set meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs;

[0291] The storage module 820 is used to receive the target file and store the target file.

[0292] As can be seen from the above, by applying a file storage method provided by an embodiment of the present invention, the server can determine at least one target client device and the target file corresponding to each target client device based on the historical interaction records of each client device, and send a pre-storage instruction to each target client device so that each target client device pre-stores the target file according to the pre-storage instruction. In this way, by selecting some client devices to pre-store the files corresponding to the client devices, it can be avoided that each client centrally requests the server for the files corresponding to each client in the same time period, thereby reducing the bandwidth of the server in the time period, avoiding the server jam caused by the network jam due to the large bandwidth during the peak period of user use, and thus improving the operation efficiency of the server.

[0293] Optionally, in a specific implementation, the device further includes:

[0294] A judgment module, used to judge whether the current time is earlier than the file release time of the target file; if not, triggering the execution module;

[0295] The execution module is used to read the target file from the local storage space based on the operation instruction for the target file, and execute the operation indicated by the operation instruction on the target file.

[0296] Optionally, in a specific implementation, the device further includes:

[0297] A setting module is used to set the display state of the target file to an invisible state if the current time is earlier than the file publishing time.

[0298] Optionally, in a specific implementation, the device further includes:

[0299] The sending module is used to send an instruction acquisition request to the server according to a preset period, so that the server receives the instruction acquisition request, and after generating the pre-stored instruction, when receiving the instruction acquisition request, sends the pre-stored instruction to the target client device.

[0300] Optionally, in a specific implementation, the instruction receiving module 810 is specifically used to:

[0301] receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server when the device state meets a preset state condition;

[0302] The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

[0303] Optionally, in a specific implementation, the target client device is in an online state.

[0304] The embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0305] Memory 903, used for storing computer programs;

[0306] The processor 901 is used to implement any of the above method steps when executing the program stored in the memory 903.

[0307] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0308] The communication interface is used for communication between the above terminal and other devices.

[0309] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0310] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0311] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the video storage method described in any one of the above embodiments is implemented.

[0312] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video storage method described in any one of the above embodiments.

[0313] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 described in the embodiment of the present invention 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. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0314] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0315] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for system embodiments, device embodiments, electronic device embodiments, and computer-readable storage medium embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0316] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A file storage method, characterized in that: Applied to a file management system, the system includes a server and multiple client devices, and the method includes: For a target file that has not been updated, the server determines at least one target client device based on the historical interaction records of the multiple client devices, and determines the target file corresponding to each target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs; The server generates a pre-stored instruction carrying a target identifier of the target file, and sends the pre-stored instruction to the target client device; The target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server; The server receives the file acquisition request and sends the target file to the target client device; The target client device receives the target file and stores the target file; The target client device determines whether the current time is earlier than the file publishing time of the target file; If the current time is not earlier than the file publishing time, the target client device reads the target file from the local storage space based on the operation instruction for the target file, and performs the operation indicated by the operation instruction on the target file; If the current time is earlier than the file publishing time, the target client device sets the display state of the target file to an invisible state.

2. The method according to claim 1, characterized in that The server determines at least one target client device based on historical interaction records of the plurality of client devices, including: When the server meets the preset conditions at the current moment, the server determines the target number of target client devices according to the current bandwidth used by the server at the current moment, and determines the target number of target client devices based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

3. The method according to claim 1, characterized in that: The server sends the pre-stored instruction to the target client device, including: When the server detects that the target client device turns on a preset push function, the server pushes the pre-stored instruction to the target client device.

4. The method according to claim 1, characterized in that: The method further comprises: The client device sends an instruction acquisition request to the server according to a preset period; The server receives the instruction acquisition request; The server sends the pre-stored instruction to the target client device, including: After generating the pre-stored instruction, the server sends the pre-stored instruction to the target client device upon receiving the instruction acquisition request.

5. The method according to claim 1, characterized in that The target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server, including: The target client device receives the pre-stored instruction, and when the device state of the target client device meets a preset state condition, sends a file acquisition request carrying the target identifier to the server; The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

6. The method according to any one of claims 1 to 5, characterized in that: The target client device is in an online state.

7. A file storage method, characterized in that: A server applied to a file management system, the system further comprising a plurality of client devices, the method comprising: For a target file that has not been updated, based on the historical interaction records of the multiple client devices, at least one target client device is determined, and the target file corresponding to each target client device is determined; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs; Generate a pre-stored instruction carrying a target identifier of the target file, and send the pre-stored instruction to the target client device, so that the target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server; Receive the file acquisition request, and send the target file to the target client device, so that the target client device receives the target file and stores the target file; determine whether the current time is earlier than the file release time of the target file; if the current time is not earlier than the file release time, read the target file from the local storage space based on the operation instruction for the target file, and perform the operation indicated by the operation instruction on the target file; if the current time is earlier than the file release time, set the display state of the target file to an invisible state.

8. The method according to claim 7, characterized in that The determining at least one target client device based on the historical interaction records of the plurality of client devices comprises: When the preset conditions are met at the current moment, the target number of target client devices is determined according to the current bandwidth used by itself at the current moment, and the target number of target client devices is determined based on the historical interaction records of the multiple client devices; wherein the preset conditions include that the current bandwidth is less than a preset bandwidth threshold.

9. The method according to claim 7, characterized in that: The sending the pre-stored instruction to the target client device includes: When it is detected that the target client device turns on a preset push function, the pre-stored instruction is pushed to the target client device.

10. The method according to claim 7, characterized in that The method further comprises: Receiving a request for obtaining a command sent by the client device according to a preset period; The sending the pre-stored instruction to the target client device includes: After the pre-stored instruction is generated, upon receiving the instruction acquisition request, the pre-stored instruction is sent to the target client device.

11. The method according to any one of claims 7 to 10, characterized in that: The target client device is in an online state.

12. A file storage method, characterized in that: The method is applied to at least one target client device among a plurality of client devices in a file management system, the system further comprising a server, the method comprising: For a target file that has not been updated, a pre-stored instruction carrying a target identifier of the target file corresponding to the target client device is received from the server, and a file acquisition request carrying the target identifier is sent to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on historical interaction records of the multiple client devices; the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs; Receiving the target file and storing the target file; The target client device determines whether the current time is earlier than the file publishing time of the target file; If the current time is not earlier than the file publishing time, the target client device reads the target file from the local storage space based on the operation instruction for the target file, and performs the operation indicated by the operation instruction on the target file; If the current time is earlier than the file publishing time, the target client device sets the display state of the target file to an invisible state.

13. The method according to claim 12, characterized in that The method further comprises: Determine whether the current time is earlier than the file release time of the target file; If not, based on the operation instruction for the target file, the target file is read from the local storage space, and the operation indicated by the operation instruction is performed on the target file.

14. The method according to claim 12, characterized in that The method further comprises: If the current time is earlier than the file publishing time, the display state of the target file is set to an invisible state.

15. The method according to claim 12, characterized in that The method further comprises: According to a preset cycle, an instruction acquisition request is sent to the server so that the server receives the instruction acquisition request, and after generating the pre-stored instruction, when receiving the instruction acquisition request, the server sends the pre-stored instruction to the target client device.

16. The method according to claim 12, characterized in that The receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server, comprises: receiving a pre-stored instruction sent by the server and carrying a target identifier of a target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server when the device state meets a preset state condition; The preset status condition includes: the remaining power of the device is greater than a preset power threshold and / or the network status of the device is a preset status.

17. The method according to any one of claims 12 to 15, characterized in that: The target client device is in an online state.

18. A file management system, characterized in that: The system includes a server and a plurality of client devices; The server is configured to determine, for a target file that has not been updated, at least one target client device based on historical interaction records of the plurality of client devices, and determine the target file corresponding to each target client device; Generate a pre-stored instruction carrying the target identifier of the target file, and send the pre-stored instruction to the target client device; receive a file acquisition request carrying the target identifier sent by the client device, and send the target file to the target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets the preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs; The client device is used to receive the pre-stored instruction, send the file acquisition request to the server; receive the target file, and store the target file; the target client device determines whether the current time is earlier than the file release time of the target file; if the current time is not earlier than the file release time, the target client device reads the target file from the local storage space based on the operation instruction for the target file, and performs the operation indicated by the operation instruction on the target file; if the current time is earlier than the file release time, the target client device sets the display state of the target file to an invisible state.

19. A file storage device, characterized in that: A server applied to a file management system, the system further comprising a plurality of client devices, the apparatus comprising: A determination module is used to determine, for a target file that has not been updated, at least one target client device based on the historical interaction records of the multiple client devices, and determine the target file of each target client device; wherein the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and the number of responses of the operation instructions for each file in the set to which the target file belongs; An instruction generation module is used to generate a pre-stored instruction carrying a target identifier of the target file, and send the pre-stored instruction to the target client device, so that the target client device receives the pre-stored instruction and sends a file acquisition request carrying the target identifier to the server; A request receiving module is used to receive the file acquisition request and send the target file to the target client device so that the target client device receives the target file and stores the target file; determine whether the current time is earlier than the file release time of the target file; if the current time is not earlier than the file release time, read the target file from the local storage space based on the operation instruction for the target file, and perform the operation indicated by the operation instruction on the target file; if the current time is earlier than the file release time, set the display state of the target file to an invisible state.

20. A file storage device, characterized in that: The device is applied to at least one target client device among a plurality of client devices in a file management system, the system further comprising a server, and the device comprises: The instruction receiving module is used for receiving, for a target file that has not been updated, a pre-stored instruction sent by the server and carrying a target identifier of the target file corresponding to the target client device, and sending a file acquisition request carrying the target identifier to the server, so that the server receives the file acquisition request and sends the target file to the target client device; wherein the target client device and the target file are determined by the server based on historical interaction records of the multiple client devices; the target file is a file whose specified historical interaction record of the set to which it belongs meets a preset storage condition; the specified historical interaction record includes: the response time and number of responses of the operation instructions for each file in the set to which the target file belongs; A storage module, used for receiving the target file and storing the target file; A judgment module, used to judge whether the current time is earlier than the file release time of the target file; if not, triggering the execution module; The execution module is used to read the target file from the local storage space based on the operation instruction for the target file, and execute the operation indicated by the operation instruction on the target file; A setting module is used to set the display state of the target file to an invisible state if the current time is earlier than the file publishing time.

21. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-17 when executing a program stored in a memory.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 17 are implemented.