Project packaging file processing method and device, equipment and storage medium

By obtaining the packaging files of different versions of the development framework in the applet, copying and configuring the paths of subpackages, the problem of incompatibility of different versions of the development framework projects is solved, cross-version compatibility of the applet is achieved, reducing development costs and increasing the efficiency.

CN119474025APending Publication Date: 2025-02-18CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411153933.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The projects implemented by different versions of the development framework are incompatible, which leads to the inability to realize the overall functions of the applet, and the cost of refactoring the old version of the development framework is high.

Method used

By obtaining the package files of the same applet under the first version development framework and the second version development framework, there is only one main package. Copy the subpackage of the second version development framework into the old package file and configure the path of the subpackage , to achieve compatibility of project files.

Benefits of technology

It realizes the compatibility of the mini program projects under different version development frameworks, reduces development costs and improves efficiency, and does not need to refactor projects under the old version development framework. It also reduces file merging and improves The rate of file merging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474025A_ABST
    Figure CN119474025A_ABST
Patent Text Reader

Abstract

The invention provides a project packaging file processing method and device, equipment and a storage medium. Relates to the technical field of computers. The method comprises the steps that a first packaging file of a first project is obtained, the first project is a project achieved by a first version development framework, the first packaging file comprises a main package, the main package is used for achieving a main page of an applet, and the first packaging file comprises a configuration file; a second packaging file of a second project is obtained, the second project is a project realized by a second version development framework, and the second packaging file comprises a sub-package; and configuring a path of the sub-package in the configuration file of the first packaging file to obtain an updated first packaging file, so as to obtain a project file of the applet based on the updated first packaging file and the second packaging file, and searching the sub-package by the project file based on the path to realize the jump of the functional page. According to the method, the problem that the compatibility cost of small program projects under different versions of development frameworks is high is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for processing project packaging files. Background Art

[0002] In front-end development, new functions may need to be implemented during the use of mini programs, so projects corresponding to the new functions need to be developed on old projects. Old projects are generally implemented by old versions of the development framework. As the development framework is updated, the new version of the development framework supports more development functions and is more efficient. New business projects will be implemented by the new version of the development framework, which leads to incompatibility between projects implemented by different versions of the development framework, and the overall functions of the mini program cannot be realized.

[0003] In some development methods, the functions implemented by the old version of the development framework can be reconstructed through the new version of the development framework. This method is costly and requires a lot of manpower and time costs. Summary of the invention

[0004] The present application provides a method, device, equipment and storage medium for processing project packaging files, which are used to solve the problem of high compatibility cost of projects with different versions of development frameworks.

[0005] In a first aspect, the present application provides a method for processing a project packaging file, comprising: obtaining a first packaging file of a first project, the first project being a project implemented by a first version development framework, the first packaging file including a main package, the main package being used to implement a main page of a mini-program, the first packaging file including a configuration file, the configuration file being used to configure an implementation method of a function corresponding to the first project; obtaining a second packaging file of a second project, the first project and the second project being function projects corresponding to the mini-program, the second project being a project implemented by a second version development framework, the second packaging file not including a main package, the second packaging file including a sub-package, the sub-package being used to implement a function page of the second project, a function image required to implement the function page of the second project being stored on a server, the sub-package including an address of the function image stored on the server, and the version of the first version development framework being lower than that of the second version development framework; configuring a path of the sub-package in the configuration file of the first packaging file, obtaining an updated first packaging file, obtaining a project file of the mini-program based on the updated first packaging file and the second packaging file, the project file searching for the sub-package based on the path to implement a jump to the function page.

[0006] In a possible design, the acquiring the project file of the mini-program based on the updated first package file and the second package file includes:

[0007] The sub-package is added to the updated first package file to obtain the project file, wherein the name of the sub-package is different from the name of the main package.

[0008] In one possible design, the first packaged file includes a first public file, the first public file includes public parameters for implementing functions corresponding to the first project, and the second packaged file includes a second public file, the second public file includes public parameters for implementing functions corresponding to the second project; obtaining the project file of the mini program based on the updated first packaged file and the second packaged file includes: adding the sub-package to the updated first packaged file to obtain a processed first packaged file; adding the content of the second public file to the first public file in the processed first packaged file to obtain the project file.

[0009] In a possible design, before adding the content in the second public file to the first public file in the processed first packaged file, the method also includes: detecting whether the content in the second public file is empty; if the content in the second public file is not empty, executing the step of adding the content in the second public file to the first public file in the processed first packaged file to obtain the project file; if the content in the second public file is empty, using the processed first packaged file as the project file.

[0010] In a possible design, before obtaining the second package file of the second project, the method also includes: creating a new update applet under the second version development framework, the name of the update applet is the same as the name of the applet; developing a sub-package corresponding to the function page in the update applet to obtain the developed update applet; and packaging the update applet to obtain the second package file.

