A code file loading method and device, electronic equipment and storage medium

By storing code files named with functional identifier information in a static file server and intercepting modification network requests, flexible loading of code files is achieved, solving the problems of loading complexity and resource waste in existing technologies, and improving loading efficiency and timeliness.

CN122240111APending Publication Date: 2026-06-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-12-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, the loading process of code files requires collaboration between development and processing equipment, which increases the complexity of the loading process, wastes computing and storage resources, and makes it difficult to guarantee the timeliness of code testing.

Method used

By intercepting the initial network request and modifying it into the target network request, and utilizing code files named with functional identification information stored in the static file server, network request redirection is achieved, allowing for flexible loading of code files for the target business function.

Benefits of technology

It reduces code file loading time and resource consumption, simplifies the loading process, improves code file loading efficiency, and ensures the timeliness of business functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240111A_ABST
    Figure CN122240111A_ABST
Patent Text Reader

Abstract

This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for loading code files. The method involves: responding to a code loading instruction triggered by a management object for a target business function of a specified business, and executing an associated page file; wherein the code loading instruction includes: business identification information of the specified business, and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server; then, the initial network request for obtaining the code file named with the business identification information is intercepted, and the initial network request is modified into a target network request for obtaining the code file named with the function identification information; finally, the target code file corresponding to the target business function stored is loaded from the static file server. This simplifies the code file loading process and improves the efficiency of code file loading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for loading code files. Background Technology

[0002] To test the effectiveness of code development, after the development equipment completes the code development for each candidate business function of the specified business, the processing equipment can load the corresponding code file for the specified business and demonstrate the functional effect of the candidate business function by executing the code file.

[0003] In related technologies, loading code files requires collaboration between development and processing equipment. After determining the target business function to be tested for a specific business, the development equipment compiles the implementation code of the target business function to obtain a code file named according to the business identifier information of the specified business, and publishes the code file to a static file server. Then, the processing equipment executes the associated page file and loads the corresponding code file from the static file server according to the indicated loading path. Similarly, when it is necessary to load code files for other business functions, the development equipment compiles the corresponding implementation code to obtain a code file with the same name, and replaces the code file on the static file server with the newly obtained code file, so that the processing equipment can load code files for other business functions from the static file server.

[0004] However, when the processing device loads code files, the development device needs to assist in the compilation and replacement of the code. This not only increases the complexity of the loading process, but also wastes computing and storage resources, and causes loading delays, making it difficult to guarantee the timeliness requirements of code testing. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for loading code files, in order to improve the loading efficiency of code files.

[0006] Firstly, a method for loading code files is proposed, including:

[0007] In response to a code loading instruction triggered by a managed object for a target business function of a specified business, the associated page file is executed; wherein, the code loading instruction includes: business identification information of the specified business, and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server;

[0008] In each candidate network request to be sent, the initial network request for obtaining a code file named with the service identification information is intercepted, and the initial network request is modified into a target network request for obtaining a code file named with the function identification information.

[0009] The system sends the target network request to the static file server and loads the target code file corresponding to the target business function from the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function of the specified business; each candidate business function includes the target business function.

[0010] Secondly, a code file loading device is proposed, comprising:

[0011] The response unit is used to execute the associated page file in response to a code loading instruction triggered by a management object for a target business function of a specified business; wherein, the code loading instruction includes: business identification information of the specified business and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server;

[0012] The modification unit is used to intercept, among the candidate network requests to be sent, the initial network request for obtaining a code file named with the service identification information, and modify the initial network request into a target network request for obtaining a code file named with the function identification information.

[0013] The loading unit is configured to send the target network request to the static file server and load the target code file corresponding to the target business function stored in the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function of the specified business; each candidate business function includes the target business function.

[0014] Optionally, when the code loading instruction triggered by the management object for a target business function of a specified business is executed, the response unit is used to:

[0015] In response to an operation instruction triggered by a pre-deployed browser plugin by a managed object, an initialized operable interface is presented in the form of a pop-up window; wherein, the initialized operable interface at least presents the business identification information of each candidate business;

[0016] In response to the code loading instruction triggered by the managed object in the operable interface for a target business function belonging to a specified business, the associated page file is executed.

[0017] Optionally, when the initialized operable interface is presented in the form of a pop-up window, the response unit is used to:

[0018] Call the preset information acquisition interface to obtain the business identification information of each candidate business from the data server, as well as the code repository address associated with each business identification information;

[0019] The first area of ​​the operable interface displays the service identification information of each candidate service, and the operable interface is displayed in the form of a pop-up window.

[0020] Optionally, when the managed object executes the associated page file in response to a code loading instruction triggered by a target business function belonging to a specified business in the operable interface, the response unit is used to:

[0021] In response to the selection operation triggered by the management object for a specified business among the candidate businesses, a preset query interface is used to query the candidate business functions belonging to the specified business based on the code repository address of the specified business.

[0022] The second area of ​​the operable interface displays the branch affiliation information of each candidate business function, and executes the associated page file in response to the code loading instruction triggered after the management object selects the target business function.

[0023] Optionally, prior to the operation instruction triggered by the management object for a pre-deployed browser plugin, the device further includes an installation unit, the installation unit being used to:

[0024] The plugin file associated with the browser plugin is installed; the plugin file includes: a pop-up logic script and a background logic script; the pop-up logic script defines information content provided to the background script; the information content is used to describe the business and business function targeted by the code loading instruction; the background logic script defines a detection function for the information content, a variable for storing the information content, an interception function for intercepting network requests, and a replacement function for modifying network requests;

[0025] In the corresponding browser's plugin display area, add a plugin identifier corresponding to the browser plugin; wherein, the plugin identifier is used to activate the browser plugin when it is operated.

[0026] Optionally, when intercepting the initial network request for obtaining a code file named with the service identification information among the candidate network requests to be sent, the modification unit is used to:

[0027] For each candidate network request to be sent, perform the following operations respectively:

[0028] When a candidate network request's Uniform Resource Locator (URL) detects that it contains file information named with the business identification information, the candidate network request is identified as an initial network request for obtaining a code file named with the business identification information, and the initial network request is intercepted.

[0029] Optionally, when the initial network request is modified to a target network request for obtaining a code file named with the function identifier information, the modification unit is used to:

[0030] Using a preset replacement function, the file information named with the service identifier information in the Uniform Resource Locator of the initial network request is adjusted to the file information named with the function identifier information, thereby obtaining the target network request for obtaining the code file named with the function identifier information.

[0031] Optionally, after loading the target code file corresponding to the target business function stored from the file server, the apparatus further includes an execution unit, the execution unit being used for:

[0032] Execute the target code file;

[0033] In response to the operation instruction triggered by the management object based on the target business function, the implementation effect of the target business function is displayed to the management object.

[0034] Optionally, after demonstrating the implementation effect of the target business function to the managed object, the execution unit is further configured to:

[0035] In response to other business functions of the management object for the specified business, a code loading instruction is triggered, and the page file is executed.

[0036] In each network request to be sent, an adjusted network request for obtaining a code file named with the business identification information from the static file server is intercepted, and the adjusted network request is modified into a directed network request for obtaining a code file named with the function identification information of the other implementation method.

[0037] Send the directed network request to the static file server and load the target code file corresponding to the other implementation from the static file server.

[0038] Thirdly, an electronic device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described method when executing the computer program.

[0039] Fourthly, a computer-readable storage medium is proposed, on which a computer program is stored, which, when executed by a processor, implements the above-described method.

