Application code package generation method and device, electronic equipment and storage medium

By detecting the adaptability and support of the application development model and underlying code, and generating object code packages, the problem of high workload and high error risk in manual inspection and modification in software development is solved, and development efficiency is improved and automated deployment is achieved.

CN119440512APending Publication Date: 2025-02-14SHENZHEN HITHIUM ENERGY STORAGE CONTROL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411456051.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the software development process, developers need to manually check and modify the adaptability between the application model and the underlying code, resulting in large workload and high risk of errors, thereby reducing development efficiency.

Method used

By detecting the adaptability and support of the application development model and the underlying code, the target code package is generated, and the automatic detection and deployment of the application development model is realized, reducing the testing and debugging of developers.

Benefits of technology

It improves the efficiency of application development, reduces the workload and error risks of developers, and realizes the automated deployment of application development models and underlying code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440512A_ABST
    Figure CN119440512A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application code package generation method and device, electronic equipment and a storage medium. The method comprises the steps that at least one application development model corresponding to a target application and a bottom layer code used for supporting operation of the at least one application development model are obtained; the at least one application development model is detected to obtain at least one first detection result, the bottom layer code is detected to obtain a second detection result, the first detection result comprises an adaptation result of the at least one application development model and the bottom layer code, and the second detection result comprises a support result of the bottom layer code for the at least one application development model; and if the at least one first detection result and the second detection result are qualified, generating a target code package according to the plurality of development models and the underlying code. By implementing the method provided by the invention, the development efficiency of the application program can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development technology, and in particular to a method, device, electronic device and storage medium for generating a code package for an application. Background Art

[0002] In the process of modern software development, various application models are often needed to implement the corresponding functions of the application models in the software. In the process of embedding the relevant code of the application model into the underlying code of the software, a lot of inspection, testing and modification work is required. In the existing software development process, the above work is usually performed by developers themselves. This means that developers need to manually perform inspection, maintenance and modification between models and codes, which greatly increases the workload of developers and the risk of errors, thus leading to the problem of low efficiency in application development. Summary of the invention

[0003] In response to the above problems, the present application example provides a method, device, electronic device and storage medium for generating an application code package, which is conducive to improving the development efficiency of the application.

[0004] To achieve the above-mentioned objectives, in the first aspect, an embodiment of the present application provides a method for generating a code package for an application, the method comprising: obtaining at least one application development model corresponding to a target application, and underlying code for supporting the operation of at least one application development model; detecting at least one application development model to obtain at least one first detection result, and detecting the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for at least one application development model; if at least one first detection result and the second detection result are both qualified, generating a target code package according to multiple development models and the underlying code.

[0005] It can be seen that in the embodiments of the present application, by detecting at least one application development model and the underlying code, at least one first detection result and a second detection result are obtained, so that it can be determined that at least one application development model can realize all the functions of the target application based on the normal operation of the underlying code, thereby realizing automatic detection and deployment of the application development model, eliminating the need for developers to test and debug the application development model, and improving the development efficiency of the application.

[0006] In combination with the first aspect, in a possible embodiment, detecting at least one application development model to obtain at least one first detection result includes: statically detecting the model code of the target model to obtain a first static detection result of the target model, where the target model is one of the at least one application development model; if the first static detection result is qualified, dynamically detecting the model code of the target model to obtain a first dynamic detection result of the target model; if the first dynamic detection result is qualified, determining that the first detection result corresponding to the target model is qualified.

[0007] It can be seen that in the embodiment of the present application, by performing static detection, dynamic detection and unit detection on the application development model, it is possible to test the support result of the underlying code for at least one application development model, and then generate a target code package when it is determined that the application development model can adapt to the underlying code and the underlying code can support at least one application development model, thereby realizing the automated deployment of the application development model.

[0008] In combination with the first aspect, in a possible embodiment, before performing static detection on the model code of the target model to obtain a first static detection result of the target model, the method also includes: performing static detection on the target model to obtain a second static detection result of the target model; if the second static detection result is qualified, performing unit detection on the target model to obtain a first unit detection result of the target model; if the first unit detection result of the target model is qualified, generating the model code of the target model.

[0009] It can be seen that in the embodiment of the present application, the target model is detected by the server, and then the model code of the target model is generated after the detection is qualified. There is no need for the developer to edit the model code of the target model, thereby improving the development efficiency of the application development.

