Same-layer resource processing method and device, computer device and storage medium
Patent Information
- Application Number
- CN202510248016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]然而,传统上通过同层组件加载提供扩展功能的方式下,应用程序所提供的动态加载框架,会将同层组件的动态组件内容存储至同层扩展库的路径下,而同层组件在加载组件内容时,则是通过基础包路径下的原生库目录,访问同层组件的动态组件内容,并不会访问直接同层扩展库的路径,容易出现无法加载访问同层组件的动态组件内容,导致同层组件加载不成功,同层扩展功能不可用的问题
Smart Images

Figure CN122653703A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for processing resources at the same layer. Background Technology
[0002] With the development of cloud technology and the widespread application of various applications or platforms, in the actual application process of applications or platforms, it is necessary to develop and extend the applications or platforms according to different actual business needs, and provide extended functions at the same layer in addition to the basic capabilities to meet actual business needs.
[0003] In traditional technologies, when developing applications or platforms to provide specific same-layer extended functions to users, users need to download and install the application's base package. During the use of the base package, when the same-layer extended function is triggered, the corresponding same-layer dynamic extension package is downloaded and installed. Through the dynamic loading framework provided by the application or platform, the dynamic component content corresponding to the same-layer dynamic extension package is loaded to provide the user with the extended functions corresponding to the same-layer component.
[0004] However, in the traditional approach of providing extended functionality through loading components within the same layer, the dynamic loading framework provided by the application stores the dynamic component content of the same-layer component in the path of the same-layer extension library. When the same-layer component loads its component content, it accesses the dynamic component content of the same-layer component through the native library directory under the base package path, and does not access the path of the same-layer extension library directly. This can easily lead to the inability to load and access the dynamic component content of the same-layer component, resulting in the same-layer component failing to load and the same-layer extension functionality becoming unavailable. Summary of the Invention
[0005] Based on this, it is necessary to address the aforementioned technical problems by providing a method, apparatus, computer device, computer-readable storage medium, and computer program product for processing same-layer resources, which can directly load same-layer components and same-layer dynamic component content through the dynamic loading framework provided by the application during the use of the application's base package, so as to provide same-layer extended functions to the user.
[0006] In a first aspect, this application provides a method for processing resources at the same layer, comprising: installing and running an application base package; if a same-layer component loading request is detected during the operation of the application base package, determining a same-layer component identifier corresponding to the same-layer component loading request, downloading and installing a same-layer component extension package matching the same-layer component identifier; obtaining a same-layer native library file matching the same-layer component extension package, constructing a file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; accessing the file soft link, linking from the base library cache path to the native file cache path to obtain the same-layer native library file from the native file cache path, executing same-layer component loading logic, and loading the same-layer native library file.
[0007] Secondly, this application also provides a same-layer resource processing apparatus, comprising: an application base package execution module for installing and running the application base package; a same-layer component extension package installation module for determining the same-layer component identifier corresponding to the same-layer component loading request if a same-layer component loading request is detected during the operation of the application base package, and downloading and installing the same-layer component extension package matching the same-layer component identifier; a file soft link construction module for obtaining the same-layer native library file matching the same-layer component extension package, and constructing a file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; and a same-layer native library file loading module for accessing the file soft link, linking from the base library cache path to the native file cache path to obtain the same-layer native library file from the native file cache path, executing the same-layer component loading logic, and loading the same-layer native library file.
[0008] Thirdly, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: installing and running an application base package; if a same-layer component loading request is detected during the operation of the application base package, determining the same-layer component identifier corresponding to the same-layer component loading request, downloading and installing a same-layer component extension package matching the same-layer component identifier; obtaining a same-layer native library file matching the same-layer component extension package, constructing a file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; accessing the file soft link, linking from the base library cache path to the native file cache path to obtain the same-layer native library file from the native file cache path, executing the same-layer component loading logic, and loading the same-layer native library file.
[0009] Fourthly, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the following steps: installing and running an application base package; if a same-layer component loading request is detected during the operation of the application base package, determining the same-layer component identifier corresponding to the same-layer component loading request, downloading and installing a same-layer component extension package matching the same-layer component identifier; obtaining a same-layer native library file matching the same-layer component extension package, constructing a file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; accessing the file soft link, linking from the base library cache path to the native file cache path to obtain the same-layer native library file from the native file cache path, executing the same-layer component loading logic, and loading the same-layer native library file.
[0010] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps: installing and running an application base package; if a same-layer component loading request is detected during the operation of the application base package, determining a same-layer component identifier corresponding to the same-layer component loading request, downloading and installing a same-layer component extension package matching the same-layer component identifier; obtaining a same-layer native library file matching the same-layer component extension package, constructing a file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; accessing the file soft link, linking from the base library cache path to the native file cache path to obtain the same-layer native library file from the native file cache path, executing same-layer component loading logic, and loading the same-layer native library file.
[0011] In the aforementioned same-layer resource processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product, by installing and running an application base package, if a same-layer component loading request is detected during the operation of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed, so as to provide the same-layer extended functions corresponding to the same-layer component extension package to the user during the operation of the application base package. Furthermore, by obtaining the native library file of the same layer that matches the extension package of the same layer component, and constructing a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library file of the same layer, a link can be accessed to link from the base library cache path to the native file cache path to obtain the native library file of the same layer. This solves the problem that in the traditional way, when loading component content to provide same-layer extension functions through same-layer components, it is impossible to directly access the path of the same-layer extension library where the dynamic component content is located, which leads to the failure to successfully load and access the dynamic component content of the same-layer component. Instead, it uses the dynamic loading framework provided by the application to directly load and execute the loading logic of the same-layer component and load the native library file of the same layer through accessing the file soft link to provide same-layer extension functions to the user object, thereby improving the development and application efficiency of application extension functions. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is an application environment diagram of a method for handling resources at the same layer in one embodiment;
[0014] Figure 2 This is a flowchart illustrating a method for handling resources at the same layer in one embodiment;
[0015] Figure 3 This is a schematic diagram illustrating the structure of a traditional same-layer dynamic package in one embodiment;
[0016] Figure 4 This is a schematic diagram of a traditional same-layer dynamic module loading process in one embodiment;
[0017] Figure 5 This is a schematic diagram illustrating the structure of a same-layer component extension package in a same-layer resource processing method in one embodiment;
[0018] Figure 6This is a schematic diagram illustrating a method for processing same-layer resources based on same-layer component extension packages in one embodiment.
[0019] Figure 7 This is a flowchart illustrating a method for handling resources at the same layer in another embodiment;
[0020] Figure 8 This is a schematic diagram illustrating the process of constructing a file symbolic link in one embodiment;
[0021] Figure 9 This is a schematic diagram illustrating the overall process of constructing a file symbolic link in one embodiment;
[0022] Figure 10 This is a schematic diagram of the process for generating a same-layer library file package that matches the same-layer component extension package in one embodiment;
[0023] Figure 11 This is a schematic diagram illustrating the structure of pre-built library files at the same level in one embodiment;
[0024] Figure 12 This is a schematic diagram of the overall processing flow of the same-layer resource processing method in one embodiment;
[0025] Figure 13 This is a schematic diagram illustrating the process of dynamically loading components at the same layer based on the application base package in one embodiment.
[0026] Figure 14 This is a structural block diagram of a resource processing device at the same level in one embodiment;
[0027] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0029] The same-layer resource processing method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 and server 104 can communicate via a network. A data storage system can store the data that terminal 102 needs to process. This data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be connected directly or indirectly through wired or wireless communication, and this embodiment does not impose any restrictions on this.
[0030] Both terminal 102 and server 104 can be used independently to execute the same-layer resource processing method provided in this embodiment, or they can work together to execute the same-layer resource processing method provided in this embodiment. For example, taking the collaborative execution of the same-layer resource processing method provided in this embodiment by terminal 102 and server 104 as an example, terminal 102 downloads, installs, and runs the application base package from server 104 in response to an application installation operation triggered by a user. If, during the operation of the application base package, a same-layer component loading request triggered by the user based on the application interface is detected, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed from server 104. Furthermore, terminal 102 obtains the native library file of the same layer that matches the native library extension package of the same layer, and constructs a file soft link based on the base library cache path of the application base package and the native file cache path of the native file of the same layer. Terminal 102 can access the file soft link and link from the base library cache path of the application base package to the native file cache path when it needs to load the native library file of the same layer, so as to obtain the required native library file from the native file cache path. By executing the native library loading logic of the same layer component, the native library file of the same layer is loaded in the application interface to provide native extension functionality for the user.
[0031] In one exemplary embodiment, such as Figure 2As shown, a method for handling resources at the same layer is provided. This method can be executed by the terminal or the server alone, or by the terminal and the server working together. This method can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps S202 to S208. Wherein:
[0032] Step S202: Install and run the application base package.
[0033] Specifically, the user can trigger an application installation request based on the terminal. After detecting the application installation request, the terminal obtains the application identifier (or application name) corresponding to the application installation request, downloads the application base package that matches the application identifier from the server, and installs and runs the downloaded application base package.
[0034] Based on business needs, applications can be divided into a base application package and a same-layer component extension package. The base application package provides the basic functions of the application itself, such as the communication and information interaction functions of a communication application. The same-layer component extension package provides extended functions beyond the basic functions, including same-layer rendering and same-layer resource processing implemented by same-layer components. For example, the mini-program component of a communication application provides mini-game functions, shopping functions, and music playback functions, while the same-layer audio and video component of a communication application provides video call functions and voice call functions.
[0035] Step S204: If a same-layer component loading request is detected during the operation of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed.
[0036] Specifically, during the execution of the application base package on the terminal, the use of objects can trigger a same-layer component loading request. For example, for the same-layer audio and video components of a communication application, if a same-layer component loading request is triggered, the terminal can parse the same-layer component loading request by calling the dynamic loading component of the application base package, so as to determine the same-layer component identifier corresponding to the same-layer component loading request.
[0037] After obtaining the same-layer component identifier, the terminal can download the same-layer component extension package that matches the same-layer component identifier from the server by calling the dynamic loading component of the application base package.
[0038] Furthermore, the same-layer component extension package contains the same-layer native library files that need to be loaded and rendered. The terminal downloads the same-layer component extension package and obtains the dynamic installation method corresponding to the same-layer component extension package, so as to install the same-layer component extension package on the terminal according to the dynamic installation method.
[0039] Specifically, when installing the same-layer component extension package using the dynamic installation method, the same-layer component extension package can be installed to the installation path of the dynamic extension package through the dynamic loading framework provided by the application. After the same-layer component extension package is installed, the classloader component deployed by the dynamic loading framework (i.e., the component responsible for dynamically loading Java class files (such as .class files) into the virtual machine) loads the same-layer component content in the same-layer component extension package, and performs the loading and rendering of the same-layer native library files through the dynamic loading component of the application base package.
[0040] For example, in the installation path of a dynamic extension package, a resource file cache path for the dynamic extension package can be specifically constructed. The resource file cache path can store resource file directories, which can specifically be an assets directory, representing a directory used to store various resource files. The resource files in the assets directory will not be compiled into binary files during compilation, but will exist in the form of raw files, which can include images, audio, video, configuration files, etc. Specifically, the same-level library file package corresponding to the same-level component extension package can be stored in the assets directory of the resource file cache path of the dynamic extension package. Thus, during the application compilation process, the same-level library file package in the same-level component extension package will not be compiled, and the original state of the same-level library file package can be preserved, that is, the original state of each same-level native library file in the same-level library file package can be preserved.
[0041] Step S206: Obtain the native library file in the same layer that matches the extension package of the same layer component, and construct a soft link for the file based on the base library cache path of the application base package and the native file cache path of the native library file in the same layer.
[0042] Specifically, after installing the same-layer component extension package that matches the same-layer component identifier on the terminal, the same-layer library file package that matches the same-layer component extension package can be obtained based on the installation path of the same-layer component extension package. This same-layer library file package is then decompressed to obtain the same-layer native library files that match the same-layer component extension package. Specifically, the same-layer native library files that match the same-layer component extension package are pre-packaged to obtain the same-layer library file package, and this same-layer library file package is stored in the installation path of the same-layer component extension package.
[0043] Specifically, the terminal pre-constructs a resource file cache path corresponding to the same-layer library file package of the same-layer component extension package based on the installation path of the same-layer component extension package, and stores the same-layer library file package matching the same-layer component extension package in the resource file directory of the resource file cache path. Then, when obtaining the same-layer library file package matching the same-layer component extension package based on the installation path of the same-layer component extension package, it can specifically determine the resource file cache path corresponding to the same-layer library file package based on the installation path of the same-layer component extension package, and obtain the same-layer library file package matching the same-layer component extension package from the resource file cache path.
[0044] Specifically, during the operation of the application base package, if it is necessary to access and load the same-layer library file package, and the dynamically loaded component of the application base package cannot directly access the installation path of the same-layer component extension package, the terminal can construct a context resource access object for accessing context resources. Through the context resource access object, it can access the resource file cache path under the installation path of the same-layer component extension package and obtain the same-layer library file package that matches the same-layer component extension package.
[0045] Furthermore, the terminal obtains the same-layer library file package matching the same-layer component extension package from the resource file cache path by calling the dynamic loading component of the application base package. Then, it obtains the preset decompression logic corresponding to the dynamic loading component, calls the dynamic loading component according to the preset decompression logic, and decompresses the same-layer library file package to obtain the same-layer native library file matching the same-layer component extension package.
[0046] Among them, the native library files of the same layer that match the same layer component extension package can be specifically understood as resource files used to implement the same layer extension function of the same layer component extension package. By loading and rendering these resource files during the running of the application base package, the same layer extension function of the same layer component extension package can be provided to the user object.
[0047] In an exemplary embodiment, when loading native library files at the same level using the dynamic loading component of the application's base package, due to the limitations of the dynamic loading framework provided by the application, it can usually only access the base library cache path of the application's base package, and cannot directly access the native file cache path of the native library files at the same level. Therefore, the terminal obtains the base library cache path of the application's base package and the native file cache path of the native library files at the same level, and constructs a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library files at the same level. Thus, by accessing the file soft link, the base library cache path can be linked to the native file cache path. Therefore, when loading native library files at the same level and accessing the base library cache path of the application's base package, the link is established from the base library cache path to the native file cache path to obtain the native library files at the same level from the native file cache path.
[0048] Step S208: Access the file symbolic link, link from the base library cache path to the native file cache path, obtain the same-level native library file from the native file cache path, execute the same-level component loading logic, and load the same-level native library file.
[0049] Specifically, the terminal links the base library cache path to the native file cache path by constructing a file symbolic link. When the terminal calls a dynamically loaded component of the application's base package and needs to load a native library file at the same level, it accesses the file symbolic link and, when accessing the base library cache path of the application's base package, links from the base library cache path to the native file cache path to obtain the native library file at the same level from the native file cache path.
[0050] Furthermore, the terminal invokes the dynamically loaded components of the application's base package to execute the same-layer component loading logic. During the runtime of the application's base package, it loads and renders the same-layer native library files. Simultaneously, it provides same-layer extended functionality to users. Same-layer rendering refers to rendering elements located on the same layer together, reducing the number of redraws and reflows, improving page rendering efficiency. By rendering native components directly on the WebView layer, native and non-native components are placed on the same level, resolving their overlapping and occlusion issues, and achieving synchronized scrolling. Therefore, while providing basic functionality to users during the runtime of the application's base package, it also provides extended functionality.
[0051] In an exemplary embodiment, after executing the same-layer component loading logic and loading the same-layer native library file, the method further includes:
[0052] If the native library files at the same level are loaded successfully, the same-level extension function of the application base package is started. When a request for processing resources at the same level is received, the same-level extension function is called through the business processing logic of the application base package to process the resources at the same level.
[0053] Specifically, when the native library file at the same layer is successfully loaded, the terminal will activate the same-layer extension function of the application base package. When it receives a same-layer resource processing request triggered by the user, it will call the same-layer extension function of the application base package, such as the audio and video call function, according to the business processing logic of the application base package, such as the audio and video business processing logic of the communication application, to perform same-layer resource processing. That is, while the communication application is exchanging information, it will synchronously provide audio and video call function to the user and perform same-layer rendering processing on the audio and video data.
[0054] In one exemplary embodiment, such as Figure 3 As shown, a schematic diagram of a traditional same-level dynamic package is provided, referring to... Figure 3 It is known that, traditionally, when distributing dynamic modules at the same level according to the dynamic module integration scheme provided by the application, it is necessary to distribute the native library files of the same-level implementation library in accordance with, for example... Figure 3 The traditional method of organizing dynamic packages at the same level is shown.
[0055] Among them, reference Figure 3 As can be seen, a traditional same-layer dynamic package specifically includes resource files, extended components, and native implementation libraries and native business logic implementation libraries under the libs path. The resource files in the same-layer dynamic package refer to resource type files (such as images, string resources, etc.) that the same-layer implementation library depends on. Extended components refer to the Java business logic bridge interface implementation of the same-layer implementation library. The libs directory includes the native implementation libraries and native business logic implementation libraries of the same-layer rendering implementation library. Specifically, the same-layer implementation files need to be placed in the libs path of the dynamic module source code according to different CPU architectures.
[0056] Furthermore, such as Figure 4 As shown, a traditional same-level dynamic module loading process is provided, referring to... Figure 4 It can be seen that the traditional same-level dynamic module loading process specifically includes:
[0057] 1) The terminal downloads and installs the application base package. During the use of the application base package, the dynamic management module of the application base package downloads the same-layer dynamic extension package from the server by triggering the download logic of the same-layer dynamic package. 2) The same-layer dynamic extension package is downloaded to the terminal as an installation package. After downloading, the dynamic management logic of the application base package calls the dynamic package installation process provided by the system to install the same-layer dynamic extension package. 3) The same-layer loading logic is triggered, accessing the libs path to obtain the native implementation library and native business implementation library from the libs path. 4) If the native implementation library and native business implementation library are successfully obtained, they are loaded, and the same-layer capability is started. 5) If the native implementation library and native business implementation library are not successfully obtained, a message indicating that the same-layer component's native library file cannot be loaded and accessed is displayed, and the same-layer capability is unavailable is displayed.
[0058] The installation logic for dynamic extension packages at the same level differs from that of ordinary application installation packages in that they are installed in the private storage path of the base package and organized using the installation method provided by the application's dynamic loading framework. Following typical dynamic package loading logic, after installation, the dynamic loading framework loads the dynamic component portion of the dynamic extension package via the classloader component (a component used to dynamically load Java class files (.class files) into the virtual machine). Furthermore, after the installation of the dynamic extension package containing the native library of the same-level component, the loading of the native library of the same-level component is triggered in the base package.
[0059] Specifically, in the traditional process of loading same-layer dynamic modules, the application's dynamic loading framework installs the native library of the same-layer component to the installation path of the same-layer extension library when installing the same-layer component extension package. The installation path of the same-layer extension library can be " / data / data / base package name / file / ". However, when loading the native library, the same-layer component will by default access the native library file of the same-layer component from the native library directory under the base package path, instead of directly accessing the installation path of the same-layer extension library. Because it cannot directly access the native library file of the same-layer component in the installation path of the same-layer extension library, the same-layer component fails to load and the same-layer capabilities become unavailable.
[0060] In one exemplary embodiment, such as Figure 5 As shown, this diagram illustrates the structure of a same-layer component extension package that provides a same-layer resource processing method. (Refer to...) Figure 5As can be seen, the same-layer resource processing method in this application provides a same-layer component extension package, which includes traditional resource files and extension components. At the same time, the native library files of the same-layer component implementation library are packaged into a same-layer library file package. That is, the same-layer library file package contains all the implementation native library files of the same-layer components, and the same-layer library file package is stored in the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package.
[0061] Furthermore, such as Figure 6 As shown, a process for processing same-layer resources based on same-layer component extension packages is provided, referring to... Figure 6 It can be seen that the method for handling same-layer resources based on same-layer component extension packages specifically includes:
[0062] 1) After the terminal downloads and installs the application base library package from the server, it runs the application base package. 2) During the execution of the application base package, the loading logic of the same-layer component is triggered (e.g., video-related capabilities are used). 3) The dynamic loading component of the application base library package requests and downloads a dynamic component installation package file containing the same-layer component files from the server, based on the preset name of the same-layer component. 4) After the dynamic component installation package file is downloaded, it is installed according to the installation method provided by the dynamic component. 5) After the dynamic component installation package file is installed, a resource file cache path corresponding to the same-layer library file package of the same-layer component extension package is constructed based on the installation path of the same-layer component extension package, and the same-layer library file package is stored in the resource file cache path. 6) Through the dynamic component loading logic of the application base package, a context resource access object is constructed, and the same-layer component file package in the resource file cache path is accessed through the context object. 7) The dynamic loading component of the application base library package decompresses the same-layer component file package according to the preset decompression method and stores the decompressed original files of the same-layer library in the cache path of the application base package. 8) The dynamic loading component of the application's base library package scans the original files of the same-layer libraries and establishes a symbolic link from the cache path of the same-layer native library files to the original library path of the base package. 9) The dynamic loading component of the application's base library package calls the initialization method of the same-layer component to initialize it. It also accesses the symbolic link to link from the original library path of the base package to the cache path of the same-layer native library files, retrieves the same-layer native library files from the cache path, and executes the loading logic of the same-layer component. 10) After the same-layer component is successfully loaded, its capabilities become enabled, and related extended functions of the same-layer component are called through the business logic of the application's base library package. 11) If the same-layer component fails to load, a message indicating that the same-layer native library file could not be loaded and the extended functions are unavailable is displayed.
[0063] In the above-mentioned same-layer resource processing method, by installing and running the application base package, if a same-layer component loading request is detected during the running of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed, so as to provide the same-layer extended functions corresponding to the same-layer component extension package to the user during the running of the application base package. Furthermore, by obtaining the native library file of the same layer that matches the extension package of the same layer component, and constructing a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library file of the same layer, a link can be accessed to link from the base library cache path to the native file cache path to obtain the native library file of the same layer. This solves the problem that in the traditional way, when loading component content to provide same-layer extension functions through same-layer components, it is impossible to directly access the path of the same-layer extension library where the dynamic component content is located, which leads to the failure to successfully load and access the dynamic component content of the same-layer component. Instead, it uses the dynamic loading framework provided by the application to directly load and execute the loading logic of the same-layer component and load the native library file of the same layer through accessing the file soft link to provide same-layer extension functions to the user object, thereby improving the development and application efficiency of application extension functions.
[0064] In one exemplary embodiment, such as Figure 7 As shown, a method for processing resources at the same level is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps S702 to S708. Wherein:
[0065] Step S702: Based on the installation path of the same-layer component extension package, determine the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package.
[0066] In this process, after the terminal downloads and installs the same-layer component extension package from the server, it obtains the installation path of the same-layer component extension package and, based on the installation path, pre-builds a resource file cache path corresponding to the same-layer library file package of the same-layer component extension package, so as to store the same-layer library file package matching the same-layer component extension package in the resource file directory of the resource file cache path.
[0067] Specifically, when a terminal needs to obtain a library file package that matches the same layer component extension package, it can determine the resource file cache path corresponding to the same layer library file package based on the installation path of the same layer component extension package. Since the same layer library file package that matches the same layer component extension package has been stored in the resource file directory of the resource file cache path in advance, the terminal can further obtain the same layer library file package that matches the same layer component extension package from the resource file directory of the resource file cache path.
[0068] For example, when installing a same-layer component extension package using dynamic installation, the application can use a dynamic loading framework to install the same-layer component extension package to the installation path of the dynamic extension package. In the installation path of the dynamic extension package, a resource file cache path for the dynamic extension package can be constructed. The resource file cache path can store resource file directories. Specifically, the resource file directory can be an assets directory, which represents a directory used to store various resource files. The resource files in the assets directory will not be compiled into binary files during compilation, but will exist in the form of raw files, which can include images, audio, video, configuration files, etc.
[0069] Specifically, the terminal stores the same-layer library file package corresponding to the same-layer component extension package in the assets directory of the resource file cache path of the dynamic extension package. As a result, during the application compilation process, the same-layer library file package in the same-layer component extension package will not be compiled, and the original state of the same-layer library file package can be preserved, that is, the original state of each same-layer native library file in the same-layer library file package is preserved.
[0070] Step S704: Construct a context resource access object using dynamic component loading logic that matches the application base package.
[0071] Specifically, the terminal constructs a context resource access object by calling the dynamic component loading logic that matches the application's base package. Specifically, it constructs a Context object (i.e., a context object) during the application's runtime to access system resources. This context object can be used to access the system resources corresponding to the application, such as accessing resource file cache paths and obtaining the same-layer library file package that matches the same-layer component extension package.
[0072] Step S706: Access the resource file cache path through the context resource access object, and obtain the same-layer library file package that matches the same-layer component extension package from the resource file cache path.
[0073] Specifically, the terminal accesses the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package by calling the context resource access object, so as to read the same-layer library file package that matches the same-layer component extension package from the resource file cache path.
[0074] Step S708: Decompress the same-layer library file package to obtain the same-layer native library file that matches the same-layer component extension package.
[0075] Specifically, if the same-layer library file package includes multiple same-layer native library files, then after the terminal obtains the same-layer library file package that matches the same-layer component extension package, it obtains the preset decompression logic corresponding to the dynamically loaded component, and decompresses the same-layer library file package according to the preset decompression logic corresponding to the dynamically loaded component, thereby obtaining multiple same-layer native library files that match the same-layer component extension package.
[0076] In the aforementioned method for handling same-layer resources, the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package is determined based on the installation path of the same-layer component extension package. Specifically, the same-layer library file package is stored in the resource file cache path. Since it is not necessary to download the same-layer library file package and the same-layer component extension package to the terminal simultaneously, the size of the installation package can be reduced, thus reducing resource consumption. Furthermore, by constructing a context resource access object through dynamic component loading logic that matches the application base package, when the dynamic loading of components in the application base package cannot directly access the installation path of the same-layer component extension package, the context resource access object can be used to access the resource file cache path, read the same-layer library file package that matches the same-layer component extension package, and decompress the same-layer library file package to obtain the same-layer native library file that matches the same-layer component extension package. This improves the development efficiency of application extension functions and reduces resource consumption during the development process.
[0077] In one exemplary embodiment, such as Figure 8 As shown, the steps for constructing a file symbolic link, namely the steps based on the base library cache path of the application's base package and the native file cache path of the native library files at the same level, specifically include steps S802 to S808. Wherein:
[0078] Step S802: Access the base library cache path of the application base package, load the list of same-level native library file identifiers stored in the base library cache path, and obtain at least one same-level native library file identifier from the list of same-level native library file identifiers.
[0079] Specifically, after obtaining the native library files of the same layer that match the extension package of the same layer component, the terminal obtains the file identifiers of each native library file of the same layer, constructs a list of native library file identifiers of the same layer based on each file identifier, and stores the list of native library file identifiers of the same layer in the base library cache path of the application base package. Then, the terminal can load the list of native library file identifiers of the same layer stored in the base library cache path by accessing the base library cache path of the application base package.
[0080] Furthermore, by loading the list of native library file identifiers at the same level, the terminal can obtain at least one native library file identifier from the list. The native library file identifier corresponds to the cache path of the native library file at the same level; that is, based on the native library file identifier, the cache path of the native file corresponding to the native library file at the same level can be determined.
[0081] Step S804: Determine the native file cache path corresponding to each of the at least one native library file at the same level based on the identifier of at least one native library file at the same level.
[0082] Specifically, for each of the at least one same-level native library files, the terminal determines the native file cache path of the same-level native library file corresponding to the same-level native library file based on the association between the same-level native library file identifier and the native file cache path, thereby obtaining the native file cache path corresponding to each of the at least one same-level native library files.
[0083] Step S806: Based on the base library cache path and the native file cache path corresponding to at least one native library file at the same level, construct file symbolic link creation instructions corresponding to at least one native library file at the same level.
[0084] Specifically, the terminal obtains the base library cache path of the application base package, and for each of the at least one same-level native library files, constructs a file soft link creation instruction corresponding to the same-level native library file based on the base library cache path and the native file cache path of the same-level native library file, thereby constructing file soft link creation instructions corresponding to each of the at least one same-level native library file.
[0085] For example, the command to create a symbolic link can be a shell command in the operating system. This command is entered through the command-line interface and interacts with the operating system. The shell command is constructed using the format "ln -n source_file_path target_file_path". The symbolic link creation command specifically includes the base library cache path of the application's base package and the native file cache path of the same-level native library files. The source file path corresponds to the base library cache path of the application's base package, and the target file path corresponds to the native file cache path of the same-level native library files.
[0086] The source file path, i.e., the base library cache path of the application's base package, is a path that can be directly accessed or manipulated and is the starting point of the link. The target file path, i.e., the native file cache path of the same-level native library file, is a path that cannot be directly accessed or manipulated and is the ending point of the link. That is, by using a file symbolic link, when accessing or manipulating the source file path, i.e., the base library cache path of the application's base package, a link can be established to the target file path, i.e., the native file cache path of the same-level native library file, thus achieving the purpose of linking and jumping to access the native file cache path of the same-level native library file.
[0087] Step S808: Execute at least one file symbolic link creation instruction in sequence. For each native library file at the same level, construct a file symbolic link based on the base library cache path and the native file cache path.
[0088] Since there are usually multiple processing instructions during the operation of an application, and each instruction has its own corresponding execution time and the components that need to be called, in order to improve the efficiency of instruction execution and processing, multiple instruction interactive input data streams can be added to the instruction interactive input data stream. By executing the instruction interactive input data stream, the multiple processing instructions can be executed sequentially.
[0089] Specifically, the terminal obtains a runtime instance object corresponding to the application base package, and accesses the instruction interaction input data stream corresponding to the application base package through the runtime instance object, thereby adding at least one file soft link creation instruction to the instruction interaction input data stream.
[0090] Furthermore, during the execution of the application base package, the terminal executes the instruction interaction input data stream, and sequentially executes at least one file soft link creation instruction included in the instruction interaction input data stream. This allows the terminal to construct a file soft link for each same-level native library file based on the base library cache path and the native file cache path. This soft link is used to link from the base library cache path to the native file cache path when loading the same-level native library file and accessing the base library cache path of the application base package, so as to obtain the same-level native library file from the native file cache path.
[0091] In this scenario, when using the dynamic loading component of the application's base package to load native library files at the same level, due to the limitations of the dynamic loading framework provided by the application, it can usually only access the base library cache path of the application's base package, and cannot directly access the native file cache path of the native library files at the same level. Therefore, the terminal obtains the base library cache path of the application's base package and the native file cache path of the native library files at the same level, and constructs a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library files at the same level. Thus, by accessing the file soft link, the base library cache path is linked to the native file cache path. Therefore, when loading native library files at the same level and accessing the base library cache path of the application's base package, the link is established from the base library cache path to the native file cache path to obtain the native library files at the same level from the native file cache path.
[0092] In one exemplary embodiment, such as Figure 9 As shown, a complete process for constructing a file symbolic link is provided, refer to... Figure 9 It can be seen that the overall process of creating a file symbolic link includes:
[0093] 1) Access the base library cache path of the application's base package, load the list of native library file identifiers stored in the base library cache path, and obtain at least one native library file identifier from the list of native library file identifiers.
[0094] 2) Determine the native file cache path corresponding to at least one native library file at the same level. Based on the base library cache path and the native file cache path corresponding to at least one native library file at the same level, construct file symbolic link creation instructions corresponding to at least one native library file at the same level.
[0095] The specific command for creating a symbolic link can be a shell command under the operating system. The shell command used to create a symbolic link is 'ln -n source_file_path target_file_path'.
[0096] 3) Obtain the runtime instance object corresponding to the application base package, and access the instruction interaction input data stream corresponding to the application base package through the runtime instance object, and add multiple instruction interaction input data streams to the instruction interaction input data stream.
[0097] Specifically, the Runtime object of the current application (i.e., the runtime instance object, which can access system resources related to the application and perform operations related to the runtime environment) can be obtained through the Runtime methods provided by the terminal (i.e., methods used to perform operations related to the Java Virtual Machine and operating system, such as obtaining system resources and executing external commands).
[0098] Furthermore, by utilizing the Runtime object, the instruction interaction input data stream corresponding to the application's base package is accessed, that is, the input / output stream used to interact with the system shell is accessed, and multiple instruction interaction input data streams are added to the instruction interaction input data stream, that is, shell commands are input to the input / output stream for interaction with the system shell.
[0099] 4) During the execution of the application base package, the instruction interaction input data stream is executed, and the file symbolic link creation instructions in the instruction interaction input data stream are executed in sequence. For each native library file at the same level, a file symbolic link is built based on the base library cache path and the native file cache path, until all native library files at the same level have had file symbolic links created and there are no remaining native library files at the same level.
[0100] In this embodiment, by accessing the base library cache path of the application's base package, a list of same-layer native library file identifiers stored in the base library cache path is loaded to obtain at least one same-layer native library file identifier from the list. Based on the at least one same-layer native library file identifier, the corresponding native file cache path for each of the at least one same-layer native library file is determined. Thus, based on the base library cache path and the corresponding native file cache path for each of the at least one same-layer native library file, a file soft link creation instruction corresponding to each of the at least one same-layer native library file can be constructed. By sequentially executing at least one file soft link creation instruction, a file soft link is constructed for each same-layer native library file based on the base library cache path and the native file cache path. Subsequently, by accessing the file soft link, the base library cache path can be linked to the native file cache path, and the same-layer native library file can be obtained from the native file cache path. This solves the problem that, traditionally, due to the limitations of the dynamic loading framework provided by the application, the native file cache path of the same-layer native library file cannot be directly accessed, resulting in unsuccessful loading of same-layer components and unusable same-layer functions. Thus, by loading the same-layer native library file, same-layer extended functions can be provided to the user, improving the development and application efficiency of application extended functions.
[0101] In one exemplary embodiment, such as Figure 10 As shown, the steps for generating a same-layer library file package that matches the same-layer component extension package include steps S1002 to S1006. Wherein:
[0102] Step S1002: Based on the same-layer component identifier, determine the same-layer extended function corresponding to the same-layer component extension package, and obtain at least one same-layer native library file that matches the same-layer extended function.
[0103] Specifically, if the terminal detects a same-layer component loading request during the operation of the application base package, it determines the same-layer component identifier corresponding to the same-layer component loading request, and determines the same-layer extended function corresponding to the same-layer component extension package based on the same-layer component identifier. For example, if the same-layer component identifier corresponding to the same-layer component loading request represents a mini-program component of the communication application, then the same-layer extended function corresponding to the mini-program component of the communication application specifically includes mini-game function, shopping function, and music playback function, etc.
[0104] In this process, after identifying the same-layer extended functions corresponding to the same-layer component extension package, at least one same-layer native library file matching the same-layer extended functions is further obtained. For example, at least one same-layer native library file matching the same-layer extended functions corresponding to the mini-program components of the communication application, including at least one same-layer native library file corresponding to each of the mini-game functions, shopping functions, and music playback functions.
[0105] Step S1004: Generate a configuration file corresponding to the extension package of the component in the same layer based on at least one native library file in the same layer.
[0106] Specifically, after obtaining at least one native library file at the same level, the file name and file content corresponding to each of the at least one native library file at the same level are obtained, and the file attribute information corresponding to each of the at least one native library file at the same level is determined based on the file content corresponding to each of the at least one native library file at the same level.
[0107] The file attribute information can specifically be the file hash value corresponding to the native library file at the same level. It can be obtained by hashing the file content of the native library file at the same level. The file hash value is used to verify the file content to determine whether the file content has been tampered with during the operation of the application base package.
[0108] Furthermore, the terminal can generate a configuration file corresponding to the same-layer component extension package based on the file name and file attribute information of at least one same-layer native library file. That is, the configuration file specifically contains the file name of at least one same-layer native library file and the file hash value corresponding to each of the at least one same-layer native library file.
[0109] Step S1006: Construct a pre-built same-layer library file, and store the configuration file and at least one same-layer native library file into the pre-built same-layer library file to obtain a same-layer library file package that matches the same-layer component extension package.
[0110] Specifically, for each native library file in the same layer, the terminal pre-builds a pre-built native library file for storing the file, so as to store the configuration file and at least one native library file in the pre-built native library file. Then, the pre-built native library file containing the configuration file and at least one native library file in the same layer is packaged to obtain a native library file package that matches the native library package of the same layer component.
[0111] Among them, the pre-set storage locations are set for configuration files and native library files in the same layer. These include a first preset location set for configuration files to store configuration file information corresponding to the configuration file, and a second preset location set for native library files in the same layer to store at least one native library file in the same layer.
[0112] Furthermore, the terminal obtains the configuration file information corresponding to the configuration file, stores the configuration file information corresponding to the configuration file in a first preset location corresponding to the preset same-layer library file, and stores at least one same-layer native library file in a second preset location of the preset same-layer library file, thereby obtaining a same-layer library file package that matches the same-layer component extension package.
[0113] In an exemplary embodiment, storing at least one native library file at the same level into a second preset location for preset library files at the same level includes:
[0114] Obtain the file length corresponding to at least one native library file at the same level; for each native library file at the same level, determine the content storage location corresponding to the file length, file name, and file content of the native library file at the same level in the second preset location; store the file length, file name, and file content corresponding to the native library file at the same level to the content storage location in the second preset location respectively.
[0115] Specifically, when the terminal stores each of the at least one same-level native library files into a second preset location of the preset same-level library files, it needs to further determine the file length, file name, and content storage location of each same-level native library file based on the second preset location.
[0116] Furthermore, after determining the corresponding content storage locations for the file length, file name, and file content of the same-layer native library file in the second preset location of the preset same-layer library file, for example, after determining the file length storage location, file name storage location, and file content storage location in the second preset location, the file length, file name, and file content of the same-layer native library file are respectively stored in the file length storage location, file name storage location, and file content storage location in the second preset location.
[0117] In one exemplary embodiment, such as Figure 11 As shown, a schematic diagram of a pre-built library file at the same level is provided. Figure 11 It can be seen that the pre-built same-level library files store configuration files and same-level native library files, and the configuration files correspond to... Figure 11 The library file information includes the filename of the native library file at the same level, as well as the file hash value corresponding to the native library file at the same level. The native library file at the same level specifically includes... Figure 11 The library files are numbered 1 to n, and each native library file at the same level includes specific information such as file length, file name, and file content.
[0118] The configuration file contains the filenames and hash values of the native library files at the same level. The file hash value is used to verify whether the file has been tampered with. The configuration file is part of the pre-built native library files and is located in the interval from the beginning to byte 4096 of the pre-built native library files. That is, the configuration file occupies a fixed length in the pre-built native library files, with a length range of 0-4096 bytes. The native library files at the same level are stored from byte 4097 to the end of the file. The native library files at the same level are organized in the following manner: file length (4 bytes) - filename (32 bytes) - file content (N bytes) and added to the pre-built native library files in the order of "file length - filename - file content".
[0119] For example, if the current same-layer component contains four same-layer native library files (a, b, c, and d), when packaging the same-layer library file package for storage in the resource file cache path, firstly, the file hash value corresponding to each file needs to be calculated based on the file content of the four same-layer native library files (a, b, c, and d), and the file name and file hash value are written into a new configuration file. Secondly, by constructing a pre-built same-layer library file for storing the files, the bytecode data of the configuration file is read, i.e., the configuration file information of the configuration file is obtained, and the configuration file information is filled into positions 0-4096 of the pre-built same-layer library file. Thirdly, the file length, file name, and file content of the four same-layer native library files (a, b, c, and d) are read sequentially, and the file length, file name, and file content are written sequentially into the content storage location pre-set for the same-layer native library file in the pre-built same-layer library file.
[0120] Optionally, for a native library file 'a' at the same level, with a file length of 1024 bytes and the file name 'a', the file length information of native library file 'a' is stored in bytes 4096-4100 of the pre-defined native library file, the name information of native library file 'a' is stored in bytes 4101-4032 of the pre-defined native library file, and the content of native library file 'a' is stored in the storage range of bytes 4033-(4032+1024). The storage method for native library files 'b', 'c', and 'd' at the same level is similar to that for native library file 'a', with their respective storage locations following the same pattern, ultimately resulting in a package of native library files at the same level.
[0121] In an exemplary embodiment, after obtaining a same-layer library file package that matches the same-layer component extension package, a same-layer component extension package that matches the same-layer component identifier is generated based on the same-layer library file package, the extension component, and the resource file corresponding to the same-layer library file package.
[0122] Specifically, the same-layer component extension package provided by the same-layer resource processing method in this application includes traditional resource files (i.e., resource files corresponding to the same-layer library file package), and extension components. It also includes a same-layer library file package obtained by packaging the native library files of the same-layer component implementation library. Based on the same-layer library file package, extension components, and resource files corresponding to the same-layer library file package, a same-layer component extension package matching the same-layer component identifier can be generated. The same-layer library file package contains all the implementation native library files of the same-layer components, without having to store them separately in the libs directory in the traditional way, thus avoiding the situation where the native library files cannot be accessed.
[0123] In one exemplary embodiment, after the terminal downloads and installs the same-layer component extension package that matches the same-layer component identifier from the server, it needs to further obtain the same-layer library file package that matches the same-layer component extension package and store the same-layer library file package in the installation path of the same-layer component extension package. This allows the terminal to obtain the same-layer library file package based on the installation path of the same-layer component extension package when the same-layer component needs to be loaded. Specifically, this involves constructing a resource file cache path corresponding to the same-layer library file package under the installation path of the same-layer component extension package and storing the same-layer library file package in the resource file cache path.
[0124] In this embodiment, based on the same-layer component identifier, the same-layer extended function corresponding to the same-layer component extension package is determined, and at least one same-layer native library file matching the same-layer extended function is obtained. Based on at least one same-layer native library file, a configuration file corresponding to the same-layer component extension package is generated, thereby constructing a pre-set same-layer library file. The configuration file and at least one same-layer native library file are stored in the pre-set same-layer library file, resulting in a same-layer library file package matching the same-layer component extension package. This achieves the construction of a same-layer library file package corresponding to the same-layer component extension package based on at least one same-layer native library file and the configuration file. Therefore, after installing the same-layer component extension package, the constructed same-layer library file package can be stored in the resource file cache path under the installation path of the same-layer component extension package, without having to download the same-layer library file package and the same-layer component extension package to the terminal at the same time. When the same-layer component needs to be loaded, the same-layer library file package matching the same-layer component extension package can be read directly by accessing the resource file cache path, reducing the application's installation package size and resource consumption.
[0125] In one exemplary embodiment, such as Figure 12 As shown, a method for processing resources at the same level is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps S1201 to S1218. Wherein:
[0126] Step S1201: Install and run the application base package. If a same-layer component loading request is detected during the running of the application base package, determine the same-layer component identifier corresponding to the same-layer component loading request.
[0127] Specifically, the user can trigger an application installation request based on the terminal. After detecting the application installation request, the terminal obtains the application identifier (or application name) corresponding to the application installation request, downloads the application base package that matches the application identifier from the server, and installs and runs the downloaded application base package.
[0128] Step S1202: Based on the same-layer component identifier, determine the same-layer extended function corresponding to the same-layer component extension package, and obtain at least one same-layer native library file that matches the same-layer extended function.
[0129] Specifically, if the terminal detects a same-layer component loading request during the operation of the application base package, it determines the same-layer component identifier corresponding to the same-layer component loading request, and determines the same-layer extended function corresponding to the same-layer component extension package based on the same-layer component identifier, and further obtains at least one same-layer native library file that matches the same-layer extended function, such as at least one same-layer native library file that matches the same-layer extended function corresponding to the mini-program component of the communication application.
[0130] Step S1203: Obtain the file name and file content corresponding to each of the at least one native library file at the same level, and determine the file attribute information corresponding to each of the at least one native library file at the same level based on the file content corresponding to each of the at least one native library file at the same level.
[0131] Specifically, after obtaining at least one native library file at the same level, the terminal acquires the file name and file content corresponding to each of the at least one native library file at the same level, and determines the file attribute information corresponding to each of the at least one native library file at the same level based on the file content. The file attribute information may specifically be the file hash value corresponding to the native library file at the same level, which can be obtained by hashing the file content of the native library file at the same level.
[0132] Step S1204: Generate a configuration file corresponding to the same-layer component extension package based on the file name and file attribute information of at least one same-layer native library file.
[0133] Specifically, the terminal can generate a configuration file corresponding to the same-layer component extension package based on the file name and file attribute information of at least one same-layer native library file. That is, the configuration file specifically includes the file name of at least one same-layer native library file and the file hash value corresponding to each of the at least one same-layer native library file.
[0134] Step S1205: Construct a preset library file at the same level, obtain the configuration file information corresponding to the configuration file, and store the configuration file information corresponding to the configuration file in the first preset location corresponding to the preset library file at the same level.
[0135] Specifically, for each native library file at the same level, the terminal pre-builds a preset library file for storing files, so as to store the configuration file and at least one native library file at the same level into the preset library file. Specifically, the terminal obtains the configuration file information corresponding to the configuration file and determines a first preset location in the preset library file for storing the configuration file, so as to store the configuration file information corresponding to the configuration file into the first preset location corresponding to the preset library file.
[0136] Step S1206: Obtain the file length corresponding to at least one native library file at the same level. For each native library file at the same level, determine the content storage location corresponding to the file length, file name, and file content of the native library file at the same level in the second preset location of the native library file at the same level.
[0137] Specifically, when the terminal stores each of the at least one same-level native library files into a preset second preset location for the same-level native library files, it needs to further determine the file length, file name, and content storage location of each same-level native library file based on the second preset location. Specifically, this includes the file length storage location, the file name storage location, and the file content storage location.
[0138] Step S1207: Store the file length, file name and file content of each native library file in the same layer to the content storage location in the second preset location to obtain the same layer library file package that matches the same layer component extension package.
[0139] Specifically, after determining the file length storage location, file name storage location, and file content storage location of the same-layer native library file in the second preset location, the terminal stores the corresponding file length, file name, and file content of each same-layer native library file in the file length storage location, file name storage location, and file content storage location in the second preset location, respectively, to obtain the same-layer library file package that matches the same-layer component extension package.
[0140] Step S1208: Download and install the same-layer component extension package that matches the same-layer component identifier.
[0141] Specifically, during the execution of the application base package on the terminal, the use of objects can trigger a same-layer component loading request. The terminal can parse the same-layer component loading request by calling the dynamic loading component of the application base package to determine the same-layer component identifier corresponding to the same-layer component loading request. Then, by calling the dynamic loading component of the application base package, the terminal can download the same-layer component extension package that matches the same-layer component identifier from the server according to the same-layer component identifier, and install the same-layer component extension package.
[0142] Step S1209: Based on the installation path of the same-layer component extension package, determine the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package.
[0143] Specifically, the terminal pre-builds a resource file cache path corresponding to the same-layer library file package of the same-layer component extension package based on the installation path of the same-layer component extension package, and stores the same-layer library file package matching the same-layer component extension package in the resource file cache path. Then, during the operation of the application base package, if it is necessary to access and load the same-layer library file package, it can determine the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package based on the installation path of the same-layer component extension package, and access the resource file cache path under the installation path of the same-layer component extension package to obtain the same-layer library file package matching the same-layer component extension package.
[0144] Step S1210: Construct a context resource access object through dynamic component loading logic that matches the application base package; access the resource file cache path through the context resource access object; and read the same-layer library file package that matches the same-layer component extension package.
[0145] Specifically, during the operation of the application base package, if it is necessary to access and load the same-layer library file package, and the dynamically loaded component of the application base package cannot directly access the installation path of the same-layer component extension package, the terminal can construct a context resource access object by calling the dynamic component loading logic matched by the application base package, and access the resource file cache path by calling the context resource access object, so as to read the same-layer library file package that matches the same-layer component extension package from the resource file cache path.
[0146] Step S1211: Decompress the same-layer library file package to obtain the same-layer native library file that matches the same-layer component extension package.
[0147] Specifically, the terminal decompresses the same-layer library file package according to the preset decompression logic corresponding to the dynamically loaded component, and obtains the same-layer native library file that matches the same-layer component extension package.
[0148] Step S1212: Access the base library cache path of the application base package, load the list of same-level native library file identifiers stored in the base library cache path, and obtain at least one same-level native library file identifier from the list of same-level native library file identifiers.
[0149] Specifically, after obtaining the native library files of the same layer that match the extension package of the same layer component, the terminal obtains the file identifiers of each native library file of the same layer, constructs a list of native library file identifiers of the same layer based on each file identifier, and stores the list of native library file identifiers of the same layer in the base library cache path of the application base package. Then, by accessing the base library cache path of the application base package, the terminal can load the list of native library file identifiers of the same layer stored in the base library cache path, and by loading the list of native library file identifiers of the same layer, it can obtain at least one native library file identifier of the same layer in the list of native library file identifiers of the same layer.
[0150] Step S1213: Determine the native file cache path corresponding to each of the at least one native library file at the same level based on the identifier of at least one native library file at the same level.
[0151] Specifically, for each of the at least one same-level native library files, the terminal determines the native file cache path of the same-level native library file corresponding to the same-level native library file based on the association between the same-level native library file identifier and the native file cache path, thereby obtaining the native file cache path corresponding to each of the at least one same-level native library files.
[0152] Step S1214: Based on the base library cache path and the native file cache path corresponding to at least one native library file at the same level, construct file symbolic link creation instructions corresponding to at least one native library file at the same level.
[0153] Specifically, the terminal obtains the base library cache path of the application base package, and for each of the at least one same-level native library files, constructs a file soft link creation instruction corresponding to the same-level native library file based on the base library cache path and the native file cache path of the same-level native library file, thereby constructing file soft link creation instructions corresponding to each of the at least one same-level native library file.
[0154] Step S1215: Obtain the runtime instance object corresponding to the application base package, access the instruction interaction input data stream corresponding to the application base package through the runtime instance object, and add at least one file symbolic link creation instruction to the instruction interaction input data stream.
[0155] Specifically, the terminal obtains a runtime instance object corresponding to the application base package, and accesses the instruction interaction input data stream corresponding to the application base package through the runtime instance object, thereby adding at least one file soft link creation instruction to the instruction interaction input data stream.
[0156] Step S1216: By executing the instruction interactive input data stream, at least one file soft link creation instruction is executed sequentially. For each native library file at the same level, a file soft link is constructed based on the base library cache path and the native file cache path.
[0157] Specifically, during the execution of the application base package, the terminal executes the instruction interaction input data stream, and sequentially executes at least one file soft link creation instruction included in the instruction interaction input data stream, thereby constructing a file soft link for each native library file at the same level based on the base library cache path and the native file cache path.
[0158] Step S1217: Access the file symbolic link, link from the base library cache path to the native file cache path, obtain the same-level native library file from the native file cache path, execute the same-level component loading logic, and load the same-level native library file.
[0159] Specifically, when loading native library files at the same level, the terminal starts from the base library cache path of the application's base package, accesses file symbolic links, links from the base library cache path to the native file cache path, accesses the native file cache path, and obtains native library files at the same level from the native file cache path.
[0160] Step S1218: If the native library file at the same level is successfully loaded, start the same-level extension function of the application base package, and when a same-level resource processing request is received, call the same-level extension function through the business processing logic of the application base package to perform same-level resource processing.
[0161] Specifically, when the native library file at the same layer is successfully loaded, the terminal will activate the same-layer extension function of the application base package. When it receives a same-layer resource processing request triggered by the user, it will call the same-layer extension function of the application base package, such as the audio and video call function, according to the business processing logic of the application base package, such as the audio and video business processing logic of the communication application, to perform same-layer resource processing. That is, while the communication application is exchanging information, it will synchronously provide audio and video call function to the user and perform same-layer rendering processing on the audio and video data.
[0162] In one exemplary embodiment, such as Figure 13 As shown, a process for dynamically loading components at the same layer based on the application's base package is provided, referencing... Figure 13It can be seen that the process of dynamically loading components at the same level based on the application's base package specifically includes:
[0163] 1) The terminal downloads the application's basic installation package from the server. This package integrates logic for downloading same-layer components and dynamic package loading. 2) During the execution of the basic installation package, the logic for downloading same-layer components for the extended package is triggered. Specifically, this could involve triggering dynamic loading logic for some mini-programs containing same-layer component tags (such as the video tag) while using the basic installation package and experiencing the mini-program. 3) By calling the same-layer component download logic of the basic installation package, the extended package containing the same-layer components is downloaded from the server. 4) By calling the dynamic package loading logic of the basic installation package, the dynamic package is parsed to obtain the same-layer component package, which is then parsed to obtain the original library files of the same-layer components. 5) By creating a symbolic link, the cache path of the original library files in the same-layer component package is linked to the cache path of the basic installation package's base library. This allows the dynamic loading capability of the basic installation package to link to the cache path of the original library files when accessing the base library cache path, thus retrieving the original library files from the cache path. 6) Execute the same-layer component loading logic, load the native library file, and if the same-layer native library file is successfully loaded, start the same-layer extension function of the application base package.
[0164] In the above-mentioned same-layer resource processing method, by installing and running the application base package, if a same-layer component loading request is detected during the running of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed, so as to provide the same-layer extended functions corresponding to the same-layer component extension package to the user during the running of the application base package. Furthermore, by obtaining the native library file of the same layer that matches the extension package of the same layer component, and constructing a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library file of the same layer, a link can be accessed to link from the base library cache path to the native file cache path to obtain the native library file of the same layer. This solves the problem that in the traditional way, when loading component content to provide same-layer extension functions through same-layer components, it is impossible to directly access the path of the same-layer extension library where the dynamic component content is located, which leads to the failure to successfully load and access the dynamic component content of the same-layer component. Instead, it uses the dynamic loading framework provided by the application to directly load and execute the loading logic of the same-layer component and load the native library file of the same layer through accessing the file soft link to provide same-layer extension functions to the user object, thereby improving the development and application efficiency of application extension functions.
[0165] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0166] Based on the same inventive concept, this application also provides a same-layer resource processing apparatus for implementing the same-layer resource processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more same-layer resource processing apparatus embodiments provided below can be found in the limitations of the same-layer resource processing method described above, and will not be repeated here.
[0167] In one exemplary embodiment, such as Figure 14 As shown, a same-layer resource processing device is provided, including: an application base package runtime module 1402, a same-layer component extension package installation module 1404, a file soft link building module 1406, and a same-layer native library file loading module 1408, wherein:
[0168] The application base package runtime module 1402 is used to install and run the application base package; the same-layer component extension package installation module 1404 is used to determine the same-layer component identifier corresponding to the same-layer component loading request if a same-layer component loading request is detected during the operation of the application base package, and download and install the same-layer component extension package matching the same-layer component identifier; the file soft link construction module 1406 is used to obtain the same-layer native library file matching the same-layer component extension package, and construct the file soft link based on the base library cache path of the application base package and the native file cache path of the same-layer native library file; the same-layer native library file loading module 1408 is used to access the file soft link, link from the base library cache path to the native file cache path, obtain the same-layer native library file from the native file cache path, execute the same-layer component loading logic, and load the same-layer native library file.
[0169] In the aforementioned same-layer resource processing device, by installing and running the application base package, if a same-layer component loading request is detected during the operation of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed, so as to provide the same-layer extended functions corresponding to the same-layer component extension package to the user during the operation of the application base package. Furthermore, by obtaining the native library file of the same layer that matches the extension package of the same layer component, and constructing a file soft link based on the base library cache path of the application's base package and the native file cache path of the native library file of the same layer, a link can be accessed to link from the base library cache path to the native file cache path to obtain the native library file of the same layer. This solves the problem that in the traditional way, when loading component content to provide same-layer extension functions through same-layer components, it is impossible to directly access the path of the same-layer extension library where the dynamic component content is located, which leads to the failure to successfully load and access the dynamic component content of the same-layer component. Instead, it uses the dynamic loading framework provided by the application to directly load and execute the loading logic of the same-layer component and load the native library file of the same layer through accessing the file soft link to provide same-layer extension functions to the user object, thereby improving the development and application efficiency of application extension functions.
[0170] In an exemplary embodiment, the file soft link building module is further configured to: obtain a same-layer library file package matching the same-layer component extension package based on the installation path of the same-layer component extension package; and decompress the same-layer library file package to obtain the same-layer native library file matching the same-layer component extension package.
[0171] In an exemplary embodiment, the file soft link building module is further configured to: determine the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package based on the installation path of the same-layer component extension package.
[0172] In an exemplary embodiment, the file soft link building module is further configured to: construct a context resource access object through dynamic component loading logic matching the application base package; access the resource file cache path through the context resource access object and read the same-layer library file package matching the same-layer component extension package; and decompress the same-layer library file package according to the preset decompression logic corresponding to the dynamically loaded component to obtain the same-layer native library file matching the same-layer component extension package.
[0173] In an exemplary embodiment, the file symbolic link building module is further configured to: access the base library cache path of the application base package, load the list of same-level native library file identifiers stored in the base library cache path, and obtain at least one same-level native library file identifier from the list of same-level native library file identifiers; determine the native file cache path corresponding to each of the at least one same-level native library file based on the at least one same-level native library file identifier; construct file symbolic link creation instructions corresponding to each of the at least one same-level native library file based on the base library cache path and the native file cache path corresponding to each of the at least one same-level native library file; and execute at least one file symbolic link creation instruction in sequence to construct a file symbolic link for each same-level native library file based on the base library cache path and the native file cache path.
[0174] In an exemplary embodiment, the file symbolic link building module is further configured to: obtain a runtime instance object corresponding to the application base package; access the instruction interaction input data stream corresponding to the application base package through the runtime instance object; add at least one file symbolic link creation instruction to the instruction interaction input data stream; and execute at least one file symbolic link creation instruction sequentially by executing the instruction interaction input data stream, and build a file symbolic link for each native library file at the same level based on the base library cache path and the native file cache path.
[0175] In an exemplary embodiment, a same-layer resource processing apparatus is provided, further comprising a same-layer component extension package generation module, configured to: determine a same-layer extended function corresponding to the same-layer component extension package based on a same-layer component identifier, and obtain at least one same-layer native library file matching the same-layer extended function; generate a configuration file corresponding to the same-layer component extension package based on the at least one same-layer native library file; construct a preset same-layer library file, and store the configuration file and at least one same-layer native library file in the preset same-layer library file to obtain a same-layer library file package matching the same-layer component extension package; and generate a same-layer component extension package matching the same-layer component identifier based on the same-layer library file package, the extended component, and the resource file corresponding to the same-layer library file package.
[0176] In an exemplary embodiment, the same-layer component extension package generation module is further configured to: obtain the file name and file content corresponding to each of the at least one same-layer native library file; determine the file attribute information corresponding to each of the at least one same-layer native library file based on the file content corresponding to each of the at least one same-layer native library file; and generate a configuration file corresponding to the same-layer component extension package based on the file name and file attribute information corresponding to each of the at least one same-layer native library file.
[0177] In an exemplary embodiment, the same-layer component extension package generation module is further configured to: obtain configuration file information corresponding to the configuration file, store the configuration file information corresponding to the configuration file in a first preset location corresponding to the preset same-layer library file, and store at least one same-layer native library file in a second preset location of the preset same-layer library file, thereby obtaining a same-layer library file package matching the same-layer component extension package.
[0178] In an exemplary embodiment, the same-layer component extension package generation module is further configured to: obtain the file length corresponding to at least one same-layer native library file; for each same-layer native library file, determine the content storage location corresponding to the file length, file name, and file content of the same-layer native library file in a preset second preset location; and store the file length, file name, and file content corresponding to the same-layer native library file to the content storage location in the second preset location.
[0179] In one exemplary embodiment, a same-layer resource processing apparatus is provided, which further includes a same-layer extended function calling module, used to: start the same-layer extended function of the application base package when the same-layer native library file is successfully loaded; and when a same-layer resource processing request is received, call the same-layer extended function through the business processing logic of the application base package to perform same-layer resource processing.
[0180] Each module in the aforementioned same-layer resource processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0181] In one exemplary embodiment, a computer device is provided, which can be a terminal or a server. Taking the computer device as a terminal as an example, its internal structure diagram can be as follows: Figure 15As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for processing resources at the same level. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0182] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0183] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0184] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0185] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0186] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0187] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0188] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this application. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for processing resources at the same level, characterized in that, The method includes: Install and run the application base package; If a same-layer component loading request is detected during the operation of the application base package, the same-layer component identifier corresponding to the same-layer component loading request is determined, and the same-layer component extension package matching the same-layer component identifier is downloaded and installed. Obtain the native library file at the same level that matches the extension package of the component at the same level, and construct a soft link for the file based on the base library cache path of the application base package and the native file cache path of the native library file at the same level; Access the file symbolic link, link from the base library cache path to the native file cache path, obtain the same-level native library file from the native file cache path, execute the same-level component loading logic, and load the same-level native library file.
2. The method according to claim 1, characterized in that, The step of obtaining the same-layer native library file that matches the same-layer component extension package includes: Based on the installation path of the same-layer component extension package, obtain the same-layer library file package that matches the same-layer component extension package; The same-layer library file package is decompressed to obtain the same-layer native library file that matches the same-layer component extension package.
3. The method according to claim 2, characterized in that, The step of obtaining a corresponding library file package based on the installation path of the same-layer component extension package includes: Based on the installation path of the same-layer component extension package, determine the resource file cache path corresponding to the same-layer library file package of the same-layer component extension package; Obtain the same-layer library file package that matches the same-layer component extension package from the resource file cache path.
4. The method according to claim 3, characterized in that, From the resource file cache path, obtain the same-layer library file package that matches the same-layer component extension package, including: A context resource access object is constructed using dynamic component loading logic that matches the application's base package; Access the resource file cache path through the context resource access object, and obtain the same-layer library file package that matches the same-layer component extension package from the resource file cache path.
5. The method according to any one of claims 1 to 4, characterized in that, The construction of symbolic links based on the base library cache path of the application's base package and the native file cache path of the native library files at the same level includes: Access the base library cache path of the application base package, load the list of same-level native library file identifiers stored in the base library cache path, and obtain at least one same-level native library file identifier from the list of same-level native library file identifiers. Based on the identifier of the at least one native library file at the same level, determine the native file cache path corresponding to each of the at least one native library file at the same level; Based on the base library cache path and the native file cache path corresponding to each of the at least one native library file at the same level, construct file soft link creation instructions corresponding to each of the at least one native library file at the same level. At least one file symbolic link creation instruction is executed sequentially. For each native library file at the same level, a file symbolic link is constructed based on the base library cache path and the native file cache path.
6. The method according to claim 5, characterized in that, The step of sequentially executing at least one file symbolic link creation instruction, and constructing a file symbolic link for each native library file at the same level based on the base library cache path and the native file cache path, includes: Obtain the runtime instance object corresponding to the application base package, and access the instruction interaction input data stream corresponding to the application base package through the runtime instance object; Add the at least one file symbolic link creation instruction to the instruction interactive input data stream; By executing the instruction interactive input data stream, at least one file symbolic link creation instruction is executed sequentially. For each native library file at the same level, a file symbolic link is constructed based on the base library cache path and the native file cache path.
7. The method according to any one of claims 1 to 4, characterized in that, Generate a library file package that matches the same-layer component extension package, including: Based on the same-layer component identifier, determine the same-layer extended function corresponding to the same-layer component extension package, and obtain at least one same-layer native library file that matches the same-layer extended function; Based on the at least one native library file at the same layer, generate a configuration file corresponding to the extension package of the component at the same layer; A pre-built same-layer library file is constructed, and the configuration file and the at least one same-layer native library file are stored in the pre-built same-layer library file to obtain a same-layer library file package that matches the same-layer component extension package.
8. The method according to claim 7, characterized in that, The step of generating a configuration file corresponding to the same-layer component extension package based on the at least one same-layer native library file includes: Obtain the file name and file content corresponding to each of the at least one native library file at the same level; Based on the file content corresponding to each of the at least one native library file at the same level, determine the file attribute information corresponding to each of the at least one native library file at the same level; Based on the file name and file attribute information of each of the at least one native library file in the same layer, a configuration file corresponding to the extension package of the component in the same layer is generated.
9. The method according to claim 7, characterized in that, The step of storing the configuration file and the at least one native library file at the same layer into the preset library file at the same layer to obtain a library file package at the same layer that matches the extension package of the component at the same layer includes: Obtain the configuration file information corresponding to the configuration file, store the configuration file information corresponding to the configuration file in a first preset location corresponding to the preset same-layer library file, and store the at least one same-layer native library file in a second preset location of the preset same-layer library file, thereby obtaining a same-layer library file package that matches the same-layer component extension package.
10. The method according to claim 9, characterized in that, The step of storing the at least one same-level native library file into the second preset location of the preset same-level library file includes: Obtain the file length of each of the at least one native library file at the same level; For each native library file at the same level, in the second preset location of the preset native library file at the same level, determine the content storage location corresponding to the file length, file name and file content of the native library file at the same level. The file length, file name, and file content of each of the same-layer native library files are stored in the content storage location in the second preset location.
11. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If the same-level native library file is successfully loaded, the same-level extension function of the application base package is started; Upon receiving a request for processing resources at the same layer, the application base package's business processing logic is used to invoke the extended function at the same layer to process the resources at the same layer.
12. A same-layer resource processing device, characterized in that, The device includes: The application base package runtime module is used to install and run the application base package; The same-layer component extension package installation module is used to determine the same-layer component identifier corresponding to the same-layer component loading request if a same-layer component loading request is detected during the operation of the application base package, and to download and install the same-layer component extension package that matches the same-layer component identifier. The file symbolic link building module is used to obtain the native library file of the same layer that matches the extension package of the same layer component, and build a file symbolic link based on the base library cache path of the application base package and the native file cache path of the native library file of the same layer. The same-layer native library file loading module is used to access the file soft link, link from the basic library cache path to the native file cache path, obtain the same-layer native library file from the native file cache path, execute the same-layer component loading logic, and load the same-layer native library file.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
