CN113051223A - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN113051223A CN113051223A CN202110343348.0A CN202110343348A CN113051223A CN 113051223 A CN113051223 A CN 113051223A CN 202110343348 A CN202110343348 A CN 202110343348A CN 113051223 A CN113051223 A CN 113051223A
- Authority
- CN
- China
- Prior art keywords
- file
- information
- condition
- saving
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title abstract description 17
- 238000000034 method Methods 0.000 claims abstract description 43
- 238000012545 processing Methods 0.000 claims description 32
- 238000012790 confirmation Methods 0.000 claims description 14
- 230000009191 jumping Effects 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 claims description 4
- 230000014759 maintenance of location Effects 0.000 claims 1
- 230000000717 retained effect Effects 0.000 claims 1
- 238000012217 deletion Methods 0.000 description 10
- 230000037430 deletion Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000001960 triggered effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012552 review Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/113—Details of archiving
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/168—Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a data processing method and a device, wherein the method comprises the following steps: the method comprises the steps of obtaining file information of a first file under the condition that an access operation aiming at the first file is received; judging whether the file information meets file storage conditions or not, wherein the file storage conditions represent that a second file matched with the file information is stored in the electronic equipment; under the condition that the file information meets a file saving condition, opening a second file in the electronic equipment; and under the condition that the file information does not meet the file saving condition, saving the first file into the electronic equipment and opening the first file.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method and apparatus.
Background
With the development of technologies, social software is widely used, and multiple users establish social groups by using the social software to realize multi-party chat.
In social groups, a large amount of chat records, such as pictures, video, and voice data, are generated, which occupies a large amount of storage space on each user's terminal.
Disclosure of Invention
In view of the above, the present application provides a data processing method and apparatus, as follows:
a method of data processing, comprising:
the method comprises the steps of obtaining file information of a first file under the condition that an access operation aiming at the first file is received;
judging whether the file information meets file storage conditions or not, wherein the file storage conditions represent that a second file matched with the file information is stored in the electronic equipment;
under the condition that the file information meets a file saving condition, opening a second file in the electronic equipment;
and under the condition that the file information does not meet the file saving condition, saving the first file into the electronic equipment and opening the first file.
The method preferably further includes, after storing the first file in the electronic device, the step of:
and sending first information to a server corresponding to the electronic equipment so as to update saving information corresponding to the first file in the server, wherein the saving information at least comprises the saved number of the first file.
The above method, preferably, further comprises:
under the condition that a deleting operation for the first file is received, obtaining saving information corresponding to the first file saved in the server;
and if the number of the first files stored in the storage information is 1, outputting first prompt information, wherein the first prompt information is used for prompting that the first file in the electronic equipment is the last file.
The above method, preferably, further comprises:
and transmitting the first file to the server under the condition that a confirmation operation for determining to delete the last file is received aiming at the first prompt message, so that the server saves the first file.
In the method, preferably, the first file transmitted to the server by the electronic device has a first storage effective duration, so that the server deletes the first file when the lifetime of the first file stored by the server reaches the first storage effective duration.
In the method, preferably, the first saving effective time period is related to the number of the first files saved.
In the method, preferably, the first file saved in the electronic device has a second saving effective duration;
wherein the method further comprises:
and under the condition that the generation duration of the first file in the electronic equipment reaches the second storage effective duration, deleting the first file stored in the electronic equipment and outputting second prompt information, wherein the second prompt information is at least used for prompting that the first file is expired.
Preferably, in the method, after deleting the first file saved in the electronic device, the method further includes:
under the condition that an obtaining operation aiming at a first file is received, sending second information to a server corresponding to the electronic equipment so that the server sends a retransmission request to other equipment saving the first file;
and receiving the first file transmitted by the other device in which the first file is stored according to the retransmission request.
The above method, preferably, further comprises:
monitoring whether link update exists in the first file or not under the condition that the first file is an access link;
if the first file has link update, acquiring a target link corresponding to the first file;
and associating the target link with a first file saved in the electronic equipment, so that when the first file is accessed, jumping to an access page corresponding to the target link.
A data processing apparatus comprising:
an information acquisition unit configured to acquire file information of a first file in a case where an access operation for the first file is received;
the information judging unit is used for judging whether the file information meets a file storage condition, and the file storage condition represents that a second file matched with the file information is stored in the electronic equipment; and triggering a first processing unit when the file information meets the file saving condition, and triggering a second processing unit when the file information does not meet the file saving condition.
The first processing unit is used for opening a second file in the electronic equipment;
and the second processing unit is used for storing the first file into the electronic equipment and opening the first file.
An electronic device, comprising:
a memory for storing an application program and data generated by the application program running;
a processor for executing the application to implement: the method comprises the steps of obtaining file information of a first file under the condition that an access operation aiming at the first file is received; judging whether the file information meets file storage conditions or not, wherein the file storage conditions represent that a second file matched with the file information is stored in the electronic equipment; under the condition that the file information meets a file saving condition, opening a second file in the electronic equipment; and under the condition that the file information does not meet the file saving condition, saving the first file into the electronic equipment and opening the first file.
A storage medium having stored therein computer-executable instructions that, when loaded and executed by a processor, carry out a data processing method as claimed in any preceding claim.
According to the technical scheme, in the data processing method and the data processing device, under the condition that the access operation aiming at the first file is received, the file information of the first file is obtained, and whether the file information meets the file saving condition or not can be judged, so that the second file saved in the electronic equipment can be directly opened under the condition that the file information meets the file saving condition, namely the second file matched with the file information is saved in the electronic equipment, and the first file is saved in the electronic equipment and the first file is opened under the condition that the file information does not meet the file saving condition, namely the second file matched with the file information is not saved in the electronic equipment. It can be seen that, in the present application, when a received file is accessed, the file is saved and opened in the current device only when the file is not saved in the current device, so as to provide the content of the file for the user, and if the file is already saved in the current device, the saved file is directly opened without saving the file again, thereby avoiding the situation that a large amount of storage space is occupied due to the fact that redundant files are stored in the device.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;
FIGS. 2-5 are diagrams illustrating examples of applications of embodiments of the present application;
fig. 6 is another flowchart of a data processing method according to an embodiment of the present application;
FIG. 7 is a diagram illustrating another exemplary application of an embodiment of the present application;
fig. 8 is another flowchart of a data processing method according to an embodiment of the present application;
fig. 9-10 are partial flow charts of a data processing method according to an embodiment of the present application;
FIG. 11 is a diagram illustrating another exemplary application of an embodiment of the present application;
fig. 12 is another flowchart of a data processing method according to an embodiment of the present application;
FIG. 13 is a diagram illustrating another exemplary application of an embodiment of the present application;
fig. 14 is another flowchart of a data processing method according to an embodiment of the present application;
FIG. 15 is a diagram illustrating another exemplary application of an embodiment of the present application;
fig. 16 is a flowchart of another part of a data processing method according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a data processing apparatus according to a second embodiment of the present application;
fig. 18 to fig. 19 are schematic structural diagrams of a data processing apparatus according to a second embodiment of the present application;
fig. 20 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
fig. 21 is a flowchart of chat file processing performed by the group chat application according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart of an implementation of a data processing method provided in an embodiment of the present application is shown, where the method may be applied to an electronic device, such as a mobile phone, a pad, or a computer, that can receive a file transmitted by another device and can access the file. The technical scheme in the embodiment is mainly used for solving the technical problem that a large amount of storage space is occupied as redundant files are stored in the electronic equipment.
Specifically, the method in this embodiment may include the following steps:
step 101: and receiving the first file sent by other equipment.
In this embodiment, the first file sent by the other device may be received through a data connection established between the electronic device and the other device based on an interactive application or the like. The first file can be the file content of voice, video, picture, document, etc. For example, a picture file sent by the opposite user is received in a chat application on a mobile phone, and for example, a conference summary file sent by other conference participants is received in a conference application on a conference terminal, and so on.
Step 102: an access operation is received for a first file.
The access operation refers to an operation performed on the first file by a user of the electronic device on the electronic device to represent that the user of the electronic device needs to view the file content of the first file. For example, a mobile phone user clicks a received picture file sent by the other party in a chat application to represent that a picture needs to be enlarged to view picture content, as shown in fig. 2; for another example, the user of the conference terminal performs a click operation on the received conference summary file sent by the other conference participants in the conference application to represent that the conference summary content in the conference summary file needs to be viewed, as shown in fig. 3.
Step 103: in a case where an access operation for a first file is received, file information of the first file is obtained.
The file information of the first file may be information that can uniquely characterize the first file, such as any one or more of a file name of the first file, a file receiving time of the first file, a file source user of the first file, and the like. For example, the file name "20210321 meeting summary", the file reception time "2021-: 45: 28 ", and so on.
Step 104: it is determined whether or not the file information satisfies the file saving condition, and if the file information satisfies the file saving condition, step 105 is executed, and if the file information does not satisfy the file saving condition, step 106 is executed.
The file saving condition indicates that the second file matched with the file information is saved in the electronic device, that is, the file saving condition is a condition indicating whether the first file is already saved in the electronic device.
Specifically, in this embodiment, the file information of the first file is compared with the file information of the file already stored in the electronic device, and when the file information of the file already stored in the electronic device includes the file information matching with the file information of the first file, it may be determined that the file information satisfies the file storage condition, at this time, step 105 may be executed, and when the file information of the file already stored in the electronic device does not include the file information matching with the file information of the first file, it may be determined that the file does not satisfy the file storage condition, at this time, step 106 may be executed.
Step 105: opening a second file in the electronic device.
When the file information meets the file saving condition, that is, it is indicated that the second file matched with the file information is already saved in the electronic device, at this time, the second file in the electronic device can be directly opened without saving the first file in the electronic device, so that redundancy with the second file already saved in the electronic device is avoided.
Step 106: and storing the first file into the electronic equipment and opening the first file.
In this embodiment, the first file is stored in the cache area of the electronic device in a cache manner, or the first file may be stored in the file storage area of the electronic device in a download manner. For example, in this embodiment, a picture file is cached in a chat content cache area of a mobile phone; for another example, in this embodiment, the conference summary file is downloaded to a hard disk storage area of the conference terminal, and so on.
It should be noted that, in this embodiment, opening the first file or the second file is to output the content of the file on the electronic device, for example, enlarging a picture and outputting the enlarged picture on a mobile phone screen in the form of an original picture, so that a user can view the picture content conveniently, as shown in fig. 4; for another example, the document reading application is invoked to open the conference document file, and the conference document content in the conference document file is output on the display screen of the conference terminal, so that the user can view the conference document content in the file, as shown in fig. 5.
It can be seen from the foregoing technical solutions that, in a data processing method provided in the first embodiment of the present application, when an access operation for a first file is received, file information of the first file is obtained, and whether the file information meets a file saving condition or not can be further determined, so that when the file information meets the file saving condition, that is, a second file matching the file information is saved in an electronic device, the second file saved in the electronic device can be directly opened, and when the file information does not meet the file saving condition, that is, a second file matching the file information is not saved in the electronic device, the first file is saved in the electronic device and the first file is opened. It can be seen that, in this embodiment, when accessing a received certain file, only when the file is not saved in the current device, the file is saved and opened in the current device, so as to provide the content of the file for the user, and if the file is already saved in the current device, the saved file is directly opened without saving the file again, thereby avoiding a situation that a large amount of storage space is occupied due to the fact that a redundant file is stored in the device.
In one implementation, step 104 may be triggered to be performed after the file information of the first file is obtained in step 103, as described in the foregoing.
In another implementation, step 104 may be triggered to be executed after receiving a conditional determination confirmation operation of the user for the first file. Specifically, in this embodiment, after the file information of the first file is obtained in step 103, there may be the following steps, as shown in fig. 6:
step 107: and outputting a confirmation control for judging whether the first file is redundant or not on the electronic equipment.
As shown in fig. 7, the user may click on "confirm" or "cancel" on the confirmation control, based on which step 104 is executed after the electronic device receives a conditional judgment confirmation operation for "confirm", and if the electronic device receives a conditional judgment cancellation operation for "cancel", step 104 is not executed, but step 106 is directly executed, as shown in fig. 6, that is, it is not judged whether a second file matching the file information of the first file is already stored in the electronic device, but the first file is directly stored and opened, so that although a redundant file may be generated on the electronic device, the opening efficiency of the file is accelerated, and convenience is provided for the user.
In one implementation manner, after the first file is stored in the electronic device in step 106, the method in this embodiment may further include the following steps, as shown in fig. 8:
step 108: and sending the first information to a server corresponding to the electronic equipment so as to update the storage information corresponding to the first file in the server.
Wherein the saving information at least comprises the number of the first files saved.
It should be noted that the server corresponding to the electronic device may be understood as a background server corresponding to an interactive application that receives the first file on the electronic device, such as a background server of a chat application, and further such as a background server of a conference application, and so on.
Specifically, the first information may include information that the first file is saved once by the electronic device, so that after the first information is received at the server, the saving information corresponding to the first file is updated according to the first information, for example, 1 is added to the number of saved first files in the saving information. This records the number of times the first file is saved on the server. That is, the number of times the first file is saved on all devices corresponding to the server is recorded on the server, indicating that the first file is cached or downloaded on these number of electronic devices.
In addition, the saving information on the server may further include a saving identifier corresponding to the electronic device that saves the first file, so as to represent which electronic devices save the first file. The saved identifier may include an equipment identifier and/or a user identifier of an application corresponding to the first file transmitted on the electronic equipment, such as a serial number of a mobile phone and/or a user account of the user in a mobile phone chat application, and further such as a serial number of a conference terminal and/or a login account of a conference participant in a conference application on the conference terminal.
Based on the above implementation, the method in this embodiment may further include the following steps, as shown in fig. 9:
step 109: a delete operation for the first file is received.
The electronic device can receive a deletion operation for the first file based on the fact that the user can delete the first file according to requirements such as saving storage space.
Step 110: when a deletion operation for the first file is received, saving information corresponding to the first file saved in the server is obtained.
In this embodiment, in order to avoid the situation that the first file cannot be retrieved after being completely deleted, in the case that a deletion operation for the first file is received, in this embodiment, saving information corresponding to the first file saved in the server is obtained first, that is, the number of saved first files is obtained.
Step 111: it is determined whether the number of saved first files in the saving information is 1, and if the number of saved first files in the saving information is 1, step 112 is performed.
In this embodiment, whether the number of the first files stored in the storage information is 1 is determined to determine whether the first files are completely deleted if the deletion processing is performed on the first files, where complete deletion may be understood as that the first files are not stored in the server and the multiple devices corresponding to the server, and in order to avoid a situation that the first files are completely deleted and cannot be retrieved any more subsequently, in this embodiment, before the deletion processing is performed on the first files, whether the number of the first files stored in the storage information is 1 is determined, that is, whether the first files are completely deleted after the deletion processing is performed this time is determined, and if it is determined that the number of the first files stored in the storage information is 1, step 112 is performed.
Step 112: and outputting the first prompt message.
The first prompt message is used for prompting that the first file in the electronic device is the last file, and if the first file in the electronic device is deleted, the first file may not be retrieved. Based on the first prompt information, the user of the electronic equipment is reminded whether to determine that the last first file is to be deleted.
Further, after the first prompt information is output in step 112, the method in this embodiment may further include the following steps, as shown in fig. 10:
step 113: and receiving a confirmation operation aiming at the first prompt message and used for determining to delete the last file.
Specifically, in this embodiment, when the first prompt information is output, a confirmation control for determining whether to delete the last file may be output at the same time, as shown in fig. 11, the user may click on "confirm" or "cancel" on the confirmation control, and based on this, the electronic device receives a confirmation operation for "confirm" to represent that the user confirms to delete the last file; or, a cancel operation for canceling is received on the electronic equipment to represent that the user cancels the deletion of the last file.
Step 114: and transmitting the first file to the server so that the server saves the first file when receiving a confirmation operation for the first prompt message for determining to delete the last file.
In this embodiment, in the case that a confirmation operation for determining to delete the last file is received for the first prompt message, the deletion processing of the first file may be executed on the electronic device, and the first file is no longer saved on the electronic device; before the deletion process of the first file is executed, the first file is first transmitted to the server in this embodiment, so that the first file is stored on the server, and the situation that the first file cannot be retrieved is avoided.
In a specific implementation, the first file transmitted to the server by the electronic device has a first storage effective duration, so that the server deletes the first file when the lifetime of the first file stored by the server reaches the first storage effective duration.
Based on this, after the electronic device transmits the first file to the server, the timer on the server starts timing, the timing duration is the survival duration of the first file on the server, when the timing duration, namely the generation duration of the first file, reaches the first storage effective duration, the first file can be determined to be expired, at this time, the server deletes the first file stored by the server,
in the above implementation, the first saving valid time period is related to the number of the first file saved. And the first preservation effective time length can be dynamically adjusted. Under the condition that the number of the first files to be saved is increased, the first saving effective time of the first files on the server is correspondingly reduced, and under the condition that the number of the first files to be saved is reduced, the first saving effective time of the first files on the server is correspondingly increased. It should be noted that, the first saving effective time duration of the first file is set and generated when the first file is transmitted to the server and saved on the server, therefore, when the first saving effective time duration of the first file is set, the initial first saving effective time duration is determined according to the size of the number of the current first files saved on the server, and as the number of the saved first files increases, the first saving effective time duration of the first file saved on the server is correspondingly shortened, and in the case that the electronic device deletes the saved first file, the first saving effective time duration of the first file on the server is correspondingly lengthened. For example, when the download amount of the first file on each electronic device corresponding to the server is large, the first storage effective time of the first file saved as the backup on the server is relatively short, and when the download amount of the first file on each electronic device corresponding to the server is small, the first storage effective time of the first file saved as the backup on the server is relatively long.
It should be noted that, when the first storage validity duration of the first file is expired and the first file is deleted, the server may additionally store the backed-up first file and set a new storage validity duration, or the server does not additionally store the first file.
In one implementation, a first file saved in an electronic device has a second save valid duration. The electronic equipment starts timing when the first file is saved by the electronic equipment, and the timing duration is the lifetime of the first file on the electronic equipment.
Based on this, the method in the present embodiment may further include the following steps, as shown in fig. 12:
step 115: and under the condition that the generation duration of the first file in the electronic equipment reaches the second storage effective duration, deleting the first file stored in the electronic equipment and outputting second prompt information.
The second prompt message is at least used for prompting that the first file is expired.
That is to say, in this embodiment, after the first file on the electronic device expires, the first file saved in the electronic device is deleted, and a second prompt message is further output on the display screen of the electronic device, so as to prompt the user that the first file saved on the electronic device has expired. As shown in fig. 13, after the picture on the mobile phone expires, the picture saved in the mobile phone is deleted, and a second prompt message is also output on the mobile phone to prompt that the picture has expired.
It should be noted that before the first file stored in the electronic device is deleted, the storage information corresponding to the first file stored in the server may be obtained, and if the number of the first files stored in the storage information is 1, first prompt information is output, where the first prompt information is used to prompt that the first file in the electronic device is the last file, and based on this, when a confirmation operation for determining that the last file is deleted is received for the first prompt information, the first file is transmitted to the server, and then the first file stored in the electronic device is deleted, so that the server stores the first file, and a situation that the first file cannot be retrieved after the first file expires is avoided.
Based on the above implementation, after deleting the first file saved in the electronic device, the method in this embodiment may further include the following steps, as shown in fig. 14:
step 116: an acquisition operation for a first file is received.
The acquiring operation for the first file refers to an operation of a user of the electronic device to reacquire, that is, access, the first file that has expired or been deleted on the electronic device. For example, in a chat application, after a picture is deleted by a mobile phone after expiration, a chat interface only has a thumbnail mark of the picture, and the content of the picture cannot be viewed, at this time, a user clicks the thumbnail mark of the picture, and the click operation is received in this embodiment, so as to obtain an acquisition operation for the picture. For another example, in the conference application, after the conference summary file is expired and deleted by the conference terminal, only the file name of the conference summary file is displayed on the interface of the conference application and the expiration is prompted, at this time, the user clicks the mark, and the conference terminal receives the clicking operation of the user to obtain the acquisition operation for the conference summary file.
Step 117: and when the acquisition operation for the first file is received, sending second information to a server corresponding to the electronic equipment so that the server sends a retransmission request to other equipment saving the first file.
The server checks the storage identifier corresponding to the electronic equipment storing the first file in the storage information after receiving the second information sent by the electronic equipment, so that the server sends a retransmission request to other equipment corresponding to the storage identifier, and the retransmission request contains the file information of the first file needing to be retransmitted, thereby enabling other equipment receiving the retransmission request to transmit the first file to the electronic equipment according to the retransmission request.
Step 118: and receiving the first file transmitted by the other device storing the first file according to the retransmission request.
As shown in fig. 15, after a picture is deleted on a mobile phone, when a user of the mobile phone wants to review the picture again, a click operation may be performed on the mobile phone to generate an obtaining operation, the mobile phone sends second information to a backend server of a chat application in response to the obtaining operation to represent that the user of the mobile phone wants to retrieve the picture again, at this time, the backend server searches which devices still store the picture according to a storage identifier in the stored information, after finding a pad storing the picture, the backend server sends a retransmission request to the pad, the pad retransmits the picture to the mobile phone through the chat application according to the retransmission request, and at this time, the user of the mobile phone can review the picture content again.
When the electronic device is replaced, the first file stored in the electronic device is regarded as deleted, and therefore, the number of the first files is updated in the storage information stored in the server. For example, when a mobile phone user changes a mobile phone device to log in a chat application again, if data synchronization is not performed, the user is equivalent to delete pictures saved by the mobile phone, and at this time, the saved number of the pictures is updated in a background server of the chat application.
In one implementation, the method in this embodiment may further include the following steps, as shown in fig. 16:
step 119: and monitoring whether the first file has link update or not under the condition that the first file is the access link.
The access link refers to a link that can jump to another address page and view the page content, such as a public link or a web address link.
Specifically, in this embodiment, whether the link update exists in the first file may be monitored through an interface between pages corresponding to the first file. The method comprises the steps of determining that the first file has no link update under the condition that the first file can be accurately identified through an interface and can enter a page address corresponding to the first file, and determining that the first file has the link update under the condition that the first file cannot be accurately identified through the interface or the page address corresponding to the first file cannot be entered.
Step 120: and if the first file has link update, acquiring a target link corresponding to the first file.
The target link is a link which can enter a page address corresponding to the first file and can access page content corresponding to the first file, such as a short link or a long link.
Step 121: and associating the target link with a first file saved in the electronic equipment, so that when the first file is accessed, jumping to an access page corresponding to the target link.
For example, when the public link on the mobile phone is clicked, the target link associated with the public link is entered in the embodiment, so that the mobile phone can jump to the access page corresponding to the target link based on the target link, that is, the access page corresponding to the public link, thereby viewing the page content.
Referring to fig. 17, a schematic structural diagram of a data processing apparatus according to the second embodiment of the present application is provided, where the apparatus may be configured in an electronic device, such as a mobile phone, a pad, or a computer, that can receive a file transmitted by another device and can access the file. The technical scheme in the embodiment is mainly used for solving the technical problem that a large amount of storage space is occupied as redundant files are stored in the electronic equipment.
Specifically, the apparatus in this embodiment may include the following units:
an information acquisition unit 1701 for, in a case where an access operation for a first file is received, acquiring file information of the first file;
an information determining unit 1702, configured to determine whether the file information meets a file saving condition, where the file saving condition represents that a second file matching the file information is saved in the electronic device; the first processing unit 1703 is triggered when the file information satisfies the file saving condition, and the second processing unit 1704 is triggered when the file information does not satisfy the file saving condition.
A first processing unit 1703, configured to open a second file in the electronic device;
a second processing unit 1704, configured to store the first file in the electronic device and open the first file.
It can be seen from the foregoing technical solutions that, in the data processing apparatus provided in the second embodiment of the present application, when an access operation for a first file is received, file information of the first file is obtained, and whether the file information meets a file saving condition or not can be further determined, so that when the file information meets the file saving condition, that is, a second file matching the file information is saved in the electronic device, the second file saved in the electronic device can be directly opened, and when the file information does not meet the file saving condition, that is, a second file matching the file information is not saved in the electronic device, the first file is saved in the electronic device and the first file is opened. It can be seen that, in this embodiment, when accessing a received certain file, only when the file is not saved in the current device, the file is saved and opened in the current device, so as to provide the content of the file for the user, and if the file is already saved in the current device, the saved file is directly opened without saving the file again, thereby avoiding a situation that a large amount of storage space is occupied due to the fact that a redundant file is stored in the device.
In one implementation, the second processing unit 1704, after storing the first file in the electronic device, is further configured to: and sending first information to a server corresponding to the electronic equipment so as to update saving information corresponding to the first file in the server, wherein the saving information at least comprises the saved number of the first file.
In one implementation, the information acquisition unit 1701 is further configured to: under the condition that a deleting operation for the first file is received, obtaining saving information corresponding to the first file saved in the server; if the number of the first files stored in the storage information is 1, outputting first prompt information through an information display unit 1705, as shown in fig. 18, where the first prompt information is used to prompt that the first file in the electronic device is the last file.
In one implementation, the apparatus in this embodiment further includes the following units, as shown in fig. 19:
a transmitting unit 1706, configured to transmit the first file to the server when receiving a confirmation operation for determining that the last file is deleted for the first prompt information, so that the server stores the first file.
The first file transmitted to the server by the electronic device has a first storage effective duration, so that the server deletes the first file when the life duration of the first file stored by the server reaches the first storage effective duration.
Further, the first saving duration is related to the number of saved first files.
In one implementation, a first file saved in the electronic device has a second saving effective duration;
wherein, the second processing unit 1703 is further configured to: and under the condition that the generation duration of the first file in the electronic equipment reaches the second storage effective duration, deleting the first file stored in the electronic equipment and outputting second prompt information through an information display unit 1705, wherein the second prompt information is at least used for prompting that the first file is expired.
Based on the above implementation, after the second processing unit 1703 deletes the first file saved in the electronic device, the transmission unit 1706 is further configured to: under the condition that an obtaining operation aiming at a first file is received, sending second information to a server corresponding to the electronic equipment so that the server sends a retransmission request to other equipment saving the first file; and receiving the first file transmitted by the other device in which the first file is stored according to the retransmission request.
In one implementation, the second processing unit 1704 is further configured to: monitoring whether link update exists in the first file or not under the condition that the first file is an access link; if the first file has link update, acquiring a target link corresponding to the first file; and associating the target link with a first file saved in the electronic equipment, so that when the first file is accessed, jumping to an access page corresponding to the target link.
It should be noted that, for the specific implementation of each unit in the present embodiment, reference may be made to the corresponding content in the foregoing, and details are not described here.
Referring to fig. 20, a schematic structural diagram of an electronic device according to a third embodiment of the present application is provided, where the electronic device may be an electronic device, such as a mobile phone, a pad, or a computer, that can receive a file transmitted by another device and can access the file. The technical scheme in the embodiment is mainly used for solving the technical problem that a large amount of storage space is occupied as redundant files are stored in the electronic equipment.
Specifically, the electronic device in this embodiment may include the following structure:
a memory 2001 for storing an application program and data generated by the operation of the application program;
a processor 2002 for executing an application to implement: obtaining file information of a first file in the case of receiving an access operation for the first file; judging whether the file information meets file storage conditions or not, wherein the file storage conditions represent that a second file matched with the file information is stored in the electronic equipment; under the condition that the file information meets the file saving condition, opening a second file in the electronic equipment; and under the condition that the file information does not meet the file saving condition, saving the first file into the electronic equipment and opening the first file.
Certainly, the electronic device in this embodiment may further include a transmission module, such as a WiFi module or an antenna, for establishing a data connection with other devices and a server, so as to implement transmission of the first file and other information.
In addition, the electronic device may further include a display, such as a touch screen, for outputting the first file and outputting other information.
It can be seen from the foregoing technical solutions that, in an electronic device provided in the third embodiment of the present application, under the condition that an access operation for a first file is received, file information of the first file is obtained, and then whether the file information meets a file saving condition or not can be determined, so that under the condition that the file information meets the file saving condition, that is, a second file matched with the file information is saved in the electronic device, the second file saved in the electronic device can be directly opened, and under the condition that the file information does not meet the file saving condition, that is, under the condition that the second file matched with the file information is not saved in the electronic device, the first file is saved in the electronic device and the first file is opened. It can be seen that, in this embodiment, when accessing a received certain file, only when the file is not saved in the current device, the file is saved and opened in the current device, so as to provide the content of the file for the user, and if the file is already saved in the current device, the saved file is directly opened without saving the file again, thereby avoiding a situation that a large amount of storage space is occupied due to the fact that a redundant file is stored in the device.
In addition, the present application also provides a storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the data processing method as described in any one of the above is implemented.
Taking chat record data in social software on a mobile phone as an example, the technical scheme of the application is described in detail as follows:
first, the inventors of the present application discovered, during a chat using social software, that: daily social software can generate a large amount of chatting record data, wherein files in picture and video formats can occupy a large amount of memory space of a mobile phone of a user. At present, chat records are generally uploaded to a cloud end and downloaded from the cloud end when needed, but the scheme can trust data to the cloud end, so that the data confidentiality is reduced, extra cost is generally needed when cloud service is used, and the utilization rate is not high. Alternatively, it is also considered to migrate the chat records to another terminal, however, in this scheme, if it takes a lot of time to migrate the data to the personal computer pc (personal computer), some software cannot switch the process during the migration; when some software is migrated, the software needs to be ensured to be in the same network segment; the migration to other terminals also involves security problems such as data privacy and the like; data loss can also occur if another terminal accidentally loses data.
In view of this, the inventor of the present application proposes a technical solution for storing chat point files, and as long as at least one file is guaranteed to exist in all people in the same group chat, when someone needs to download the file again, the file can be dynamically acquired only by requesting the file again. The method comprises the following specific steps:
when the group chat application system receives a file, basic information such as the format, the size, the creation time, the image histogram and the like of a picture is converted into a file name (or a remark name), an encrypted frame extraction rule can be adopted for a video format, and the image histogram information of the frames is used as a basis for comparison.
When a user encounters the situation that the same file is repeatedly downloaded in different scenes, the following two solutions are provided:
1) active matching of group chat application system
When the user encounters the condition that the file names are the same, the user actively prompts that the file is downloaded and jumps to the corresponding chat content of the related application. For example, when a certain document is opened, the mobile phone prompts the position of the downloaded file, and opens the cached document.
2) User active matching
For example, the user may consider the file downloaded, select a file match, find a file with the same file name, and jump to the corresponding chat content of the relevant application, if any.
Based on the implementation, after the shared information in the group chat application is downloaded by the group chat user, the background of the group chat application system records the downloading condition of the user, and when the user deletes the record, the corresponding background record is also modified. And when the shared file is expired, the downloaded user is requested to resend the shared file in combination with the record condition of the background.
In addition, in order to avoid the repeated saving of the group files or the chat records, the group files or the chat records are not repeatedly saved locally, because the step of downloading again is only involved after the local files are deleted, and when the files exist in the current group files, the user is not allowed to download. In order to avoid that the group file or the chat record cannot be found after being cleared up after the expiration of the group file or the chat record is expired, the group file or the chat record is stored in the local mobile phone, and when the content is subjected to operations of deleting action, switching the user side and the like which can clear the content, the group chat application system can check the content downloaded by the mobile phone once so as to determine that the content is not deleted intentionally by people.
Specifically, taking group chat application as an example, the following processing modes are provided:
1. when the member clicks to download the chat content (picture video), the member is marked as downloaded;
2. when a group member deletes the file, the count of the mark is automatically reduced by one bit; logging in account numbers on different devices to use the chat room, and automatically and correspondingly reducing the marked count;
3. if the last chat content is stored, the system sends a prompt, and the chat record is the last backup and can not be deleted, so that the chat content is ensured to exist all the time;
4. if a group member wants to backtrack and change the content and needs to send a request to a backup keeper, the keeper sends the request to other persons;
5. when entering group chat, the user is required to agree to start the function, so that privacy disputes are avoided.
Referring to the flowchart in fig. 21, after a different user uploads a file to a group chat, if an access operation of the user is not received, the operation is directly ignored, whether another operation exists is monitored, if the access operation of the user is received, the file is downloaded, and whether an operation of deleting the file exists is determined, if the operation of deleting the file is not received, whether another operation exists is monitored, and if the operation of deleting the file is received, it is first determined whether the current device is the last device storing the file, if so, the file cannot be deleted, and if not, the file may be deleted, and a request is sent to the different user through a server when downloading is needed, so as to trigger the different user having the file to send the file again.
Therefore, the technical scheme of the application ensures that the file can be traced, the file data cannot be lost easily, the file can be always stored in a personal terminal, and the privacy of the file is improved. More importantly, the technical scheme of the application saves the memory space of the user, for example, the same video file needs to be downloaded by each person chatting among 100 people, but the space can be saved by 99% as long as 1 backup is left.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method of data processing, comprising:
the method comprises the steps of obtaining file information of a first file under the condition that an access operation aiming at the first file is received;
judging whether the file information meets file storage conditions or not, wherein the file storage conditions represent that a second file matched with the file information is stored in the electronic equipment;
under the condition that the file information meets a file saving condition, opening a second file in the electronic equipment;
and under the condition that the file information does not meet the file saving condition, saving the first file into the electronic equipment and opening the first file.
2. The method of claim 1, after saving the first file to the electronic device, the method further comprising:
and sending first information to a server corresponding to the electronic equipment so as to update saving information corresponding to the first file in the server, wherein the saving information at least comprises the saved number of the first file.
3. The method of claim 2, further comprising:
under the condition that a deleting operation for the first file is received, obtaining saving information corresponding to the first file saved in the server;
and if the number of the first files stored in the storage information is 1, outputting first prompt information, wherein the first prompt information is used for prompting that the first file in the electronic equipment is the last file.
4. The method of claim 3, further comprising:
and transmitting the first file to the server under the condition that a confirmation operation for determining to delete the last file is received aiming at the first prompt message, so that the server saves the first file.
5. The method of claim 4, wherein the first file transmitted by the electronic device to the server has a first storage validity duration, such that the server deletes the first file if the lifetime duration of the first file stored by the server reaches the first storage validity duration.
6. The method of claim 5, wherein the first retention lifetime is related to a number of times the first file is retained.
7. The method of claim 1, the first file saved in the electronic device having a second save valid duration;
wherein the method further comprises:
and under the condition that the generation duration of the first file in the electronic equipment reaches the second storage effective duration, deleting the first file stored in the electronic equipment and outputting second prompt information, wherein the second prompt information is at least used for prompting that the first file is expired.
8. The method of claim 7, after deleting the first file saved in the electronic device, the method further comprising:
under the condition that an obtaining operation aiming at a first file is received, sending second information to a server corresponding to the electronic equipment so that the server sends a retransmission request to other equipment saving the first file;
and receiving the first file transmitted by the other device in which the first file is stored according to the retransmission request.
9. The method of claim 1, further comprising:
monitoring whether link update exists in the first file or not under the condition that the first file is an access link;
if the first file has link update, acquiring a target link corresponding to the first file;
and associating the target link with a first file saved in the electronic equipment, so that when the first file is accessed, jumping to an access page corresponding to the target link.
10. A data processing apparatus comprising:
an information acquisition unit configured to acquire file information of a first file in a case where an access operation for the first file is received;
the information judging unit is used for judging whether the file information meets a file storage condition, and the file storage condition represents that a second file matched with the file information is stored in the electronic equipment; under the condition that the file information meets the file saving condition, triggering a first processing unit, and under the condition that the file information does not meet the file saving condition, triggering a second processing unit;
the first processing unit is used for opening a second file in the electronic equipment;
and the second processing unit is used for storing the first file into the electronic equipment and opening the first file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110343348.0A CN113051223A (en) | 2021-03-30 | 2021-03-30 | Data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110343348.0A CN113051223A (en) | 2021-03-30 | 2021-03-30 | Data processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113051223A true CN113051223A (en) | 2021-06-29 |
Family
ID=76516951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110343348.0A Pending CN113051223A (en) | 2021-03-30 | 2021-03-30 | Data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113051223A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102970358A (en) * | 2012-11-08 | 2013-03-13 | 百度在线网络技术(北京)有限公司 | Method and device for controlling local cache of mobile client in network disc |
CN109324999A (en) * | 2018-11-30 | 2019-02-12 | 维沃移动通信有限公司 | A kind of method and electronic equipment executing operation based on download instruction |
CN109558378A (en) * | 2018-11-28 | 2019-04-02 | 泰康保险集团股份有限公司 | File management method, device, equipment and storage medium |
WO2020140634A1 (en) * | 2019-01-04 | 2020-07-09 | 平安科技(深圳)有限公司 | Storage space optimization method and device, computer apparatus, and storage medium |
-
2021
- 2021-03-30 CN CN202110343348.0A patent/CN113051223A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102970358A (en) * | 2012-11-08 | 2013-03-13 | 百度在线网络技术(北京)有限公司 | Method and device for controlling local cache of mobile client in network disc |
CN109558378A (en) * | 2018-11-28 | 2019-04-02 | 泰康保险集团股份有限公司 | File management method, device, equipment and storage medium |
CN109324999A (en) * | 2018-11-30 | 2019-02-12 | 维沃移动通信有限公司 | A kind of method and electronic equipment executing operation based on download instruction |
WO2020140634A1 (en) * | 2019-01-04 | 2020-07-09 | 平安科技(深圳)有限公司 | Storage space optimization method and device, computer apparatus, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8086719B2 (en) | Bypassing uploading of data from a wireless device using outbound attachment caching | |
US7676544B2 (en) | File sharing system, file sharing method, and recording medium storing file sharing program | |
US9372935B2 (en) | Content management and access systems and methods | |
US8654175B2 (en) | Video messaging system | |
US9129023B2 (en) | Connected address book systems and methods | |
CN102714681B (en) | For the method and apparatus using voice mail to provide message to transmit | |
US10715572B2 (en) | Electronic devices for capturing media content and transmitting the media content to a network accessible media repository and methods of operating the same | |
US9832148B2 (en) | System and method for attaching a remotely stored attachment to an email | |
US20100054148A1 (en) | Data association system, data association method and data association program | |
CN104580121A (en) | People search/people information matching and pushing method, system, client and server | |
EP2605460A1 (en) | Method, apparatus, and system for transferring file to user of instant message system | |
CN102119525A (en) | Method and apparatus for notifying remote user interface client about event of remote user interface server in home network | |
US20020069253A1 (en) | Multimedia data electronic mail system | |
CN110971984B (en) | Wheat connecting method, device, system, equipment and storage medium | |
US20050075895A1 (en) | Method for storing and retrieving digital images with a service provider | |
US10798047B2 (en) | Systems, devices and methods for text message communication | |
CN115208873A (en) | File transmission method, device and storage medium | |
CN103139041A (en) | Method for filtering information and method, device and system for processing forwarded information | |
US8826026B2 (en) | Systems and methods for tracking electronic files in computer networks using electronic signatures | |
CN113051223A (en) | Data processing method and device | |
KR102175806B1 (en) | Method for providing contents certification in social media service and, server, user device and application implementing the method | |
KR100528590B1 (en) | Method and apparatus for performing the process such as re-transmittance of the saved spam mail and modification of the spam rule, and computer readable medium on which program for executing the method is recorded | |
CN113810266B (en) | Retry operation method, device, equipment and storage medium for message object | |
KR100813741B1 (en) | Method and System of Controlling Contents in the Wire and Wireless Communication Network | |
Chang et al. | Memory forensics for key evidence investigations in case illustrations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |