CN111459893A - File processing method and device and electronic equipment - Google Patents

File processing method and device and electronic equipment Download PDF

Info

Publication number
CN111459893A
CN111459893A CN202010263066.5A CN202010263066A CN111459893A CN 111459893 A CN111459893 A CN 111459893A CN 202010263066 A CN202010263066 A CN 202010263066A CN 111459893 A CN111459893 A CN 111459893A
Authority
CN
China
Prior art keywords
file
processed
processing
data
target
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.)
Granted
Application number
CN202010263066.5A
Other languages
Chinese (zh)
Other versions
CN111459893B (en
Inventor
李志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010263066.5A priority Critical patent/CN111459893B/en
Publication of CN111459893A publication Critical patent/CN111459893A/en
Application granted granted Critical
Publication of CN111459893B publication Critical patent/CN111459893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure discloses a file processing method and device and electronic equipment. One embodiment of the method comprises: determining whether a file of which the data to be processed in the cache region is used for processing in the external memory region belongs to a target type file or not; responding to that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an update list; and processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list. The embodiment implements processing of the target type file stored in the external memory area on the basis of reducing the number of times of accessing the external memory area.

Description

File processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a file processing method and apparatus, and an electronic device.
Background
With the improvement of the performance of the terminal equipment, the terminal equipment can generate a large amount of data in the operation process. For example data generated by a client application installed by the terminal device. In addition, the external memory of the terminal device stores files to be processed.
In some scenarios, the terminal device may use the generated data to process files in the external memory that need to be processed.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a file processing method, a file processing device and electronic equipment, which are used for realizing the processing of a target type file stored in an external memory area on the basis of reducing the number of times of accessing the external memory area.
In a first aspect, an embodiment of the present disclosure provides a file processing method, where the method includes: determining whether a file of which the data to be processed in the cache region is used for processing in the external memory region belongs to a target type file or not; responding to that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an update list; and processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list.
In a second aspect, an embodiment of the present disclosure provides a file processing method and apparatus, where the apparatus includes: the determining unit is used for determining whether a file of the data to be processed in the cache region for processing in the external memory region belongs to a target type file; the storage unit is used for responding to that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an updating list; and the processing unit is used for processing the target to-be-processed data which is used for the target file processed in the external memory area and is stored in the storage address indicated in the cache area based on the address information in the updating list.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the file processing method according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the file processing method according to the first aspect.
According to the file processing method and device and the electronic equipment, whether the file, of which the data to be processed in the cache region is used for processing in the external memory region, belongs to the target type file or not can be determined. Further, in response to that the file for processing the data to be processed belongs to the target type file, the address information of the data to be processed in the cache area may be stored in the update list. Still further, the target data to be processed for the target file processed in the external memory area may be processed based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list. Thus, the processing of the target type file stored in the external memory area is realized on the basis of reducing the number of times of accessing the external memory area.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram for one embodiment of a document processing method according to the present disclosure;
FIG. 2 is a schematic diagram of one application scenario of a document processing method according to the present disclosure;
FIG. 3 is a flow diagram of yet another embodiment of a document processing method according to the present disclosure;
FIG. 4 is a schematic block diagram of one embodiment of a document processing apparatus according to the present disclosure;
FIG. 5 is an exemplary system architecture to which the file processing method of one embodiment of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to FIG. 1, a flow diagram of one embodiment of a document processing method according to the present disclosure is shown. As shown in fig. 1, the file processing method is applied to a terminal device, and includes the following steps:
step 101, determining whether a file of data to be processed in a cache region for processing in an external memory region belongs to a target type file.
In the present embodiment, the execution subject of the file processing method (e.g., terminal devices 501, 502 shown in fig. 5) may determine whether the data to be processed in the buffer area is for a file to be processed in the external memory area to belong to the target type file.
The data to be processed may be data to be processed stored in the buffer. The buffer may be a predefined storage area in the memory area. That is, the cache region belongs to a portion of the memory region. The memory area may be a storage area provided by an internal memory.
The external memory area may be a memory area provided by an external memory. It will be appreciated that the external memory area may store files for processing of the data to be processed.
The target type file may be a file of a pre-specified type. For example, the target type file may be a system file.
In some scenarios, the cache region may include a first cache region and a second cache region. The data to be processed stored in the first cache region is used for processing files belonging to the target type files. And the data to be processed stored in the second cache region is used for processing files which do not belong to the target type file. Therefore, the execution main body can determine whether the file used for processing by the data to be processed belongs to the target type file or not according to the position of the data to be processed.
And 102, in response to that the file for processing the data to be processed belongs to the target type file, storing the address information of the data to be processed in the cache area into an update list.
In this embodiment, in response to that the file for processing the data to be processed belongs to the target type file, the execution main body may store the address information of the data to be processed in the cache area into the update list.
The address information indicates the storage address of the data to be processed in the cache region.
The update list may store address information of the data to be processed for processing the target type file in the cache region. It is understood that when one or more pieces of to-be-processed data for processing the target type file exist in the cache region, the address information of the to-be-processed data in the cache region may be stored in the update list.
And 103, processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored in the storage address indicated by the address information in the updating list in the cache area.
In this embodiment, the execution subject described above may process target to-be-processed data for a target file processed in the external memory area, based on the target to-be-processed data stored at the storage address indicated in the cache area by the address information in the update list.
The target data to be processed may be data to be processed stored at a storage address indicated in the cache area by the address information in the update list.
The target file may be a target type file for target data to be processed for processing in the external memory area.
In some scenarios, for each address information in the update list, the execution body may perform the following steps. Specifically, the execution main body may obtain target data to be processed, which is stored in a storage address indicated by the address information in the cache region. Further, the execution body may also determine a target file for processing the target data to be processed in the external memory area. Still further, the executing agent may perform operations such as adding, deleting, and modifying the determined target file using the acquired target to-be-processed data.
Referring to fig. 2, an application scenario of the file processing method according to the embodiment of the present disclosure is shown. As shown in fig. 2, the terminal device 201 may determine whether a file 205 in the buffer area 202 for processing in the external memory area 204 is a target type file. Further, in response to the file 205 for processing of the to-be-processed data 203 belonging to the target type file, the terminal device 201 may store the address information 206 of the to-be-processed data 203 in the buffer 202 into the update list 207. Still further, the terminal device 201 may process target to-be-processed data (for example, to-be-processed data 209) stored at the storage address indicated in the buffer area 202 based on each address information (for example, address information 208) in the update list 207 for a target file (for example, file 210) processed in the external memory area 204.
In the related art, when data is generated, a terminal device directly accesses an external memory and processes a file to be processed in the external memory using the generated data. It can be understood that when a large amount of data is generated, the file to be processed in the external memory area needs to be processed by accessing the external memory area multiple times. It can also be understood that accessing the external memory area multiple times may shorten the lifetime of the external memory of the terminal device.
In this embodiment, in response to that the file of the data to be processed in the cache region for processing in the external memory region belongs to the target type file, the address information of the data to be processed in the cache region is stored in the update list. That is, when the file used for processing the data to be processed in the cache region belongs to the target type file, the target type file is not processed by directly accessing the external memory region, but the address information of the data to be processed in the cache region is stored in the update list. And processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list. It means that one or more pieces of data to be processed stored in the cache area are determined by updating one or more pieces of address information in the list, and further, one or more target type files in the external memory area are processed at a time by using the determined one or more pieces of data to be processed. Thus, the processing of the target type file stored in the external memory area is realized on the basis of reducing the number of times of accessing the external memory area. Thus, the influence on the service life of the external memory is reduced by reducing the number of times of accessing the external memory area.
In some optional implementations of this embodiment, the data to be processed includes file information of a file for processing.
The file information may be various information describing the file. For example, the file information includes the file size of the file.
At this time, the execution main body may determine whether a file of the to-be-processed file for processing in the external memory area belongs to the target type file according to file information included in the to-be-processed data.
In some scenarios, the file information includes identification information that identifies whether the file belongs to the target type. The execution main body may determine whether a file of the data to be processed for processing in the external memory area belongs to the target type file according to the identification information included in the file information in the data to be processed.
In these implementations, it is determined whether a file for processing of the data to be processed belongs to the target type file by setting file information of the file for processing in the external memory area in the data to be processed.
In some optional implementations of this embodiment, the data to be processed further includes reference data for processing a file.
At this time, the execution body described above may process the target file as follows.
Firstly, determining a target file from an external memory area according to file information contained in target data to be processed.
In some scenarios, the execution subject may determine a file indicated by file information in the target data to be processed from the external memory area. Further, the execution subject may use the determined file as a target file for processing of target data to be processed.
And secondly, processing the target file based on the reference data contained in the target data to be processed.
In some scenarios, the execution subject may write reference data contained in the target data to be processed into the target file.
In other scenarios, the execution agent may modify or delete the data stored in the target file according to the reference data included in the target data to be processed.
In these implementations, the target-type file indicated in the external memory area by the file information contained in the data to be processed is processed by the reference data contained in the data to be processed.
In some optional implementations of this embodiment, the file information includes at least one of: file extension of the file, file name of the file.
In some scenarios, the file extension may be ". db" when the file belongs to a database file.
In some scenarios, the execution subject may determine whether the file used for processing the data to be processed is a data object type file according to a file extension included in file information in the data to be processed. Thus, it is determined whether or not the file for processing of the data to be processed belongs to the target type file by setting the file extension for the file processed in the external memory area in the data to be processed.
In some scenarios, the execution subject may determine, from the external memory area, a file indicated by a file name included in the file information in the data to be processed. Further, the execution subject may use the determined file as a file for processing of the data to be processed. Thus, the file for processing the data to be processed is determined by setting the file name of the file for processing in the external memory area in the data to be processed.
In some optional implementations of this embodiment, in response to that the file for processing of the data to be processed does not belong to the target type file, the execution main body may process the data to be processed for the file processed in the external memory area based on the data to be processed.
In some scenarios, the execution subject may use the data to be processed to perform operations such as adding, deleting, modifying, etc. on the file that is used for processing in the external memory area.
In these implementations, when a file in the cache region for which data to be processed is for processing in the external memory region does not belong to the target type file, the file in the cache region for processing in the external memory region is processed using the data to be processed directly.
In some optional implementations of this embodiment, the update list is stored in the memory area. At this time, one or more target type files stored in the external memory area may be processed at a time by processing the update list stored in the internal memory area.
In some optional implementations of this embodiment, the target type file is a database file. At this time, one or more database files stored in the external memory area may be processed at once by processing one or more address information included in the update list.
In some optional implementations of the embodiment, the execution subject may process the target file as follows.
First, it is determined whether unprocessed address information exists in the update list.
In some scenarios, if the number of address information in the update list is greater than or equal to a preset number, the execution main body may determine that unprocessed address information exists in the update list. Otherwise, the execution subject may determine that unprocessed address information does not exist in the update list.
And secondly, responding to the unprocessed address information in the updating list, and processing the target file based on the target to-be-processed data.
In some scenarios, the execution subject may process the target file in the manner described in step 103, which is not described herein again.
In these implementations, the target type file stored in the external memory area is processed on the premise that it is determined that unprocessed address information exists in the update list.
In some optional implementations of this embodiment, the performing determines whether unprocessed address information exists in the update list as follows.
Specifically, the execution body may determine whether the update list is empty. In response to the update list not being empty, the execution body may determine that unprocessed address information exists in the update list. In response to the update list being empty, the execution body may determine that there is no unprocessed address information in the update list.
In these implementations, when only unprocessed address information is stored in the update list, it can be determined whether unprocessed address information exists in the update list by determining whether the update list is empty.
In some optional implementation manners of this embodiment, the address information in the update list is sequentially arranged according to the stored sequence. That is, the update list may be viewed as a queue.
At this time, the execution main body may process the target file based on the target data to be processed according to the sequence of storing the address information into the update list.
In some scenarios, the execution main body may sequentially select the address information from the update list according to the sequence of storing the address information into the update list. Further, the executing agent may obtain the target data to be processed and determine the target file in the manner described in step 103, and process the target file using the target data to be processed.
In these implementations, the data to be processed for the target type file processed in the external memory area may be processed according to the order in which the address information is stored in the update list.
Continuing to refer to FIG. 3, a flow diagram of yet another embodiment of a document processing method according to the present disclosure is shown. As shown in fig. 3, the file processing method includes the following steps:
step 301, determining whether a file of the data to be processed in the cache region for processing in the external memory region belongs to a target type file.
Step 302, in response to that the file for processing the data to be processed belongs to the target type file, storing the address information of the data to be processed in the cache area into an update list.
Step 301 and step 302 may be performed in a similar manner as step 101 and step 102 in the embodiment shown in fig. 1, and the above description for step 101 and step 102 also applies to step 301 and step 302, which is not described herein again.
Step 303, determine whether the processing time of the update list is reached.
In the present embodiment, the execution subject of the file processing method (e.g., terminal apparatuses 501, 502 shown in fig. 5) can determine whether the processing time of the update list is reached.
In some optional implementations of this embodiment, the execution subject may determine a time period from the last time the updated list is processed. Further, in response to that the time length from the last time of processing the update list reaches a preset time length, the execution subject may determine the processing time to reach the update list.
The preset time period may be a preset time period. For example, the preset duration may be 200 milliseconds.
In these implementations, processing the update list every preset duration is implemented by determining a duration from the last time the update list was processed. Further, the target type file stored in the external memory area is processed every preset time.
In some optional implementations of this embodiment, the execution subject may determine whether the current time is a time for periodically processing the update list. Further, in response to the current time being a time at which the update list is periodically processed, the execution body may determine that the processing time of the update list is reached.
The time duration between the timings of two adjacent periodic processing update lists may be a preset time duration. For example, the time duration between the timings of two adjacent periodic processing update lists may be 200 milliseconds.
In these implementations, the periodic processing of the target type file stored in the external memory area is achieved by setting the time at which the update list is periodically processed.
And 304, responding to the processing time of the update list, and processing the target file based on the target data to be processed.
In this embodiment, in response to reaching the processing time of the update list, the execution main body described above may process target to-be-processed data for a target file processed in the external memory area, based on the target to-be-processed data stored at the storage address indicated in the cache area by the address information in the update list.
In some scenarios, the execution main body may process each address information in the update list in the manner described in step 103, and details are not described here.
In the present embodiment, in response to the arrival of the processing timing of the update list, the target to-be-processed data stored at the storage address indicated in the cache area based on the address information in the update list is processed for the target file processed in the external memory area. This means that the update list is processed by setting the processing timing of the update list. Further, one or more target type files in the external memory area are processed by setting the processing time of the update list and using one or more pieces of data to be processed stored in the cache area.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a file processing apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 4, the document processing apparatus of the present embodiment includes: a determination unit 401, a storage unit 402, a first processing unit 403. The determination unit 401 is configured to: and determining whether the file of which the data to be processed in the cache region is used for processing in the external memory region belongs to the target type file. The storage unit 402 is used for: and storing the address information of the data to be processed in the cache area into an update list in response to that the file for processing the data to be processed belongs to the target type file. The first processing unit 403 is configured to: and processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list.
In this embodiment, the specific processing of the determining unit 401, the storing unit 402, and the first processing unit 403 of the file processing apparatus and the technical effects thereof can refer to the related descriptions of step 101, step 102, and step 103 in the corresponding embodiment of fig. 1, which are not described herein again.
In some optional implementations, the first processing unit 403 is further configured to: determining whether a processing time of the update list is reached; and processing the target file based on the target to-be-processed data in response to the processing time of the update list being reached.
In some optional implementations, the processing unit 403 is further configured to: and determining the processing time of reaching the update list in response to the fact that the time from the last time of processing the update list reaches the preset time.
In some optional implementations, the first processing unit 403 is further configured to: and determining the processing time of the update list in response to the current time being the time of periodically processing the update list.
In some optional implementations, the data to be processed includes file information of a file used for processing. The determination unit 401 is further configured to: and determining whether the file to be processed for processing in the external memory area belongs to the target type file or not according to the file information contained in the data to be processed.
In some optional implementations, the data to be processed further includes reference data for processing the file. The first processing unit 403 is further configured to: determining a target file from an external memory area according to file information contained in target data to be processed; and processing the target file based on the reference data contained in the target data to be processed.
In some optional implementations, the file information includes at least one of: file extension of the file, file name of the file.
In some alternative implementations, the document processing apparatus further includes a second processing unit (not shown in the figures). The second processing unit is used for: in response to the file for which the data to be processed is for processing not belonging to the target type file, processing the data to be processed for the file processed in the external memory area based on the data to be processed.
In some alternative implementations, the update list is stored in a memory area.
In some alternative implementations, the target type file is a database file.
In some optional implementations, the first processing unit 403 is further configured to: determining whether unprocessed address information exists in the update list; and processing the target file based on the target to-be-processed data in response to the unprocessed address information existing in the update list.
In some optional implementations, the first processing unit 403 is further configured to: determining that unprocessed address information exists in the update list in response to the update list not being empty; in response to the update list being empty, it is determined that unprocessed address information is not present in the update list.
In some optional implementation manners, the address information in the update list is sequentially arranged according to the stored sequence. The first processing unit 403 is further configured to: and processing the target file based on the target data to be processed according to the sequence of storing the address information into the update list.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture to which the file processing method of one embodiment of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, a network 503, and a server 504. The network 503 is the medium used to provide communication links between the terminal devices 501, 502 and the server 504. Network 503 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 501, 502 may interact with a server 504 via a network 503. The terminal devices 501 and 502 may have various client applications installed thereon, such as a browser application, a search application, a news application, and a shopping application. In some scenarios, a client application installed on a terminal device 501, 502 may generate one or more pieces of pending data during operation. Further, the terminal devices 501 and 502 may store the data to be processed in the buffer.
The terminal devices 501 and 502 may be hardware or software. When the terminal devices 501, 502 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal devices 501 and 502 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 504 may be a server that provides various services. For example, the server 504 may store the data to be processed generated by the terminal devices 501, 502. In some scenarios, server 504 may not be included in the system architecture shown in fig. 5.
The server 504 may be hardware or software. When the server 504 is hardware, it can be implemented as a distributed server cluster composed of a plurality of servers, or as a single server. When the server 504 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the file processing method provided by the embodiment of the present disclosure may be executed by the terminal devices 501 and 502, and accordingly, the file processing apparatus may be disposed in the terminal devices 501 and 502.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., the terminal device of fig. 5) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 607 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 608 including, for example, magnetic tape, hard disk, etc., and communication devices 609. the communication devices 609 may allow the electronic device to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). examples of communications networks include local area networks ("L AN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining whether a file of which the data to be processed in the cache region is used for processing in the external memory region belongs to a target type file or not; responding to that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an update list; and processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored at the storage address indicated in the cache area by the address information in the update list.
Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation on the unit itself, for example, the determination unit may also be described as a unit that determines whether or not a file in the cache for which data to be processed is used for processing in the external memory area belongs to the target type file.
For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CP L D), and so forth.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (16)