[0040] Fifthly, a computer program product is proposed, comprising a computer program that, when executed by a processor, implements the above-described method.

[0041] The beneficial effects of this application are as follows:

[0042] This application proposes a method, apparatus, electronic device, and storage medium for loading code files. It also proposes a method to execute an associated page file in response to a code loading instruction triggered by a management object for a target business function of a specified service. The code loading instruction includes: business identification information of the specified service and function identification information of the target business function. The page file contains a loading path indicating that a code file named after the business identification information is loaded from a static file server. Then, among the candidate network requests to be sent, the initial network request for obtaining the code file named after the business identification information is intercepted, and the initial network request is modified into a target network request for obtaining the code file named after the function identification information. Subsequently, a target network request is sent to the static file server, and the target code file stored for the corresponding target business function is loaded from the static file server. The static file server stores executable code files named after the corresponding function identification information for each candidate business function of the specified service. Each candidate business function contains the target business function.

[0043] In this way, by intercepting and modifying the initial network request to obtain the target network request, the initial network request used to obtain the code file named with the business identifier information can be changed to the target network request used to obtain the code file named with the function identifier information. This is equivalent to achieving network request redirection, solving the pain point of only being able to load code files for one business function from the static file server. Moreover, by leveraging the code files stored separately for each candidate business function in the static file server, code files can be loaded for any target business function selected from the candidate business functions. This allows for flexible and independent loading of code files for any selected target business function within a single environment. This not only reduces code file loading time but also reduces the overall consumption of compilation and storage resources, simplifies the code file loading process, improves code file loading efficiency, and ensures the timeliness of business functions. Attached Figure Description

[0044] Figure 1 This is a schematic diagram illustrating the loading process of code files in the prior art as described in this application embodiment;

[0045] Figure 2 This is a schematic diagram illustrating possible application scenarios in the embodiments of this application;

[0046] Figure 3 This is a schematic diagram illustrating the process of sending code files to a static file server in an embodiment of this application;

[0047] Figure 4 This is a schematic diagram illustrating the code file loading process in an embodiment of this application;

[0048] Figure 5 This is a schematic diagram illustrating the plug-in identifier in an embodiment of this application;

[0049] Figure 6 This is a schematic diagram illustrating the presentation process of the operable interface after initialization in an embodiment of this application.

[0050] Figure 7 This is a schematic diagram illustrating the process of selecting the target business function in the embodiments of this application;

[0051] Figure 8 This is a schematic diagram illustrating the triggering process of the code loading instruction in an embodiment of this application;

[0052] Figure 9 This is a schematic diagram illustrating the process of processing network request modifications within the device in an embodiment of this application;

[0053] Figure 10 This is a schematic diagram of the logical structure of the code file loading device in the embodiments of this application;

[0054] Figure 11 This is a schematic diagram of the hardware structure of an electronic device using an embodiment of this application;

[0055] Figure 12 This is a schematic diagram of the hardware structure of another electronic device using an embodiment of this application. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0057] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0058] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0059] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0060] Browser plugins, also known as browser extensions or add-ons, are small software programs used to add new features to a browser or modify existing features.

[0061] Designated business: refers to a business specified from various selectable candidate businesses. In this application embodiment, for a designated business, there are multiple possible candidate business functions. In some possible implementations, the candidate business functions belonging to the designated business specifically refer to the various possible implementations of the designated business development. For example, for the designated business "login business," there may be multiple candidate business functions, such as SMS verification login and third-party application login. In other possible implementations, the candidate business functions belonging to the designated business refer to various business functions developed for a business product. For example, for the designated business "cloud virtual machine," there may be multiple candidate business functions, such as scanning, automatic scaling, and load balancing.

[0062] Code file: In this embodiment of the application, the loaded code file refers to the executable file compiled from the implementation code of the business function based on the specified business; in this embodiment of the application, the implementation code of different business functions belonging to a business may be developed by different developers on different development devices.

[0063] Managed objects: These are objects that can trigger the loading instruction of code files, specifically product personnel or test personnel.

[0064] Static file server: In this embodiment of the application, it is used to store code files compiled by the development device; or, it is used to store code files compiled by the compilation server after obtaining the implementation code provided by the development device; wherein, the stored code files are named with the functional identification information of the corresponding business function.

[0065] Code loading instruction: This instruction instructs the loading of the executable code for the target business function. The executable code for the target business function is stored in a target code file on a static file server, named according to the function identifier information of the target business function. The executable code for the target business function is compiled from the implementation code of the target business function. Furthermore, by executing the target code file corresponding to the target business function, the managed object can experience the target business function of the specified business.

[0066] The design concept of the embodiments of this application is briefly introduced below:

[0067] To test the effectiveness of code development, after the development equipment completes the code development for each candidate business function of the specified business, the processing equipment can load the corresponding code file for the specified business and demonstrate the functional effect of the candidate business function by executing the code file.

[0068] In the current technology, during the deployment of code files, development equipment can use a source code management system (Git) to maintain different development branches, which are used to develop different business functions. Moreover, it can use automated scripts or continuous integration (CI) tools to build and deploy the code files corresponding to different business functions.

[0069] After deploying a test environment, the processing device can test a specified service. During the test, the browser on the processing device obtains the loading path of the code file by executing the associated page file, enabling it to load the code file named with the service identifier information of the specified service from the corresponding static file server. Then, by executing the code file, the browser on the processing device can display the service function in the service page corresponding to the page file.

[0070] Specifically, during the loading process of code files after the test environment deployment is completed, the collaborative processing of the development device of the development object and the processing device of the management object is relied upon. When the target business function of a specified business needs to be tested, the development device compiles the implementation code of the target business function to obtain a code file named according to the business identification information of the specified business, and publishes the code file to the static file server. Then, the processing device executes the associated page file and loads the corresponding code file from the static file server according to the indicated loading path. Similarly, when it is necessary to load code files for other business functions, the development device compiles the corresponding implementation code to obtain a code file with the same name, and replaces the code file on the static file server with the newly obtained code file, so that the processing device can load code files for other business functions from the static file server.

[0071] See Figure 1 As shown, this is a schematic diagram of the code file loading process in the prior art of this application embodiment. The following is a description of the process in conjunction with the attached diagram. Figure 1 This document explains the loading process of code files involved when managed objects experience both "third-party login" and "SMS verification login" login methods on the processing device after the test environment is deployed:

[0072] Step 101: Development device 1 compiles the implementation code for the third-party login and uploads the resulting login.js file to the static file server.

[0073] Step 102: The processing device requests the login.js file by executing the HTML file of the business page.

[0074] Specifically, it should be understood that the business page includes an area for displaying the login functionality. The HTML file for this business page can be stored on the processing device after environment deployment is complete. Furthermore, the HTML file for the business page configures the address for loading the code file for the login functionality, enabling the `login.js` file to be loaded from a static file server. Subsequently, executing the `login.js` file displays the login functionality on the business page.

[0075] For example, if the developers are creating a login function for a chat application, then the business page could be a webpage used to log in to the chat application.

[0076] Step 103: The static file server sends the login.js file to the processing device.

[0077] Specifically, after the processing device loads the login.js file from the static file server, it can execute the login.js file to enable the third-party login function in the business page.

[0078] Furthermore, when it is necessary to experience the login method of SMS verification, continue to perform the processing of steps 104-106.

[0079] Step 104: Development device 2 compiles the corresponding SMS verification login implementation code, resulting in the login.js file, and sends it to the static file server.

