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

File processing method and device and electronic equipment Download PDF

Info

Publication number
CN111459893B
CN111459893B CN202010263066.5A CN202010263066A CN111459893B CN 111459893 B CN111459893 B CN 111459893B CN 202010263066 A CN202010263066 A CN 202010263066A CN 111459893 B CN111459893 B CN 111459893B
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.)
Active
Application number
CN202010263066.5A
Other languages
Chinese (zh)
Other versions
CN111459893A (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

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

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)

Abstract

The embodiment of the invention discloses a file processing method, a file processing device and electronic equipment. One embodiment of the method comprises the following steps: determining whether a file of the data to be processed in the cache area for processing in the external memory area belongs to a target type file or not; responding to the file used for processing of 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 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 in the cache area by the address information in the update list. The implementation method realizes the processing of the target type file stored in the external memory area on the basis of reducing the times of accessing the external memory area.

Description

File processing method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a file processing method, a file processing device and electronic equipment.
Background
With the improvement of the performance of the terminal device, the terminal device can generate a large amount of data in the running process. For example data generated by a client application installed by the terminal device. And, 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 in part 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 realize the processing of a target type file stored in a memory area on the basis of reducing the times of accessing the memory area.
In a first aspect, an embodiment of the present disclosure provides a file processing method, including: determining whether a file of the data to be processed in the cache area for processing in the external memory area belongs to a target type file or not; responding to the file used for processing of 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 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 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 apparatus, where the apparatus includes: a determining unit, configured to determine whether a file in which data to be processed in the buffer area is used for processing in the external memory area 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 update list; and the processing unit is used for 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.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a 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 method of file processing as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure 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.
The file processing method, the file processing device and the electronic equipment provided by the embodiment of the disclosure can determine whether the file to be processed in the cache area for processing the file in the external memory area belongs to the target type file. Further, in response to the file for processing of the data to be processed belonging to the target type file, address information of the data to be processed in the buffer may be stored in the update list. Still further, the target to-be-processed data may be processed 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. 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 embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of one embodiment of a method of file processing according to the present disclosure;
FIG. 2 is a schematic illustration of one application scenario of a file processing method according to the present disclosure;
FIG. 3 is a flow chart of yet another embodiment of a document processing method according to the present disclosure;
FIG. 4 is a schematic diagram of the structure of one embodiment of a document processing device according to the present disclosure;
FIG. 5 is an exemplary system architecture in which a 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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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. Furthermore, 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Referring to FIG. 1, a flow of one embodiment of a document processing method according to the present disclosure is shown. The file processing method as shown in fig. 1 is applied to terminal equipment and comprises the following steps:
step 101, determining whether the file of the data to be processed in the buffer area for processing in the external memory area belongs to the target type file.
In the present embodiment, the execution subject of the file processing method (e.g., the 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 a buffer. The buffer area may be a predefined storage area in the memory area. That is, the buffer area is part of the memory area. 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 of data to be processed for processing.
The target type file may be a file of a pre-specified type. For example, the object type file may be a system file.
In some scenarios, the buffers may include a first buffer and a second buffer. The data to be processed stored in the first buffer is used for processing files belonging to the target type file. The data to be processed stored in the second buffer area is used for processing files which do not belong to the target type files. Therefore, the execution body can determine whether the file for processing the data to be processed belongs to the target type file according to the position of the data to be processed.
And step 102, storing address information of the data to be processed in the buffer area into an update list in response to the file to be processed belongs to the target type file.
In this embodiment, in response to the file for processing the data to be processed belonging to the target type file, the execution body may store address information of the data to be processed in the buffer into the update list.
The address information indicates a storage address of the data to be processed in the buffer.
The update list may store address information of data to be processed for processing the target type file in the buffer. It will be appreciated that when there are one or more data to be processed for processing the target type file in the buffer, address information of the data to be processed in the buffer may be stored in the update list.
And step 103, 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 memory address indicated in the cache area by the address information in the update list.
In this embodiment, the execution body may process 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 memory 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 buffer area by the address information in the update list.
The target file may be a target type file that targets data to be processed for processing in the external memory area.
In some scenarios, the above-described execution body may perform the following steps for each address information in the update list. Specifically, the execution body may acquire target to-be-processed data stored in a storage address indicated by the address information in the cache region. Further, the execution body may determine a target file for processing in the external memory area, where the target data to be processed is a target file. Still further, the executing body may use the obtained target data to be processed to perform operations such as adding, deleting, modifying, etc. on the determined target file.
Referring to fig. 2, an application scenario of a file processing method according to an embodiment of the present disclosure is shown. As shown in fig. 2, the terminal device 201 can determine whether the file 205 in which the data 203 to be processed in the buffer area 202 is used for processing in the external memory area 204 belongs to a target type file. Further, in response to the file 205 for processing of the data to be processed 203 belonging to the target type file, the terminal device 201 may store address information 206 of the data to be processed 203 in the buffer 202 into the update list 207. Still further, the terminal device 201 may process target to-be-processed data (e.g., to-be-processed data 209) stored in the memory address indicated in the buffer area 202 based on each address information (e.g., address information 208) in the update list 207 for a target file (e.g., 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 will be appreciated that when a large amount of data is generated, it is necessary to access the external memory area a plurality of times to process the files to be processed in the external memory area. It will also be appreciated that accessing the external memory area multiple times shortens the lifetime of the external memory of the terminal device.
In this embodiment, in response to the file of the data to be processed in the buffer area for processing in the external memory area belonging to the target type file, address information of the data to be processed in the buffer area is stored in the update list. That is, when the file to be processed in the buffer area for processing belongs to the target type file, the file to be processed is not directly accessed to the external memory area for processing the target type file, but the address information of the data to be processed in the buffer area is stored in the update list. And 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 in the cache area by the address information in the update list. That means, one or more data to be processed stored in the buffer area is determined by updating one or more address information in the list, and further, one or more target type files in the external memory area are processed at one time using the determined one or more 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. Therefore, by reducing the number of times of accessing the external memory area, the influence on the service life of the external memory is reduced.
In some optional implementations of this embodiment, the data to be processed includes file information of the 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 body may determine whether a file to be processed for processing in the external memory area belongs to the target type file according to file information included in the data to be processed.
In some scenarios, the file information includes identification information that identifies whether the file belongs to the target type. The execution 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 identification information included in the file information in the data to be processed.
In these implementations, it is determined whether a file for which the data to be processed is to be processed belongs to a target type file by setting file information for the file to be processed 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 the file.
At this time, the execution subject may process the target file as follows.
And the first step, determining the target file from the external memory area according to the file information contained in the target data to be processed.
In some cases, the execution body may determine, from the external memory area, a file indicated by file information in the target data to be processed. Further, the execution subject may use the determined file as a target file for processing the target data to be processed.
And a second step of processing the target file based on the reference data contained in the target data to be processed.
In some scenarios, the execution body may write the reference data included in the target data to be processed into the target file.
In other cases, the execution body 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, when a file belongs to a database file, the file extension may be ".
In some cases, the execution body may determine whether the file to be processed is a data object type file according to a file extension included in the file information in the data to be processed. Thus, by setting a file extension for a file processed in the external memory area in the data to be processed, it is determined whether the file for processing of the data to be processed belongs to the target type file.
In some cases, the execution body 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 body may use the determined file as the file for processing the data to be processed. Thus, the file for processing of 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 the file to be processed for processing not belonging to the target type file, the executing entity may process the file to be processed for processing in the external memory area based on the data to be processed.
In some scenarios, the execution body may use data to be processed to perform operations such as adding, deleting, and modifying a file that is used for processing in the external memory area.
In these implementations, when the file to be processed in the cache area for processing in the external memory area does not belong to the target type file, the data to be processed is directly used, and the data to be processed is processed for the file processed in the external memory area.
In some alternative implementations of the present embodiment, the update list is stored in a memory area. At this time, one or more target type files stored in the external memory area may be processed at one time by processing the update list stored in the memory area.
In some alternative implementations of the present embodiment, the object type file is a database file. At this time, one or more database files stored in the external memory area may be processed at a time by processing one or more address information contained in the update list.
In some optional implementations of this embodiment, the execution body may process the target file as follows.
First, it is determined whether unprocessed address information exists in the update list.
In some cases, if the number of address information in the update list is greater than or equal to the preset number, the execution body may determine that unprocessed address information exists in the update list. Otherwise, the executing body may determine that unprocessed address information does not exist in the update list.
And a second step of processing the target file based on the target data to be processed in response to the presence of unprocessed address information in the update list.
In some scenarios, the execution body may process the target file in the manner described in step 103, which is not described herein.
In these implementations, the object 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 alternative implementations of the present embodiment, the above-described performing determines whether unprocessed address information is present in the update list in the following manner.
Specifically, the execution body may determine whether the update list is empty. In response to the update list not being empty, the executing entity may determine that unprocessed address information is present in the update list. In response to the update list being empty, the executing entity may determine that no unprocessed address information exists in the update list.
In these implementations, when only unprocessed address information is stored in the update list, it may be determined whether unprocessed address information is present in the update list by determining whether the update list is empty.
In some optional implementations of this embodiment, the address information in the update list is arranged sequentially in the order of the storing. That is, the update list may be regarded as a queue.
At this time, the execution body may process the target file based on the target data to be processed according to the sequence in which the address information is stored in the update list.
In some cases, the executing body may sequentially select the address information from the update list according to the sequence in which the address information is stored in the update list. Further, the execution body may acquire 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 may be processed for the target type file processed in the external memory area in the order in which the address information is stored in the update list.
With continued reference to fig. 3, a flow 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 steps of:
in step 301, it is determined whether the file in the buffer area for processing the data to be processed in the external memory area belongs to the target type file.
In step 302, address information of the data to be processed in the buffer is stored in the update list in response to the file to be processed belongs to the target type file.
The steps 301 and 302 may be performed in a similar manner to the steps 101 and 102 in the embodiment shown in fig. 1, and the descriptions of the steps 101 and 102 are also applicable to the steps 301 and 302, which are not repeated herein.
Step 303, it is determined whether the processing time of the update list is reached.
In the present embodiment, the execution subject of the file processing method (e.g., the terminal devices 501, 502 shown in fig. 5) can determine whether the processing timing of the update list is reached.
In some optional implementations of this embodiment, the executing entity may determine a time period from the last processing of the update list. Further, in response to the time period from the last processing of the updated list reaching the preset time period, the executing body may determine a processing time to reach the updated 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 time period is achieved by determining the time period from the last processing of the update list. Further, the target type files stored in the external memory area are processed every preset time length.
In some optional implementations of this embodiment, the executing entity may determine whether the current time is a time of 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 a processing time at which the update list is reached.
The time period between the times of adjacent two periodic processing update lists may be a preset time period. For example, the time period between adjacent two times of periodic processing of the update list may be 200 milliseconds.
In these implementations, the periodic processing of the object type files stored in the external memory area is achieved by setting the timing of the periodic processing update list.
Step 304, in response to reaching the processing time of the update list, 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 body may process 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 in the cache area by the address information in the update list.
In some scenarios, the executing body may process each address information in the update list in the manner described in step 103, which is not described herein.
In the present embodiment, in response to the processing timing of reaching the update list, target to-be-processed data stored based on the storage address indicated in the cache area by the address information in the update list is processed for the target file processed in the external memory area. Meaning that the update list is processed by setting the processing timing of the update list. Further, by setting the processing time of the update list, one or more target type files in the external memory area are processed by using one or more data to be processed stored in the buffer area.
With further reference to fig. 4, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a document processing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 4, the file processing apparatus of the present embodiment includes: a determining unit 401, a storing unit 402, and a first processing unit 403. The determining unit 401 is configured to: and determining whether the file to be processed in the cache area for processing in the external memory area belongs to the target type file or not. The storage unit 402 is configured to: and storing the address information of the data to be processed in the buffer area into an update list in response to the fact that the file used 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 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 in the cache area by the address information in the update list.
In this embodiment, the specific processes of the determining unit 401, the storing unit 402, the first processing unit 403 and the technical effects thereof in the file processing apparatus may refer to the descriptions related to the steps 101, 102 and 103 in the corresponding embodiment of fig. 1, and are not repeated here.
In some alternative implementations, the first processing unit 403 is further configured to: determining whether the 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 reaching the update list.
In some alternative implementations, the processing unit 403 is further configured to: and determining the processing time reaching the updated list in response to the time reaching the preset time from the last time of processing the updated list.
In some alternative implementations, the first processing unit 403 is further configured to: and determining the processing time for reaching the update list in response to the current time being the time for periodically processing the update list.
In some alternative implementations, the data to be processed includes file information for the file being processed. The determining 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 alternative implementations, the data to be processed also includes reference data for processing the file. The first processing unit 403 is further configured to: determining a target file from the 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 alternative implementations, the file information includes at least one of: file extension of the file, file name of the file.
In some alternative implementations, the file processing apparatus further includes a second processing unit (not shown in the figures). The second processing unit is used for: and processing the file of the data to be processed for processing in the external memory area based on the data to be processed in response to the data to be processed not belonging to the target type file.
In some alternative implementations, the update list is stored in a memory area.
In some alternative implementations, the object type file is a database file.
In some alternative 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 data to be processed in response to the unprocessed address information in the update list.
In some alternative 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 no unprocessed address information exists in the update list.
In some alternative implementations, the address information in the update list is arranged in order of the stored order. 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 in 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. The network 503 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
Terminal devices 501, 502 may interact with server 504 through network 503. Various client applications, such as a browser-like application, a search-like application, a news information-like application, a shopping-like application, may be installed on the terminal devices 501, 502. In some scenarios, the client application installed by the terminal device 501, 502 may generate one or more data to be processed during operation. Further, the terminal device 501, 502 may store these pending data in a 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 smartphones, tablet computers, e-book reader laptop portable computers, desktop computers, and the like. When the terminal devices 501, 502 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 504 may be a server providing various services. For example, the server 504 may store 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 may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 504 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention 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, a schematic diagram of a configuration of an electronic device (e.g., the terminal device of fig. 5) suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, 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 communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("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 contained in the electronic device; or may exist alone without being incorporated 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 the data to be processed in the cache area for processing in the external memory area belongs to a target type file or not; responding to the file used for processing of 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 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 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 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 program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit is not limited to the unit itself in some cases, and for example, the determination unit may also be described as a unit that "determines whether a file of the target type file to which the data to be processed in the cache area is for processing in the external memory area" is described.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
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. The 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 of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although 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. In 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 limiting the scope of the present 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 example forms of implementing the claims.

Claims (15)

1. A document processing method, comprising:
determining whether a file of the data to be processed in the cache area for processing in the external memory area belongs to a target type file or not;
responding to the file used for processing of 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;
processing target to-be-processed data stored by a storage address indicated in the cache region based on the address information in the update list, wherein the target to-be-processed data is used for processing a target file in the external memory region;
and responding to the file to be processed for processing does not belong to the target type file, and processing the file to be processed for processing in the external memory area based on the data to be processed.
2. The method according to claim 1, wherein the processing the target pending data for the target file processed in the external memory area based on the target pending data stored in the memory address indicated in the cache area by the address information in the update list includes:
determining whether the 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 reaching the update list.
3. The method of claim 2, wherein the determining whether the processing time of the update list is reached comprises:
and determining the processing time reaching the updated list in response to the time reaching the preset time from the last processing of the updated list.
4. The method of claim 2, wherein the determining whether the processing time of the update list is reached comprises:
and determining the processing time reaching 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 the data to be processed in the buffer area for processing in the external memory area belongs to the target type file includes:
and determining whether the file to be processed 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 comprises reference data for processing the file; and
the processing the target to-be-processed data stored in the storage address indicated in the cache area based on the address information in the update list for the target file processed in the external memory area includes:
determining the target file from the external memory area according to the 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, wherein the updated list is stored in a memory area.
9. The method of claim 1, wherein the object type file is a database file.
10. The method according to claim 1, wherein the processing the target pending data for the target file processed in the external memory area based on the target pending data stored in the memory address indicated in the cache area by the address information in the update list includes:
determining whether unprocessed address information exists in the update list;
and processing the target file based on the target data to be processed in response to the unprocessed address information in the update list.
11. The method of claim 10, wherein the determining whether unprocessed address information is present in the update list comprises:
determining that unprocessed address information exists in the update list in response to the update list not being empty;
and in response to the update list being empty, determining that unprocessed address information does not exist in the update list.
12. The method of claim 1, wherein address information in the updated list is arranged in sequence according to a stored order; and
The processing the target to-be-processed data stored in the storage address indicated in the cache area based on the address information in the update list for the target file processed in the external memory 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.
13. A document processing apparatus, comprising:
a determining unit, configured to determine whether a file in which data to be processed in the buffer area is used for processing in the external memory area 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 update list;
a first processing unit, configured to process target to-be-processed data stored in a storage address indicated in the cache area based on address information in the update list, the target to-be-processed data being used for a target file processed in the external memory area;
and the second processing unit is used for responding to the fact that the file used for processing the data to be processed does not belong to the target type file, and processing the file used for processing the data to be processed in the external memory area based on the data to be processed.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-12.
15. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-12.
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 CN111459893A (en) 2020-07-28
CN111459893B true 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)

Families Citing this family (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 (9)

* 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
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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7908413B2 (en) * 2003-07-15 2011-03-15 International Business Machines Corporation Data allocation in a distributed storage system
US9122791B2 (en) * 2013-03-05 2015-09-01 International Business Machines Corporation Identifying a storage location for a storage address requested during debugging
JP2015011570A (en) * 2013-06-28 2015-01-19 株式会社東芝 Storage device, electronic apparatus, control method of storage device, and control program of storage device
FR3022653B1 (en) * 2014-06-20 2017-10-13 Bull Sas REDUCTION OF EVICTIONS IN CACHE MEMORY MANAGEMENT DIRECTORIES

Patent Citations (9)

* 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
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

Also Published As

Publication number Publication date
CN111459893A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
CN112256231B (en) Volume control method, device, terminal and storage medium
CN111240834B (en) Task execution method, device, electronic equipment and storage medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN110633126B (en) Information display method and device and electronic equipment
CN111259636B (en) Document rendering method and device and electronic equipment
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN112035529A (en) Caching method and device, electronic equipment and computer readable storage medium
CN111459893B (en) File processing method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111273884A (en) Image display method and device and electronic equipment
CN116679930A (en) Front-end project construction method and device, electronic equipment and storage medium
CN111756833B (en) Node processing method, node processing device, electronic equipment and computer readable medium
CN112100211B (en) Data storage method, apparatus, electronic device, and computer readable medium
CN110619079B (en) Method and device for pushing information
CN111259291B (en) View display method and device and electronic equipment
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN113518183A (en) Camera calling method and device and electronic equipment
CN113176937A (en) Task processing method and device and electronic equipment
CN111694679B (en) Message processing method and device and electronic equipment
CN113138883B (en) Message processing method and device, storage medium and electronic equipment
CN111562913B (en) Method, device and equipment for pre-creating view component and computer readable medium
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN111626787B (en) Resource issuing method, device, medium and equipment

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