Android platform compiling control method, compiling system, device, medium and equipment

文档序号:1952140 发布日期:2021-12-10 浏览:23次 中文

阅读说明:本技术 安卓平台编译管控方法、编译系统、装置、介质和设备 (Android platform compiling control method, compiling system, device, medium and equipment ) 是由 李伟华 于 2021-09-18 设计创作,主要内容包括:本发明公开了一种安卓平台编译管控方法、编译系统、装置、介质和设备,该编译系统包括:客户端设备,用于响应于开发人员对源代码的修改操作,并将源代码发生修改的软件包上传到版本控制服务器的软件库中;版本控制服务器设置有用于保存软件包的软件库;用于向编译服务器发送编译指令;编译服务器用于根据编译指令,对软件包进行编译,并向统计分析服务器输出软件包的编译信息;统计分析服务器,用于根据编译信息,确定满足预设规则的源代码的异常修改和异常修改对应的客户端设备;向客户端设备发送提醒信息,提醒信息用于通知客户端设备对应的开发人员对异常修改进行修正,该方法能够辅助开发人员分析出影响编译速度的异常修改,提高开发效率。(The invention discloses an android platform compiling control method, a compiling system, a device, a medium and equipment, wherein the compiling system comprises the following steps: the client device is used for responding to the modification operation of a developer on the source code and uploading the software package with the modified source code to a software library of the version control server; the version control server is provided with a software library for storing the software package; the compiling server is used for sending compiling instructions to the compiling server; the compiling server is used for compiling the software package according to the compiling instruction and outputting compiling information of the software package to the statistical analysis server; the statistical analysis server is used for determining the abnormal modification of the source code meeting the preset rule and the client equipment corresponding to the abnormal modification according to the compiling information; and sending reminding information to the client device, wherein the reminding information is used for informing a developer corresponding to the client device to correct the abnormal modification.)

1. A compiling system is characterized by comprising a client device used by a developer, a version control server, a compiling server and a statistical analysis server;

the version control server is connected with the client equipment; the client device is used for responding to the modification operation of a developer on the source code and uploading the software package with the modified source code to the software library of the version control server;

the version control server is connected with the compiling server and is provided with a software library for storing the software package; the version control server is used for sending a compiling instruction to the compiling server;

the compiling server is connected with the statistical analysis server and used for compiling the software package according to a compiling instruction and outputting compiling information of the software package to the statistical analysis server;

the statistical analysis server is used for determining abnormal modification of the source code meeting the preset rule and client equipment corresponding to the abnormal modification according to the compiling information;

and sending reminding information to the client equipment, wherein the reminding information is used for informing a developer corresponding to the client equipment of correcting the abnormal modification.

2. The compilation system of claim 1, wherein the version control server is specifically configured to:

acquiring project names, project versions and project architecture information from the software package;

inquiring configuration information of a compiling server according to the project name, the project version and the project architecture information to obtain an address of the corresponding compiling server;

and sending a compiling instruction to a compiling server corresponding to the address.

3. The compiling system according to claim 1 or 2, wherein the preset rule comprises that a native name hostname of the compiling server is changed, a linnas linux version of the compiling server is changed, and the compiling control file android.

4. The compilation system according to claim 1 or 2, wherein the compilation server comprises N sets of compilers, N being configured according to the number of software items.

5. The android platform compiling control method is applied to a statistical analysis server and is characterized by comprising the following steps:

receiving compilation information of a software package output from a compilation server;

according to the compiling information, determining abnormal modification of the source code meeting a preset rule and client equipment corresponding to the abnormal modification;

and sending reminding information to the client equipment, wherein the reminding information is used for informing a developer corresponding to the client equipment of correcting the abnormal modification.

6. The method according to claim 5, wherein the preset rules comprise that a native name hostname of the compiling server is changed, a Linnes linux version of the compiling server is changed, and a compiling control file android.

7. The utility model provides a management and control device is compiled to tall and erect platform which characterized in that, the device includes:

a receiving unit for receiving compilation information of the software package output from the compilation server;

the determining unit is used for determining the abnormal modification of the source code meeting the preset rule and the client equipment corresponding to the abnormal modification according to the compiling information;

and the sending unit is used for sending reminding information to the client equipment, and the reminding information is used for informing a developer corresponding to the client equipment to correct the abnormal modification.

8. The device of claim 7, wherein the preset rules comprise that a native name hostname of the compiling server is changed, a Linnes linux version of the compiling server is changed, and a compiling control file android.