[0011] In a possible design, after obtaining the project file of the mini program based on the updated first packaging file and the second packaging file, the method further includes: packaging and deploying the project file to complete the launch of the mini program.

[0012] In one possible design, after configuring the path of the sub-package in the configuration file of the first packaging file to obtain the updated first packaging file, and obtaining the project file of the mini-program based on the updated first packaging file and the second packaging file, the method further includes: obtaining an updated packaging file of the updated project, the updated packaging file is a project implemented by an updated version development framework, the updated version development framework is the second version development framework or the version of the updated version development framework is higher than the version of the second version development framework, and the updated packaging file includes an updated sub-package; configuring the update path of the updated sub-package in the configuration file of the project file to obtain the updated project file, and obtaining the updated project file based on the updated project file and the updated packaging file, the updated project file is a project file for implementing the functions of the first project, the second project and the updated project, and the updated project file searches for the updated sub-package based on the update path to achieve the jump of the update page corresponding to the updated sub-package.

[0013] In a second aspect, the present application provides a device for processing project packaging files, including: a first packaging file acquisition module, used to acquire a first packaging file of a first project, the first project is a project implemented by a first version development framework, the first packaging file includes a main package, the main package is used to implement the main page of the mini-program, the first packaging file includes a configuration file, the configuration file is used to configure the implementation method of the corresponding function of the first project; a second packaging file acquisition module, used to acquire a second packaging file of a second project, the first project and the second project are functional projects corresponding to the mini-program, the second project is a project implemented by a second version development framework, the second packaging file does not include a main package, the second packaging file includes a sub-package, the sub-package is used to implement the functional page of the second project, the functional image required to implement the functional page of the second project is stored on the server, the sub-package includes the address of the functional image stored on the server, and the version of the first version development framework is lower than that of the second version development framework; a file merging module, used to configure the path of the sub-package in the configuration file of the first packaging file, obtain the updated first packaging file, so as to obtain the project file of the mini-program based on the updated first packaging file and the second packaging file, and the project file searches for the sub-package based on the path to implement the jump of the functional page.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the project packaging file processing method described in the first aspect and various possible designs of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a method for processing project packaging files as described in the first aspect and various possible designs of the first aspect is implemented.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method for processing project packaging files as described in the first aspect and various possible designs of the first aspect.

[0017] The project packaging file processing method, device, equipment and storage medium provided in the present application obtain the packaging files of the same mini program under the first version development framework and the second version development framework, thereby ensuring that there is only one main package in the packaging file. In this way, the sub-package in the packaging file of the second version development framework can be copied to the old packaging file, and the path of the sub-package can be configured, so that the project file can be obtained through the two packaging files. The project file can realize the project file corresponding to the function page of the main package and the function page of the sub-package. Subsequently, the project file can realize the compatibility between the projects obtained under different versions of the development framework for the same mini program. The process has short development time and high efficiency, and there is no need to reconstruct the project under the old version development framework. At the same time, by storing the function picture on the server and writing the address of the function picture stored on the server in the sub-package, there is no need to merge the file storing the function picture into the project file, and the function picture can be accessed through the address of the function picture stored on the server, which can reduce file merging and increase the rate of file merging. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] Figure 1 An application scenario diagram provided for an embodiment of the present application;

[0020] Figure 2 Process of the project packaging file processing method provided in the embodiment of the present application Figure 1 ;

[0021] Figure 3 Process of the project packaging file processing method provided in the embodiment of the present application Figure 2 ;

[0022] Figure 4 A schematic diagram of the structure of a device for processing project packaging files provided in an embodiment of the present application;

[0023] Figure 5A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0024] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0026] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0027] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0028] Terminology explanation:

[0029] Uniapp: A development framework.

[0030] vue2: A development framework that can use vue2 syntax on the uniapp platform.

[0031] Vue3: A development framework, which belongs to a different version of the development framework from Vue2. Vue3 syntax can be used on the Uniapp platform. Compared with Vue2, Vue3 optimizes related algorithms and improves runtime efficiency; it compiles on demand, and the size of the same project in Vue3 is smaller than that in Vue2; it supports combined APIs (interfaces), which makes it easier to reuse and modularize components; it better supports TypeScript (an open source programming language) to improve code reliability and maintainability; it exposes custom rendering APIs, provides more advanced components to support two-way binding of data, and uses routing instead of hyperlinks to improve user experience.