[0010] In combination with the first aspect, in a possible embodiment, detecting the underlying code to obtain a second detection result includes: performing static detection on the underlying code to obtain a third static detection result of the underlying code; if the third static detection result is qualified, performing dynamic detection on the underlying code to obtain a second dynamic detection result of the underlying code; if the second dynamic detection result is qualified, performing unit detection on at least one underlying code module of the underlying code to obtain at least one second unit detection result of the underlying code; if at least one second unit detection result is qualified, determining that the second detection result of the underlying code is qualified.

[0011] It can be seen that in the embodiment of the present application, by performing static detection, dynamic detection and unit detection on the underlying code, it is possible to test the support results of the underlying code for at least one application development model, and then generate a target code package when it is determined that at least one application development model can adapt to the underlying code and the underlying code can support at least one application development model, thereby realizing the automatic deployment of the underlying code.

[0012] In combination with the first aspect, in a possible embodiment, the method also includes: if the intermediate detection result is unqualified, obtaining at least one first code according to the intermediate detection result; wherein the first code is a code indicating an error in the intermediate detection result, and the intermediate detection result is an intermediate result generated during the detection process of the first detection result or an intermediate result generated during the detection process of the second detection result; determining at least one object to be modified according to the at least one first code, the object to be modified being an application development model or a bottom-level code module of the bottom-level code; and modifying at least one object to be modified according to the intermediate detection result.

[0013] It can be seen that in the embodiment of the present application, at least one object to be modified is modified through the intermediate detection results, and the underlying code modules of the application development model and the underlying code that cannot be adapted to each other are modified to realize the modification and deployment of the model, thereby improving the development efficiency of the application.

[0014] In combination with the first aspect, in a possible embodiment, modifying the object to be modified according to the intermediate detection result includes: inputting the intermediate detection result and at least one first code into a repair model; obtaining a second code output by the repair model; and modifying the object to be modified according to the second code.

[0015] It can be seen that in the embodiment of the present application, the second code generated by machine learning is used to modify the object to be modified, which can automatically handle problems in at least one application development model or underlying code, thereby improving the development efficiency of the target application.

[0016] In combination with the first aspect, in a possible embodiment, the method also includes: generating a version number of the target code package, and storing the target code package and the version number in a database; receiving a rollback request sent by an application terminal, the rollback request including the target version number; and sending the code package corresponding to the target version number in the data to the application terminal.

[0017] It can be seen that in the embodiment of the present application, the application terminal can request a code package corresponding to a more stable target version number from the server by sending a rollback request, thereby reverting the target application to a historical version and solving problems such as the target application being unable to run, thereby ensuring the stability of the target application.

[0018] In a second aspect, an embodiment of the present application provides a device for generating a code package of an application, which is used to execute a method for generating a code package of an application, and the device includes:

[0019] An acquisition unit: used to acquire at least one application development model corresponding to a target application, and underlying code used to support the operation of at least one application development model;

[0020] A detection unit: used to detect at least one application development model to obtain at least one first detection result, and detect the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for at least one application development model;

[0021] A generating unit is used to generate a target code package according to a plurality of development models and underlying codes if at least one of the first test result and the second test result are both qualified.

[0022] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and one or more instructions are suitable for being loaded by the processor and executing part or all of the method of the first aspect.

[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the method of the first aspect.

[0024] In a fifth aspect, the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes part or all of the method of the first aspect.

[0025] It can be understood that the beneficial effects of the embodiments described in the second to fifth aspects can refer to the beneficial effects of the method described in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 A schematic diagram of an application scenario of a method for generating a code package for an application provided in an embodiment of the present application;

[0028] Figure 2 A flowchart of a method for generating a code package for an application provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of a dynamic detection provided by an embodiment of the present application;

[0030] Figure 4 A schematic diagram of the structure of a target model provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of another method for generating a code package for an application provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of the structure of a code package generating device for an application provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0037] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0038] See also Figure 1 , Figure 1 The application scenario diagram of a method for generating a code package of an application provided in an embodiment of the present application, wherein the application scenario 100 includes a server 101, a development terminal 102, and an application terminal 103. The server is used to receive the code sent by the development terminal 102, and then generate an execution file according to the code after determining that the application code can run normally through detection steps such as static detection, dynamic detection, and unit detection, and then generate a code package according to the execution file.

