Application program running method and device, computer equipment and storage medium
By generating and executing the entry configuration files under the preset underlying multi-end framework, the problems of code redundancy and low development efficiency when developing multi-end applications in the existing technology are solved, and code sharing and efficient development of cross-end applications are realized.
Patent Information
- Application Number
- CN202311038182.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, developing multiple sets of code to support multiple application types (multi-terminal) results in cumbersome and costly development process, affecting the operation efficiency of the application.
By obtaining the running parameters of the application page in the target application, determining the application's project entry file, and generating the preset entry configuration file under the underlying multi-end framework based on the running parameters and project entry files, executing the configuration file to generate the adaptive target application page.
It realizes the sharing of application codes on different ends, and can generate different application pages, greatly improving the development efficiency and operation efficiency of the application, and solving the problem that preset underlying multi-end frameworks do not support dynamic modification of entry files and entry configuration files.
Smart Images

Figure CN119493608A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to an application running method, device, computer equipment and storage medium. Background Art
[0002] There are many types of applications on the market, such as H5, mini programs, APP, etc. In particular, various mini programs emerge in an endless stream, such as WeChat mini programs, Baidu mini programs, Douyin mini programs, Alipay mini programs, QQ mini programs, and other forms of different terminals. When the business requires the simultaneous support of multiple application types (multiple terminals), in the existing technology, multiple sets of codes need to be written for different application types. At the same time, for businesses that display different content in different applications, multiple sets of codes still need to be written to achieve this. The development process is cumbersome and requires a lot of working time from developers, which affects the operating efficiency of the application. Summary of the invention
[0003] The embodiments of the present application provide an application running method, apparatus, computer device and storage medium to solve the technical problem in the prior art that the development process is cumbersome and costly due to developing multiple sets of codes.
[0004] In one aspect, the present application provides a method for running an application program, the method comprising:
[0005] Obtaining running parameters of an application page in an application to be generated on the target end, wherein the application is developed based on a preset underlying multi-end framework;
[0006] Determine the project entry file of the application according to the information of the target end;
[0007] Based on the operating parameters and the project entry file, generating an entry configuration file under the preset underlying multi-terminal framework;
[0008] The application is executed based on the entry configuration file to generate an application page of the application on the target end.
[0009] In some embodiments of the present application, the target end information includes the end identifier of the target end, and before determining the target entry file of the application according to the target end information, it also includes:
[0010] Constructing an entry file library, wherein the entry file library includes terminal identifiers of multiple terminals and entry files corresponding to the multiple terminals;
[0011] Determining the project entry file of the application according to the information of the target end includes:
[0012] According to the terminal identifier of the target terminal, the project entry file of the application is determined in the entry file library.
[0013] In some embodiments of the present application, the operating parameters include page parameters;
[0014] The step of generating an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file includes:
[0015] The page parameters are passed into the project entry file to generate an entry file script;
[0016] Execute the entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0017] In some embodiments of the present application, the operating parameters also include environmental variables;
[0018] The step of generating an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file includes:
[0019] Injecting the environment variable into the project entry file to generate a first entry file;
[0020] Passing the page parameters into the first entry file to generate a first entry file script;
[0021] Execute the first entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0022] In some embodiments of the present application, executing the application based on the entry configuration file to generate an application page of the application on the target end includes:
[0023] Based on the entry configuration file, the application is updated to obtain an updated application;
[0024] The updated application is executed to generate the application page of the application on the target end.
[0025] In some embodiments of the present application, after executing the application based on the entry configuration file and generating an application page of the application on the target end, the method further includes:
[0026] Acquire a plurality of the application pages, wherein the plurality of application pages include a test page;
[0027] When receiving a test request for a test page, extracting the test page from the plurality of application pages;
[0028] A development test is performed based on the test page to generate a page test result.
[0029] In some implementation schemes of the present application, the preset underlying multi-terminal framework is Taro or uni-app, and the target end is one of Alibaba Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program.
[0030] On the other hand, the present application provides an application running device, the application running device comprising:
[0031] An acquisition module, used to acquire the operating parameters of an application page in an application to be generated on the target end, wherein the application is developed based on a preset underlying multi-end framework;
[0032] A determination module, used to determine the project entry file of the application according to the information of the target end;
[0033] A first generating module, configured to generate an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file;
[0034] The second generating module is used to execute the application program based on the entry configuration file and generate an application page of the application program at the target end.
[0035] In some implementation schemes of the present application, the application running device further includes: a construction module for constructing an entry file library, wherein the entry file library includes terminal identifiers of multiple terminals and their corresponding entry files; and a determination module specifically for:
[0036] According to the terminal identifier of the target terminal, the project entry file of the application is determined in the entry file library.
[0037] In some embodiments of the present application, the operating parameters include page parameters; the first generating module is specifically used for:
[0038] The page parameters are passed into the project entry file to generate an entry file script;
[0039] Execute the entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0040] In some embodiments of the present application, the operating parameters also include environmental variables; the first generation module is further used to:
[0041] Injecting the environment variable into the project entry file to generate a first entry file;
[0042] Passing the page parameters into the first entry file to generate a first entry file script;
[0043] Execute the first entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0044] In some embodiments of the present application, the second generation module is specifically used for:
[0045] Based on the entry configuration file, the application is updated to obtain an updated application;
[0046] The updated application is executed to generate the application page of the application on the target end.
[0047] In some embodiments of the present application, the application running device further includes:
[0048] A first acquisition module, used to acquire a plurality of the application pages, wherein the plurality of application pages include a test page;
[0049] an extraction module, configured to extract the test page from the plurality of application pages when receiving a test request for the test page;
[0050] The test module is used to perform development testing based on the test page and generate page test results.
[0051] On the other hand, the present application also provides a computer device, the computer device comprising:
[0052] one or more processors;
[0053] Memory; and
[0054] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the steps in the application running method described in any one of the first aspects.
[0055] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the application running method described in any one of the first aspects.
[0056] The present application obtains the running parameters of the application page in the application of the target end to be generated, wherein the application is developed based on a preset underlying multi-end framework; determines the project entry file of the application according to the information of the target end; generates the entry configuration file under the preset underlying multi-end framework based on the running parameters and the project entry file; executes the application based on the entry configuration file to generate the application page of the application on the target end, and executes the application corresponding to the entry configuration file under the preset underlying multi-end framework. Since the entry configuration file is a dynamic modification of the project entry file of the target end according to the running parameters, the generated application page is adapted to the running parameters and the target end, which solves the problem that the preset underlying multi-end framework does not support dynamic modification of entry files and entry configuration files. In addition, the characteristic that the execution of the entry configuration file of the preset underlying multi-end framework precedes the execution of the application is utilized, so that the entry configuration file is executed first, ensuring that the dynamic modification of the project entry file and the generation of the entry configuration file are completed before the application is executed, so as to realize the code sharing of applications on different ends, and for applications on different ends, different application pages can be generated, which greatly improves the development efficiency and operation efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 It is a schematic diagram of an application scenario of the application program running device provided in an embodiment of the present application;
[0059] Figure 2 It is a flowchart of an embodiment of the method for running an application program provided in an embodiment of the present application;
[0060] Figure 3 It is a code screenshot of the application provided in the embodiment of the present application;
[0061] Figure 4 It is a schematic diagram of the structure of an embodiment of an application program running device provided in an embodiment of the present application;
[0062] Figure 5 It is a schematic diagram of the structure of an embodiment of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of this application.
[0064] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0065] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0066] It should be noted that since the method of the embodiment of the present application is executed in a computer device, the processing objects of each computer device exist in the form of data or information. For example, the time described in this article is actually time information, which is used to characterize the information of time. It can be understood that if the size, quantity, position, etc. are mentioned in the subsequent embodiments, they all exist in the corresponding data form to facilitate the computer device to process, and the details will not be repeated here.
[0067] The embodiments of the present application provide an application running method, apparatus, computer device, and storage medium, which are described in detail below.
[0068] See also Figure 1 , Figure 1 Schematic diagram of a scenario of an application program running device provided in an embodiment of the present application. The application program running device may include a computer device 100. The computer device 100 is integrated with the application program running device, such as Figure 1 Computer equipment in.
[0069] In the embodiment of the present application, the computer device 100 is mainly used to obtain the operating parameters of the application page in the application to be generated on the target side, wherein the application is developed based on a preset underlying multi-terminal framework; according to the information of the target side, the project entry file of the application is determined; based on the operating parameters and the project entry file, an entry configuration file under the preset underlying multi-terminal framework is generated; based on the entry configuration file, the application is executed to generate the application page of the application on the target side, and the application corresponding to the entry configuration file under the preset underlying multi-terminal framework is executed. Since the entry configuration file is a dynamic modification of the project entry file of the target side according to the operating parameters, the generated application page is adapted to the operating parameters and the target side, which solves the problem that the preset underlying multi-terminal framework does not support dynamic modification of entry files and entry configuration files, and utilizes the characteristic that the execution of the entry configuration file of the preset underlying multi-terminal framework precedes the execution of the application, so that the entry configuration file is executed first, ensuring that the dynamic modification of the project entry file and the generation of the entry configuration file are completed before the application is executed, thereby realizing code sharing of applications on different sides, and for applications on different sides, different application pages can be generated, which greatly improves the development efficiency and operation efficiency of the application.
[0070] In the embodiment of the present application, the computer device 100 may be an independent server, or a server network or server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0071] It is understandable that the computer device 100 used in the embodiments of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific computer device 100 may be a desktop terminal or a mobile terminal, and the computer device 100 may also be one of a mobile phone, a tablet computer, a laptop computer, etc.
[0072] Those skilled in the art will understand that Figure 1 The application scenario shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application scenarios may also include Figure 1 More or less computer equipment as shown in Figure 1Only one computer device is shown. It can be understood that the application running device can also include one or more other services, which are not specifically limited here.
[0073] In addition, if Figure 1 As shown, the application running device may further include a storage module 200 for storing data, which may include the application type of the application, the business data of the application, etc.
[0074] It should be noted that Figure 1 The scenario diagram of the application running device shown is merely an example. The application running device and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the application running device and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0075] First, an application running method is provided in an embodiment of the present application. The execution subject of the application running method is an application running device, which is applied to a computer device. The application running method includes: obtaining running parameters of an application page in an application of a target end to be generated, wherein the application is developed based on a preset underlying multi-end framework; determining a project entry file of the application according to information of the target end; generating an entry configuration file under the preset underlying multi-end framework based on the running parameters and the project entry file; executing the application based on the entry configuration file to generate an application page of the application at the target end, and executing the application corresponding to the entry configuration file under the preset underlying multi-end framework. Since the entry configuration file is a dynamic modification of the project entry file of the target end according to the running parameters, the generated application page is adapted to the running parameters and the target end, which solves the problem that the preset underlying multi-end framework does not support dynamic modification of entry files and entry configuration files, and utilizes the characteristic that the execution of the entry configuration file of the preset underlying multi-end framework precedes the execution of the application, so that the entry configuration file is executed first, ensuring that the dynamic modification of the project entry file and the generation of the entry configuration file are completed before the application is executed, realizing code sharing of applications at different ends, and for applications at different ends, different application pages can be generated, greatly improving the development efficiency and operation efficiency of the application.
[0076] like Figure 2 FIG. 1 is a flow chart of an embodiment of a method for running an application program in an embodiment of the present application. The method for running the application program may include the following steps 301 to 304, which are as follows:
[0077] 301. Obtain running parameters of an application page in an application program to be generated on a target terminal, wherein the application program is developed based on a preset underlying multi-terminal framework.
[0078] Among them, the target end refers to the application type to which the application to be generated belongs, and can be any end of the generated application. For example, the target end can be one of Alibaba Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program.
[0079] The preset underlying multi-terminal framework refers to a preset underlying multi-terminal framework, such as Taro or uni-app, which can support the development of cross-terminal applications. An application refers to a set of codes that need to be run on the target end, and the application is developed based on the preset underlying multi-terminal framework. Since the preset underlying multi-terminal framework (Taro or uni-app) is an open cross-terminal and cross-framework solution, it supports the use of frameworks such as React / Vue / Nerv to develop multi-terminal applications. Therefore, applications developed in the underlying multi-terminal framework can adapt to multiple application types (multi-terminals) by writing only one set of code, so that the application has the ability to adapt to multiple application types with one set of code, and realizes that one set of application code can be cross-terminal, without generating services for applications on different ends and then writing multiple sets of code for each end.
[0080] It should be noted that although the preset underlying multi-terminal framework solves the problem that a set of code can be adapted to multiple terminals, it requires that the applications on each terminal contain consistent content, that is, they need to share the same entry configuration file, and cannot solve the demand for different applications to display different page content.
[0081] The running parameters are used as the requirement parameters of the page content generated after the application is run, and can be parameters related to the page information.
[0082] Specifically, the operating parameters can be obtained from the demand database of the server, wherein the demand database is formed by the server storing the demand data received in the past period of time in the database. Alternatively, the client sends the demand data to the server, and the demand data received by the server is used as the operating parameters.
[0083] In a specific implementation, the preset underlying multi-terminal framework is Taro or uni-app, and the target end is one of Alibaba Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program.
[0084] Specifically, the preset underlying multi-terminal framework can be Taro or uni-app, and the target end is one of Ali Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program. Taro and uni-app are both open cross-end and cross-framework solutions that support the use of frameworks such as React / Vue / Nerv to develop multi-terminal applications, and support Ali Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program. It can be understood that in this embodiment, by developing applications through Taro or uni-app, a set of codes are used to generate different types of applications, thereby improving the development efficiency of applications.
[0085] 302. Determine the project entry file of the application according to the information of the target end.
[0086] Different terminals correspond to different entry files. The entry file is used as the entry file for the application execution (app.js), and defines the pages and some global configurations contained in the application. The project entry file refers to the entry file of the application generated on the target terminal, that is, the app.js file. The app.js file completes different tasks by connecting various modules and dependencies, and starts and runs the application.
[0087] Specifically, the project entry file can be configured according to the target end, or the application type can be determined according to the target end, and the application type can be used as a parameter of the command line to execute the command line to generate the project entry file.
[0088] In a specific implementation, the target end information includes the end identifier of the target end; before determining the project entry file of the application according to the target end information in step 302, the following step 305 may also be included, as follows:
[0089] 305. Construct an entry file library, which includes terminal identifiers of multiple terminals and entry files corresponding to the multiple terminals; determining the project entry file of the application based on the information of the target terminal includes: determining the project entry file of the application in the entry file library based on the terminal identifier of the target terminal.
[0090] Among them, each end corresponds to an entry file, and the entry file corresponding to the target end is the project entry file. For example, ends A, B, and C correspond to entry files 1, 2, and 3 respectively. If the target end is end A, the project entry file is entry file 1.
[0091] Specifically, the entry file library can be obtained by pre-configuring the entry file corresponding to each end, and then constructing the end identification of each end and the file library of the entry files corresponding to multiple ends. It is also possible to obtain the command line parameters corresponding to each end, pass the command line parameters into the command line, thereby generating the entry file corresponding to each end, constructing the end identification of each end and the file library of the entry files corresponding to multiple ends, and obtaining the entry file library. According to the target end, the end identification of the target end is obtained, and according to the end identification of the target end, the entry file consistent with the end identification of the target end is obtained from the entry file library as the project entry file. In this embodiment, according to the target end, the project entry file is obtained from the constructed entry file library, thereby realizing the acquisition of the project entry file of the application, and because it can be determined directly according to the target end, the efficiency of acquiring the project entry file of the application is improved.
[0092] In one example, an entry file is added for each application type (each end), the corresponding end identifier and the corresponding entry file are constructed, and a file library is generated. The app.config.tpl.ts file can also be used by default, such as the Douyin applet is generated using app.config.tpl.tt.ts.
[0093] It is worth mentioning that the entry file generation of each end supports both file configuration and command line parameter input, which improves the efficiency of project entry file generation and takes into account the convenience and versatility of application development.
[0094] 303. Based on the operating parameters and the project entry file, generate an entry configuration file under the preset underlying multi-terminal framework.
[0095] The entry configuration file refers to the file (app.config.js) in the config directory, which is used to determine the content generated by the application execution under the preset underlying multi-terminal framework. That is, the entry configuration file is the app.config.js file in the config directory. The app.config.js file includes the global configuration of the application, such as the pages included in the application, the color of the window, the title, etc. Figure 3 As shown in the figure, it is a code screenshot of the application. The third entry file "app.config.js" in the figure is the entry configuration file, which determines which page content the application contains and cannot be modified dynamically. When the business needs to display different content in different application types (different ends), it cannot be realized because the entry configuration file cannot be modified dynamically. Therefore, in this embodiment, the entry configuration file of the target end, that is, the app.config.js file, is generated by running parameters and project entry files, thereby realizing the dynamic generation of the app.config.js file.
[0096] Specifically, the project entry file can be modified according to the operating parameters to generate an entry configuration file under the preset underlying multi-terminal framework. In this embodiment, the project entry file is modified according to the operating parameters to generate an entry configuration file under the preset underlying multi-terminal framework, so that the entry configuration file under the preset underlying multi-terminal framework, that is, a set of codes, can be used to generate multi-terminal applications with different contents.
[0097] It can be understood that the preset underlying multi-terminal framework supports the use of frameworks such as React / Vue / Nerv to develop multi-terminal applications, but requires that the applications on each end contain consistent content, that is, they need to share the same entry configuration file, and it is impossible to achieve multi-terminal applications showing different content. In this embodiment, by generating an entry configuration file under the preset underlying multi-terminal framework based on operating parameters and project entry files, dynamic modification of the project entry file of the target terminal application is achieved, thereby dynamically generating an entry configuration file to facilitate the subsequent generation of different content for multi-terminal applications.
[0098] In a specific implementation, the operating parameters include page parameters; in step 303, generating the entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file may include the following steps 303A to 303B, which are as follows:
[0099] 303A, passing the page parameters into the project entry file to generate an entry file script;
[0100] 303B. Execute the entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0101] The page parameters are parameters used to characterize the page information of the application, such as the page ID, the color of the page window, the title, etc. For example, the page parameters are npm run dev:tt---pactivity / webank-introduce / index. The entry file script refers to the script into which the page parameters are passed.
[0102] Specifically, by executing the entry file script, an entry configuration file under the preset underlying multi-terminal framework is generated, the dynamic modification of the page parameters of the project entry file is realized, and the entry configuration file is generated.
[0103] In a specific implementation, the operating parameters also include environment variables; the step 303 of generating the entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file may include the following steps 303C to 303E, which are as follows:
[0104] 303C, injecting the environment variable into the project entry file to generate a first entry file;
[0105] 303D, passing the page parameters into the first entry file to generate a first entry file script;
[0106] 303E. Execute the first entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0107] The environment variable is used to characterize the application running environment, which may be a test environment or a production environment. For example, the environment variable is npm run dev:tt----app_env sit, where sit represents the test environment.
[0108] Specifically, environment variables are injected into the project entry file to generate a first entry file. Then, page parameters are passed into the first entry file to generate a first entry file script. The first entry file script is executed to generate an entry configuration file under a preset underlying multi-terminal framework. This realizes dynamic modification of the environment variables and page parameters of the project entry file and generates an entry configuration file.
[0109] 304. Execute the application based on the entry configuration file to generate an application page of the application on the target end.
[0110] Specifically, the application is executed according to the entry configuration file, that is, the application corresponding to the entry configuration file under the preset underlying multi-terminal framework is executed. Since the entry configuration file dynamically modifies the project entry file of the target end according to the operating parameters, the generated application page adapts to the operating parameters and the target end, which solves the problem that the preset underlying multi-terminal framework does not support dynamic modification of entry files and entry configuration files. In addition, the characteristic that the execution of the entry configuration file of the preset underlying multi-terminal framework precedes the execution of the application is utilized, so that the entry configuration file is executed first, ensuring that the dynamic modification of the project entry file and the generation of the entry configuration file are completed before the application is executed, thereby realizing code sharing of applications on different ends, and different application pages can be generated for applications on different ends, which greatly improves the development efficiency and operation efficiency of the application.
[0111] In the above embodiment, the project entry file of the application is determined according to the target end; based on the operating parameters and the project entry file, an entry configuration file under the preset underlying multi-terminal framework is generated; based on the entry configuration file, the application is executed, and the application corresponding to the entry configuration file under the preset underlying multi-terminal framework is executed. Since the entry configuration file is a dynamic modification of the project entry file of the target end according to the operating parameters, the generated application page adapts to the operating parameters and the target end, which solves the problem that the preset underlying multi-terminal framework does not support dynamic modification of entry files and entry configuration files. In addition, the characteristic that the execution of the entry configuration file of the preset underlying multi-terminal framework precedes the execution of the application is utilized, so that the entry configuration file is executed first, ensuring that the dynamic modification of the project entry file and the generation of the entry configuration file are completed before the application is executed, thereby realizing code sharing of applications on different ends, and for applications on different ends, different application pages can be generated, which greatly improves the development efficiency and operation efficiency of the application.
[0112] In a specific implementation, executing the application based on the entry configuration file in step 304 to generate an application page of the application at the target end may include the following steps 304A-304B, which are as follows:
[0113] 304A. Based on the entry configuration file, update the application to obtain an updated application.
[0114] 304B: Execute the updated application program to generate the application page of the application program on the target end.
[0115] The updating of the application program refers to a processing method in which the configuration of the executed application program is updated by executing a dynamically modified project entry file (entry configuration file).
[0116] Specifically, it can be seen from steps 303A to 303B and / or steps 303C to 303E that the entry configuration file is generated by dynamically modifying the operating parameters in the project entry file, thereby realizing dynamic modification of the project entry file and generating the entry configuration file. The execution order of the entry configuration file precedes the application. Therefore, by directly executing the entry configuration file, the application can be updated to obtain the updated application. The updated application is executed to generate the application page of the application on the target end.
[0117] In a specific implementation, after executing the application based on the entry configuration file in step 304 to generate the application page of the application on the target end, the following steps 306 to 308 may also be included, as follows:
[0118] 306. Acquire a plurality of the application pages, wherein the plurality of application pages include a test page;
[0119] 307. When a test request for a test page is received, extract the test page from the multiple application pages;
[0120] 308. Perform development testing based on the test page to generate page test results.
[0121] Specifically, multiple application pages are obtained, and the multiple application pages include a test page. When a test request for a test page is received, the test page is extracted from the multiple application pages, and the test page is developed and tested to generate page test results, thereby improving the development and testing efficiency of the application page.
[0122] In order to better implement the application program running method in the embodiment of the present application, based on the application program running method, the embodiment of the present application also provides an application program running device, such as Figure 4 As shown, the application program running device 400 includes:
[0123] The acquisition module 401 is used to acquire the operation parameters of the application page in the target terminal application to be generated, wherein the application is developed based on a preset underlying multi-terminal framework;
[0124] A determination module 402, configured to determine a project entry file of the application according to information of the target end;
[0125] A first generating module 403 is used to generate an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file;
[0126] The second generating module 404 is used to execute the application program based on the entry configuration file and generate an application page of the application program at the target end.
[0127] In the embodiment of the present application, the application running device 400 further includes: a construction module, which is used to construct an entry file library, wherein the entry file library includes terminal identifiers of multiple terminals and entry files corresponding to the multiple terminals;
[0128] The determination module 402 is specifically used for:
[0129] According to the terminal identifier of the target terminal, the project entry file of the application is determined in the entry file library.
[0130] In the embodiment of the present application, the operating parameters include page parameters; the first generating module 403 is specifically used for:
[0131] The page parameters are passed into the project entry file to generate an entry file script;
[0132] Execute the entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0133] In the embodiment of the present application, the operating parameters also include environment variables; the first generating module 403 is further used to:
[0134] Injecting the environment variable into the project entry file to generate a first entry file;
[0135] Passing the page parameters into the first entry file to generate a first entry file script;
[0136] Execute the first entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
[0137] In the embodiment of the present application, the second generation module 404 is specifically used for:
[0138] Based on the entry configuration file, the application is updated to obtain an updated application;
[0139] The updated application is executed to generate the application page of the application on the target end.
[0140] In the embodiment of the present application, the application program running device 400 further includes:
[0141] A first acquisition module, used to acquire a plurality of the application pages, wherein the plurality of application pages include a test page;
[0142] an extraction module, configured to extract the test page from the plurality of application pages when receiving a test request for the test page;
[0143] The test module is used to perform development testing based on the test page and generate page test results.
[0144] The embodiment of the present application further provides a computer device, which integrates any application program running device provided in the embodiment of the present application, and the computer device includes:
[0145] one or more processors;
[0146] Memory; and
[0147] One or more applications, wherein the one or more applications are stored in the memory and are configured so that the processor executes the steps of the application running method described in any of the above-mentioned application running method embodiments.
[0148] The present application also provides a computer device that integrates any application program running device provided in the present application. Figure 5 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0149] The computer device may include one or more processing core processors 701, one or more computer readable storage media memories 702, a power supply 703, an input unit 704 and other components. Those skilled in the art will appreciate that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0150] The processor 701 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 702 and calling data stored in the memory 702, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.
[0151] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0152] The computer device also includes a power supply 703 for supplying power to various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 703 can also include any combination of one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, etc.
[0153] The computer device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0154] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 701 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 will run the application programs stored in the memory 702, thereby realizing various functions, as follows:
[0155] Obtaining running parameters of an application page in an application to be generated on the target end, wherein the application is developed based on a preset underlying multi-end framework;
[0156] Determine the project entry file of the application according to the information of the target end;
[0157] Based on the operating parameters and the project entry file, generating an entry configuration file under the preset underlying multi-terminal framework;
[0158] The application is executed based on the entry configuration file to generate an application page of the application on the target end.
[0159] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0160] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any application program running method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:
[0161] Obtain an industry report text library of a target industry and obtain industry themes of the target industry;
[0162] According to the industry theme, the preset chatGPT model is called to perform block-by-block cyclic aggregation processing on the industry report text library to output an industry research report on the industry theme.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0164] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0165] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0166] The above is a detailed introduction to an application running method, device and storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for running an application, characterized in that: The application program running method comprises: Obtaining running parameters of an application page in an application to be generated on the target end, wherein the application is developed based on a preset underlying multi-end framework; Determine the project entry file of the application according to the information of the target end; Based on the operating parameters and the project entry file, generating an entry configuration file under the preset underlying multi-terminal framework; The application is executed based on the entry configuration file to generate an application page of the application on the target end.
2. The application program running method according to claim 1, characterized in that: The target end information includes the end identifier of the target end. Before determining the target entry file of the application according to the target end information, the method further includes: Constructing an entry file library, wherein the entry file library includes terminal identifiers of multiple terminals and entry files corresponding to the multiple terminals; Determining the project entry file of the application according to the information of the target end includes: According to the terminal identifier of the target terminal, the project entry file of the application is determined in the entry file library.
3. The application program running method according to claim 1, characterized in that: The operation parameters include page parameters; The step of generating an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file includes: The page parameters are passed into the project entry file to generate an entry file script; Execute the entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
4. The application program running method according to claim 3, characterized in that: The operating parameters also include environmental variables; The step of generating an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file includes: Injecting the environment variable into the project entry file to generate a first entry file; Passing the page parameters into the first entry file to generate a first entry file script; Execute the first entry file script to generate an entry configuration file under the preset underlying multi-terminal framework.
5. The application program running method according to claim 1, characterized in that: The executing the application based on the entry configuration file to generate an application page of the application at the target end includes: Based on the entry configuration file, the application is updated to obtain an updated application; The updated application is executed to generate the application page of the application on the target end.
6. The application program running method according to any one of claims 1 to 5, characterized in that: After executing the application based on the entry configuration file and generating an application page of the application on the target end, the method further includes: Acquire a plurality of the application pages, wherein the plurality of application pages include a test page; When receiving a test request for a test page, extracting the test page from the plurality of application pages; A development test is performed based on the test page to generate a page test result.
7. The application program running method according to any one of claims 1 to 5, characterized in that: The preset underlying multi-terminal framework is Taro or uni-app, and the target end is one of Alibaba Mini Program, Tencent Mini Program, Byte Mini Program or Baidu Mini Program.
8. An application program running device, characterized in that: The application program running device comprises: An acquisition module, used to acquire the operating parameters of an application page in an application to be generated on the target end, wherein the application is developed based on a preset underlying multi-end framework; A determination module, used to determine the project entry file of the application according to the information of the target end; A first generating module, configured to generate an entry configuration file under the preset underlying multi-terminal framework based on the operating parameters and the project entry file; The second generating module is used to execute the application program based on the entry configuration file and generate an application page of the application program at the target end.
9. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the application running method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the application running method described in any one of claims 1 to 7.