1. A file processing method, comprising:
determining whether a file of which the data to be processed in the cache region is used for processing in the external memory region belongs to a target type file or not;
responding to that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an update list;
and processing the target data to be processed for the target file processed in the external memory area based on the target data to be processed stored in the storage address indicated by the address information in the update list in the cache area.
2. The method according to claim 1, wherein the processing the target to-be-processed data for the target file processed in the external memory area based on the target to-be-processed data stored at the storage address indicated in the cache area by the address information in the update list comprises:
determining whether a processing time of the update list is reached;
and processing the target file based on the target data to be processed in response to the processing time of the update list.
3. The method of claim 2, wherein the determining whether the processing time of the updated list is reached comprises:
and determining the processing time of reaching the updated list in response to the fact that the time from the last time of processing the updated list reaches a preset time.
4. The method of claim 2, wherein the determining whether the processing time of the updated list is reached comprises:
and determining the processing time of the update list in response to the current time being the time of periodically processing the update list.
5. The method according to claim 1, wherein the data to be processed includes file information of a file for processing; and
the determining whether the file of which the data to be processed in the cache region is used for processing in the external memory region belongs to the target type file includes:
and determining whether the file of the file to be processed, which is used for processing in the external memory area, belongs to the target type file or not according to the file information contained in the data to be processed.
6. The method according to claim 5, wherein the data to be processed further includes reference data for processing the file; and
the processing the target to-be-processed data for the target file processed in the external memory area based on the target to-be-processed data stored in the storage address indicated by the address information in the update list in the cache area includes:
determining the target file from the external memory area according to file information contained in the target data to be processed;
and processing the target file based on the reference data contained in the target data to be processed.
7. The method of claim 5, wherein the file information comprises at least one of: file extension of the file, file name of the file.
8. The method of claim 1, further comprising:
and in response to the file for processing of the data to be processed not belonging to the target type file, processing the file for processing in the external memory area based on the data to be processed.
9. The method of claim 1, wherein the update list is stored in a memory area.
10. The method of claim 1, wherein the target type file is a database file.
11. The method according to claim 1, wherein the processing the target to-be-processed data for the target file processed in the external memory area based on the target to-be-processed data stored at the storage address indicated in the cache area by the address information in the update list comprises:
determining whether unprocessed address information exists in the update list;
and responding to the unprocessed address information in the updating list, and processing the target file based on the target to-be-processed data.
12. The method of claim 11, wherein the determining whether unprocessed address information exists in the update list comprises:
determining that unprocessed address information exists in the update list in response to the update list not being empty;
determining that unprocessed address information does not exist in the update list in response to the update list being empty.
13. The method according to claim 1, wherein the address information in the update list is arranged in sequence according to the stored sequence; and
the processing the target to-be-processed data for the target file processed in the external memory area based on the target to-be-processed data stored in the storage address indicated by the address information in the update list in the cache area includes:
and processing the target file based on the target data to be processed according to the sequence of storing the address information into the update list.
14. A document processing apparatus, characterized by comprising:
the determining unit is used for determining whether a file of the data to be processed in the cache region for processing in the external memory region belongs to a target type file;
the storage unit is used for responding to the fact that the file used for processing the data to be processed belongs to the target type file, and storing the address information of the data to be processed in the cache area into an updating list;
a first processing unit, configured to process, based on target to-be-processed data stored at a storage address indicated in the cache region by address information in the update list, a target file used for processing in the external storage region by the target to-be-processed data.
15. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-13.
16. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-13.
CN202010263066.5A 2020-04-03 2020-04-03 File processing method and device and electronic equipment Active CN111459893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010263066.5A CN111459893B (en) 2020-04-03 2020-04-03 File processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010263066.5A CN111459893B (en) 2020-04-03 2020-04-03 File processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111459893A true CN111459893A (en) 2020-07-28
CN111459893B CN111459893B (en) 2023-08-22