9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 5 to 6.

10. A server, comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, causing the processor to carry out the method of any one of claims 5 to 6.

Technical Field

The invention relates to the technical field of software development, in particular to a method, a system, a device, a medium and equipment for compiling and controlling an android platform.

Background

Before the Android (Android) formally starts to compile, compiling control files of all modules, such as android.mk and android.bp, need to be converted into build.ninja files, and the conversion process is very time-consuming, and particularly when multiple developers share the same compiling server, the problem of long time consumption is more obvious. It is found that, in addition to triggering the android.mk and the android.bp of all modules to be converted into build.ninja files under the condition of compiling for the first time, modifying the android.mk/the android.bp, or adding or deleting source files, the compiling server is triggered to execute the process under other unnecessary conditions, so that the compiling speed of the compiling server is seriously influenced, and the development efficiency of developers is reduced.

Disclosure of Invention

The embodiment of the invention provides a compiling control method, a compiling system, a compiling device, a medium and equipment for an android platform.

In a first aspect, the present invention provides a compiling system, including a client device, a version control server, a compiling server and a statistical analysis server, which are used by developers;

the version control server is connected with the client equipment; the client device is used for responding to the modification operation of a developer on the source code and uploading the software package with the modified source code to the software library of the version control server;

the version control server is connected with the compiling server and is provided with a software library for storing the software package; the version control server is used for sending a compiling instruction to the compiling server;

the compiling server is connected with the statistical analysis server and used for compiling the software package according to a compiling instruction and outputting compiling information of the software package to the statistical analysis server;

the statistical analysis server is used for determining abnormal modification of the source code meeting the preset rule and client equipment corresponding to the abnormal modification according to the compiling information;

and sending reminding information to the client equipment, wherein the reminding information is used for informing a developer corresponding to the client equipment of correcting the abnormal modification.

The compiling system provided by the invention has the beneficial effects that: the compiling information triggered by any compiling server of the same set of codes can be reported to the statistical analysis server, and the statistical analysis server can analyze the abnormal modification influencing the compiling time and the client equipment corresponding to the abnormal modification, so that the statistical analysis server can push reminding information to developers corresponding to the client equipment to remind the developers to correct the abnormal modification, and the source code compiling speed is optimized.

In a possible embodiment, the version control server is specifically configured to:

acquiring project names, project versions and project architecture information from the software package; inquiring configuration information of a compiling server according to the project name, the project version and the project architecture information to obtain an address of the corresponding compiling server; and sending a compiling instruction to a compiling server corresponding to the address. The version control server can acquire the configuration information of the compiling server, so that the configuration information can be used for determining the address of the compiling server corresponding to the current project and then sending a compiling instruction to the compiling server corresponding to the address, and the process is beneficial for the version control server to accurately locate the compiling server corresponding to the software project.

In one possible embodiment, the preset rule includes that a native name (hostname) of the compiling server is changed, a linnas (linux) version of the compiling server is changed, and a compiling control file (android.mk) includes an illegal shell script. By configuring the preset rule, the statistical analysis server can conveniently screen out code modification operations which affect the compiling time except the conditions of compiling for the first time, modifying the android.mk/android.bp, or adding and deleting source files, so that abnormal modification which affects the compiling time length is analyzed.

In one possible embodiment, the compilation server includes N sets of compilers, N being configured as required by the number of software items. The compiling server configured in this way can ensure that the source code is compiled quickly, not only can make full use of hardware resources, but also can ensure the compiling speed.

In a second aspect, the present invention provides a method for managing and controlling compilation of an android platform, where the method includes:

receiving compilation information of a software package output from a compilation server;

according to the compiling information, determining abnormal modification of the source code meeting a preset rule and client equipment corresponding to the abnormal modification;

and sending reminding information to the client equipment, wherein the reminding information is used for informing a developer corresponding to the client equipment of correcting the abnormal modification.

In a possible embodiment of the method according to the invention,

the preset rules comprise that the name hostname of the compiling server changes, the Linnes linux version of the compiling server changes, and the compiling control file android.

The android platform compiling control method provided by the invention has the beneficial effects that: the compiling information triggered by any compiling server of the same set of codes can be reported to the statistical analysis server, and the statistical analysis server can analyze the abnormal modification influencing the compiling time and the client equipment corresponding to the abnormal modification, so that the statistical analysis server can push reminding information to developers corresponding to the client equipment to remind the developers to correct the abnormal modification, and the source code compiling speed is optimized.

