Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
At present, a system installation package (such as an installation package when an Android operating system is updated or updated) of an electronic device generally includes some Application (APP) installation packages, and in a system installation process of the electronic device, the APPs are generally compiled one by one, so that the APPs can be directly used without installation after the system installation. The APP contained in the system installation package may also be referred to as a built-in APP (system build-in APP).
However, since the built-in APPs need to be compiled one by one in the system installation process, when there are more built-in APPs in the system installation package, the system installation time is increased. In addition, each time the system software of an electronic device is installed, the built-in APP is compiled once, which means that the time, the computing resource and the energy loss caused by the built-in APP are consumed, and the consumption caused by the built-in APP is increased as the number of the electronic devices is increased in proportion to the number of the electronic devices installed in the electronic devices.
The inventor discovers and puts forward the file processing method, the device, the server, the electronic equipment and the storage medium provided by the embodiment of the application through long-term research, and can compile the built-in APP before the system software is packaged, so that the compiled file obtained by compiling the built-in APP can be directly incorporated into the system installation package when the system installation package is packaged. Therefore, when the system is installed in the electronic equipment, the compiling file of the built-in APP can be directly extracted from the system installation package without compiling the appointed application program, so that the time, the computing resource and the loss of the battery power of the electronic equipment caused by compiling the built-in APP are saved. The specific document processing method will be described in detail in the following examples.
The application scenario provided by the embodiment of the application is described below.
In some implementations, referring to fig. 1, fig. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application, where the application scenario includes a file processing system 10, and the file processing system 10 includes an electronic device 100 and a first server 200. Wherein the electronic device 100 communicates with the first server 200 via a network. The electronic device 100 may interact with the first server 200 to obtain file data, such as an installation package, a compiled file, etc., of an application from the first server 200.
In other embodiments, referring to fig. 2, fig. 2 shows another schematic diagram of an application scenario provided by an embodiment of the present application, and the file processing system 10 may also include an electronic device 100, a first server 200, and a second server 300. The electronic device 100 and the first server 200 may perform data interaction, and the first server 200 and the second server 300 may also perform data interaction. The first server 200 may be used to process a request of the electronic device 100, the second server 300 may be used to store and manage installation packages of the application program, compile file data of the file, etc., and when the electronic device 100 acquires the file of the application program from the first server 200, the first server 200 may acquire the file of the application program from the second server 300 and transmit the file of the application program to the electronic device 100.
Of course, other servers may also be included in file processing system 10. For example, the file processing system 10 may further include a third server, which may be configured to collect compiled files of the application program from the electronic device of the user and transmit the collected compiled files to the second server 200 for sorting and storing, etc., and for example, the file processing system 10 may further include a fourth server, which may be configured to store and manage installation packages of the application program, etc., in which case the compiled files of the application program may be stored and managed by the second server 200, enabling the installation packages and the compiled files of the application program to be separately managed and stored.
In some embodiments, the electronic device 100 may be a smart phone, a tablet computer, an electronic book, a smart watch, etc., and the servers of the first server 200, the second server 300, etc. may be conventional servers or cloud servers, which are not limited herein.
The file processing method provided by the embodiment of the application is described in detail below.
Referring to fig. 3, fig. 3 is a flow chart illustrating a file processing method according to an embodiment of the application. The file processing method can be applied to the server in the file processing system. The specific flow of the present embodiment will be described below by taking a server as an example. The following details about the flow shown in fig. 3, the file processing method may specifically include the following steps:
Step S110, obtaining a compiling file corresponding to a specified application program, wherein the compiling file is an executable file obtained by compiling source codes of the specified application program.
In the embodiment of the application, in order to save the system installation time of the electronic equipment, the compiling processing can be carried out on the application program in the system installation package in advance before the electronic equipment installs the system, so that the electronic equipment does not compile the application program in the system installation package in the system installation process, the system installation time is greatly reduced, and meanwhile, the loss of computing resources and energy caused by compiling the application program is also saved.
Specifically, the server may obtain a compiled file corresponding to the specified application program, where the compiled file is an executable file obtained by compiling source code of the specified application program. That is, the compiling of the specified application program is completed before the server packaging system installs the package, so that the server can acquire the compiled file corresponding to the specified application program.
Wherein the above compilation can understand the conversion of source code written in a certain programming language (original language) into another programming language (target language). The purpose is mainly to translate a source code program written in a high-level computer language which is convenient for people to write, read and maintain into a program of a low-level machine language which can be read and run by a computer, namely an executable file. That is, the files in the compiled file corresponding to the specified application program acquired by the server are actually binary machine codes.
In some embodiments, the specified application may be an application contained in a system installation package, i.e., the aforementioned built-in APP, each time the system is updated or upgraded. The application may be a system-self application, such as an information application, a telephone application, a camera application, a calendar application, etc., or a non-system-self application, such as a mainstream application on an application store, such as an instant messaging application, a game application, a news client, etc., and the specific application type is not limited herein.
In some embodiments, the server may determine, first, that the source code of the specified application to be carried or carried in the system installation package, that is, the installation package, when the current system is updated or upgraded, so that the server may obtain, according to the source code of the specified application to be carried or carried, a compiled file corresponding to the specified application. The compiling file may be obtained by compiling the source code of the specified application program by the server, or may be transmitted to the server after compiling the source code of the specified application program by other devices, which is not limited herein.
And step S120, adding the compiling file into a system installation package, so that when the electronic equipment installs the system according to the system installation package, the compiling file is extracted from the system installation package.
In the embodiment of the application, after the server acquires the compiled file corresponding to the specified application program, the compiled file can be added into the system installation package. Specifically, when the system installation package is packaged, the server packages the compiling files corresponding to the specified application program into the system installation package, so that when the electronic device acquires the system installation package and installs the system according to the system installation package, the compiling files can be extracted from the system installation package.
In some embodiments, after the electronic device extracts the compiled file from the system installation package, the compiled file may be stored in a designated storage location in the electronic device that corresponds to the designated application. And further, after the system is installed, the appointed application program can be directly used without installation.
In some embodiments, the system installation package may be an update installation package when the system is updated in the current version, an upgrade installation package when the system is upgraded from one version to another version (typically, a low version upgrade and a high version), or a system installation package of an arbitrarily selected version when the system is reinstalled, which is not limited herein.
In some embodiments, the system installation package may be a system installation package that is not yet packaged, where the system installation package may be a source code that has been put into a specific application program, or may be a source code that has not been put into a specific application program. In other embodiments, the system installation package may also be an existing already packaged system installation package, which may contain source code of an uncompiled designated application.
In one mode, when the system installation package does not contain source codes of uncompiled specified application programs, the compiled files of the compiled specified application programs are added to the system installation package, and after the final system installation package is generated by packaging, the finally generated system installation package only contains the compiled files, so that the file size of the system installation package is reduced, and meanwhile, the transmission time of the system installation package to the electronic equipment is also reduced.
In another way, when the system installation package includes the source code of the uncompiled specific application program, the compiled file of the compiled specific application program is added to the system installation package, and after the final system installation package is generated by packaging, the finally generated system installation package can include the source code of the specific application program and the compiled file at the same time. When the electronic equipment installs the system according to the system installation package, the compiling file of the appointed application program can be directly extracted and stored, and meanwhile, the source code of the appointed application program can be stored without compiling. When the system is installed successfully, the electronic equipment needs to run the appointed application program, if the running is successful, the stored source code of the appointed application program can be deleted, if the running is unsuccessful, the problem of the compiling file can be considered, at the moment, the stored source code of the appointed application program can be extracted and compiled, and the appointed application program can be run according to the newly obtained compiling file. Therefore, the condition that the appointed application program cannot be operated due to the abnormality of the compiling file in the system installation package can be avoided, and the operation success rate of the appointed application program is improved.
According to the file processing method provided by the embodiment of the application, the compiling file corresponding to the appointed application program is obtained, the compiling file is the executable file obtained by compiling the source code of the appointed application program, and then the compiling file is added into the system installation package, so that the compiling file of the appointed application program can be directly extracted from the system installation package when the electronic equipment installs the system according to the system installation package. Therefore, the compiling file of the appointed application program is added into the system installation package, so that the electronic equipment does not need to compile the appointed application program in the system installation process, and only the compiling file of the appointed application program is directly extracted from the system installation package, the system installation time of the electronic equipment is saved, and the use experience of the electronic equipment is improved.
Referring to fig. 4, fig. 4 is a flow chart illustrating a file processing method according to another embodiment of the application. The file processing method can be applied to the server in the file processing system. The specific flow of the present embodiment will be described below by taking a server as an example. The following details about the flow shown in fig. 4, the file processing method may specifically include the following steps:
step S210, obtaining a compiling file corresponding to a specified application program, wherein the compiling file is an executable file obtained by compiling source codes of the specified application program.
In some embodiments, since the content types and the number of the updates and the upgrades are generally different each time the system is updated and upgraded, if the number of the specific applications updated and upgraded in the system installation package is small, the compiling time for compiling the specific applications in the system installation process is also short. Therefore, the designated application may not be compiled in advance each time. Specifically, referring to fig. 5, step S210 may include:
Step S211, obtaining installation parameter information corresponding to the appointed application program.
The installation parameter information may be an evaluation parameter for analyzing whether it is necessary to compile a specific application program to be carried or carried in the current system installation package in advance, and may be evaluated from multiple angles such as a compilation time length, a compilation importance, and the like. For example, when evaluating from the compilation time length, the installation parameter information corresponding to the specified application may be the number of the specified application, the file size of the source code, or the like, and when evaluating from the compilation importance, the application type, the frequency of use, the time length of use, or the like of the specified application may be the specified application. The present invention is not limited thereto.
In some embodiments, when the installation parameter information corresponding to the specified application program is the number of the specified application program, the file size of the source code, and the application type (such as the video type and the game type), the server may obtain the installation parameter information corresponding to the specified application program by calculating and identifying when obtaining the installation package or the source code of the specified application program. In other embodiments, when the installation parameter information corresponding to the specified application program is an application type (such as a mainstream hot application and a cold application), a use frequency and a use duration of the specified application program, the server may obtain the installation parameter information corresponding to the specified application program through databases of other platforms. For example, the application type of the specified application is determined by acquiring recorded application download leaderboard data on the application store platform, the frequency of use, the duration of use, etc. of the specified application is determined by acquiring a user use behavior database of the electronic device facilitator.
And S212, acquiring a compiling file corresponding to the appointed application program when the installation parameter information meets the preset installation parameter condition.
In some embodiments, after the installation parameter information corresponding to the specified application program is obtained, it may be determined whether the installation parameter information meets a preset installation parameter condition. When the installation parameter information meets the preset installation parameter condition, it may be considered necessary to compile the specific application program to be carried or carried in the current system installation package in advance, that is, the server may obtain the compiled file corresponding to the specific application program, so as to add the compiled file into the system installation package later. When the installation parameter information does not meet the preset installation parameter condition, it can be considered that the specific application program to be carried or carried in the current system installation package does not need to be compiled in advance, that is, the server can directly issue the system installation package containing the uncompiled source code of the specific application program without acquiring the compiling file corresponding to the specific application program.
The preset installation parameter condition may be a condition that needs to be satisfied by the installation parameter information when it is necessary to perform advanced compiling processing on a specific application program to be carried or carried in the current system installation package, that is, once the installation parameter condition is satisfied, it may be considered that the specific application program does not need to be compiled in advance at present. Specifically, the installation parameter conditions can be set in advance according to actual scene requirements, and are not limited herein.
As one way, the installation parameter information may include a number of specified applications, and the preset installation parameter condition may be a preset threshold condition of the number of specified applications. The number of the specified application programs may be the number of source code files of the specified application programs to be carried in the system installation package, and generally corresponds to the number of the specified application programs, namely 3 specified application programs, and the number of the corresponding source code files is also 3.
Specifically, when the number of the specified application programs is greater than the first threshold, the installation parameter information of the specified application programs is considered to meet the preset installation parameter condition, and the server can acquire the compiled files corresponding to the specified application programs. When the number of the appointed application programs is not greater than the first threshold, the installation parameter information of the appointed application programs is considered to not meet the preset installation parameter conditions, and at the moment, the server can directly issue the system installation package containing uncompiled source codes of the appointed application programs without acquiring compiled files corresponding to the appointed application programs.
The first threshold may be the lowest threshold in the preset threshold conditions of the number of specified applications, that is, if the number of specified applications is greater than the lowest threshold condition, it may be considered that it is necessary to compile the specified applications in advance, and the specific first threshold may be reasonably set according to the actual requirement, which is not limited herein. For example, 3, 4, etc.
In other embodiments, the installation parameter information includes a file size of the source code of the specified application, and the preset installation parameter condition may be a preset file size threshold condition of the source code of the specified application. Specifically, when the file size of the source code of the specified application program is greater than the second threshold, the installation parameter information of the specified application program is considered to satisfy the preset installation parameter condition, and at this time, the server may obtain the compiled file corresponding to the specified application program. When the file size of the source code of the appointed application program is not larger than the second threshold value, the installation parameter information of the appointed application program is considered to not meet the preset installation parameter condition, and at the moment, the server can directly issue the system installation package containing the uncompiled source code of the appointed application program without acquiring the compiling file corresponding to the appointed application program.
The second threshold may be the lowest threshold in the preset threshold conditions of the file size of the source code of the specified application program, that is, if the number of the specified application programs is greater than the lowest threshold condition, it may be considered that it is necessary to compile the specified application program in advance, and the specific second threshold may be reasonably set according to the actual requirement, which is not limited herein. For example, 50M, 100M, etc. may be used.
In still other embodiments, the installation parameter information includes an application type specifying an application program, and the preset installation parameter condition may be a preset hot application type. Specifically, when the application type of the specified application program is a popular application type, the installation parameter information of the specified application program is considered to meet the preset installation parameter condition, and at this time, the server can obtain the compiled file corresponding to the specified application program. When the application type of the appointed application program is not the popular application type, the installation parameter information of the appointed application program is considered to not meet the preset installation parameter condition, and the server can directly issue the system installation package containing uncompiled source codes of the appointed application program without acquiring the compiling file corresponding to the appointed application program.
It can be understood that if the designated application program is a hot application, the designated application program can be considered to be likely to be run in a short time after the system is successfully installed, and at this time, the designated application program needs to be compiled in advance, and the server can bring the compiled file of the designated application program into the system installation package and issue the compiled file together, so that the hot application does not need to be compiled in the system installation process of the electronic device, thereby saving the time of system installation and ensuring the timely running of the designated running program.
It can be understood that if the specified application program is a non-popular application, it can be considered that the specified application program is not likely to be run in a short time after the system is installed successfully, at this time, the specified application program does not need to be compiled in advance, at this time, the server can directly issue the system installation package containing the source code of the specified application program which is not compiled without acquiring the compiled file corresponding to the specified application program, thereby reducing the size of the system installation package and reducing the download flow consumption of the electronic device. Further, in the system installation process of the electronic equipment, the source codes of the non-popular applications are directly stored without compiling the source codes of the non-popular applications, and the source codes of the non-popular applications are compiled until the electronic equipment is idle. The time for installing the system is saved, and the operation of non-hot applications is ensured not to be influenced as much as possible.
The installation parameter information and the installation parameter conditions are only examples, and other installation parameter information and other installation parameter conditions may be used. Specific installation parameter information and installation parameter conditions are not limited herein. For example, any combination of the above-described installation parameter information and installation parameter conditions may be used.
In some embodiments, the compiled file may be compiled by other terminals, so that the server may obtain the compiled file from the other terminals. Specifically, the obtaining the compiled file corresponding to the specified application program may include receiving the compiled file corresponding to the specified application program uploaded by other terminals, where the compiled file is an executable file obtained by compiling the source code of the specified application program by the other terminals. The other terminal may be any terminal device other than the execution subject server of the present application, and may be any other server or any other electronic device, without limitation.
Specifically, after compiling the source code of the specified application program to obtain the executable file, the other terminals can upload the executable file as a compiled file to the server, so that the server can receive the compiled file corresponding to the specified application program uploaded by the other terminals.
In some embodiments, the compiling environments of different terminals may be different, so that the compiling files obtained by compiling may be different, and further, the compiling files compiled by some terminals have problems, so that the electronic device cannot run the designated application program according to the compiling files. Therefore, it is necessary to make a judgment on other terminals to determine whether the compiled file compiled therefrom is viable. Specifically, referring to fig. 6, the receiving the compiled file corresponding to the specified application program uploaded by the other terminal may include:
and S213, receiving an uploading request sent by other terminals, wherein the uploading request is used for requesting to upload the compiled file of the appointed application program.
When other terminals compile the compiled file of the specified application program, an uploading request can be sent to the server to request the uploading of the compiled file of the specified application program, so that the server can receive the uploading request sent by the other terminals and respond according to the uploading request.
In some embodiments, the server may receive a specified number of upload requests to select an optimal compiled file therefrom. The server can also receive uploading requests of other terminals of the designated type, so that different system installation packages can be generated according to compiled files of terminals of different types, and the method is suitable for downloading and installing different electronic equipment. And is not limited thereto.
Step S214, judging whether the terminal parameters of the other terminals meet the preset terminal parameter conditions.
And step S215, returning an uploading instruction to the other terminals when the terminal parameters of the other terminals meet the terminal parameter conditions.
After receiving the uploading request sent by the other terminal, the server can judge whether the terminal parameters of the other terminal meet the preset terminal parameter conditions, when the terminal parameters of the other terminal meet the terminal parameter conditions, the server can consider that the compiled file compiled by the other terminal is available and can issue the compiled file with the system installation A Bao Yibing, and at the moment, the server can return an uploading instruction to the other terminal to instruct the other terminal to upload the compiled file of the appointed application program. When the terminal parameters of the other terminals do not meet the terminal parameter conditions, the compiled file compiled by the other terminals can be considered to be unavailable and can not be issued with the system installation A Bao Yibing, and the server can return a rejection instruction to the other terminals or does not respond to the rejection instruction, so that the other terminals do not need to upload the compiled file of the designated application program.
In some embodiments, the compiled files compiled by the same type of terminal may be executed successfully, typically on the same type of electronic device. Thus, the above terminal parameter may be a device type of the other terminal, which may be a device model, a device manufacturer, or the like. In some embodiments, the compiling environment may also be different due to the different system version numbers installed by the same type of terminal, so that the compiling file is a uniform device type, but the electronic device which is not the uniform system version number cannot successfully execute the compiling file. Therefore, the terminal parameter may be an operating system type, an operating system version number, or the like of the other terminal. The present invention is not limited thereto.
Step S216, receiving the compiled file corresponding to the appointed application program uploaded by the other terminals according to the uploading instruction.
After the server returns the uploading instruction to the other terminals, the server can be in a waiting and receiving state so as to receive the compiled files corresponding to the appointed application programs uploaded by the other terminals according to the uploading instruction, and therefore the server can acquire the compiled files corresponding to the available appointed application programs.
In some embodiments, if the terminal parameters of the other terminals do not meet the terminal parameter conditions, whether the compiling environments of the other terminals are qualified or not may also be detected, and if the compiling environments are qualified, the compiled compiling files are also available. Specifically, referring to fig. 7, the receiving the compiled file corresponding to the specified application program uploaded by the other terminal may include:
and S217, detecting whether the compiling environment of the other terminal meets the preset compiling environment condition or not when the terminal parameters of the other terminal do not meet the terminal parameter condition.
Because the terminal parameters of other terminals do not meet the terminal parameter conditions, the compiling environment built on the other terminals can be regarded as a cross-platform compiling environment of the electronic equipment (target machine). The cross-platform compiling environment needs to be validated for correctness. If the cross-platform compiling environment passes the correctness verification, the compiling file compiled by the cross-platform compiling environment can be considered to be available.
Specifically, whether the correctness verification is passed can be determined by judging whether the compiling environments of other terminals meet the preset compiling environment conditions. The preset compiling environment conditions can comprise two aspects, namely, one compiling file compiled in a cross-platform manner is consistent with the compiling file compiled by the electronic equipment in comparison, and the other compiling file compiled in the cross-platform manner can be correctly operated after being installed on the electronic equipment, and the operation performance of the compiling file is not poorer than that of the compiling file compiled by the electronic equipment. Specifically, the APP compiled by the method can run correctly on the electronic device, no performance loss exists, and the compiling environment of the other terminals meets the condition of the compiling environment.
And step S218, when the compiling environment of the other terminals meets the compiling environment conditions, receiving compiling files corresponding to the appointed application programs uploaded by the other terminals.
When the compiling environment of the other terminals meets the compiling environment conditions, the server can also return uploading instructions to the other terminals to instruct the other terminals to upload compiling files of the specified application programs, so that the server can receive the compiling files corresponding to the specified application programs uploaded by the other terminals. When the compiling environment of the other terminal does not meet the compiling environment condition, the compiling file compiled by the other terminal can be considered to be unavailable and can not be issued with the system installation A Bao Yibing, and the server can return a refusing instruction to the other terminal or does not respond to the refusing instruction, so that the other terminal is instructed not to upload the compiling file of the appointed application program.
In some embodiments, the compiled file may also be compiled by a server. Specifically, a cross-platform compiling environment of the electronic equipment can be built on the server, and the cross-platform compiling environment also needs to be subjected to the correctness verification. Therefore, the server can add the compiled file compiled by the server to the system installation package to be issued together.
And S220, adding the compiling file into a system installation package, so that when the electronic equipment installs the system according to the system installation package, the compiling file is extracted from the system installation package.
In some embodiments, the system installation package may be generated according to different device types, different system version numbers. Specifically, referring to fig. 8, after step S220, the file processing method of the present application may further include:
and S221, generating an installation package identifier according to the terminal parameter condition.
In some embodiments, when the terminal parameters of the other terminals meet the terminal parameter conditions, or when the terminal parameters of the other terminals meet the terminal parameter conditions not, but the compiling environment of the other terminals meets the compiling environment conditions, the compiling file of the specified application program obtained by the server from the other terminals can be considered to be suitable for being executed by the electronic device matched with the terminal parameter conditions. Therefore, the installation package identifier can be generated according to the terminal parameter condition, and the electronic equipment matched with the terminal parameter condition can accurately download the system installation package suitable for the user according to the installation package identifier.
It can be appreciated that when the server sets different terminal parameter conditions, the server may receive compiled files of the specified application program uploaded by different other terminals and then add the compiled files to the same system installation package, thereby generating multiple types of system installation packages. To distinguish these system installation packages, the server may generate different installation package identifications corresponding to different terminal parameter conditions. The installation package identifier may be a terminal parameter required in a terminal parameter condition, for example, a device model number, a system version number installed on the device, and the like.
Step S222, generating a system installation package corresponding to the installation package identification.
After generating the installation package identifier corresponding to the terminal parameter condition, the server can establish a corresponding relation between the installation package identifier and the system installation package. Namely, the installation package identifier corresponding to the same terminal parameter condition is bound with the system installation package, so that the system installation package corresponding to the installation package identifier is generated, and the electronic equipment matched with the terminal parameter condition can quickly find out the proper system installation package to use according to the installation package identifier.
And step S230, receiving a downloading request sent by the electronic equipment, wherein the downloading request is used for requesting to download the system installation package.
Wherein, the download request may be generated by the electronic device and sent to the server, and the download request is used for requesting to download the system installation package. So that the server can receive the download request sent by the electronic device and respond according to the download request.
In some embodiments, the electronic device may generate the download request according to a user operation of a user, and send the download request to the server, so that the server receives the download request, for example, the terminal device detects an update operation on a system version in an interface of the system device, and further generates a download request for acquiring the system installation package.
And step S240, responding to the downloading request and sending the system installation package to the electronic equipment.
After receiving the download request sent by the electronic device, the server may respond to the download request and send a system installation package for updating/upgrading the current system to the electronic device. The server may also send a matched system installation package to the electronic device according to terminal parameters of the electronic device.
According to the file processing method provided by the embodiment of the application, the installation parameter information corresponding to the appointed application program is obtained to judge whether the source code of the appointed application program is necessary to be compiled in advance. Specifically, when the installation parameter information satisfies a preset installation parameter condition, it may be considered that the source code of the specified application program needs to be compiled in advance, and at this time, a compiled file corresponding to the specified application program may be obtained, and a recompiled file may be added to the system installation package. When receiving a download request sent by the electronic device, the electronic device can respond to the download request and send the system installation package to the electronic device, so that when the electronic device installs the system according to the system installation package, the compiled file can be directly extracted from the system installation package. Therefore, whether the built-in APP needs to be compiled in advance currently can be evaluated through the installation parameter information of the built-in APP when the system installation package is packaged each time. When the installation parameter information of the built-in APP meets certain conditions, the compiling file of the appointed application program is added into the system installation package, so that the electronic equipment does not need to compile the appointed application program in the system installation process, and only the compiling file of the appointed application program is directly extracted from the system installation package, the system installation time of the electronic equipment is saved, and the use experience of the electronic equipment is improved. Namely, the selective processing of the advanced compiling is realized.
Referring to fig. 9, fig. 9 is a flowchart illustrating a file processing method according to another embodiment of the application. The file processing method can be applied to the electronic equipment in the file processing system. The specific flow of the present embodiment will be described below by taking an electronic device as an example. The following details about the flow shown in fig. 9, the file processing method may specifically include the following steps:
step S310, a system installation package is received, wherein the system installation package comprises a compiling file corresponding to a specified application program.
And step S320, when the system is installed according to the system installation package, the compiling file is extracted from the system installation package.
In some embodiments, the electronic device may receive a new system installation package when it detects the presence of the system installation package. The system installation package comprises a compiling file corresponding to a specified application program. Reference is made in particular to the preceding description.
When the electronic equipment installs the system according to the received system installation package, the compiling file corresponding to the appointed application program can be directly extracted from the system installation package. Therefore, the electronic equipment does not need to compile the appointed application program in the system installation process, and only needs to directly extract the compiling file of the appointed application program from the system installation package, so that the system installation time of the electronic equipment is saved, and the use experience of the electronic equipment is improved.
As one implementation mode, after the compiling file corresponding to the appointed application program is extracted, the compiling file can be stored in an appointed storage position corresponding to the appointed application program in the electronic equipment, and then the appointed application program can be directly used without being installed after the system is installed.
In some embodiments, when the installation parameter information of the specified application program is the application type of the specified application program, if the server evaluates that the specified application program is not compiled in advance according to the installation parameter information of the specified application program, the electronic device does not need to compile the specified application program in the system installation process, and can compile the specified application program in an idle state of the electronic device after the system is successfully installed.
Specifically, the electronic device may determine whether to compile the specified application program during the system installation process according to whether the compiling file of the specified application program exists in the received system installation package. If the compiling file of the appointed application program does not exist in the system installation package, the server evaluates that the appointed application program is not hot or high-frequency according to the application type of the appointed application program, so that the appointed application program is not compiled in advance, and the compiling file of the appointed application program does not exist in the issued system installation package, therefore, the electronic equipment can determine that the importance of the appointed application program is lower, the appointed application program can be compiled without the necessity of the compiling in the system installation process, and the appointed application program can be compiled again in the idle state of the electronic equipment after the system installation is successful.
According to the file processing method provided by the embodiment of the application, the system installation package containing the compiled file corresponding to the appointed application program is received, so that the compiled file can be directly extracted from the system installation package when the electronic equipment installs the system according to the system installation package. Therefore, the compiling file of the appointed application program is added into the system installation package, so that the electronic equipment does not need to compile the appointed application program in the system installation process, and only the compiling file of the appointed application program is directly extracted from the system installation package, the system installation time of the electronic equipment is saved, and the use experience of the electronic equipment is improved.
Referring to fig. 10, a block diagram of a file processing apparatus 700 according to an embodiment of the present application is shown, where the file processing apparatus 700 includes a file obtaining module 710 and a file adding module 720. The file adding module 720 is configured to add the compiled file into a system installation package, so that when the electronic device installs a system according to the system installation package, the compiled file is extracted from the system installation package.
In some embodiments, the file acquisition module 710 may include a parameter acquisition unit and a parameter determination unit. The parameter judging unit is used for acquiring the compiling file corresponding to the appointed application program when the installation parameter information meets the preset installation parameter condition.
In some embodiments, the installation parameter information may include a number of specified applications, and the parameter determining unit may be specifically configured to obtain a compiled file corresponding to the specified applications when the number is greater than a first threshold.
In some embodiments, the installation parameter information may also include a file size of a source code of the specified application program, and the parameter determining unit may be specifically configured to obtain a compiled file corresponding to the specified application program when the file size is greater than a second threshold.
In some embodiments, the file obtaining module 710 may include a file receiving unit, configured to receive a compiled file corresponding to a specified application program uploaded by another terminal, where the compiled file is an executable file obtained by compiling, by the other terminal, a source code of the specified application program.
In some embodiments, the file receiving unit may be specifically configured to receive an upload request sent by another terminal, where the upload request is used to request uploading of a compiled file of a specified application program, determine whether a terminal parameter of the other terminal meets a preset terminal parameter condition, return an upload instruction to the other terminal when the terminal parameter of the other terminal meets the terminal parameter condition, and receive the compiled file corresponding to the specified application program uploaded by the other terminal according to the upload instruction.
In other embodiments, the file receiving unit may be specifically configured to detect whether the compiling environment of the other terminal meets a preset compiling environment condition when the terminal parameter of the other terminal does not meet the terminal parameter condition, and receive a compiling file corresponding to a specified application program uploaded by the other terminal when the compiling environment of the other terminal meets the compiling environment condition.
In some embodiments, the file processing apparatus 700 may further include an identification generation module and an installation package generation module. The system comprises an identifier generating module, an installation package generating module and a system installation package generating module, wherein the identifier generating module is used for generating an installation package identifier according to the terminal parameter condition, and the installation package generating module is used for generating a system installation package corresponding to the installation package identifier.
In some embodiments, the file processing apparatus 700 may further include a request acquisition module and an installation package transmission module. The system installation package comprises a request acquisition module, an installation package sending module and an electronic device, wherein the request acquisition module is used for receiving a downloading request sent by the electronic device, the downloading request is used for requesting to download the system installation package, and the installation package sending module is used for responding to the downloading request and sending the system installation package to the electronic device.
Referring to fig. 11, a block diagram of a file processing apparatus 800 according to an embodiment of the present application is shown, where the file processing apparatus 800 includes a system acquisition module 810 and a system installation module 820. The system acquisition module 810 is configured to receive a system installation package, where the system installation package includes a compiled file corresponding to a specified application, and the system installation module 820 is configured to extract the compiled file from the system installation package when the system is installed according to the system installation package.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The embodiment of the application also provides a file processing system, which comprises the electronic equipment and the server. The server is communicatively connected to the electronic device, for example, referring again to fig. 1, the server may be the first server 200. The server is used for acquiring a compiling file corresponding to a specified application program, wherein the compiling file is an executable file obtained by compiling source codes of the specified application program; the electronic equipment is used for receiving the system installation package and extracting the compiling file from the system installation package when the system is installed according to the system installation package.
In summary, the file processing device provided in the embodiment of the present application is configured to implement the corresponding file processing method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which is not described herein again.
Referring to fig. 12, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a terminal device capable of running an application program, such as a PC computer, a mobile terminal, or the like. The electronic device 100 of the present application may include one or more processors 110, memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more applications configured to perform the methods as described in the foregoing method embodiments.
Processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and lines to connect various portions of the overall electronic device 100, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like, the GPU is used for rendering and drawing display contents, and the modem is used for processing wireless communication. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
Memory 120 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the electronic device 100 in use (e.g., phonebook, audiovisual data, chat log data), and the like.
It is understood that the configuration shown in fig. 12 is merely an example, and that electronic device 100 may also include more or fewer components than shown in fig. 12, or have a completely different configuration than shown in fig. 12. The embodiment of the present application is not limited thereto.
Referring to fig. 13, a block diagram of a server according to an embodiment of the present application is shown. The server 600 may be a conventional server, cloud server, or the like. The server 600 in the present application may include one or more processors 610, a memory 620, and one or more application programs, wherein the one or more application programs may be stored in the memory 620 and configured to be executed by the one or more processors 610, the one or more program(s) configured to perform the methods as described in the foregoing method embodiments.
Processor 610 may include one or more processing cores. The processor 610 connects various portions of the overall server 600 using various interfaces and lines, performs various functions of the server 600 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and invoking data stored in the memory 620. Alternatively, the processor 610 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 610 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like, the GPU is used for rendering and drawing display contents, and the modem is used for processing wireless communication. It will be appreciated that the modem may not be integrated into the processor 610 and may be implemented solely by a single communication chip.
Memory 620 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Memory 620 may be used to store instructions, programs, code sets, or instruction sets. The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the server 600 in use (e.g., phonebook, audio-video data, chat log data), etc.
It is understood that the configuration shown in fig. 13 is merely an example, and that the server 600 may also include more or fewer components than shown in fig. 13, or have a completely different configuration than shown in fig. 13. The embodiment of the present application is not limited thereto.
Referring to fig. 14, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 800 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the above-mentioned embodiments, it will be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or replacements do not drive the essence of the corresponding technical solution to deviate from the spirit and scope of the technical solution of the embodiments of the present application.