[0032] During the version update process of the development framework, the new version is generally more efficient than the old version. Therefore, the new version is generally used for development. However, for some small programs, the original project may be developed with the old version. If some new functional projects need to be expanded for the small program, the new version is used for development. This is equivalent to a small program that has both the functions developed with the old version and the functions developed with the new version. This leads to incompatibility between the projects developed with the new version and the projects developed with the old version. If the projects developed with the old version are reconstructed with the new version, the cost is too high. Therefore, it is necessary to achieve compatibility between the projects developed with the new version and the projects developed with the old version, so that the new project can be developed on the new version, and the small program also supports the projects that have been developed with the old version.

[0033] For example, the Uniapp development framework was developed using the Vue2 syntax in previous versions. Later, due to version updates, Uniapp already supports the Vue3 syntax. If Vue3 is used to reconstruct the entire Vue2 project, the cost will be too high and require huge manpower. In order to enable the use of Vue3 for new business development, the existing projects need to be transformed to achieve compatible development between Vue2 and Vue3 development projects.

[0034] In response to the above problems, the present application proposes a method, device, equipment and storage medium for processing project packaging files, which can be used to make projects in different versions of development frameworks in a small program compatible.

[0035] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0036] The method for processing project package files provided in this application can be implemented on any electronic device with data processing capabilities, or it can be a system for processing project package files. It should be noted that the system for processing project package files can be deployed separately on an electronic device in any environment (for example, separately deployed on an edge server in an edge environment), or it can be deployed entirely in a cloud environment, or it can be deployed in different environments in a distributed manner.

[0037] For example, the processing system of project packaging files can be logically divided into multiple parts, each with different functions. The various parts of the processing system of project packaging files can be deployed in any two or three of the electronic device (located on the user side, such as the client), the edge environment, and the cloud environment. The edge environment is an environment that includes a collection of edge electronic devices that are close to the electronic device. The edge electronic devices include: edge servers, edge stations with computing power, etc. The various parts of the processing system of project packaging files deployed in different environments or devices work together to realize the functions of the data processing platform.

[0038] It should be understood that this application does not restrictively divide which parts of the project packaging file processing system are deployed in what specific environment. In actual application, it can be adaptively deployed according to the computing power of the electronic device, the resource possession of the edge environment and the cloud environment, or the specific application requirements.

[0039] like Figure 1 This is an application scenario diagram provided for an embodiment of the present application. The project packaging file processing system corresponding to the implementation scenario includes a client 10 and a server 11, and the client 10 and the server 11 are connected via network communication.

[0040] The executor of the method of the embodiment of the present application is the server 11, and the client 10 can receive a project compatibility request. The client 10 sends the project compatibility request to the server 11 through the network. The server 11 performs project compatibility and obtains a project compatibility result, and can feed back the project compatibility result to the client 10 through the network. The client 10 has a graphic user interface, and the project compatibility result can be displayed on the graphic user interface.

[0041] Of course, the project compatibility request may also be automatically triggered by the client 10 or the server 11 .

[0042] In some embodiments, after receiving a project compatibility request, the server 11 obtains a first packaging file of the first project, the first project is a project implemented by the first version development framework, the first packaging file includes a main package, the main package is used to implement the main page of the mini program, and the first packaging file includes a configuration file, the configuration file is used to configure the implementation method of the corresponding function of the first project; obtains a second packaging file of the second project, the first project and the second project are functional projects corresponding to the mini program, the second project is a project implemented by the second version development framework, the second packaging file does not include the main package, the second packaging file includes a sub-package, the sub-package is used to implement the functional page of the second project, and the version of the first version development framework is lower than the second version development framework; configures the path of the sub-package in the configuration file of the first packaging file to obtain the updated first packaging file, so as to obtain the project file of the mini program based on the updated first packaging file and the second packaging file, and the project file searches for the sub-package based on the path to realize the jump of the functional page.

[0043] It is understandable that the project packaging file processing device can be set at Figure 1 In the server 11, but the example shown in this embodiment Figure 1 The implementation environment shown is only exemplary. In other embodiments, the method for processing project packaging files can also be applied to other implementation environments, and the processing device for project packaging files can also be set in other structures in other implementation environments. No specific limitations are made here.

[0044] In this embodiment, the client 10 is an electronic device on the user side, which can be a wired terminal with a visualization structure or a wireless terminal. In other embodiments, the terminal can be an electronic device with a visualization structure such as a mobile phone, a computer, a tablet, and a vehicle-mounted device.

[0045] The server 11 can be an edge environment and a cloud environment, such as a physical server, a server cluster, and a cloud server, etc., and no specific limitations are made here.

[0046] It is understandable that the project packaging file processing device can be set at Figure 1 In the server 11, but the example shown in this embodiment Figure 1 The implementation environment shown is only exemplary. In other embodiments, the method for processing project packaging files can also be applied to other implementation environments, and the processing device for project packaging files can also be set in other structures in other implementation environments. No specific limitations are made here.