In a third aspect, an embodiment of the present invention further provides an android platform compiling apparatus, where the apparatus includes a module/unit that executes any one of the possible designed methods in the first aspect. These modules/units may be implemented by hardware, or by hardware executing corresponding software.

In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory. Wherein the memory is used to store one or more computer programs; the one or more computer programs stored in the memory, when executed by the processor, enable the terminal device to implement the method of any of the possible designs of the second aspect described above.

In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on an electronic device, the electronic device is caused to perform any one of the possible design methods of any one of the aspects.

In a sixth aspect, an embodiment of the present invention further provides a computer program product, which, when running on a terminal, causes the electronic device to execute any one of the possible design methods of any one of the above aspects.

In a seventh aspect, an embodiment of the present invention further provides a server, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor is caused to execute any one of the possible designed methods in any one of the above aspects.

As for the advantageous effects of the above third to seventh aspects, reference may be made to the description of the above first aspect.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic diagram of an android platform compiling system architecture provided in an embodiment of the present invention;

fig. 2 is a schematic flow diagram of a method for managing and controlling compilation of an android platform according to an embodiment of the present invention;

fig. 3 is a schematic flow chart of another android platform compilation control method according to an embodiment of the present invention;

fig. 4 is a schematic diagram of a management and control device for compiling an android platform according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.

Detailed Description

In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the following description of the prior art and the technical solutions in the embodiments of the present invention with reference to the accompanying drawings is provided.

In order to solve the problem of time consumption for compiling in the background art, the embodiment of the present invention analyzes the condition of triggering the conversion of android.mk and android.bp of all modules into build.ninja files in advance as follows:

1. the source code is compiled for the first time;

2. android.mk/android.bp are modified;

3. the source files are added and deleted;

4. the native name (hostname) of the compilation server changes;

5. a change in the Linnaus (linux) version of the compilation server;

6. mk contains illegal shell scripts.

Based on the analysis of the above situation, the Android compiling system is additionally provided with a key compiling information collecting function, and compiling information triggered by any compiling server of the same set of codes is reported to the statistical analysis server, so that the statistical analysis server in the embodiment can analyze the compiling information, screen abnormal compiling, analyze reasons and submitters of the abnormal compiling, and push the reasons and the submitters to correct the codes so as to achieve self-optimization of the compiling speed.

To this end, the present invention provides a compiling system including a client device 101, a client device 102, a client device 103, a version control server 200, a compiling server 301, a compiling server 302, a compiling server 303, and a statistical analysis server 400 used by a developer. Wherein:

the version control server 200 is connected with the client apparatuses 101 to 103; the client device 100 is used for responding to the modification operation of the source code by the developer and uploading the software package with the modified source code to the software library of the version control server 200.

The version control server 200 is connected with the compiling server 301 to the compiling server 303, and the version control server 200 is provided with a software library for storing the software package; and a version control server 200 for sending the compiling instruction to the compiling server. Illustratively, version control server 200 may be an SVN server. In a possible embodiment, the version control server may further obtain a project name, a project version, and project architecture information from the software package; then inquiring configuration information of a compiling server according to the project name, the project version and the project architecture information to obtain the address of the corresponding compiling server; and sending a compiling instruction to the compiling server 301 corresponding to the address.

The compiling server 301 to the compiling server 303 are connected to the statistical analysis server 400, and the compiling server is configured to compile the software package according to the compiling instruction and output compiling information of the software package to the statistical analysis server 400. In this embodiment, the compiler server includes N sets of compilers, where N is configured according to the number of software items.

And the statistical analysis server 400 is configured to determine, according to the compiling information, the abnormal modification of the source code that meets the preset rule and the client device 101 corresponding to the abnormal modification. The preset rules comprise that the native name hostname of the compiling server changes, the Linns linux version of the compiling server changes, and the compiling control file android.

The statistical analysis server 400 is further configured to send a reminding message to the client device 101, where the reminding message is used to notify a developer corresponding to the client device 101 to correct the abnormal modification.

It should be noted that, in fig. 1, the number of the client devices is 3, and the number of the compiling servers is 3 for example, in practical application, the number of the client devices may be less than 3, or more than 3, and the number of the compiling servers may also be less than 3, or more than 3, which is not limited in this embodiment.