[0080] Specifically, the login.js file sent by development device 2 will replace the login.js file sent by development device 1 on the static file server.

[0081] Step 105: The processing device requests the login.js file by executing the HTML file of the business page.

[0082] Specifically, the related processing is the same as in step 102, and will not be elaborated here.

[0083] Step 106: The static file server sends the login.js file to the processing device.

[0084] Specifically, after the processing device loads the login.js file from the static file server, it can execute the login.js file to experience the SMS verification login function on the business page.

[0085] As can be seen, in the existing loading scheme, due to the loading configuration in the associated page file (i.e., the HTML of the business page), when the business page is rendered, a code file named with the business identification information (such as login) of the specified business is loaded from the static file server. This requires the development equipment to assist in the compilation and replacement of the code when the processing device loads the required code file. Therefore, this not only increases the complexity of the loading process, but also wastes computing and storage resources, and causes loading delays, making it difficult to guarantee the timeliness requirements of code testing.

[0086] In view of this, this application proposes a method, apparatus, electronic device, and storage medium for loading code files, and proposes to execute an associated page file in response to a code loading instruction triggered by a management object for a target business function of a specified service. The code loading instruction includes: business identification information of the specified service and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server; then, among the candidate network requests to be sent, the initial network request for obtaining the code file named with the business identification information is intercepted, and the initial network request is modified into a target network request for obtaining the code file named with the function identification information; subsequently, the target network request is sent to the static file server, and the target code file stored for the corresponding target business function is loaded from the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function of the specified service; each candidate business function contains the target business function.

[0087] In this way, by intercepting and modifying the initial network request to obtain the target network request, the initial network request used to obtain the code file named with the business identifier information can be changed to the target network request used to obtain the code file named with the function identifier information. This is equivalent to achieving network request redirection, solving the pain point of only being able to load code files for one business function from the static file server. Moreover, by leveraging the code files stored separately for each candidate business function in the static file server, code files can be loaded for any target business function selected from the candidate business functions. This allows for flexible and independent loading of code files for any selected target business function within a single environment. This not only reduces code file loading time but also reduces the overall consumption of compilation and storage resources, simplifies the code file loading process, improves code file loading efficiency, and ensures the timeliness of business functions.

[0088] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0089] See Figure 2 The diagram shown illustrates a possible application scenario in this application embodiment. This application scenario diagram includes a processing device 110 and a static file server 120.

[0090] In feasible embodiments of this application, the processing device 110 can present an operable interface to the managed object according to the operation instructions of the managed object, enabling the managed object to select a specified service and a target service function developed for the specified service on the operable interface. Furthermore, the processing device can execute the associated page file according to the code loading instruction triggered by the managed object for the target service function, enabling the sending of a network request to be triggered according to the loading path indicated in the page code file.

[0091] Furthermore, the processing device 110 can intercept the initial network request for obtaining a code file named with the service identification information from among the candidate network requests to be sent, and modify the initial network request into a target network request for obtaining a code file named with the corresponding function identification information. Then, the processing device 110 sends the target network request to the static file server and loads the target code file corresponding to the target service function stored on the static file server.

[0092] It should be noted that, when loading the code file, this application can utilize a deployed browser plugin for processing. This allows the browser plugin to trigger the code loading instruction and intercept and modify the initial network request, enabling the browser on the processing device to load the target code file based on the modified target network request.

[0093] In this embodiment, after the environment deployment is completed, the static file server 120 is used to provide executable code files for the experience of a specified service, so that the processing device 110 can trigger a network request based on the loading path indicated in the page file by executing the associated page file, and by modifying the network request, it can finally load the target code file stored in the corresponding target service function from the static file server 120; moreover, the static file server 120 stores executable code files named with corresponding function identification information for each candidate service function of the specified service. In a feasible implementation, the page file executed in this application can be the same as the code file executed in the prior art, without adjusting the page file.

[0094] In addition, when storing code files, the static file server 120 may, in some feasible implementations, obtain compiled, executable code files named with corresponding functional identification information from each development device and store each code file; in other feasible implementations, when the development device uploads code files by triggering a continuous integration (CI) or continuous deployment / delivery (CD) pipeline, the static file server 120 obtains executable code files named with corresponding functional identification information sent by the CI / CD server and stores each code file.

[0095] See Figure 3 As shown, this is a schematic diagram of the process of sending code files to a static file server in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 3 The process of retrieving code files from a static file server is illustrated below:

[0096] Step 301: The development device responds to the release instruction triggered by the development object based on the developed branch code and commits the branch code to the code repository.

[0097] The development equipment is equipped with a source code management system (such as Git). The development equipment can submit branch code for development through the source code management system according to the operation instructions of the development object. The branch code refers to the implementation code developed for the business function of a specific business. When developing code, it can be processed by building development branches. This application does not impose specific restrictions on the related development process.

[0098] In addition, to ensure that the CI / CD server can detect the submission of branch code, hooks can be deployed in the source code management system so that the development device can trigger the CI pipeline processing after submitting branch code. The specific method of setting up the hook depends on the CI tool and source code management system used. This application does not restrict the relevant setup process. The specific processing involved in the CI pipeline is illustrated in steps 302-306.

[0099] For example, assuming the CI tool used is Jenkins and the source code management system used is Git, then a Git hook can be set up in Jenkins.

[0100] Step 302: After the CI / CD server confirms that the branch code has been committed, it pulls the branch code committed by the development equipment.

[0101] Step 303: The CI / CD server establishes the dependency relationship between the branch code and the code repository.

[0102] Specifically, you can create project dependencies for a branch by running commands such as npm install or yarn install.

[0103] Step 304: The CI / CD server compiles the branch code to obtain a code file named with the business identification information of the specified business.

[0104] Specifically, you can compile branch code by running build commands (such as npm run build or yarn build), thereby generating a compiled static js file, i.e., a code file.

[0105] For example, assuming the business identifier information for a specified business is cvm, then the generated code file would be cvm.js.

[0106] Step 305: The CI / CD server renames the code file to the functional identifier information of the business function.

[0107] Specifically, shell commands or other tools can be used to rename code files named with business identification information.

[0108] For example, assuming the business identifier information for a specified business is cvm, and the business function corresponding to the branch code is XX (or the branch name corresponding to the branch code is XX), then the cvm.js file can be renamed to cvm_XX.js.

[0109] Step 306: The CI / CD server sends a code file named with the function identification information to the static file server.

[0110] Specifically, depending on the actual processing needs, you can use Secure Copy Protocol (SCP), File Transfer Protocol (FTP), or other tools to upload code files.

[0111] Processing devices 110 include, but are not limited to, mobile phones, tablets, laptops, smart home appliances, in-vehicle terminals, and other electronic devices.

[0112] The static file server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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 (Content Delivery Network), and big data and artificial intelligence platforms.

[0113] In this embodiment, the processing device 110 and the static file server 120 can communicate via a wired network or a wireless network. The following description focuses solely on the loading process of the code file from the perspective of the processing device 110.

[0114] The following section provides an illustrative explanation of the code file loading process, considering possible application scenarios:

[0115] Application scenario: Loading the code files of business functions while experiencing them.

[0116] Specifically, the user experience of business functions may occur during the testing phase, the verification phase before official release, or other phases after code development. Based on this, the user experience of business functions can be achieved simply by deploying the corresponding environment for different phases.

[0117] The code file loading process proposed in this application occurs after the environment is deployed. Moreover, after the management object selects a specific business and the target business function under the specified business, the management object triggers a code loading instruction. Then, in response to the triggered code loading instruction, the processing device can load the code file corresponding to the business function to be experienced by executing the page file according to the loading address indicated in the page file.