[0047] based on Figure 1 In the application scenario shown, the embodiment of the present application also provides a method for processing project packaging files. Figure 2 The process of the method for processing the project packaging file provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the processing method of the project packaging file includes:

[0048] S201. Obtain a first package file of a first project, where the first project is a project implemented by a first version development framework. The first package file includes a main package, which is used to implement a main page of the mini-program. The first package file includes a configuration file, which is used to configure an implementation method of a corresponding function of the first project.

[0049] In this embodiment, the mini program can realize one or more functions. The mini program is a program with specific functions developed based on the main program. It can be understood that as the functional requirements of the mini program develop, the functions that the mini program can support in different time periods may be different. For example, in the initial stage, the mini program can support 2 functions, and as the functional requirements increase, a new function is developed on the original mini program. At this time, the mini program should support 3 functions, including the 2 functions developed previously and the 1 newly developed function.

[0050] The first project is a project of one or more functional modules of the mini program. In some implementations, the first project can be packaged to obtain a first package file. For example, if a mini program is developed on vue2 of uniapp, the mini program developed by vue2 can be packaged through uniapp to obtain the first project.

[0051] It can be understood that the first project in this embodiment can be regarded as a project implemented by the first version development framework, that is, a project obtained by developing relevant functions of the mini-program on the first version development framework.

[0052] This first version development framework can be regarded as the development framework used when the mini program is first developed, that is, it can be regarded as the old version development framework proposed above. Since the first project is the project file obtained by the development framework used when the mini program is first developed, the first packaged file obtained by packaging includes a main package, which includes programs related to the mini program display main page, which is used to implement the mini program's main page. Subsequently, other functions can be called through the mini program's main page function, and other function pages can exist in the first packaged file in the form of sub-packages.

[0053] For example, in one embodiment, a small program is developed through uniapp's vue2. At this time, the function corresponding to the small program developed by vue2 is the first project. The first project is packaged to obtain a first package file. The first package file includes a main package. The main package can implement the main page of the small program developed by vue2. Of course, other sub-packages can also be included to implement other functional pages of the small program during use.

[0054] It can be understood that the first packaged file also includes a first public file, and the first public file includes public parameters for implementing the corresponding functions of the first project, such as functions and parameters shared by the main package and sub-packages in the first packaged file.

[0055] In one embodiment, the first packaged file corresponding to the first project implemented by vue2 may include a configuration file, such as a file with the suffix .json, which configures the calling of each page in the first packaged file. For example, in the main page of the main package, selecting a corresponding function button can call the page corresponding to the function button. This process can be implemented through the configuration file.

[0056] S202. Obtain a second package file for the second project. The first project and the second project are functional projects corresponding to the mini-program. The second project is a project implemented by the second version development framework. The second package file does not include a main package. The second package file includes a sub-package, which is used to implement the functional page of the second project.

[0057] In this embodiment, the functions of the mini-program are increased based on the mini-program functions corresponding to the first project, and the version of the development framework is updated at the same time. The second version of the development framework can be used to develop the second project of the mini-program.

[0058] The second version development framework and the first version development framework are different versions of the same development framework, and the version of the second version development framework should be higher than the first version development framework. For example, the second version development framework is vue3, and the first version development framework is vue2. The new function project of the mini program is developed through the second version development framework, that is, the second project.

[0059] After the second project is completed, the second project can be packaged to obtain a package file. It can be understood that the first project and the second project are both functional projects of the mini-program. For the purpose of distinction, the first project is a project obtained by developing some functions of the mini-program through the first version development framework, and the second project is a project obtained by developing other functions of the mini-program through the second version development framework.

[0060] In this embodiment, since the first project is before the second project, and there is a main package in the first project, that is, there is a main page of the mini program, the second package file does not include the main package. The second package file includes a sub-package, and the sub-package is used to implement the function page of the second project. The function corresponding to the second project can be implemented through the function page.

[0061] In some embodiments, the function picture required to implement the function page of the second project is stored on the server side, the required function picture is stored on the server side, and the sub-package includes the address of the function picture stored on the server side.

[0062] Generally speaking, the functional picture is stored in a separate image file, which is located in the second package file. In this embodiment, the functional file is not stored through the image file, but the functional picture is uploaded to the server storage, and the address of the functional picture stored on the server is written in the sub-package, so that the address realizes the access and call of the functional picture.

[0063] In some embodiments, the function image is stored on the server side, which may be a picture server stored on the server side, that is, a picture server is set on the server side, the function image is stored in the picture server, and the address of each function image is obtained, and the address is written into a sub-package. It can be understood that when the address is written into the sub-package, it should correspond to the reference rule of the function image, that is, the sub-package is used to implement the function page. In the execution logic required to implement the function page, if the function image needs to be called, the function image stored on the server side is called based on the address written in the sub-package.