[0039] The server 101 is also configured with a code library, which is used to manage the format and version of the code, so that the server 101 can detect the application development model and underlying code sent by the development terminal 102, generate a code package after the detection, and deploy the code package to the application terminal 103 through automated scripts, Over-the-Air Technology (OTA), etc. The application terminal 103 is specifically a local terminal used to run the application to implement the function of the application.

[0040] In the embodiment of the present application, the server 101 obtains at least one application development model corresponding to the target application, and the underlying code for running at least one application development model. The application development model and the underlying code here are generated by the development engineer through the development terminal 102 according to the requirements of the target application and sent to the server 101. In the actual scenario, the development model and the underlying code here may be sent through multiple different development terminals. Each development model corresponds to a function or step of a target application, etc.

[0041] After obtaining at least one application development model and underlying code, server 101 detects whether the at least one application development model and the underlying code are adapted and supported, and obtains at least one first detection result and a second detection result, that is, determines whether the at least one application development model can run normally based on the underlying code to realize all functions of the target application.

[0042] After the server 101 determines that at least one first test result and the second test result are both qualified, that is, it determines whether at least one application development model can realize all functions of the target application based on the normal operation of the underlying code. Then, a code package corresponding to the target application is generated according to the at least one application development model and the underlying code. Then, the target application can be deployed in the application terminal 103 according to the code package.

[0043] It can be seen that in the embodiments of the present application, by detecting at least one application development model and the underlying code, at least one first detection result and a second detection result are obtained, so that it can be determined that at least one application development model can realize all the functions of the target application based on the normal operation of the underlying code, thereby realizing automatic detection and deployment of the application development model, eliminating the need for developers to perform testing, debugging, etc., and improving the development efficiency of the application.

[0044] See also Figure 2 , Figure 2 A flowchart of a method for generating a code package for an application provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented as follows Figure 2 As shown, steps S201-S203 are included.

[0045] S201: The server obtains at least one application development model corresponding to the target application, and underlying code for supporting the operation of the at least one application development model.

[0046] Specifically, the server here is used to manage the development process of the target application. In order to complete the development of the target application, it is necessary to complete the underlying code of the target application and the application development model that runs on the underlying code to implement various application functions. The underlying code here includes multiple underlying code modules. The developer completes multiple underlying code modules and at least the code in the application development model through the development terminal and sends the above code to the server.

[0047] The application development model here includes at least one model code. Model code usually refers to the code for building and training models such as machine learning or deep learning models. These models are used to implement various functions of the application. The model code involves the model architecture, input and output definitions, loss functions, optimizers, etc. The underlying code here refers to the basic components for implementing algorithms or frameworks, which usually involve lower-level programming details, such as data structures, memory management, parallel computing, etc. It provides basic support for the normal operation of the model in the application.

[0048] S202: The server detects at least one application development model to obtain at least one first detection result, and detects the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for at least one application development model.

[0049] Specifically, after obtaining at least one application development model, the server detects each application development model in the at least one application development model to obtain a first detection result of each application development model, which is to detect the adaptation result of each application development model and the underlying code, that is, to detect whether each application development model can run normally in the underlying code. The server also detects the underlying code to obtain a second detection result, which is used to indicate whether the underlying code can support the above at least one application development model.

[0050] Furthermore, in the process of performing static detection, dynamic detection or unit detection on the underlying code or application development model, the server will generate at least one detection item based on factors such as the detection item, the detection object, and the preset items of the target application. The first detection result and the second detection result here include the detection result of at least one detection item.

[0051] In addition, the preset projects of the target application here are mainly set based on the preset underlying architecture and preset application development model of the target application. Since the above-mentioned at least one application development model and underlying code are developed based on the preset underlying architecture and preset application development model here, at least one detection project is generated through factors such as preset projects to detect the underlying code or application development model, which can test the degree of adaptation of the application development model to the underlying code, and the degree of support of the underlying code for at least one application development model.

[0052] The server obtains the test results of each test item based on the underlying code or application development model according to at least one test item. Finally, it is determined whether the underlying code or application development model under test has passed the test based on the proportion of qualified test results. For example, if 100% or more than 90% of the test results are qualified, the corresponding test results are determined to be qualified.

[0053] Furthermore, after the static detection, dynamic detection or unit detection is completed, the server generates a detection report according to the detection result of each detection item, and sends the detection report to the development terminal.