[0118] In the technical solution proposed in this application, the content inside the page file is not adjusted. That is, the loading address indicated in the page file is used to load a code file named with the business identification information of the specified business from the static file server. In the technical solution claimed in this application, the initial network request for loading the code file named with the business identification information of the specified business can be intercepted, and the initial network request can be modified to obtain a target network request for loading a code file named with the function identification information of the target business function. Then, the processing device sends the target network request to the static file server and loads the target code file corresponding to the target business function from the static file server, wherein the target code file is named with the function identification information of the target business function.

[0119] Furthermore, the processing device enables the managed objects to experience the target business functions by executing the target code file.

[0120] In addition, it should be understood that the specific implementation of this application involves the loading process of code files. When the embodiments described in this application are applied to specific products or technologies, the collection, use and processing of related data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0121] The code file loading scheme proposed in this application is specifically executed by the browser on the processing device. The following description only illustrates the code file loading process from the perspective of the processing device as a whole:

[0122] See Figure 4 As shown, this is a schematic diagram of the code file loading process in an embodiment of this application. The following is a description of the process in conjunction with the attached diagram. Figure 4 The loading process of the code files is explained below:

[0123] Step 401: The processing device responds to the code loading instruction triggered by the management object for the target business function of the specified business and executes the associated page file.

[0124] When the processing device performs step 401, it may respond to the operation instruction triggered by the management object for the pre-deployed browser plugin and present the initialized operable interface in the form of a pop-up window; wherein the initialized operable interface at least presents the business identification information of each candidate business; and then, in response to the code loading instruction triggered by the management object in the operable interface for the target business function belonging to the specified business, it executes the associated page file.

[0125] Specifically, after the browser plugin is deployed on the processing device, the plugin icon will be displayed in the corresponding browser, allowing the managed object to trigger the operation instruction for the browser plugin by clicking the corresponding plugin icon, i.e., to start the browser plugin.

[0126] It should be understood that the processing device needs to install the browser plugin before responding to the operation instructions triggered by the managed object for the pre-deployed browser plugin.

[0127] During the actual installation of the browser plugin, the plugin files associated with the browser plugin are processed. These plugin files include: pop-up logic scripts and background logic scripts. The pop-up logic scripts define the information content provided to the background scripts of the browser plugin. This information content describes the business and business functions targeted by the code loading instructions. The background logic scripts define functions for detecting the information content, variables for storing the information content, interception functions for intercepting network requests, and replacement functions for modifying network requests. Then, a plugin identifier corresponding to the browser plugin is added to the corresponding browser plugin display area. This plugin identifier is used to activate the browser plugin when it is activated.

[0128] It should be noted that in the embodiments of this application, the description of the associated plugin files only schematically illustrates the scripts and script content related to loading code files. For the plugin files associated with browser plugins, other scripts and script content may also be included, and this application does not impose specific limitations here. Moreover, it should be understood that browser plugins are compatible with the corresponding browsers.

[0129] For example, the popup logic script is specifically `popup.js`, and the background logic script is specifically `background.js`. Furthermore, the `popup.html` file is also required during the popup's presentation. The `popup.html` file defines the content and structure of the popup displayed when the managed object clicks the plugin icon. This HTML page typically contains form elements, buttons, and other UI components for interacting with the managed object. `popup.js` provides the interaction logic for `popup.html`, handling the managed object's actions within the popup. `background.js` is responsible for handling background logic, detecting various browser events (such as tab updates, network requests, etc.), managing global state, and executing long-running tasks.

[0130] For example, see Figure 5 As shown, this is a schematic diagram illustrating the plug-in identifier in an embodiment of this application. Figure 5 As illustrated, after installing a browser plugin by installing the associated plugin file, the plugin icon can be displayed in the browser's plugin display area according to actual processing needs; combined with the attached... Figure 5 The content shown can be displayed in the browser window's toolbar, showing the plugin icon within the dashed box.

[0131] In this way, by installing the plugin files associated with the browser plugin, the browser plugin can be deployed in the corresponding browser, allowing the browser plugin to be triggered to start according to the actual processing needs.

[0132] Then, based on the processing logic in the plugin file associated with the browser plugin, the processing device responds to the operation instructions of the management object for the browser plugin and presents the initialized operable interface in the form of a pop-up window.

[0133] In some feasible ways of presenting an operational interface after initialization, the processing device can pre-store the corresponding service identification information for each selectable candidate service; then, when presenting the operational interface after initialization, the management object can select the specified service from each candidate service by presenting the service identification information. The stored service identification information can be cached after being obtained from the data server. Moreover, according to the actual processing needs, a relevant first update component can be configured so that the first update component can retrieve the updated service identification information from the data server after being operated.

[0134] For example, by configuring an update button, clicking the update button will call a preset information retrieval interface to obtain the business identification information of each candidate business from the data server.

[0135] In other feasible ways of presenting the initialized operable interface, the processing device can obtain the business identification information of each candidate service through an information acquisition interface. In this case, the processing device can call the preset information acquisition interface to obtain the business identification information of each candidate service and the code repository address associated with each business identification information from the data server. Then, the processing device can configure the first area of ​​the operable interface to display the business identification information of each candidate service and display the operable interface in the form of a pop-up window. The data server stores the association between the business identification information of each candidate service and the corresponding code repository address. The association stored in the data server can be pre-entered by the developers (or development objects).

[0136] Specifically, when initializing the operable interface, the business identification information of all available candidate services can be obtained by calling the information retrieval interface (API). Then, the obtained business identification information is rendered into the first area of ​​the operable interface to obtain the initialized operable interface. The first area can be a drop-down selection box.

[0137] For example, see Figure 6 As shown, this is a schematic diagram illustrating the presentation process of the operable interface after initialization in an embodiment of this application. According to the appendix... Figure 6 As illustrated, the processing device responds to the management object's operation instruction for the plug-in identifier, presenting an initialized operable interface. In the first area of ​​this operable interface, a drop-down selection box displays the service identifier information for each candidate service. (See attached diagram.) Figure 6As can be seen from the illustration, the optional operable interface may also include a second area and a third area. The second area is used to display the candidate business functions corresponding to the specified business for the management object to select; the third area is used to display the selected specified business and target business function.

[0138] In this way, by using the information acquisition interface, the business identification information of each candidate business and the code repository address associated with each candidate business can be obtained from the data server, thereby determining the range of selectable businesses and enabling the display of each selectable candidate business when presenting the operable interface after initialization.

[0139] Furthermore, after the initialization of the operable interface is completed, the processing device can execute the associated page file in response to the code loading instruction triggered in the operable interface.

[0140] When the processing device executes the associated page file in response to a code loading instruction, in some feasible implementations, if the branch affiliation information of each candidate business function under the corresponding candidate business is stored in advance, the processing device can, in response to the selection operation triggered by the management object for a specified business among the candidate businesses, display the corresponding branch affiliation information for each candidate business function of the specified business in the second area of ​​the operable interface, and execute the associated page file in response to the code loading instruction triggered after the management object selects the target business function.

[0141] The code ownership information of each candidate business function stored can be obtained and cached in advance from the server corresponding to the source code management system using a preset query interface; moreover, a relevant second update component can be configured according to actual processing needs, so that the second update component can re-obtain the code ownership information of each candidate business function after being operated.