[0064] In this embodiment, the function image is not stored in a local file, but is stored on the server side. By writing the address of the function image in the sub-package, the function image can be called through the sub-package later, thereby realizing the function page required for the second project.

[0065] This method of storing the functional image on the server side can avoid the need to merge the image file storing the functional image in the second package file into the first package file when the sub-package is subsequently merged into the first package file, resulting in a large amount of files merged into the first package file, increasing the resources and time for file merging, and when there are too many functional images, or other functions need to be developed in the second version development framework in the future, other images are added to realize the functions, resulting in the image file becoming larger and larger, further increasing the time for merging the image file into the first package file.

[0066] The function images are stored on the server side, and the function images are called by writing their addresses in the sub-package. This can reduce the number of merged files, obtain the function images directly from the server side, improve the rendering speed, increase the processing efficiency of the project packaging files, and improve the efficiency of project compatibility.

[0067] S203. Configure the path of the sub-package in the configuration file of the first package file to obtain an updated first package file, and obtain the project file of the mini-program based on the updated first package file and the second package file. The project file searches for the sub-package based on the path to realize the jump of the function page.

[0068] In this embodiment, the path of the sub-package is configured in the configuration file of the first package file. When the applet is applied, the path can be used to locate the jump to the corresponding function page of the sub-package in the second package file through the first package file, thereby realizing access between the function pages of the first project and the second project. Specifically, the path can enable subsequent project files to find the corresponding sub-package file, and merge the corresponding functions of the first project and the second project together through the path.

[0069] After obtaining the updated first package file, the project file of the mini program can be obtained through the updated first package file and the second package file. The project file is the first project implemented by the compatible first version development framework and the second project implemented by the second version development framework. The functions of the mini program in the first project and the functions of the second project are implemented through the target file.

[0070] It can be understood that the number of second projects can be one or more, and there is no specific limitation here. The number of sub-packages in a first project can also be one or more, but the names of the sub-packages are different. The difference in names is reflected in the different names of the sub-packages in all first projects, and also in the different names of the sub-packages in the first project and the second project.

[0071] In this embodiment, the sub-package is added to the updated first package file to obtain a project file, and the name of the sub-package is different from the name of the main package.

[0072] In this embodiment, the updated first package file is configured with a path to access the sub-package in the second package file, so that by adding the sub-package to the updated first package file, a project file that can realize the functions of the first project and the second project can be obtained.

[0073] In one embodiment, taking the case where the first project is a project developed with vue2 and the second project is a project developed with vue3 as an example, after packaging the projects developed with vue2 and vue3, most of the files in the first package file and the second package file are the same, and the sub-packages for implementing different functional pages are different, so the sub-packages in the second package file are copied and added to the updated first package file.

[0074] In this manner, all functional parameters of the corresponding function of the second item are written into the sub-package, and the functional parameters include data such as functions and parameters that implement the corresponding functions, and no specific restrictions are made here.

[0075] By writing all functional parameters of the corresponding functions of the second project in the sub-package, it is only necessary to add the updated first packaging file to the sub-package to obtain the project file, and the functions of the first project and the second project can be realized through the project file.

[0076] In some other embodiments, the first packaged file includes a first public file, the first public file includes public parameters for implementing functions corresponding to the first project, the second packaged file includes a second public file, the second public file includes public parameters for implementing functions corresponding to the second project; and obtaining the project file of the mini-program based on the updated first packaged file and the second packaged file includes:

[0077] S10: Add the sub-package to the updated first package file to obtain a processed first package file.

[0078] S11: Add the content in the second public file to the processed first public file in the first packaged file to obtain a project file.

[0079] In this embodiment, if the second project is configured with common parameters during development, the common parameters can be stored through a second common file, and a second common file will exist in the second packaged file accordingly. At this time, other parameters except the common parameters exist in the sub-package, and the sub-package and the second common file jointly implement the function of the second project. When the sub-package of the second packaged file is running, the common parameters in the second common file will be called. When the first project and the second project are compatible, in order to ensure the normal operation of the second project, the content of the second common file should also be added to the first common file. Since there is generally one common file in a project, and the common file has a fixed name common, the content of the second common file is added to the first common file in the processed first packaged file. At this time, the first public file obtained includes the common parameters of the first project and the common parameters of the second project.

[0080] This embodiment also proposes a judgment condition for merging the contents of the first public file and the second public file:

[0081] S20: Detect whether the content in the second public file is empty.

[0082] S21: If the content in the second public file is not empty, a step of adding the content in the second public file to the processed first public file in the first packaged file is performed to obtain a project file.