[0054] In a possible embodiment, detecting at least one application development model to obtain at least one first detection result includes: statically detecting a model code of a target model to obtain a first static detection result of the target model, where the target model is one of the at least one application development model; if the first static detection result is qualified, dynamically detecting the model code of the target model to obtain a first dynamic detection result of the target model; if the first dynamic detection result is qualified, determining that the first detection result corresponding to the target model is qualified.

[0055] Specifically, in the embodiment of the present application, each application development model is sent to the server in the form of code. In the embodiment of the present application, the detection of the application development model mainly includes static detection and dynamic detection of the model code in the application development model. The following is a specific description using the target model as an example, where the target model is one of at least one application development model.

[0056] The server performs static detection on the model code in the target model and obtains the first static detection result. The static detection here is performed when the model code is not in operation, and is mainly used to discover potential errors and defects, such as code format problems and potential logical errors. After the static detection of the model code is qualified, that is, the first static detection result is qualified, the model code is then dynamically detected. The dynamic detection here is a test performed when the code is running, which verifies its behavior and performance by actually executing the code, and captures runtime errors and problems. After the static detection of the model code is qualified, that is, the first dynamic detection result is qualified; then it is determined that the first detection result corresponding to the target model is qualified, which means that the target model can adapt to the underlying code.

[0057] Furthermore, the dynamic detection here specifically includes obtaining multiple test codes of the target model, where the test code is a model code of an application development model strongly related to the target model in at least one application model or an underlying code module strongly related to the target model. The actual execution order differs from the target actual execution order by less than a preset difference value.

[0058] For example, see Figure 3 , Figure 3 A schematic diagram of a dynamic detection provided for an embodiment of the present application. The target model here includes multiple model codes, and the preset difference value in the embodiment of the present application is 1, that is, in the dynamic test of the target model, the server will build a temporary code test chain for testing based on the model or underlying code module whose execution order difference with the target model is 1.

[0059] like Figure 3 As shown in the figure, the test model here is one of the application development models. The execution order in the target application is "8", and the execution order of the target model in the application is "9". Therefore, the test model here is the model executed before the target model. The target model may need the execution result of the test model here during execution. The test underlying code module here is one of the multiple underlying code modules of the underlying code. The execution order of the test underlying code module in the target application is "10". The server generates Figure 3 The code test chain shown performs dynamic testing on the target model to obtain the compatibility of the target model with other models and underlying codes.

[0060] It can be seen that in the embodiment of the present application, by performing static detection, dynamic detection and unit detection on the application development model, it is possible to test the support result of the underlying code for at least one application development model, and then generate a target code package when it is determined that the application development model can adapt to the underlying code and the underlying code can support at least one application development model, thereby realizing the automated deployment of the application development model.

[0061] In a possible embodiment, before statically detecting the model code of the target model to obtain a first static detection result of the target model, the method also includes: statically detecting the target model to obtain a second static detection result of the target model; if the second static detection result is qualified, performing unit detection on the target model to obtain a first unit detection result of the target model; if the unit detection result of the target model is qualified, generating the model code of the target model.

[0062] Specifically, in the embodiment of the present application, the target model here does not include specific model codes. The target model is a simulation model built by developers through different simulation modules and connecting lines. The model code of the target model is automatically generated by the server. For example, see Figure 4 , Figure 4 A schematic diagram of the structure of a target model provided in an embodiment of the present application. It includes a first input module, a second input module, a third input module, a fourth input module, a calculation module, a first output module, a second output module, and connection lines between various modules. Developers complete the development of the target model by connecting various modules together. This is only an example, and a specific scenario may include more or fewer modules and more complex connection relationships.

[0063] In the embodiment of the present application, after the server obtains the target model, it first performs a static test on the target model. After the static test is qualified, that is, after determining that the second static test result is qualified, the target model unit test is performed, that is, each model in the multiple modules of the target model is tested separately. When the test results of all modules are qualified, it is determined that the first unit test result here is qualified. At this time, the server determines that the target model can run normally at the simulation model level, and then generates the model code of the target model, specifically generating the corresponding model code through the simulation model of the target model.

[0064] It can be seen that in the embodiment of the present application, the target model is detected by the server, and then the model code of the target model is generated after the detection is qualified. There is no need for the developer to edit the model code of the target model, thereby improving the development efficiency of the application development.

