CN115292254A - File storage method and device, medium and electronic equipment - Google Patents

File storage method and device, medium and electronic equipment Download PDF

Info

Publication number
CN115292254A
CN115292254A CN202210970428.3A CN202210970428A CN115292254A CN 115292254 A CN115292254 A CN 115292254A CN 202210970428 A CN202210970428 A CN 202210970428A CN 115292254 A CN115292254 A CN 115292254A
Authority
CN
China
Prior art keywords
file
target file
storage
target
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210970428.3A
Other languages
Chinese (zh)
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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information 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 Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202210970428.3A priority Critical patent/CN115292254A/en
Publication of CN115292254A publication Critical patent/CN115292254A/en
Pending legal-status Critical Current

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/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • 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

Abstract

The disclosure belongs to the technical field of computers, and relates to a file storage method and device, a medium and electronic equipment. The method comprises the following steps: acquiring a binary file and a target file corresponding to the binary file, and mapping the binary file to obtain a target file name of the target file; and searching the name of the target file under the storage path of the target file, and determining the storage result of the target file under the storage path according to the search result. The method and the device perform mapping processing on the binary file to determine the target file name of the target file, establish the mapping relation between the binary file and the target file, and provide data support and theoretical basis for determining the storage result of the target file. Furthermore, the storage result of the target file is determined according to the search result of the target file name under the storage path, and the single target file is stored, so that the storage granularity of the target file is refined, the problem of storage redundancy of the target file is solved, and the disk space is further saved.

Description