[0142] It should be noted that in the embodiments of this application, the first update component and the second update component may correspond to the same or different update components; based on this, the code ownership information of each candidate service function and the service identification information of each candidate service may have the same or different update times.

[0143] In other feasible implementations, in the absence of stored business identifier information for each candidate service and stored correspondence between candidate services and candidate service functions, the processing device can respond to the selection operation triggered by the management object for a specified service among the candidate services, use a preset query interface, and query the code ownership information of each candidate service function belonging to the specified service based on the code repository address of the specified service; then display the code ownership information of each candidate service function in the second area of ​​the operable interface, and execute the associated page file in response to the code loading instruction triggered by the management object after selecting the target service function.

[0144] Specifically, when the processing device retrieves each candidate business function, it can call the query interface provided by the source code management system (such as Git's API) to obtain and display the branch list under the repository corresponding to the code repository address. The branch list is used to indicate the code ownership information of each candidate business function that is developed for a specified business and can be experienced. The code ownership information is usually represented by the branch name of the corresponding code branch, which is used to indicate the branch created for the development of a candidate business function. In other words, the branch name of a code branch is used to indicate the branch where the implementation code of a candidate business function is located in the code repository.

[0145] It should be noted that the functional identification information of each candidate business function can be determined based on the code ownership information and the corresponding business identification information; moreover, it is necessary to ensure that the same candidate business function has the same functional identification information in the processing device and the static file server.

[0146] For example, for a business identified by CVM, the scanning function of the specified business has the code attribution information Scan or feat / Scan, and the corresponding function identification information is CVM_Scan.

[0147] Optionally, in this embodiment of the application, the operable interface may include a third area in addition to the first area and the second area, wherein the third area is used to display the specified business and target business functions selected by the management object.

[0148] For example, in the first area of ​​the operable page, a drop-down selection box can be used to display a list of business identification information. When the managed object selects the business identification information of a specific business, the code branches in the corresponding code repository of the specified business can be displayed in the second area of ​​the operable page.

[0149] For example, when business identification information is identified by a code, in a private cloud scenario, a product can be regarded as a business, each product corresponds to a code, and each product corresponds to a code repository.

[0150] For example, see Figure 7 As shown, this is a schematic diagram of the process of selecting the target business function in an embodiment of this application. According to the appendix... Figure 7 As shown in the diagram, after presenting the initialized operable interface as shown in section 701, according to the content shown in section 702, the processing device, in response to the selection instruction triggered by the management object in the first area, selects the service identified by "CVM" as the designated service from the service identification information of each candidate service presented; then, according to the content shown in section 703, the processing device, in response to the selection instruction triggered by the management object in the second area, presents the code attribution information of each selectable candidate service function as shown in section 704, so that the management object can select a code attribution information in the operable interface shown in section 704.

[0151] In this way, the processing device can obtain the code branches existing under the code repository indicated by the code repository address by means of a preset query interface, and then obtain the candidate business functions belonging to the specified business, thereby determining the range of selectable business functions.

[0152] It should be noted that, in this embodiment, the code loading instruction can be automatically triggered after the management object selects the target business function; or, the code loading instruction can be triggered by clicking the user interface (UI) component used to trigger the loading instruction after the management object selects the target business function. The code loading instruction includes: business identification information of the specified business, and function identification information of the target business function; the page file contains the loading path of the code file named with the business identification information, which is indicated to be loaded from the static file server; the page file can be deployed on the processing device after the environment deployment is completed, or it can be obtained by the processing device from a specified server, and this application does not impose specific limitations on this.

[0153] It should be understood that by executing the page file, the loading path can be determined for the business function that needs to be experienced. This allows the business function to be displayed in the business page rendered based on the page file by loading the corresponding code file.

[0154] In this embodiment of the application, when the functional identification information is obtained by combining the business identification information and the code ownership information, from the perspective of the internal processing of the browser plugin, after the management object triggers the code loading instruction, the processing device will obtain a message content with the structure {code:“business identification information”, branch:“code ownership information”}, and refresh the current page so that the result of the selected management object is displayed in the operable interface.

[0155] For example, taking the Chrome browser as an example, in the popup.js method of the browser plugin, chrome.runtime.sendMessage sends a message to background.js. The message content contains a type and the actual data (payload). Let's assume the type is 'setData', and the payload is used to indicate the specified business and target business function selected by the management object. Correspondingly, a variable (let's assume it's currentData) is defined in background.js to store the data received from popup.js. Moreover, by using the chrome.runtime.onMessage method to retrieve messages from popup.js, when a message is received and its type is detected as 'setData', currentData is updated to the payload in the message content.

[0156] For example, see Figure 8 As shown, this is a schematic diagram of the triggering process of the code loading instruction in an embodiment of this application. According to the appendix... Figure 8 As shown, after selecting the target business function in the operable interface indicated by 801, the selected specified business and the target business function can be displayed in the operable interface indicated by 802; then, according to the operable interface indicated by 803, after the managed object triggers the "Click to Switch" button, it can be confirmed that the code loading instruction has been triggered.

[0157] In this way, after the processing device starts the browser plugin, it can present the initialized operable interface and determine the specified business and target business function that the code is loaded based on the operation of the managed object in the operable interface, so as to clearly identify the business function corresponding to the loaded code file.

[0158] Step 402: Among the candidate network requests to be sent, the processing device intercepts the initial network request for obtaining a code file named with service identification information, and modifies the initial network request into a target network request for obtaining a code file named with function identification information.

[0159] Specifically, for each candidate network request to be sent, the processing device can trigger the detection of each candidate network request before each candidate network request is sent, and intercept the initial network request when it detects the initial network request for obtaining the code file named with the business identification information.

[0160] In the process of detecting and intercepting the initial network request from the candidate network requests to be sent, the processing device may perform the following operations for each candidate network request to be sent: when a candidate network request is found to contain file information named with business identification information in its Uniform Resource Locator, the candidate network request is identified as the initial network request for obtaining the code file named with business identification information, and the initial network request is intercepted.

[0161] In the specific implementation of intercepting the initial network request, taking Chrome as an example, the browser plugin's background.js uses the chrome.webRequest.onBeforeRequest.addListener method to register a detector, which is triggered before the network request is sent. Then, when the detector is triggered before the candidate network request is sent, it checks whether the Uniform Resource Locator (URL) of the candidate network request contains content in the form of currentData.code+'.js'. If it does, it means that this candidate network request is the initial network request that needs to be intercepted. Here, currentData.code refers to the content indicated by code in currentData, that is, the business identification information of the specified business.

[0162] In this way, the initial network request for obtaining the code file named with the business identification information can be intercepted among the candidate network requests to be sent, so that although the network request to load the code file named with the business identification information is triggered, the network request will not be sent.

[0163] Furthermore, after determining the initial network request, during the process of modifying the initial network request, the processing device can use a preset replacement function to adjust the file information named with the business identifier information in the Uniform Resource Locator of the initial network request to the file information named with the function identifier information, thereby obtaining the target network request for obtaining the code file named with the function identifier information.

[0164] Taking the code loading instruction as an example, where the content is {code:“business identification information”, branch:“code ownership information”}, the combination of business identification information and code ownership information can serve as functional identification information. Therefore, when modifying the initial network request, the replace() function in the browser plugin's background.js can be used to replace the content corresponding to currentData.code+'.js' in the URL of the initial network request with the content corresponding to currentData.code+'_'+currentData.branch+'.js'. This results in an object containing a redirectUrl property, the value of which is the modified URL, allowing the browser to determine that the modified initial network request has been redirected to the new URL.

[0165] For example, the selected service identifier information is CVM, and the function identifier information of the target service function is CVM_add_button; the URL of the intercepted initial network request contains the content CVM.js, and then, after modifying the initial network request, the URL of the modified target network request contains the content CVM_add_button.js.

[0166] In this way, with the help of the preset replacement function, the initial network request can be modified, which is equivalent to the network request redirection. This changes the code file named with business identification information from the static file server to the code file named with function identification information from the static file server. Therefore, the target network request issued by the processing device can be directly used to obtain the code file of the target business function.

[0167] Step 403: The processing device sends a target network request to the static file server and loads the target code file corresponding to the target business function stored on the static file server.

[0168] After the processing device sends a target network request to the static file server, since the static file server stores executable code files named with corresponding function identification information for each candidate business function for the specified business, it can directly load the target code file stored for the corresponding target business function from the static file server. Each candidate business function contains the target business function.

[0169] Furthermore, the processing device can execute the target code file; and, in response to the operation instructions triggered by the management object based on the target business function, display the implementation effect of the target business function to the management object.

[0170] Specifically, the processing device can use a browser to execute the target code file and display the target business function on the corresponding business page of the page file; furthermore, it can respond to the operation instructions triggered by the management object for the target business function and present the implementation effect of the target business function.

[0171] In this way, by executing the target code file, the processing device can demonstrate the functional effects of the target business function to the managed object, enabling the managed object to quickly experience the implementation effect of the target business function after flexibly selecting the target business function to be experienced.

[0172] Furthermore, the processing device can load code files for other business functions according to the processing needs of the managed objects.

[0173] Specifically, the processing device can respond to the code loading instruction triggered by other business functions of the managed object for the specified business, and execute the page file; then, in each network request to be sent, it can intercept the network request to be adjusted for obtaining the code file named with the business identification information from the static file server, and modify the network request to be adjusted into a directed network request for obtaining the code file named with the function identification information of other implementation methods; then, it can send the directed network request to the static file server and load the target code file stored in the corresponding other implementation method from the static file server.

[0174] When the code loading instruction is retried, the processing device needs to re-present the operable interface to the management object. The re-presented operable interface can be achieved by the management object closing the business page used to display the target business function, or by the management object re-triggering the operation instruction for the plugin identifier.

[0175] It should be understood that the triggering method of the code loading instruction, the page file to be executed, the interception method of the network request, and the modification method are all the same as those described in steps 401-404 above, and will not be elaborated here.

[0176] For example, if the managed object needs to experience the delete_file function under the business CVM, the loading request for the CVM.js file will be intercepted and replaced with the loading request for CVM_delete_file.js.

[0177] This allows for flexible switching between different optional business functions based on the processing needs of the managed objects, and enables direct loading of code files for different business functions. This allows for the direct retrieval of the corresponding code files for the selected target business function, thus improving the efficiency of code file loading.

[0178] Similarly, the processing device can respond to the management object's selection instruction for business functions under other services, and execute the code file loading process for other business functions under other services.

[0179] Thus, considering that different services may be deployed in different environments, the technical solution proposed in this application enables a seamless experience across different environments.

[0180] The following section uses a specific business scenario, taking the source code management system deployed on the processing device as a Git system, to illustrate the process by which the processing device modifies network requests based on the browser during the loading of code files from different code branches. Here, each code branch corresponds to a candidate business function.

[0181] See Figure 9 As shown, this is a schematic diagram of the process of modifying network requests within the processing device in an embodiment of this application. The following is a description of the process in conjunction with the attached diagram. Figure 9 The process of modifying network requests is explained below:

[0182] Step 901: The processing device, with the help of a browser, executes the html.js file of the browser plugin, and presents an operable interface containing product identification information of each product in the form of a pop-up window to the management object that clicks the plugin identifier of the browser plugin.

[0183] Each product specifically corresponds to a specific service that the managed object can experience in the deployment environment; the deployment environment includes, but is not limited to, a testing environment; each product's identification information corresponds to... Figure 4 The methods for obtaining business identification information in the process will not be explained further here.

[0184] Step 902: The processing device uses a browser to execute the html.js file of the browser plugin to determine the specified product selected by the management object.

[0185] Step 903: The processing device, with the help of a browser, sends a request to the Git system via API to retrieve the branch list of the specified product by executing the popup.js file of the browser plugin.

[0186] Step 904: The processing device uses a browser to obtain a list of branches for the specified product from the Git system.

[0187] The branch list indicates the candidate code branches that are available for development and can be experienced for a specific product.

[0188] Step 905: The processing device, with the help of a browser, displays the candidate code branches that can be experienced for the specified product to the management object by executing the html.js file of the browser plugin.

[0189] Specifically, this could include the code ownership information corresponding to each candidate code branch, or the corresponding branch information.

[0190] Step 906: The processing device, with the aid of a browser, determines the target code branch selected by the managed object among the candidate code branches by executing the html.js file of the browser plugin.

[0191] Step 907: The processing device, with the help of a browser, refreshes the operable interface by executing the html.js file of the browser plugin, and displays the specified product and target code branch selected by the managed object.

[0192] Step 908: The processing device, with the help of a browser, sends information that requires further processing in the background by executing the popup.js file of the browser plugin. The information includes product identification information of the specified product and code ownership information corresponding to the target code branch.

[0193] Step 909: The processing device, with the help of a browser, executes the background.js file of the browser plugin to obtain the information content sent when the popup.js file is executed, and uses predefined variables to store the product identification information of the specified product and the code ownership information corresponding to the target code branch.

[0194] Step 910: The processing device, with the help of a browser, executes the associated page file and triggers a network request to load the code file according to the loading path configured for the business experience of the specified service in the page file.

[0195] Step 911: The processing device, with the help of a browser, executes the background.js file of the browser plugin and, with the help of a predefined request interceptor, intercepts the initial network request for loading a code file named with the product identification information of the specified product among the candidate network requests to be sent.

[0196] Step 912: The processing device, with the help of a browser, modifies the initial network request by executing the background.js file of the browser plugin to a target network request for obtaining the code file named with the function identifier information corresponding to the target code branch.

[0197] Furthermore, the processing device, with the aid of a browser, sends a target network request, and if the target network request is directed to a static file server, loads the target code file named with the function identifier information of the target code branch from the static file server.

[0198] In summary, this application provides a solution for instantly experiencing business functions using a browser plugin. It enables dynamic switching and loading of code files from different code branches within a single environment, allowing for a single environment and codebase throughout the development process, and facilitating rapid switching between different business functions across multiple code branches. Furthermore, in scenarios involving collaborative development by multiple developers, it addresses the pain point of existing solutions that only allow the simultaneous deployment of one code branch within the same environment, thus enabling instant access to different business functions without the need for manual code file deployment, reducing waiting time. Moreover, dynamic compilation and loading technologies reduce the demand for computing and storage resources. Additionally, since managed objects can independently select the business functions to be loaded and experienced without developer assistance, the code file loading process is simplified. Furthermore, the instant feedback and experience mechanism accelerates collaboration and communication between product and development teams, ensures that different versions of code files are loaded and executed in independent environments without interference, and improves user satisfaction by providing an intuitive user interface and a smooth experience flow. Finally, since different products may be deployed in different environments for testing, the technical solution proposed in this application effectively enables instant multi-environment testing.

[0199] Based on the same inventive concept, see [reference] Figure 10 As shown, this is a schematic diagram of the logical structure of the code file loading device in an embodiment of this application. The code file loading device 1000 includes a response unit 1001, a modification unit 1002, and a loading unit 1003.

[0200] The response unit 1001 is used to respond to a code loading instruction triggered by a management object for a target business function of a specified business and to execute the associated page file; wherein, the code loading instruction includes: business identification information of the specified business and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server;

[0201] Modification unit 1002 is used to intercept the initial network request for obtaining a code file named with business identification information among the candidate network requests to be sent, and modify the initial network request into a target network request for obtaining a code file named with function identification information.

[0202] The loading unit 1003 is used to send a target network request to the static file server and load the target code file stored for the corresponding target business function from the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function for the specified business; each candidate business function contains the target business function.

[0203] Optionally, in response to a code loading instruction triggered by a management object for a target business function of a specified business, and the execution of the associated page file, response unit 1001 is used to:

[0204] In response to the operation instructions triggered by the managed object for the pre-deployed browser plugin, the initialized operable interface is presented in the form of a pop-up window; wherein the initialized operable interface at least presents the business identification information of each candidate business.

[0205] In response to a code loading instruction triggered by a managed object in the operable interface for a target business function belonging to a specified business, the associated page file is executed.

[0206] Optionally, when the initialized operable interface is presented as a pop-up window, the response unit 1001 is used to:

[0207] Call the preset information retrieval interface to obtain the business identification information of each candidate business from the data server, as well as the code repository address associated with each business identification information;

[0208] The first area of ​​the operable interface displays the business identification information of each candidate business, and the operable interface is displayed in the form of a pop-up window.

[0209] Optionally, in response to a code loading instruction triggered by a managed object in the operable interface for a target business function belonging to a specified business, and the execution of the associated page file, the response unit 1001 is used to:

[0210] In response to the selection operation triggered by the management object for a specified business among the candidate businesses, a preset query interface is used to query the candidate business functions belonging to the specified business based on the code repository address of the specified business.

[0211] The second area of ​​the operable interface displays the branch affiliation information of each candidate business function, and executes the associated page file in response to the code loading instruction triggered after the target business function is selected by the management object.

[0212] Optionally, prior to an operation instruction triggered by a managed object for a pre-deployed browser plugin, the device further includes an installation unit 1004, which is configured to:

[0213] The plugin file associated with the browser plugin; the plugin file includes: pop-up logic script and background logic script; the pop-up logic script defines the information content provided to the background script; the information content is used to describe the business and business function targeted by the code loading instruction; the background logic script defines the detection function of the information content, the variable used to store the information content, the interception function used to intercept network requests, and the replacement function used to modify network requests;

[0214] Add a plugin identifier to the corresponding browser plugin's plugin display area; the plugin identifier is used to activate the browser plugin when it is activated.

[0215] Optionally, when intercepting the initial network request for obtaining a code file named with business identification information among the candidate network requests to be sent, the modification unit 1002 is used to:

[0216] For each candidate network request to be sent, perform the following operations respectively:

[0217] When a candidate network request's Uniform Resource Locator (URL) detects that it contains file information named with business identification information, the candidate network request is identified as the initial network request for obtaining the code file named with the business identification information, and the initial network request is intercepted.

[0218] Optionally, when the initial network request is modified to a target network request for obtaining a code file named with functional identification information, the modification unit 1002 is used to:

[0219] Using a preset replacement function, the file information named with business identification information in the Uniform Resource Locator of the initial network request is adjusted to file information named with function identification information, resulting in the target network request used to obtain the code file named with function identification information.

[0220] Optionally, after loading the target code file corresponding to the target business function stored from the file server, the device further includes an execution unit 1005, which is used for:

[0221] Execute the target code file;

[0222] In response to the operation instructions triggered by the managed object based on the target business function, the system displays the implementation effect of the target business function to the managed object.

[0223] Optionally, after demonstrating the implementation effect of the target business function to the managed object, the execution unit 1005 is also used for:

[0224] In response to other business functions of the managed object that are specific to the business, the page file is executed by triggering a code loading instruction.

[0225] In each network request to be sent, intercept the network request to be adjusted for obtaining code files named with business identification information from the static file server, and modify the network request to be adjusted into a directed network request for obtaining code files named with function identification information of other implementation methods.

[0226] Send a directed network request to the static file server and load the target code file stored in the corresponding other implementation from the static file server.

[0227] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.

[0228] Having introduced the code file loading method and apparatus of exemplary embodiments of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.

[0229] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0230] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. See reference... Figure 11 As shown, it is a schematic diagram of the hardware composition structure of an electronic device applying an embodiment of this application. Specifically, this electronic device may be... Figure 2 The processing device 210 is shown. In this embodiment, the electronic device can be structured as follows: Figure 11 As shown, it includes components such as: communication component 1110, memory 1120, display unit 1130, camera 1140, sensor 1150, audio circuit 1160, Bluetooth module 1170, processor 1180, etc.