[0065] In a possible embodiment, detecting the underlying code to obtain a second detection result includes: performing static detection on the underlying code to obtain a third static detection result of the underlying code; if the third static detection result is qualified, performing dynamic detection on the underlying code to obtain a second dynamic detection result of the underlying code; if the second dynamic detection result is qualified, performing unit detection on the underlying code to obtain at least one second unit detection result of the underlying code; if at least one second unit detection result is qualified, determining that the second detection result of the underlying code is qualified.

[0066] Specifically, in the embodiment of the present application, the bottom layer code includes at least one bottom layer code module, each bottom layer code module is used to implement different functions of the bottom layer architecture of the application program. Therefore, when performing unit detection on the bottom layer code, at least one second unit detection result will be obtained.

[0067] The server first performs static detection and dynamic detection on the underlying code. As mentioned above, the static detection and dynamic detection here are performed by generating at least one detection item based on factors such as the detection item, the detection object, and the preset items of the target application. Therefore, the specific detection process for different detection objects is also different.

[0068] After determining the third static test result and the second dynamic test result, it is also necessary to perform unit test on at least one underlying code module of the underlying code to obtain at least one second unit test result. This is because in the dynamic side, the underlying code is usually intelligently tested to see if it can run smoothly, while the unit test will further test whether the data generated during the specific operation of each unit is normal, and pay more attention to details such as the module's functions and boundary conditions.

[0069] Further, the specific test content of dynamic detection here can be found in Figure 3 The code test chain described above will not be repeated here.

[0070] It can be seen that in the embodiment of the present application, by performing static detection, dynamic detection and unit detection on the underlying code, it is possible to test the support results of the underlying code for at least one application development model, and then generate a target code package when it is determined that at least one application development model can adapt to the underlying code and the underlying code can support at least one application development model, thereby realizing the automated deployment of the application development model.

[0071] S203: If at least one of the first test result and the second test result are both qualified, the server generates a target code package according to the multiple development models and the underlying codes.

[0072] Specifically, if at least one of the first test result and the second test result are both qualified, it is proved that at least one application development model can run normally in the application framework composed of the underlying code. At this time, the server generates a target code package based on multiple development models and the underlying code, so that the target application can be deployed in various production environments, that is, the application terminal 103 mentioned above.

[0073] In a possible embodiment, the method also includes: generating a version number of the target code package, and storing the target code package and the version number in a database; receiving a rollback request sent by an application terminal, the rollback request including the target version number; and sending the code package corresponding to the target version number in the data to the application terminal.

[0074] Specifically, after generating the target code package, the server will generate a version number of the target code package, and different code packages correspond to different version numbers. The code package and the version number are stored in the server's database. When the application terminal deploys the target application according to the target code package and there are problems such as being unable to run, the application terminal can send a rollback request including the target version number to the server, where the target version number is lower than the version number corresponding to the target code package. In this way, the code package of the historical version of the target application that can run normally is obtained, that is, the code package corresponding to the target version number here.

[0075] It can be seen that in the embodiment of the present application, the application terminal can request a code package corresponding to a more stable target version number from the server by sending a rollback request, thereby reverting the target application to a historical version and solving problems such as the target application being unable to run, thereby ensuring the stability of the target application.

[0076] In the above application embodiment, a method for generating a code package for an application with both a first test result and a second test result being qualified is described. Based on this, in the embodiment of the present application, a method for generating a code package for an application with unqualified results in the process of testing the application development model and the underlying code is also provided. Figure 5 , Figure 5 A flowchart of another method for generating a code package for an application provided in an embodiment of the present application includes steps S501-S504:

[0077] S501: The server obtains at least one application development model corresponding to the target application, and underlying code for supporting the operation of the at least one application development model.

[0078] S502: The server detects at least one application development model to obtain at least one first detection result, and detects the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for at least one application development model.

[0079] For the detailed description of steps S501-S502, please refer to the related description of the aforementioned steps S201-S202, which will not be repeated here.

[0080] S503: If at least one of the first test result and / or the second test result is not qualified, modify the multiple development models and / or the underlying codes.

[0081] Specifically, the first test result and / or the second test result are unqualified because one or more of the first static test result, the first dynamic test result, the second static test result, the first unit test result, the third static test result, the second dynamic test result, and the second unit test result are unqualified. The one or more unqualified test results will be marked with the reasons for the unqualified, and then the multiple development models and / or underlying codes will be modified according to the reasons for the unqualified to solve the problems raised by the corresponding test results.

[0082] Furthermore, the modification here specifically includes operations such as replacement, addition, and deletion of the code. After completing the modification of the code, the server will re-execute all the detection steps included in step S502 to ensure that the target application can run normally after being deployed through the target code package.