File storage method and device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a file storage method, a file storage apparatus, a computer-readable storage medium, and an electronic device.
Background
In a typical program compilation process, code is submitted by a developer to trigger the compilation machine to build. When the construction is completed, a batch of binary files and a corresponding batch of PDB (Program DataBase File) files may be generated. Binary files generally have a version number to distinguish each construction. The PDB files are processed in various ways, and most commonly, all PDB files are copied to a certain disk directory, and the version number of a binary file is used as a parent folder. Besides, in order to save space, all PDBs can be packaged and compressed, and the version number is used as the file name. Therefore, when the PDB file needs to be used, the PDB file can be obtained according to the version number of the program. This way of storage is very intuitive and simple.
However, since program building is generally incremental building, the code of a module has a variable to regenerate the binary file and the PDB file, and a module without a change is not regenerated but uses the result of the last building. Therefore, the storage method can store all the PDB files of each version, which results in redundancy of a large number of PDB files and further occupies a large amount of disk space.
In view of the above, there is a need in the art to develop a new file storage method and apparatus.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a file storage method, a file storage apparatus, a computer-readable storage medium, and an electronic device, so as to overcome, at least to some extent, the technical problems of file storage redundancy and large space occupation due to the limitations of the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of an embodiment of the present invention, there is provided a file storage method, including:
acquiring a binary file and a target file corresponding to the binary file, and mapping the binary file to obtain a target file name of the target file;
and searching the name of the target file under the storage path of the target file, and determining the storage result of the target file under the storage path according to the search result.
In an exemplary embodiment of the present invention, the binary file includes: a program file, the program file comprising: executable files and library files.
In an exemplary embodiment of the invention, the object file includes: and debugging the file by the program.
In an exemplary embodiment of the present invention, the mapping the binary file to obtain the target file name of the target file includes:
and calculating the binary file by using a password hash function to obtain the target file name of the target file.
In an exemplary embodiment of the present invention, the mapping the binary file to obtain the target file name of the target file includes:
calculating the binary file by using a password hash function to obtain a hash value, and acquiring a time stamp for constructing the binary file;
and combining the hash value and the time stamp to obtain the target file name of the target file.
In an exemplary embodiment of the present invention, the determining, according to the search result, a storage result of the target file under the storage path includes:
when the search result is that the target file name is included in the storage path, determining that the storage result of the target file is that the target file is not stored in the storage path;
and when the search result indicates that the target file name is not included in the storage path, determining that the storage result of the target file is that the target file is stored according to the target file name in the storage path.
In an exemplary embodiment of the present invention, after determining the storage result of the target file under the storage path according to the search result, the method further includes:
acquiring a file to be debugged and a first file name of the file to be debugged, and mapping the file to be debugged to obtain a second file name;
searching the target file name which is the same as the second file name under the storage path, and downloading a target file which is the same as the second file name and corresponds to the target file name;
and renaming the downloaded target file according to the first file name so as to debug the renamed target file.
According to a second aspect of an embodiment of the present invention, there is provided a file storage apparatus including:
the file mapping module is configured to acquire a binary file and a target file corresponding to the binary file, and map the binary file to obtain a target file name of the target file;
and the file storage module is configured to search the target file name under the storage path of the target file and determine the storage result of the target file under the storage path according to the search result.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory has stored thereon computer readable instructions which, when executed by the processor, implement the file storage method in any of the exemplary embodiments described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the file storage method in any of the above-described exemplary embodiments.
According to the technical scheme, the file storage method, the file storage device, the computer storage medium and the electronic device in the exemplary embodiment of the disclosure have at least the following advantages and positive effects:
in the method and the device provided by the exemplary embodiment of the disclosure, the binary file is mapped to determine the target file name of the target file, the mapping relation between the binary file and the target file is established, and data support and theoretical basis are provided for determining the storage result of the target file. Furthermore, the storage result of the target file is determined according to the search result of the target file name under the storage path, and the single target file is stored, so that the storage granularity of the target file is refined, the problem of storage redundancy of the target file is solved, and the disk space is further saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a schematic flow chart diagram illustrating a file storage method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of determining a target file name in an exemplary embodiment of the disclosure;
FIG. 3 is a schematic flow chart diagram illustrating a method for determining a result of storing a target file in an exemplary embodiment of the disclosure;
FIG. 4 is a schematic flow chart diagram illustrating a method for querying a target document in an exemplary embodiment of the disclosure;
FIG. 5 is a schematic diagram illustrating a structure of a file storage apparatus according to an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates an electronic device for implementing a file storage method in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a computer-readable storage medium for implementing a file storage method in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
In a typical program compilation process, code is submitted by a developer to trigger the compilation machine to build. When the build is complete, a batch of binary files and a corresponding batch of PDB files may be generated. Binary files generally have a version number to distinguish each construction. The PDB files are processed in various ways, and most commonly, all PDB files are copied to a certain disk directory, and the version number of a binary file is used as a parent folder.
Figure BDA0003796348640000051
Obviously, this way can store 6 PDB files, a1.PDB, b1.PDB and c1.PDB under directory 1, and a2.PDB, b1.PDB and c1.PDB under directory 2.
Among them, b1.Pdb and c1.Pdb under the directory 1 and b1.Pdb and c1.Pdb under the directory 2 are the same, and a problem of duplicate storage arises.
In addition, in order to save space, all PDBs may be packaged and compressed with version numbers as file names. Therefore, when the PDB file needs to be used, the PDB file can be obtained according to the version number of the program. This storage is very intuitive and simple.
However, since program building is generally incremental building, the code of a certain module has a variable to regenerate a binary file and a PDB file, and a module without change is not regenerated but uses the result of the last building. Therefore, the storage method can store all the PDB files of each version, which results in redundancy of a large number of PDB files and further occupies a large amount of disk space.
In order to solve the problems in the related art, the present disclosure provides a file storage method. Fig. 1 shows a flow chart of a file storage method, as shown in fig. 1, the file storage method at least comprises the following steps:
and S110, acquiring the binary file and the target file corresponding to the binary file, and mapping the binary file to obtain the target file name of the target file.
And S120, searching the name of the target file under the storage path of the target file, and determining the storage result of the target file under the storage path according to the search result.
In the exemplary embodiment of the disclosure, the binary file is mapped to determine the target file name of the target file, the mapping relation between the binary file and the target file is established, and data support and theoretical basis are provided for determining the storage result of the target file. Furthermore, the storage result of the target file is determined according to the search result of the target file name under the storage path, and the single target file is stored, so that the storage granularity of the target file is refined, the problem of storage redundancy of the target file is solved, and the disk space is further saved.
The following describes each step of the file storage method in detail.
In step S110, the binary file and the target file corresponding to the binary file are obtained, and the binary file is mapped to obtain a target file name of the target file.
In an exemplary embodiment of the present disclosure, the binary file may be a file generated at the time of compilation of the application program.
The build of the packer can be triggered when a developer submits a code modification. After the build is complete, the binaries are further fabricated into an installation package, or may be submitted to a SVN (a widely used version control System) repository to get a list of all binaries.
In an alternative embodiment, the binary file comprises: a program file, the program file comprising: executable files and library files.
The program file may be a PE (Portable Executable) file on the Windows platform, or may be another file, which is not limited in this exemplary embodiment.
When the program file is a PE file, the program file may further include an executable file and a library file. The executable file may be an EXE file (executable file), and the Library file may be a DLL (Dynamic Link Library) file.
Taking the application on Windows as an example, a typical software package may include a.exe (program entry component), b.dll (functional component B), c.dll (functional component C).
In an alternative embodiment, the object file comprises: and debugging the file by the program.
The program debugging file is PDB and is an auxiliary debugging file generated when the binary file is generated during the compiling of the application program.
When binary files such as a.exe, b.dll and c.dll are generated by compiling, a corresponding PDB file, such as a.pdb, b.pdb and c.pdb, is generated.
The PDB file mainly stores basic information required by a debugger, including a source file name, a variable name, a function name, an FPO (Frame Pointer), a corresponding line number, and the like.
After the binary file and the target file generated during the compiling of the application program are obtained, the binary files in the binary file list can be traversed, and each binary file is subjected to mapping processing to obtain the target file name of the target file.
In an alternative embodiment, the target file name of the target file is obtained by calculating the binary file by using a password hash function.
The cryptographic hash function may be an MD5 Message Digest Algorithm (MD 5 Message-Digest Algorithm). The MD5 message digest algorithm is a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value to ensure the integrity of the message transmission. The hash value is the name of the target file and is used for uniquely characterizing the target file.
In an alternative embodiment, fig. 2 shows a flowchart of a method for determining a target file name, and as shown in fig. 2, the method may at least include the following steps: in step S210, a cryptographic hash function is used to calculate the binary file to obtain a hash value, and a timestamp for constructing the binary file is obtained.
Wherein, the cryptographic hash function may also be an MD5 message digest algorithm. The MD5 message digest algorithm generates a 128-bit hash value by performing a calculation on the binary file.
Further, a time stamp of the binary file is obtained.
Taking the PE file on the Windows platform as an example, because the format of the PE file is fixed, the construction timestamp of the binary file can be stored in the corresponding byte, so that the timestamp of the construction binary file can be analyzed through the PE file header.
In step S220, the hash value and the time stamp are combined to obtain the target file name of the target file.
After the hash value and the time stamp are obtained, the hash value and the time stamp may be combined together to be the target file name at the time of storage of the target file.
For example, the hash value and the timestamp may be combined in a manner of "hash value + timestamp", for example, "yyy _ zzz", or in a manner of "timestamp + hash value", or in combination with other characters, which is not particularly limited in this exemplary embodiment.
By means of mapping the binary file to obtain the target file name of the target file, a one-to-one correspondence relationship can be established between the binary file and the corresponding target file.
In the exemplary embodiment, considering that a hash value of a single dimension may be repeatedly named as a target file name, a timestamp of a second dimension is increased to further reduce the probability that different binary files calculate a target file name conflict, and ensure the uniqueness of the target file name.
It should be noted that, considering that the timestamp can only be accurate to seconds, but there are many binary files that can be generated in each second, and the probability of generating a conflict is too high, so that the timestamp with a single dimension cannot be used as the target file name.
In step S120, the name of the target file is searched for under the storage path of the target file, and the storage result of the target file under the storage path is determined according to the search result.
In an exemplary embodiment of the present disclosure, when a target file name of the target file is "yyy _ zzz" is generated, it may be looked up under a storage path of the target file, for example, a PDB file, whether the target file named "yy _ zzz" exists to determine whether the target file is stored under the storage path.
In an alternative embodiment, fig. 3 is a flowchart illustrating a method for determining a storage result of a target file, and as shown in fig. 3, the method may include at least the following steps: in step S310, when the search result is that the target file name is included under the storage path, it is determined that the target file is not stored under the storage path as a result of the storage of the target file.
When the target file name is found in the storage path of the target file, the corresponding binary file is a product constructed before, so that the corresponding PDB file is stored in the storage path of the target file, and the target file does not need to be stored.
In step S320, when the search result indicates that the target file name is not included in the storage path, it is determined that the storage result of the target file is that the target file is stored according to the target file name in the storage path.
When the target file name is not found in the storage path of the target file, the corresponding binary file is not constructed before, and therefore, the corresponding PDB file is not stored in the storage path of the target file.
Based on this, the PDB file corresponding to the binary file may be stored in the storage path of the target file, and the target file may be named according to the target file name during storage.
Specifically, when the PDB file is stored under the storage path of the target file, the PDB file may be copied under the storage path of the target file.
Figure BDA0003796348640000091
It can be seen that 4 PDB files, namely, a1.PDB, a2.PDB, b1.PDB, and c1.PDB, are finally stored according to the storage manner shown in fig. 3.
In the exemplary embodiment, the target file is stored according to the search result, so that the single storage of the target file can be realized, the mapping relation between the constructed binary file and the target file is maintained, the problem of storage redundancy of the target file is solved, and the disk space is saved.
After the target file is stored, the corresponding target file can be searched under the storage path of the stored target file for debugging and using under the condition that the application program is crashed.
In an alternative embodiment, fig. 4 shows a flowchart of a method for querying a target file, and as shown in fig. 4, the method may include at least the following steps: in step S410, the file to be debugged and the first file name of the file to be debugged are obtained, and the file to be debugged is mapped to obtain a second file name.
When the application program crashes, the crash file and the crashed software version number can be acquired. Furthermore, software of a corresponding version is obtained from the crash file through the software version number, so that all binary files of the software are obtained as files to be debugged. In addition, the file names corresponding to all binary files can be acquired as the first file name. For example, the first file name may be "xxx".
After the file to be debugged is obtained, the method in step S110 may be used to perform mapping processing to determine the second file name generated according to the file to be debugged. For example, the second file name may be "yyy _ zzz".
In step S420, the target file name identical to the second file name is searched for under the storage path, and the target file corresponding to the target file name identical to the second file name is downloaded.
After generating the second file name, the target file name named "yyy _ zzz" may be looked up under the storage path of the baler according to the second file name.
When the target file name identical to the second file name can be found in the storage path, the target file corresponding to the target file name, for example, the target file named "yyy _ zzz" may be downloaded.
The packer is a single machine, and may be implemented by using a network share or an FTP (File Transfer Protocol) server, which is not limited in this exemplary embodiment.
In step S430, the downloaded target file is renamed according to the first file name to debug the renamed target file.
After the target file named "yyy _ zzz" is downloaded under the program directory, the downloaded target file may be renamed.
PDB, the downloaded target file can be renamed, for example named xxx.
Therefore, the PDB file searching means that, when an application program of a certain version is known, PDB files corresponding to all binary files in the program of the version are searched and downloaded locally for debugging.
In the exemplary embodiment, the target file can be further inquired after being stored, data support is provided for program debugging, the processing flow of the target file is perfected, and the method has important practical significance.
In the file storage method in the exemplary embodiment of the present disclosure, the binary file is mapped to determine the target file name of the target file, the mapping relationship between the binary file and the target file is established, and data support and a theoretical basis are provided for determining the storage result of the target file. Furthermore, the storage result of the target file is determined according to the search result of the target file name under the storage path, and the single target file is stored, so that the storage granularity of the target file is refined, the problem of storage redundancy of the target file is solved, and the disk space is further saved.
Further, in an exemplary embodiment of the present disclosure, a file storage apparatus is also provided. Fig. 5 shows a schematic structural diagram of a file storage apparatus, and as shown in fig. 5, a file storage apparatus 500 may include: a file mapping module 510 and a file storage module 520. Wherein:
a file mapping module 510, configured to obtain a binary file and a target file corresponding to the binary file, and map the binary file to obtain a target file name of the target file;
a file storage module 520 configured to search the name of the target file in the storage path of the target file, and determine a storage result of the target file in the storage path according to the search result.
In an exemplary embodiment of the present invention, the binary file includes: a program file, the program file comprising: executable files and library files.
In an exemplary embodiment of the present invention, the object file includes: and debugging the file by the program.
In an exemplary embodiment of the present invention, the mapping the binary file to obtain the target file name of the target file includes:
and calculating the binary file by using a password hash function to obtain the target file name of the target file.
In an exemplary embodiment of the present invention, the mapping the binary file to obtain the target file name of the target file includes:
calculating the binary file by using a password hash function to obtain a hash value, and acquiring a time stamp for constructing the binary file;
and combining the hash value and the time stamp to obtain the target file name of the target file.
In an exemplary embodiment of the present invention, the determining, according to the search result, a storage result of the target file under the storage path includes:
when the search result is that the target file name is included in the storage path, determining that the storage result of the target file is that the target file is not stored in the storage path;
and when the search result indicates that the target file name is not included in the storage path, determining that the storage result of the target file is that the target file is stored according to the target file name in the storage path.
In an exemplary embodiment of the present invention, after determining the storage result of the target file under the storage path according to the search result, the method further includes:
acquiring a file to be debugged and a first file name of the file to be debugged, and mapping the file to be debugged to obtain a second file name;
searching the target file name which is the same as the second file name under the storage path, and downloading a target file which is the same as the second file name and corresponds to the target file name;
and renaming the downloaded target file according to the first file name so as to debug the renamed target file.
The details of the file storage apparatus 500 are described in detail in the corresponding file storage method, and therefore will not be described herein again.
It should be noted that although several modules or units of the file storage 500 are mentioned in the above detailed description, such division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
An electronic device 600 according to such an embodiment of the invention is described below with reference to fig. 6. The electronic device 600 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 invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, a bus 630 connecting different system components (including the memory unit 620 and the processing unit 610), and a display unit 640.
Wherein the memory unit stores program code that may be executed by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary method" of this specification.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 621 and/or a cache memory unit 622, and may further include a read only memory unit (ROM) 623.
The storage unit 620 may also include a program/utility 624 having a set (at least one) of program modules 625, such program modules 625 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 800 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. 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 thereof. A readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of file storage, the method comprising:
acquiring a binary file and a target file corresponding to the binary file, and mapping the binary file to obtain a target file name of the target file;
and searching the name of the target file under the storage path of the target file, and determining the storage result of the target file under the storage path according to the search result.
2. The file storage method according to claim 1, wherein the binary file comprises: a program file, the program file comprising: executable files and library files.
3. The file storage method according to claim 1, wherein the target file comprises: and debugging the file by the program.
4. The file storage method according to claim 1, wherein the mapping the binary file to obtain the target file name of the target file comprises:
and calculating the binary file by using a password hash function to obtain the target file name of the target file.
5. The method according to claim 1, wherein the mapping the binary file to obtain the target file name of the target file includes:
calculating the binary file by using a password hash function to obtain a hash value, and acquiring a time stamp for constructing the binary file;
and combining the hash value and the time stamp to obtain the target file name of the target file.
6. The file storage method according to claim 1, wherein the determining a storage result of the target file under the storage path according to the search result comprises:
when the search result indicates that the target file name is included in the storage path, determining that the storage result of the target file is that the target file is not stored in the storage path;
and when the search result indicates that the target file name is not included in the storage path, determining that the storage result of the target file is that the target file is stored according to the target file name in the storage path.
7. The file storage method according to any one of claims 1 to 6, wherein after determining the storage result of the target file under the storage path according to the search result, the method further comprises:
acquiring a file to be debugged and a first file name of the file to be debugged, and mapping the file to be debugged to obtain a second file name;
searching the target file name which is the same as the second file name under the storage path, and downloading a target file which is the same as the second file name and corresponds to the target file name;
and renaming the downloaded target file according to the first file name so as to debug the renamed target file.
8. A file storage device, comprising:
the file mapping module is configured to acquire a binary file and a target file corresponding to the binary file, and map the binary file to obtain a target file name of the target file;
and the file storage module is configured to search the target file name under the storage path of the target file and determine the storage result of the target file under the storage path according to the search result.
9. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the file storage method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the file storage method of any one of claims 1-7 via execution of the executable instructions.
CN202210970428.3A 2022-08-12 2022-08-12 File storage method and device, medium and electronic equipment Pending CN115292254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210970428.3A CN115292254A (en) 2022-08-12 2022-08-12 File storage method and device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210970428.3A CN115292254A (en) 2022-08-12 2022-08-12 File storage method and device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115292254A true CN115292254A (en) 2022-11-04