[0083] S22: If the content in the second public file is empty, the processed first packaged file is used as the project file.

[0084] In some embodiments, the second version development framework may generate a second public file, but during development, no data may be written into the second public file. In this case, it is detected whether the content of the second public file is empty. If the content of the second public file is not empty, the step of adding the content of the second public file to the first public file in the processed first package file is executed to obtain the project file; if the content of the second public file is empty, the processed first package file is used as the project file.

[0085] In some embodiments, in order to improve the compatibility efficiency between projects obtained from different versions of development frameworks, when developing through a new version of the development framework, public parameters may not be used, and all relevant content may be written into a sub-package. At this time, the step of merging the second public file and the first public file may be omitted. Only the sub-package needs to be added to the updated first package file to obtain the project file.

[0086] In some embodiments, after obtaining the project file, if it is necessary to develop other functions of the mini-program again, the update packaging file of the update project is obtained, the update project is a project for developing other functions, the update packaging file is a project implemented by the update version development framework, the update version development framework is the second version development framework or the version of the update version development framework is higher than the version of the second version development framework, the update packaging file includes an update sub-package; the update path of the update sub-package is configured in the configuration file of the project file, and the updated project file is obtained to obtain the update project file based on the updated project file and the update packaging file, the update project file is a project file for implementing the functions of the first project, the second project and the update project, and the update project file searches for the update sub-package based on the update path to realize the jump of the update page corresponding to the update sub-package.

[0087] It can be understood that the version of the development framework is not updated or updated, that is, no matter the update project is developed through the second version of the development framework, or the update project is developed through a version higher than the second version of the development framework, the packaged file is regarded as a new second package file, that is, an updated package file. The path of the update sub-package of the update package file is added to the configuration file of the project file, and the update sub-package of the update package file is added to the project file. If there is a public file in the update package file, the content of the public file of the update package file must also be merged into the public file in the project file.

[0088] Of course, in other embodiments, for the updated packaging file under the second version development framework, the mini-program under the second version development framework can be directly packaged to obtain a new second packaging file, which includes files of all functions developed for the mini-program under the second version development framework, including sub-packages and update sub-packages, and then the sub-packages and update sub-packages are merged into the first packaging file, and the configuration file in the first packaging file is written into the path of the sub-package and the path of the update sub-package. The final file can achieve compatibility between the first project under the first version development framework and the second project and update project under the second version development framework.

[0089] It can be understood that in the update project, the address of the update function picture required for the update project is written into the corresponding update sub-package, and the update function picture is stored on the server. The address of the update function picture is the address where the update function picture is stored on the server. Therefore, when merging files of the update project, there is no need to merge the files of the update function picture. The update function picture can be called through the address of the update function picture, thereby improving the efficiency of file merging.

[0090] In this embodiment, the project files are packaged and deployed to complete the launch of the mini program. At this time, the mini program launched is compatible with the first project and the second project, that is, it is compatible with projects obtained by different versions of development software.

[0091] In this embodiment, the packaged files of the same mini program under the first version development framework and the second version development framework are obtained to ensure that there is only one main package in the packaged file. In this way, the sub-package in the packaged file of the second version development framework can be copied to the old packaged file, and the path of the sub-package can be configured. In this way, the project file that can implement the function page corresponding to the main package and the function page corresponding to the sub-package can be obtained through the two packaged files. Subsequently, the project file can be used to achieve compatibility between projects obtained under different versions of the development framework for the same mini program. This process has short development time and high efficiency, and there is no need to reconstruct the project under the old version development framework. At the same time, by storing the function pictures required to implement the function pages of the second project on the server side, and writing the address of the function pictures stored on the server side into the sub-package, there is no need to merge the files storing the function pictures into the project file. Access to the function pictures can be achieved through the address of the function pictures stored on the server, which can reduce file merging and increase the rate of file merging.

[0092] Figure 3 Process of the project packaging file processing method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, Figure 3 The steps in can be implemented in Figure 2 Before step S201, the method for processing the project package file includes the following steps:

[0093] S301: Create a new update applet under the second version development framework, where the name of the update applet is the same as the name of the applet.

[0094] In this embodiment, for the first project obtained by the first version development framework, no new business iteration is performed. A new update applet can be created, and the corresponding business is developed through the second version development framework, such as developing the corresponding business through the vue3 framework of uniapp. The name of the update applet is the same as the name of the applet. This can ensure that the second package file obtained by updating the applet can be merged with the first package file. The name of the update applet is the same as the name of the applet, and it can be regarded that the name (appname) and the name identifier (appid) of the update applet are the same as those of the applet.

[0095] S302: Develop a sub-package corresponding to the function page in the update applet to obtain the developed update applet.