[0231] The communication component 1110 is used to communicate with the server. In some embodiments, it may include a Wireless Fidelity (WiFi) module, which is a short-range wireless transmission technology. Electronic devices can use the WiFi module to help users send and receive information.

[0232] The memory 1120 can be used to store software programs and data. The processor 1180 executes various functions of the processing device 210 and performs data processing by running the software programs or data stored in the memory 1120. In this application, the memory 1120 can store the operating system and various application programs, and can also store computer programs that implement the above-described code file loading method.

[0233] The display unit 1130 can also be used to display information input by the user or information provided to the user, as well as a graphical user interface (GUI) for various menus. Specifically, the display unit 1130 may include a display screen 1132 disposed on the front of the processing device 210. The display unit 1130 can be used to display pages, etc.

[0234] The display unit 1130 can also be used to receive input digital or character information and generate signal inputs related to user settings and function control of the processing device 210. Specifically, the display unit 1130 may include a touch screen 1131 disposed on the front of the processing device 210, which can collect touch operations of the user on or near it.

[0235] The touchscreen 1131 can be placed over the display screen 1132, or the touchscreen 1131 and the display screen 1132 can be integrated to realize the input and output functions of the processing device 210. After integration, it can be referred to as a touch display screen. In this application, the display unit 1130 can display the application program and the corresponding operation steps.