[0083] In a possible embodiment, the method also includes: if the intermediate detection result is unqualified, obtaining at least one first code according to the intermediate detection result; wherein the first code is a code indicating an error in the intermediate detection result, and the intermediate detection result is an intermediate result generated during the detection process of the first detection result or an intermediate result generated during the detection process of the second detection result; determining at least one object to be modified according to the at least one first code, and the object to be modified is an application development model or a bottom-level code module of the bottom-level code; and modifying at least one object to be modified according to the intermediate detection result.

[0084] Specifically, in an embodiment of the present application, the underlying code module of the application development model or the underlying code is modified for the case where the intermediate detection result is unqualified to solve the problem raised by the intermediate detection result. The intermediate detection result here is an intermediate result generated in the detection process of the first detection result or an intermediate result generated in the detection process of the second detection result, specifically one of the first static detection result, the first dynamic detection result, the third static detection result or the second dynamic detection result. The first static detection result, the first dynamic detection result, the third static detection result and the second dynamic detection are intermediate results that need to be determined in the process of determining the first detection result and the second detection result. Each intermediate result with an unqualified conclusion indicates that there is an erroneous code. For a detailed description of how to determine the first detection result based on the intermediate result combined with the first detection and how to determine the second detection result based on the intermediate result combined with the second detection, please refer to the aforementioned related content, which will not be repeated here.

[0085] The intermediate detection result is the result obtained by detecting the code, and in the embodiment of the present application, only the code is modified. The server specifically obtains at least one first code based on the intermediate detection result. The first code here can be the code in the detected object when the intermediate detection result is obtained, or it can be the code in the associated model or associated underlying code module of the detected object. The first code causes the intermediate detection result to be unqualified, so it is necessary to modify the first code machine here.

[0086] After determining the first code, at least one object to be modified is determined to be an application development model or a bottom code module of the bottom code according to at least one first code, and then the at least one object to be modified is modified.

[0087] Furthermore, a plurality of preset modification schemes are stored in the database of the server, and the preset modification schemes correspond to at least one first code. After the server obtains at least one first code according to the intermediate detection result, it queries the database, and if a preset modification scheme corresponding to at least one first code is obtained, at least one object to be modified is modified according to the preset modification scheme.

[0088] If the preset modification scheme corresponding to at least one first code is not obtained, the server sends the intermediate detection result and the first code to the development terminal, obtains the modification scheme sent by the development terminal, modifies at least one to-be-modified object according to the modification scheme, and generates a modification record according to the modification scheme sent by the development terminal.

[0089] It can be seen that in the embodiment of the present application, at least one object to be modified is modified through the intermediate detection results, and the underlying code modules of the application development model and the underlying code that cannot be adapted to each other are modified to realize the modification and deployment of the model, thereby improving the development efficiency of the application.

[0090] In a possible embodiment, modifying the object to be modified according to the intermediate detection result includes: inputting the intermediate detection result and at least one first code into a repair model; obtaining a second code output by the repair model; and modifying the object to be modified according to the second code.

[0091] Specifically, in the embodiment of the present application, the repair model here is a machine learning model, and the modification model is trained according to the modification records in the aforementioned embodiment. Therefore, the modification model can output a second code that can solve the related problems or errors of the first code according to the intermediate detection result and the first code.

[0092] Modifying the object to be modified according to the second code herein specifically includes replacing the first code according to the second code or adding the second code to a preset position in the object to be modified.

[0093] It can be seen that in the embodiment of the present application, the second code generated by machine learning is used to modify the object to be modified, which can automatically handle problems in at least one application development model or underlying code, thereby improving the development efficiency of the target application.

[0094] S504: The server generates a target code package according to the multiple development models and the underlying codes.

[0095] For the detailed description of step S504, please refer to the relevant aspects of the aforementioned step S203, which will not be repeated here.

[0096] By implementing the method in the above application embodiment, it can be seen that at least one first detection result and a second detection result are obtained by detecting at least one application development model and the underlying code through the server, and after determining that the first detection result and the second detection result are qualified, the application development model is tested, debugged, and the like, thereby improving the development efficiency of the application. By performing static detection, dynamic detection, and unit detection on the application development model and the underlying code, it is determined that at least one application development model can adapt to the underlying code and the underlying code, thereby realizing the automated deployment of the application development model and the underlying code. The second code generated by machine learning modifies the object to be modified, thereby improving the development efficiency of the target application. The terminal can ensure the stability of the target application by sending a rollback request.