Family

ID=83829888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210970428.3A Pending CN115292254A (en) 2022-08-12 2022-08-12 File storage method and device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115292254A (en)

Similar Documents

Publication Publication Date Title
CN109791483B (en) Shared software library for computing devices
US11392461B2 (en) Method and apparatus for processing information
CN104137057A (en) Generating and caching software code
CN110059456B (en) Code protection method, code protection device, storage medium and electronic equipment
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
US20220198003A1 (en) Detecting added functionality in open source package
CN110058861B (en) Source code processing method and device, storage medium and electronic equipment
US10241759B2 (en) Detecting open source components built into mobile applications
US9171028B1 (en) Method of maintaining a large set of taint labels
CN115629971A (en) Application development system and method
CN111026439A (en) Application program compatibility method, device, equipment and computer storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN109558121B (en) Interface driver development method, device, equipment and storage medium
CN116755713A (en) Application program generation method, device, equipment and storage medium
CN111506904B (en) Method and device for online bug repair
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN111198880A (en) Data storage method and device based on redis and electronic equipment
CN111258802A (en) Method for capturing application program crash information and related equipment
CN115292254A (en) File storage method and device, medium and electronic equipment
CN115952089A (en) Software automation unit testing method and device, server and storage medium
CN114817803A (en) Page skipping method and device and electronic equipment
CN114924742A (en) Hot patch making and applying method and device for virtual machine simulation software
CN112947956B (en) Application software upgrading method
CN114816816A (en) Collapse stack information processing method, device, equipment and storage medium
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium

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