[0096] The sub-package is developed by updating the relevant files in the applet. The development process can be implemented in the .json file in the update applet. In the development process, the public parameters of the update applet, that is, the public parameters in the second public file, can also be defined.

[0097] S303: Packaging the update applet to obtain a second package file.

[0098] At this point, the new project can use the second version of the development framework to develop new services, isolating it from the first project. Figure 2 The relevant steps in the above can achieve compatibility between the first project and the second project. The first project only needs to perform maintenance operations later, and there is no need to rebuild it through the second version development framework, which can greatly reduce the development cost.

[0099] In a specific embodiment, the first version development framework is uniapp's vue2, and the second version development framework is uniapp's vue3. Most of the packaged files obtained by packaging vue2 and vue3 are the same, which can be obtained by Figure 2 and Figure 3 The corresponding steps in the project are implemented to achieve project compatibility, greatly improving the efficiency of mini program development.

[0100] Figure 4 A schematic diagram of the structure of a device for processing project packaging files provided in an embodiment of the present application. Figure 4 As shown, the processing device of the project packaging file includes: a first packaging file acquisition module 401, which is used to acquire a first packaging file of a first project, the first project is a project implemented by a first version development framework, the first packaging file includes a main package, the main package is used to implement the main page of the mini program, the first packaging file includes a configuration file, and the configuration file is used to configure the implementation method of the corresponding function of the first project; a second packaging file acquisition module 402, which is used to acquire a second packaging file of a second project, the first project and the second project are functional projects corresponding to the mini program, the second project is a project implemented by a second version development framework, the second packaging file does not include the main package, the second packaging file includes a sub-package, the sub-package is used to implement the functional page of the second project, the functional image required to implement the functional page of the second project is stored on the server, the sub-package includes the address of the functional image stored on the server, and the version of the first version development framework is lower than that of the second version development framework; a file merging module 403, which is used to configure the path of the sub-package in the configuration file of the first packaging file, obtain the updated first packaging file, and obtain the project file of the mini program based on the updated first packaging file and the second packaging file, and the project file searches for the sub-package based on the path to realize the jump of the functional page.

[0101] In some embodiments, the file merging module includes: a project compatibility unit, which is used to add the sub-package into the updated first package file to obtain a project file, and the name of the sub-package is different from the name of the main package.

[0102] In some embodiments, the first packaged file includes a first public file, the first public file includes public parameters for implementing functions corresponding to the first project, and the second packaged file includes a second public file, the second public file includes public parameters for implementing functions corresponding to the second project; the file merging module includes: a first packaged file processing unit, used to add the sub-package into the updated first packaged file to obtain a processed first packaged file; a public parameter merging unit, used to add the content of the second public file to the first public file in the processed first packaged file to obtain a project file.

[0103] In some embodiments, the mini-program file merging module includes: also includes: a detection unit, used to detect whether the content in the second public file is empty; a first processing unit, used to execute the step of adding the content in the second public file to the first public file in the processed first packaged file if the content in the second public file is not empty, so as to obtain a project file; a second processing unit, used to use the processed first packaged file as a project file if the content in the second public file is empty.

[0104] In some embodiments, the processing device for the project packaging file also includes: a new creation module, used to create a new update applet under the second version development framework, and the name of the update applet is the same as the name of the applet; a development module, used to develop a sub-package corresponding to the function page in the update applet to obtain the developed update applet; a packaging module, used to package the update applet to obtain a second packaging file.

[0105] In some embodiments, the device for processing project packaging files also includes: an online module, which is used to package and deploy the project files to complete the online launch of the mini program.

[0106] In some embodiments, the processing device of the project packaging file also includes: an update packaging file acquisition module, which is used to acquire the update packaging file of the update project, the update packaging file is a project implemented by the update version development framework, the update version development framework is the second version development framework or the version of the update version development framework is higher than the version of the second version development framework, and the update packaging file includes an update sub-package; an update project file acquisition module, which is used to configure the update path of the update sub-package in the configuration file of the project file, obtain the updated project file, and obtain the update project file based on the updated project file and the update packaging file, the update project file is a project file for implementing the functions of the first project, the second project and the update project, and the update project file searches for the update sub-package based on the update path to realize the jump of the update page corresponding to the update sub-package.

[0107] The project packaging file processing device provided in the embodiment of the present application can be used to execute the technical solution of the project packaging file processing method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0108] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device may include: a processor 51 and a memory 52 , wherein the processor 51 and the memory 52 may communicate with each other; illustratively, the processor 51 and the memory 52 communicate with each other via a communication bus 53 .

[0109] The processor 51 executes the computer execution instructions stored in the memory 52, so that the processor 51 executes the scheme in the above embodiment. The processor 51 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0110] The communication bus 53 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0111] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.