Family

ID=71683626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010263066.5A Active CN111459893B (en) 2020-04-03 2020-04-03 File processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111459893B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010222A (en) * 2021-02-07 2021-06-22 神威超算(北京)科技有限公司 File processing method and server

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5247665A (en) * 1988-09-30 1993-09-21 Kabushiki Kaisha Toshiba Data base processing apparatus using relational operation processing
US20050015566A1 (en) * 2003-07-15 2005-01-20 Ofir Zohar Data allocation in a distributed storage system
US20140258785A1 (en) * 2013-03-05 2014-09-11 International Business Machines Corporation Identifying a storage location for a storage address requested during debugging
US20150006811A1 (en) * 2013-06-28 2015-01-01 Kabushiki Kaisha Toshiba Storage device, electronic apparatus, control method of storage device, and control program for storage device
CN104503707A (en) * 2014-12-24 2015-04-08 华为技术有限公司 Method and device for reading data
US20150370709A1 (en) * 2014-06-20 2015-12-24 Bull Sas Reduction of evictions in cache memory management directories
CN105677849A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Data updating method and device
CN107562851A (en) * 2017-08-28 2018-01-09 北京奇艺世纪科技有限公司 A kind of update method of data, device and electronic equipment
CN108733507A (en) * 2017-04-17 2018-11-02 伊姆西Ip控股有限责任公司 The method and apparatus of file backup and recovery
CN109558386A (en) * 2018-11-26 2019-04-02 北京微播视界科技有限公司 A kind of caching method of client data, device, equipment and medium
CN109597818A (en) * 2018-11-28 2019-04-09 优刻得科技股份有限公司 Data-updating method, device, storage medium and equipment
CN110413413A (en) * 2019-07-26 2019-11-05 北京蜜莱坞网络科技有限公司 A kind of method for writing data, device, equipment and storage medium
CN110737392A (en) * 2018-07-20 2020-01-31 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing addresses in a storage system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5247665A (en) * 1988-09-30 1993-09-21 Kabushiki Kaisha Toshiba Data base processing apparatus using relational operation processing
US20050015566A1 (en) * 2003-07-15 2005-01-20 Ofir Zohar Data allocation in a distributed storage system
US20140258785A1 (en) * 2013-03-05 2014-09-11 International Business Machines Corporation Identifying a storage location for a storage address requested during debugging
US20150006811A1 (en) * 2013-06-28 2015-01-01 Kabushiki Kaisha Toshiba Storage device, electronic apparatus, control method of storage device, and control program for storage device
US20150370709A1 (en) * 2014-06-20 2015-12-24 Bull Sas Reduction of evictions in cache memory management directories
CN104503707A (en) * 2014-12-24 2015-04-08 华为技术有限公司 Method and device for reading data
CN105677849A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Data updating method and device
CN108733507A (en) * 2017-04-17 2018-11-02 伊姆西Ip控股有限责任公司 The method and apparatus of file backup and recovery
CN107562851A (en) * 2017-08-28 2018-01-09 北京奇艺世纪科技有限公司 A kind of update method of data, device and electronic equipment
CN110737392A (en) * 2018-07-20 2020-01-31 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing addresses in a storage system
CN109558386A (en) * 2018-11-26 2019-04-02 北京微播视界科技有限公司 A kind of caching method of client data, device, equipment and medium
CN109597818A (en) * 2018-11-28 2019-04-09 优刻得科技股份有限公司 Data-updating method, device, storage medium and equipment
CN110413413A (en) * 2019-07-26 2019-11-05 北京蜜莱坞网络科技有限公司 A kind of method for writing data, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010222A (en) * 2021-02-07 2021-06-22 神威超算(北京)科技有限公司 File processing method and server

Also Published As

Publication number Publication date
CN111459893B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
CN111581563A (en) Page response method and device, storage medium and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN112256231A (en) Volume control method, device, terminal and storage medium
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN111400625A (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111259636A (en) Document rendering method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111459893B (en) File processing method and device and electronic equipment
CN114116247A (en) Redis-based message processing method, device, system, server and medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
CN111273884A (en) Image display method and device and electronic equipment
CN110619079B (en) Method and device for pushing information
CN111756833B (en) Node processing method, node processing device, electronic equipment and computer readable medium
CN110113416B (en) Method and device for displaying information
CN113760929A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN113518183A (en) Camera calling method and device and electronic equipment
CN111241443A (en) Method and device for pushing information and electronic equipment
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112306317A (en) Unread message notification method and device and electronic equipment
CN111562913B (en) Method, device and equipment for pre-creating view component and computer readable medium
CN111694679B (en) Message processing method and device and electronic equipment
CN115993942B (en) Data caching method, device, electronic equipment and computer readable medium
CN110633324B (en) Method, apparatus, electronic device and computer readable medium for synchronizing data

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
GR01 Patent grant
GR01 Patent grant