[0097] Based on the description of the above configuration method embodiment, the present application also provides an application code package generation device 600, which can be a device running on Figure 1 A computer program (including program code) in the application scenario shown in FIG. Figure 1 The application scenario shown in the figure is executed Figure 2 See the method shown in Figure 6, the code package generating device of the application includes:

[0098] Acquisition unit 601: used to acquire at least one application development model corresponding to a target application, and underlying code used to support the operation of at least one application development model;

[0099] Detection unit 602: used to detect at least one application development model to obtain at least one first detection result, and detect the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of the at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for the at least one application development model;

[0100] The generating unit 603 is configured to generate a target code package according to a plurality of development models and underlying codes if at least one of the first detection result and the second detection result are both qualified.

[0101] In a possible embodiment, in terms of detecting at least one application development model to obtain at least one first detection result, the detection unit 602 is also specifically used to: perform static detection on the model code of the target model to obtain a first static detection result of the target model, where the target model is one of the at least one application development model; if the first static detection result is qualified, perform dynamic detection on the model code of the target model to obtain a first dynamic detection result of the target model; if the first dynamic detection result is qualified, determine that the first detection result corresponding to the target model is qualified.

[0102] In a possible embodiment, before performing static detection on the model code of the target model to obtain a first static detection result of the target model, the detection unit 602 is further specifically used to: perform static detection on the target model to obtain a second static detection result of the target model; if the second static detection result is qualified, perform unit detection on the target model to obtain a first unit detection result of the target model; if the first unit detection result of the target model is qualified, generate the model code of the target model.

[0103] In a possible embodiment, in terms of detecting the underlying code to obtain a second detection result, the detection unit 602 is also specifically used to: perform static detection on the underlying code to obtain a third static detection result of the underlying code; if the third static detection result is qualified, perform dynamic detection on the underlying code to obtain a second dynamic detection result of the underlying code; if the second dynamic detection result is qualified, perform unit detection on at least one underlying code module of the underlying code to obtain at least one second unit detection result of the underlying code; if at least one second unit detection result is qualified, determine that the second detection result of the underlying code is qualified.

[0104] In a possible embodiment, the acquisition unit 601 is also specifically used to: if the intermediate detection result is unqualified, obtain at least one first code according to the intermediate detection result; wherein the first code is a code indicating an error in the intermediate detection result, and the intermediate detection result is an intermediate result generated during the detection process of the first detection result or an intermediate result generated during the detection process of the second detection result; determine at least one object to be modified according to the at least one first code, and the object to be modified is an application development model or a bottom-level code module of the bottom-level code; and modify at least one object to be modified according to the intermediate detection result.

[0105] In a possible embodiment, in terms of modifying the object to be modified according to the intermediate detection result, the generation unit 603 is also specifically used to: input the intermediate detection result and at least one first code into the repair model; obtain the second code output by the repair model; and modify the object to be modified according to the second code.

[0106] Based on the description of the above method embodiment and device embodiment, please refer to Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 The electronic device 700 shown (the electronic device 700 may be a computer device, Figure 1 The server 101 shown includes a memory 701, a processor 702, a communication interface 703 and a bus 704. The memory 701, the processor 702 and the communication interface 703 are connected to each other through the bus 704.

[0107] The memory 701 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).

[0108] The memory 701 can store programs. When the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 703 are used to execute the various steps of the code package generation method of the application embodiment of the present application.

[0109] The processor 702 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the electronic device 700 of the embodiment of the present application, or to execute the code package generation method of the application of the method embodiment of the present application.