[0112] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed on a computer, the computer executes the technical solution of the method for processing project packaging files in the above embodiment.

[0113] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the method for processing project packaging files in the above embodiment.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to implement the solution of this embodiment.

[0116] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0117] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0118] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0119] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0120] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0121] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0122] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0123] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing a project packaging file, characterized in that: include: Obtain a first package file of a first project, the first project is a project implemented by a first version development framework, the first package file includes a main package, the main package is used to implement a main page of a mini-program, and the first package file includes a configuration file, the configuration file is used to configure an implementation method of a corresponding function of the first project; Obtain a second package file of the second project, the first project and the second project are functional projects corresponding to the mini-program, the second project is a project implemented by the second version development framework, the second package file does not include a main package, the second package file includes a sub-package, the sub-package is used to implement the functional page of the second project, the functional image required to implement the functional page of the second project is stored on the server, the sub-package includes the address of the functional image stored on the server, and the version of the first version development framework is lower than the second version development framework; The path of the sub-package is configured in the configuration file of the first packaging file to obtain an updated first packaging file, so as to obtain the project file of the mini-program based on the updated first packaging file and the second packaging file, and the project file searches for the sub-package based on the path to realize the jump of the function page.

2. The method according to claim 1, characterized in that The sub-package includes function parameters for implementing the function corresponding to the second project; and the acquiring the project file of the mini-program based on the updated first package file and the second package file includes: The sub-package is added to the updated first package file to obtain the project file, wherein the name of the sub-package is different from the name of the main package.

3. The method according to claim 1, characterized in that: The first packaged file includes a first public file, the first public file includes public parameters for implementing the functions corresponding to the first project, and the second packaged file includes a second public file, the second public file includes public parameters for implementing the functions corresponding to the second project; The acquiring the project file of the mini-program based on the updated first package file and the second package file includes: Adding the sub-package to the updated first package file to obtain a processed first package file; The content in the second public file is added to the first public file in the processed first packaged file to obtain the project file.

4. The method according to claim 3, characterized in that Before adding the content in the second public file to the first public file in the processed first packaged file, the method further includes: Detect whether the content in the second public file is empty; If the content in the second public file is not empty, performing the step of adding the content in the second public file to the first public file in the processed first packaged file to obtain the project file; If the content in the second public file is empty, the processed first packaged file is used as the project file.

5. The method according to any one of claims 1 to 4, characterized in that Before obtaining the second package file of the second project, the method further includes: Create a new update applet under the second version development framework, where the name of the update applet is the same as the name of the applet; Developing a subpackage corresponding to the function page in the update applet to obtain a developed update applet; The update applet is packaged to obtain the second package file.

6. The method according to any one of claims 1 to 4, characterized in that After configuring the path of the sub-package in the configuration file of the first packaging file to obtain an updated first packaging file, and obtaining the project file of the mini-program based on the updated first packaging file and the second packaging file, the method further includes: Acquire an update package file of the update project, the update package file is a project implemented by the update version development framework, the update version development framework is the second version development framework or the version of the update version development framework is higher than the version of the second version development framework, and the update package file includes an update sub-package; An update path of the update sub-package is configured in a configuration file of the project file to obtain an updated project file, so as to obtain an update project file based on the updated project file and the update packaging file, wherein the update project file is a project file for implementing the functions of the first project, the second project and the update project, and the update project file searches for the update sub-package based on the update path to implement a jump to an update page corresponding to the update sub-package.

7. The method according to any one of claims 1 to 4, characterized in that After acquiring the project file of the mini-program based on the updated first packaging file and the second packaging file, the method further includes: The project files are packaged and deployed to complete the launch of the mini program.

8. A device for processing project packaging files, characterized in that: include: A first package file acquisition module, used to acquire a first package file of a first project, the first project is a project implemented by a first version development framework, the first package file includes a main package, the main package is used to implement the main page of the mini program, and the first package file includes a configuration file, the configuration file is used to configure the implementation method of the corresponding function of the first project; A second package file acquisition module is used to acquire a second package file of a second project, wherein the first project and the second project are functional projects corresponding to the mini-program, the second project is a project implemented by a second version development framework, the second package file does not include a main package, the second package file includes a sub-package, the sub-package is used to implement a functional page of the second project, the functional image required to implement the functional page of the second project is stored on the server, the sub-package includes an address of the functional image stored on the server, and the version of the first version development framework is lower than that of the second version development framework; A file merging module is used to configure the path of the sub-package in the configuration file of the first packaging file to obtain an updated first packaging file, so as to obtain the project file of the mini-program based on the updated first packaging file and the second packaging file, and the project file searches for the sub-package based on the path to realize the jump of the function page.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement 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 computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.