[0236] Camera 1140 can be used to capture still images, which users can then post comments on via an application. An object is projected onto a photosensitive element through a lens, generating an optical image. This photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to processor 1180 for conversion into a digital image signal.

[0237] The processing device 210 may also include at least one sensor 1150, such as an accelerometer 1151, a distance sensor 1152, a fingerprint sensor 1153, and a temperature sensor 1154. The processing device 210 may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.

[0238] Audio circuitry 1160, speaker 1161, and microphone 1162 provide an audio interface between the user and processing device 210. Audio circuitry 1160 converts received audio data into electrical signals and transmits them to speaker 1161, where speaker 1161 converts them into sound signals for output. Conversely, microphone 1162 converts collected sound signals into electrical signals, which are then received by audio circuitry 1160, converted back into audio data, and output to communication component 1110 for transmission to other devices, or to memory 1120 for further processing.

[0239] The Bluetooth module 1170 is used to exchange information with other Bluetooth devices that have Bluetooth modules via the Bluetooth protocol.

[0240] The processor 1180 is the control center of the processing device, connecting various parts of the terminal via various interfaces and lines. It executes various functions of the processing device and processes data by running or executing software programs stored in the memory 1120 and calling data stored in the memory 1120. In some embodiments, the processor 1180 may include at least one processing unit; the processor 1180 may also integrate an application processor and a baseband processor. In this application, the processor 1180 can run an operating system, applications, user interface display and touch response, and the code file loading method of the embodiments of this application, such as... Figure 4 As shown. Additionally, the processor 1180 is coupled to the display unit 1130.