Based on the above compiling system, an embodiment of the present invention further provides a flowchart of a method for managing and controlling compiling of an android platform, as shown in fig. 2, the method may be applied to the statistical analysis server 400, and the method includes the following steps.

S201, receiving compilation information of the software package output by the compilation server.

Exemplarily, if the compilation information indicates that a native name (hostname) of the compilation server is changed, or a linnas (linux) version of the compilation server is changed, or the compilation control file (android.mk) includes an illegal shell script, it may trigger the android.mk and android.bp of all modules to be converted into a build.ninja file.

S202, according to the compiling information, determining abnormal modification of the source code meeting the preset rule and the client equipment corresponding to the abnormal modification.

For example, if the statistical analysis server 400 determines that the native name (hostname) of the compilation server changes according to the compilation information, the client device corresponding to the abnormal modification and the abnormal modification may be determined according to the code submission node on the version server 200.

And S203, sending reminding information to the client device, wherein the reminding information is used for informing a developer corresponding to the client device to correct the abnormal modification.

Illustratively, the statistical analysis server 400 sends a reminder message to the client device 101 to remind a developer of the client device 101 to replace the modification operation in other ways, so as to avoid triggering the android.mk and android.bp of all modules to be converted into build.

In order to describe the above android platform compiling control method more systematically, the following is further set forth with reference to the method flowchart shown in fig. 3, and specifically refer to the following steps.

S301, after the source code is modified by the developer of the client device, the source code is uploaded to a software library of the SVN server.

And S302, starting an update detection program by the SVN server, detecting the update condition of the software library, and inquiring configuration information of the compiling server according to the project name, the project version and the project architecture information to obtain the address of the corresponding compiling server.

S303, the SVN server sends a compiling instruction to the compiling server 301 corresponding to the address.

S304, after receiving the compiling instruction, the compiling server 301 parses the compiling instruction, and performs compiling on the source code to generate compiling information, where the compiling information includes log information generated in the compiling process.

S305, the compiling server 301 sends compiling information to the statistical analysis server 400.

S306, the statistical analysis server 400 determines the abnormal modification of the source code meeting the preset rule and the client device 101 corresponding to the abnormal modification according to the compiling information.

S307, the statistical analysis server 400 sends the client device 101 the reminder information.

S308, after the developer of the client device 101 sees the reminding information, the developer corrects the previous modification operation, that is, restores the original modification or replaces the previous modification operation with another modification method.

Therefore, in this embodiment, the compiling information triggered by any compiling server of the same set of codes is reported to the statistical analysis server, and the statistical analysis server can analyze the abnormal modification affecting the compiling duration and the client device corresponding to the abnormal modification, so that the statistical analysis server can push the reminding information to the developer corresponding to the client device, so as to remind the developer to correct the abnormal modification, and realize the optimization of the compiling speed of the source code.

Based on the above android platform compilation control method, in some embodiments of the present invention, an embodiment of the present invention discloses an android platform compilation control device, as shown in fig. 4, where the device 400 is configured to implement the methods described in the above method embodiments, and includes: receiving section 401, determining section 402, and transmitting section 403. A receiving unit 401, configured to receive compilation information of the software package output from the compilation server. A determining unit 402, configured to determine, according to the compiling information, an abnormal modification of the source code that meets a preset rule and a client device corresponding to the abnormal modification. A sending unit 403, configured to send a reminding message to the client device, where the reminding message is used to notify a developer corresponding to the client device to correct the abnormal modification. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.

In other embodiments of the present invention, an embodiment of the present invention discloses a server, where the server may refer to the above statistical analysis server, and as shown in fig. 5, the server 500 may include: one or more processors 501; a memory 502; a display 503; one or more application programs (not shown); and one or more computer programs 504, which may be connected via one or more communication buses 505. Wherein the one or more computer programs 504 are stored in the memory 502 described above and configured to be executed by the one or more processors 501, the one or more computer programs 504 comprising instructions.

Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.

The invention also provides a computer-readable medium, on which a computer program is stored, which, when executed by a computer, implements the method of the above-described method embodiments.

The invention also provides a computer program product which, when executed by a computer, implements the method of the above method embodiments.

Each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be implemented in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.

The above description is only a specific implementation of the embodiments of the present invention, but the scope of the embodiments of the present invention is not limited thereto, and any changes or substitutions within the technical scope disclosed by the embodiments of the present invention should be covered within the scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be subject to the protection scope of the claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种人工智能实验平台的自动评测方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!