[0110] The processor 702 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the code package generation method of the application of the present application may be completed by an integrated logic circuit of hardware or software instructions in the processor 702. The above-mentioned processor 702 may also be a general-purpose processor, a digital signal processor (DigitalSignal Processing, DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (Field ProgrammableGate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 701, and the processor 702 reads the information in the memory 701, and combines its hardware to complete the functions required to be performed by the units included in the electronic device 700 of the embodiment of the present application, or executes the code package generation method of the application of the method embodiment of the present application.

[0111] The communication interface 703 uses a transceiver such as, but not limited to, a transceiver to implement communication between the electronic device 700 and other devices or a communication network. For example, data can be acquired through the communication interface 703 .

[0112] The bus 704 may include a path for transmitting information between various components of the electronic device 700 (eg, the memory 701 , the processor 702 , and the communication interface 703 ).

[0113] It should be noted that although Figure 7The electronic device 700 shown only shows a memory 701, a processor 702, and a communication interface 703. However, in the specific implementation process, those skilled in the art should understand that the electronic device 700 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 700 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 700 may also only include the devices necessary for implementing the embodiments of the present application, and does not necessarily include Figure 7 All devices shown in .

[0114] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the code package generation method for the application.

[0115] Optionally, as an implementation method, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the code package generation method of the application.

[0116] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.

[0117] The embodiment of the present application further provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.

[0118] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any media (e.g., based on a communication protocol) that facilitates the transfer of a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.

[0119] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0120] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.

[0121] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in an encoded hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).

[0122] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific descriptions of the corresponding steps in the aforementioned method embodiments, and will not be repeated here.

[0123] It should be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A and B can be singular or plural. Also, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be necessarily different. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.

[0127] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

[0128] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.

[0129] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a code package for an application, characterized in that: The method comprises: Acquire at least one application development model corresponding to the target application, and underlying code for supporting the operation of the at least one application development model; Detecting the at least one application development model to obtain at least one first detection result, and detecting the underlying code to obtain a second detection result, wherein the first detection result includes an adaptation result of the at least one application development model and the underlying code, and the second detection result includes a support result of the underlying code for the at least one application development model; If both the at least one first test result and the second test result are qualified, a target code package is generated according to the multiple development models and the underlying code.

2. The method according to claim 1, characterized in that The detecting the at least one application development model to obtain at least one first detection result includes: Performing static detection on a model code of a target model to obtain a first static detection result of the target model, wherein the target model is one of the at least one application development model; If the first static detection result is qualified, dynamically detecting the model code of the target model to obtain a first dynamic detection result of the target model; If the first dynamic detection result is qualified, it is determined that the first detection result corresponding to the target model is qualified.

3. The method according to claim 2, characterized in that Before the static detection of the model code of the target model is performed to obtain the first static detection result of the target model, the method further includes: Performing static detection on the target model to obtain a second static detection result of the target model; If the second static detection result is qualified, performing unit detection on the target model to obtain a first unit detection result of the target model; If the first unit detection result of the target model is qualified, a model code of the target model is generated.

4. The method according to claim 1, characterized in that: The detecting the underlying code to obtain a second detection result includes: Performing static detection on the underlying code to obtain a third static detection result of the underlying code; If the third static detection result is qualified, dynamically detecting the underlying code to obtain a second dynamic detection result of the underlying code; If the second dynamic detection result is qualified, performing unit detection on at least one bottom-level code module of the bottom-level code to obtain at least one second unit detection result of the bottom-level code; If the at least one second unit test result is qualified, it is determined that the second test result of the underlying code is qualified.

5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: If the intermediate test result is unqualified, obtaining at least one first code according to the intermediate test result; wherein the first code is a code indicating an error in the intermediate test result, and the intermediate test result is an intermediate result generated during the detection process of the first test result or an intermediate result generated during the detection process of the second test result; Determine at least one object to be modified according to the at least one first code, wherein the object to be modified is the application development model or a bottom-level code module of the bottom-level code; The at least one to-be-modified object is modified according to the intermediate detection result.

6. The method according to claim 5, characterized in that The step of modifying the object to be modified according to the intermediate detection result includes: inputting the intermediate detection result and the at least one first code into a repair model; Obtaining a second code output by the repair model; The object to be modified is modified according to the second code.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: generating a version number of the object code package, and storing the object code package and the version number in a database; Receiving a rollback request sent by an application terminal, wherein the rollback request includes a target version number; The code package corresponding to the target version number in the data is sent to the application terminal.

8. A device for generating a code package for an application, characterized in that: The device is used to execute a method for generating a code package for an application, and the device includes: An acquisition unit: used to acquire at least one application development model corresponding to a target application, and underlying code used to support the operation of the at least one application development model; A detection unit: used to detect the at least one application development model to obtain at least one first detection result, and detect the underlying code to obtain a second detection result, wherein the first detection result includes the adaptation result of the at least one application development model and the underlying code, and the second detection result includes the support result of the underlying code for the at least one application development model; A generating unit is configured to generate a target code package according to the plurality of development models and the underlying code if both the at least one first test result and the second test result are qualified.

9. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.