[0241] In another embodiment, the electronic device may also be other electronic devices, see [reference]. Figure 12 As shown, it is a schematic diagram of the hardware composition structure of another electronic device applying the embodiments of this application. In one embodiment, the electronic device may be... Figure 2 The static file server 220 is shown. In this embodiment, the electronic device can be structured as follows: Figure 12 As shown, it includes a memory 1201, a communication module 1203, and one or more processors 1202.

[0242] The memory 1201 is used to store computer programs executed by the processor 1202. The memory 1201 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0243] Memory 1201 may be volatile memory, such as random-access memory (RAM); memory 1201 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1201 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1201 may be a combination of the above-described memories.

[0244] Processor 1202 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 1202 is used to implement methods related to loading the aforementioned code file when calling computer programs stored in memory 1201.

[0245] The communication module 1203 is used to communicate with the processing device and other servers.

[0246] This application embodiment does not limit the specific connection medium between the memory 1201, communication module 1203, and processor 1202. This application embodiment... Figure 12 The memory 1201 and the processor 1202 are connected via a bus 1204, and the bus 1204 is in Figure 12 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 1204 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 12 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0247] The memory 1201 stores a computer storage medium containing computer-executable instructions for implementing methods related to loading code files in this embodiment. The processor 1202 executes the methods related to loading the code files described above.

[0248] In some possible implementations, various aspects of the code file loading method provided in this application can also be implemented as a program product, which includes a computer program. When the program product is run on an electronic device, the computer program causes the electronic device to perform the steps in the code file loading method according to the various exemplary embodiments of this application described above. For example, the electronic device can perform actions such as... Figure 4 The steps are shown in the figure.

[0249] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0250] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include a computer program, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.

[0251] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.

[0252] Computer programs contained on readable media may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0253] Computer programs for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The computer program can execute entirely on the user's electronic device, partially on the user's electronic device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0254] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0255] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0256] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing a computer-usable computer program.

[0257] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0258] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0259] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for loading code files, characterized in that, include: In response to a code loading instruction triggered by a managed object for a target business function of a specified business, the associated page file is executed; wherein, the code loading instruction includes: business identification information of the specified business, and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server; In each candidate network request to be sent, the initial network request for obtaining a code file named with the service identification information is intercepted, and the initial network request is modified into a target network request for obtaining a code file named with the function identification information. The system sends the target network request to the static file server and loads the target code file corresponding to the target business function from the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function of the specified business; each candidate business function includes the target business function.

2. The method as described in claim 1, characterized in that, The code loading instruction triggered by the management object for the target business function of the specified business, and the execution of the associated page file, include: In response to an operation instruction triggered by a pre-deployed browser plugin by a managed object, an initialized operable interface is presented in the form of a pop-up window; wherein, the initialized operable interface at least presents the business identification information of each candidate business; In response to the code loading instruction triggered by the managed object in the operable interface for a target business function belonging to a specified business, the associated page file is executed.

3. The method as described in claim 2, characterized in that, The initial operable interface, presented in the form of a pop-up window, includes: Call the preset information acquisition interface to obtain the business identification information of each candidate business from the data server, as well as the code repository address associated with each business identification information; The first area of ​​the operable interface displays the service identification information of each candidate service, and the operable interface is displayed in the form of a pop-up window.

4. The method as described in claim 3, characterized in that, The response to the code loading instruction triggered by the managed object in the operable interface for a target business function belonging to a specified business, and the execution of the associated page file, includes: In response to the selection operation triggered by the management object for a specified business among the candidate businesses, a preset query interface is used to query the candidate business functions belonging to the specified business based on the code repository address of the specified business. The second area of ​​the operable interface displays the branch affiliation information of each candidate business function, and executes the associated page file in response to the code loading instruction triggered after the management object selects the target business function.

5. The method as described in claim 2, characterized in that, Prior to responding to an operation instruction triggered by a managed object for a pre-deployed browser plugin, the method further includes: The plugin file associated with the browser plugin is installed; the plugin file includes: a pop-up logic script and a background logic script; the pop-up logic script defines information content provided to the background script; the information content is used to describe the business and business function targeted by the code loading instruction; the background logic script defines a detection function for the information content, a variable for storing the information content, an interception function for intercepting network requests, and a replacement function for modifying network requests; In the corresponding browser's plugin display area, add a plugin identifier corresponding to the browser plugin; wherein, the plugin identifier is used to activate the browser plugin when it is operated.

6. The method according to any one of claims 1-5, characterized in that, The step of intercepting the initial network request for obtaining a code file named with the service identification information from among the candidate network requests to be sent includes: For each candidate network request to be sent, perform the following operations respectively: When a candidate network request's Uniform Resource Locator (URL) detects that it contains file information named with the business identification information, the candidate network request is identified as an initial network request for obtaining a code file named with the business identification information, and the initial network request is intercepted.

7. The method according to any one of claims 1-5, characterized in that, The step of modifying the initial network request into a target network request for obtaining a code file named with the function identifier information includes: Using a preset replacement function, the file information named with the service identifier information in the Uniform Resource Locator of the initial network request is adjusted to the file information named with the function identifier information, thereby obtaining the target network request for obtaining the code file named with the function identifier information.

8. The method according to any one of claims 1-5, characterized in that, After loading the target code file corresponding to the target business function stored from the file server, the method further includes: Execute the target code file; In response to the operation instruction triggered by the management object based on the target business function, the implementation effect of the target business function is displayed to the management object.

9. The method as described in claim 8, characterized in that, After demonstrating the implementation effect of the target business function to the managed object, the method further includes: In response to other business functions of the management object for the specified business, a code loading instruction is triggered, and the page file is executed. In each network request to be sent, an adjusted network request for obtaining a code file named with the business identification information from the static file server is intercepted, and the adjusted network request is modified into a directed network request for obtaining a code file named with the function identification information of the other implementation method. Send the directed network request to the static file server and load the target code file corresponding to the other implementation from the static file server.

10. A code file loading device, characterized in that, include: The response unit is used to execute the associated page file in response to a code loading instruction triggered by a management object for a target business function of a specified business; wherein, the code loading instruction includes: business identification information of the specified business and function identification information of the target business function; the page file contains a loading path indicating that a code file named with the business identification information is loaded from a static file server; The modification unit is used to intercept, among the candidate network requests to be sent, the initial network request for obtaining a code file named with the service identification information, and modify the initial network request into a target network request for obtaining a code file named with the function identification information. The loading unit is configured to send the target network request to the static file server and load the target code file corresponding to the target business function stored in the static file server; wherein, the static file server stores executable code files named with corresponding function identification information for each candidate business function of the specified business; each candidate business function includes the target business function.

11. The apparatus as claimed in claim 10, characterized in that, When a code loading instruction is triggered by a management object for a target business function of a specified business, and the associated page file is executed, the response unit is used to: In response to an operation instruction triggered by a pre-deployed browser plugin by a managed object, an initialized operable interface is presented in the form of a pop-up window; wherein, the initialized operable interface at least presents the business identification information of each candidate business; In response to the code loading instruction triggered by the managed object in the operable interface for a target business function belonging to a specified business, the associated page file is executed.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-9.

13. 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 method as described in any one of claims 1-9.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.