Management method and device of executable program, equipment and readable storage medium
Through the geographical identification splitting of the project code package and client type loading, the problem of separately developing desktop APPs in different regions is solved, and executable program management is implemented in multiple regions, improving development efficiency.
Patent Information
- Application Number
- CN202311845206.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
In the prior art, due to different compliance requirements for desktop APPs in different regions, each region needs to develop executable programs that meet the standards separately, resulting in low development efficiency and no interoperability.
By obtaining the project code package, using the region identifier to split the project code blocks, generate executable programs suitable for multiple regions, and load them according to the client type.
It reduces development costs, improves the development efficiency of executable programs, and realizes effective management of executable programs.
Smart Images

Figure CN120234061A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly relates to a management method, device, equipment and readable storage medium for executable programs. Background Art
[0002] With the rapid development of computer technology, desktop APPs have gradually become an indispensable part of people's daily lives. In order to improve the user experience, the effective development and upgrade of desktop APPs have also become a problem that technicians urgently need to solve.
[0003] In existing desktop APP development projects, due to different requirements for project compliance in different regions, executable programs corresponding to each region's standards need to be developed separately. This method results in huge upfront development costs. At the same time, the program codes in different regions are not interoperable. Even if the development is completed in a certain region, it has no reference significance for the development processes in other regions, and the desktop APPs in other regions still need to be developed as a whole. This method has low efficiency in the APP development scenarios that need to be applied to multiple regions.
[0004] In view of the technical problem that the existing technology requires separate development of desktop APPs that meet the standards for different regions, resulting in low development efficiency, there is currently no effective solution. Summary of the Invention
[0005] The purpose of the present invention is to provide a management method, device, equipment and readable storage medium for executable programs, which can solve the technical problem that the existing technology requires separate development of desktop APPs that meet the standards for different regions, resulting in low development efficiency.
[0006] One aspect of the present invention provides a management method for executable programs. The method includes: obtaining a project code package for desktop development, where the project code package includes multiple project code blocks and a project name, and the project code blocks and the project name correspond uniquely; in response to a development instruction for a project code block, obtaining a target project name and a regional identifier input in a display page; extracting the project code block corresponding to the target project name from the project code package, and splitting the project code block corresponding to the target project name according to the regional identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions; receiving a loading instruction for the executable program from a client, where the loading instruction includes the target project name and the client type; obtaining the executable program corresponding to the target project name, and loading the executable program corresponding to the target project name based on the client type to implement the management of the executable program.
[0007] Optionally, split the project code block corresponding to the target project name according to the regional identifier to generate an executable program corresponding to the target project name, including: performing global macro definition on the project code block corresponding to the target project name to obtain a target project code block isolated from other project code blocks; copying the same number of target project code blocks as the number of regional identifiers from the project code package, and establishing a one-to-one correspondence between the copied target project code blocks and the regional identifiers; determining the client types associated with the regional identifiers, and respectively performing business splitting on the target project code blocks based on the client types to generate business items corresponding to the target project code blocks; wherein the client types include software and browsers; configuring the regional identifiers and the project code package according to a preset domain name generation rule to obtain a backend domain name corresponding to the target project code block; performing resource splitting on the target project code block through the mapping relationship between the regional identifier and the resource file to generate a resource file that can be used by the target project code block corresponding to the regional identifier; integrating the business items, the backend domain name, and the resource file to generate an executable program corresponding to the target project code block.
[0008] Optionally, configure the regional identifier and the project code package according to a preset domain name generation rule to obtain a backend domain name corresponding to the target project code block, including: determining the main domain name of the project code package and the IP address corresponding to the scenario identifier; extracting the suffix field of the main domain name, and resolving the suffix field of the main domain name to the IP address corresponding to the scenario identifier through DNS to obtain an intermediate domain name; establishing a mapping relationship between the intermediate domain name and the virtual host corresponding to the scenario identifier to generate a backend domain name corresponding to the target project code block.
[0009] Optionally, respectively perform business splitting on the target project code block based on the client type to generate business items corresponding to the target project code block, including: if the client type is software, obtaining a preset compliance rule corresponding to the regional identifier; performing code matching on the target project code blocks with the same corresponding regional identifier and the preset compliance rule, and extracting the successfully matched code segments from the target project code blocks; determining the special code segments and common code segments in the code segments, wherein the special code segments are business code segments with differences in all preset compliance rules; the common code segments are business code segments common to all preset compliance rules; respectively performing macro definition on the special code segments and abstracting the common code segments to generate code business items corresponding to the target project code block.
[0010] Optionally, the target project code block is split based on the client type to generate business items corresponding to the target project code block, including: if the client type is a browser, obtaining a preset compliance rule corresponding to the geographical identifier; performing platform matching on the target project code blocks with the same corresponding geographical identifier and the preset compliance rule, extracting the successfully matched platform identifiers from the target project code blocks, and deleting the platform identifiers that are not successfully matched; determining the rendering components associated with the platform identifiers from the target project code blocks based on the mapping relationship between the platform identifiers and the rendering components, to obtain the page business items corresponding to the target project code blocks.
[0011] Optionally, the executable program corresponding to the target project name is loaded based on the client type to manage the executable program, including: if the client type is software, directly loading the executable program corresponding to the target project name; if the client type is a browser, decompressing the executable program corresponding to the target project name and loading the decompressed executable program.
[0012] Optionally, before obtaining the executable program corresponding to the target project name, the method further includes: obtaining the geographical identifier of the client, traversing the executable program corresponding to the target project name, matching the geographical identifier of the client with the geographical identifier associated with the executable program, and determining whether the geographical identifier associated with the executable program contains the geographical identifier of the client; if so, loading the executable program corresponding to the target project name based on the client type identifier to manage the executable program; if not, stopping the loading operation of the executable program corresponding to the target project name and displaying a loading exception message to manage the executable program.
[0013] Another aspect of the present invention provides an apparatus for managing an executable program, the apparatus including: a first obtaining module, configured to obtain a project code package for desktop development, where the project code package includes a plurality of project code blocks and a project name, and the project code blocks and the project name are uniquely corresponding; a second obtaining module, configured to obtain a target project name and a geographical identifier input in the display page in response to a development instruction for the project code block; a splitting module, configured to extract the project code block corresponding to the target project name from the project code package and split the project code block corresponding to the target project name according to the geographical identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions; a receiving module, configured to receive a loading instruction of the client for the executable program, where the loading instruction includes the target project name and the client type; a loading module, configured to obtain the executable program corresponding to the target project name and load the executable program corresponding to the target project name based on the client type to manage the executable program.
[0014] Another aspect of the present invention provides a computer device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, it implements the management method of the executable program in any of the above embodiments.
[0015] Another aspect of the present invention provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the management method of the executable program in any of the above embodiments. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc.
[0016] The present invention splits the project code block through a regional identifier to generate a code package applicable to multiple regions, reducing the development cost and improving the development efficiency of the executable program. And based on the client type, the executable program is loaded in a targeted manner, realizing the effective management of the executable program. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered as a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0018] Figure 1 Shows an optional flowchart of the management method of the executable program provided in Embodiment 1 of the present invention;
[0019] Figure 2 Shows a structural block diagram of the management device of the executable program provided in Embodiment 2 of the present invention; and
[0020] Figure 3 Shows a block diagram of a computer device suitable for implementing the management method of the executable program provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0022] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.
[0023] Embodiment 1
[0024] This embodiment provides a method for managing executable programs. Figure 1 The flowchart showing the method for managing the executable program is as follows. Figure 1 As shown, the method for managing the executable program may include steps S101 to S105, where:
[0025] Step S101: Obtain a project code package for desktop development. The project code package contains multiple project code blocks and a project name, and the project code blocks and the project name correspond uniquely.
[0026] In an actual application scenario, an APP may include multiple projects to meet various needs of users. The operation of the APP requires the support of an underlying architecture. Each APP corresponds to a project code package, and each project code package contains multiple project code blocks (such as electronic insurance, etc.), and the project code blocks have corresponding project names. Each code block is pre-set with code segments applied to different regions, platform identifiers, as well as component and page display functions.
[0027] Step S102: In response to a development instruction for a project code block, obtain the target project name and region identifier entered in the display page.
[0028] The target project name and region identifier are used to determine the project code block that the user needs to develop and the application region of the project code block. In subsequent development, only the project code block needs to be subcontracted. This step can achieve targeted processing of the project code block, avoid the situation of overall development of the project code package, greatly reduce the development cost, and improve the development efficiency of the executable program.
[0029] Step S103: Extract the project code block corresponding to the target project name from the project code package, and split the project code block corresponding to the target project name according to the region identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions.
[0030] Preferably, step S103 may include steps S1031 to S1036, where:
[0031] Step S1031: Perform global macro definition on the project code block corresponding to the target project name to obtain a target project code block isolated from other project code blocks;
[0032] Using global macro definition can control the status of packaged resources and the executable content of the project code package, and can isolate the project code block corresponding to the target project name from other project code blocks, avoiding the mutual confusion of data of different types of project code blocks during the development process and improving the accuracy of generating the executable program. Among them, global macro definition can be implemented through the string #define, or other macro definition strings that can achieve isolation, which is not limited here.
[0033] Step S1032: Copy the same number of target project code blocks as the number of regional identifiers from the project code package, and establish a one-to-one correspondence between the copied target project code blocks and the regional identifiers;
[0034] Copying the target project code block so that the number of target project code blocks is the same as the number of regional identifiers avoids data loss of the project code block, thereby improving the accuracy of generating the executable program.
[0035] Step S1033: Determine the client types associated with the regional identifiers, and perform business splitting on the target project code blocks respectively based on the client types to generate business items corresponding to the target project code blocks; where the client types include software and browsers;
[0036] Users in different regions may use different client types to open the APP. Correspondingly, the executable programs relied on by different client types to open the APP will also be different. Through the client type, targeted business splitting is performed on the target project code block to generate business items of the target project code block on different clients, realizing targeted processing of the project code block and effective management of the executable program.
[0037] Preferably, step S1033 may include steps A1 to A4, where:
[0038] Step A1: If the client type is software, obtain the preset compliance rules corresponding to the regional identifier;
[0039] There are corresponding compliance rules for the use of the same APP in different regions, and these compliance rules are not completely the same. Among them, the preset compliance rules include judgment criteria in dimensions such as code type and page component type.
[0040] Step A2: Perform code matching on the target project code blocks with the same corresponding regional identifier and the preset compliance rules, and extract the code segments that match successfully from the target project code blocks;
[0041] For the case where the client is software, it is necessary to determine whether the code segments in the target project code block comply with the preset compliance rules. If the code segments comply with the preset compliance rules, these code segments are used as the generation elements of the executable program, and the code segments that do not comply with the preset compliance rules are deleted to improve the accuracy of generating the executable program.
[0042] Step A3: Determine the special code segments and common code segments in the code segments. Among them, the special code segments are the business code segments with differences in all preset compliance rules; the common code segments are the business code segments common to all preset compliance rules.
[0043] Step A4: Perform macro definitions on the special code segments respectively, and abstract the common code segments to generate the code business items corresponding to the target project code block.
[0044] By setting different types of code segments differently, targeted processing of the code segments can be achieved, and the generation efficiency of the executable program can be improved. Specifically, macro definitions are performed on the special code segments respectively, and corresponding directories are created to isolate irrelevant business codes and avoid confusion between business data; at the same time, the common code segments are abstracted together to create a unified directory, which can be called repeatedly and quickly when executing executable programs in different regions, thereby improving the loading efficiency of the executable program.
[0045] Preferably, step S1033 may include steps B1 to B3, where:
[0046] Step B1: If the client type is a browser, obtain the preset compliance rules corresponding to the geographical identifier.
[0047] Step B2: Perform platform matching on the target project code blocks with the same corresponding geographical identifier and the preset compliance rules, extract the successfully matched platform identifiers from the target project code blocks, and delete the platform identifiers that are not successfully matched.
[0048] For the case where the client type is a browser, it is necessary to determine whether the platform identifiers in the target project code block comply with the preset compliance rules, use the platform identifiers that comply with the preset compliance rules as the generation elements of the executable program, and delete the platform identifiers that do not comply with the preset compliance rules.
[0049] Step B3: Determine the rendering components associated with the platform identifiers from the target project code block based on the mapping relationship between the platform identifiers and the rendering components, and obtain the page business items corresponding to the target project code block.
[0050] Different platform identifiers have different rendering components and page display functions. By determining the rendering component associated with the platform identifier through the mapping relationship between the platform identifier and the rendering component, the page business items corresponding to the target project code block can be obtained, improving the loading efficiency of the executable program.
[0051] Step S1034, configure the regional identifier and the project code package according to the preset domain name generation rule to obtain the backend domain name corresponding to the target project code block;
[0052] Control the domain names of various services for the interaction between the front end and the backend through the backend configuration method, facilitating the effective loading of the executable program.
[0053] Preferably, step S1034 may include step C1 to step C3, where:
[0054] Step C1, determine the main domain name of the project code package and the IP address corresponding to the scenario identifier;
[0055] Step C2, extract the suffix field of the main domain name, and resolve the suffix field of the main domain name to the IP address corresponding to the scenario identifier through DNS to obtain the intermediate domain name;
[0056] Specifically, the parsing principle of DNS is similar to conventional technical means and will not be elaborated here.
[0057] Step C3, establish a mapping relationship between the intermediate domain name and the virtual host corresponding to the scenario identifier to generate the backend domain name corresponding to the target project code block.
[0058] Step S1035, perform resource splitting on the target project code block through the mapping relationship between the regional identifier and the resource file to generate the resource file that can be used by the target project code block corresponding to the regional identifier;
[0059] The resource file may include configuration files, application programs, desktop environments, etc. The mapping relationship between the regional identifier and the resource file is determined by actual requirements and is not limited here. This step can implement different resources in different regions and avoid resource waste.
[0060] Step S1036, integrate the business item, the backend domain name, and the resource file to generate the executable program corresponding to the target project code block.
[0061] Integrate the business item, the backend domain name, and the resource file to generate the executable program corresponding to the target project code block. When loading the subsequent APP project, only extract the corresponding data from the executable program to achieve the corresponding effect.
[0062] On the web (browser) side, integrate all the packaged configuration files (backend domain names, resource files), place the command scripts (business items) in the build / bin directory, and map them to npm scripts at the same time. The scripts can be executed through npm or shell. On the software client side, integrate all the packaged configuration files and store the command scripts in the database for direct invocation.
[0063] Step S104, receive the loading instruction of the executable program from the client, where the loading instruction includes the target project name and the client type;
[0064] Step S105, obtain the executable program corresponding to the target project name, and load the executable program corresponding to the target project name based on the client type to manage the executable program.
[0065] Different clients have different ways of loading the executable program. This step realizes the targeted loading of the executable program by the client for effective management of the executable program.
[0066] Preferably, step S105 may include steps S1051 to S1052, where:
[0067] Step S1051, if the client type is software, directly load the executable program corresponding to the target project name;
[0068] Step S1052, if the client type is browser, decompress the executable program corresponding to the target project name and load the decompressed executable program.
[0069] Preferably, before obtaining the executable program corresponding to the target project name, the method further includes steps D1 to D3, where:
[0070] Step D1, obtain the geographical identifier of the client, traverse the executable program corresponding to the target project name, match the geographical identifier of the client with the geographical identifier associated with the executable program, and determine whether the geographical identifier associated with the executable program contains the geographical identifier of the client;
[0071] Step D2, if so, load the executable program corresponding to the target project name based on the client type identifier to manage the executable program;
[0072] Step D3, if not, stop the loading operation of the executable program corresponding to the target project name and display the loading exception information to manage the executable program.
[0073] This step is used to identify the region of the client that is currently loading the executable program, intercept the loading instructions of the clients that do not meet the region requirements in a timely manner, and display the project content to the clients that meet the region requirements in a timely manner, achieving effective management of the executable program.
[0074] In this embodiment, the project code blocks are split through region identifiers to generate code packages that can be applied to multiple regions, reducing the development cost and improving the development efficiency of the executable program. And the executable program is loaded specifically based on the client type, achieving effective management of the executable program.
[0075] Embodiment 2
[0076] Embodiment 2 of the present invention also provides a management device for an executable program. This management device for the executable program corresponds to the management method for the executable program provided in Embodiment 1 above. The corresponding technical features and technical effects will not be elaborated in detail in this embodiment, and the relevant parts can refer to Embodiment 1 above. Specifically, Figure 2 The structural block diagram of this management device for the executable program is shown. As Figure 2 shown, the management device 200 for the executable program includes a first acquisition module 201, a second acquisition module 202, a splitting module 203, a receiving module 204, and a loading module 205, where:
[0077] The first acquisition module 201 is used to acquire the project code package for desktop development. Among them, the project code package contains multiple project code blocks and a project name, and the project code blocks and the project name correspond uniquely;
[0078] The second acquisition module 202 is connected to the first acquisition module 201 and is used to acquire the target project name and region identifier input in the display page in response to the development instruction for the project code block;
[0079] The splitting module 203 is connected to the second acquisition module 202 and is used to extract the project code block corresponding to the target project name from the project code package and split the project code block corresponding to the target project name according to the region identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions;
[0080] The receiving module 204 is connected to the splitting module 203 and is used to receive the loading instruction of the client for the executable program. Among them, the loading instruction contains the target project name and the client type;
[0081] The loading module 205 is connected to the receiving module 204 and is used to acquire the executable program corresponding to the target project name and load the executable program corresponding to the target project name based on the client type to achieve the management of the executable program.
[0082] Optionally, the splitting module includes: a macro definition unit for globally macro-defining the project code block corresponding to the target project name to obtain a target project code block isolated from other project code blocks; a copying unit for copying from the project code package the same number of target project code blocks as the number of regional identifiers, and establishing a one-to-one correspondence between the copied target project code blocks and the regional identifiers; a service splitting unit for determining the client types associated with the regional identifiers, and respectively performing service splitting on the target project code blocks based on the client types to generate service items corresponding to the target project code blocks; wherein the client types include software and browsers; a domain name configuration unit for configuring the regional identifiers and the project code package according to a preset domain name generation rule to obtain the backend domain name corresponding to the target project code block; a resource splitting unit for splitting the target project code block through the mapping relationship between the regional identifier and the resource file to generate a resource file usable by the target project code block corresponding to the regional identifier; and an integration unit for integrating the service items, the backend domain name, and the resource file to generate an executable program corresponding to the target project code block.
[0083] Optionally, the domain name configuration unit is specifically configured to: determine the main domain name of the project code package and the IP address corresponding to the scenario identifier; extract the suffix field of the main domain name, and resolve the suffix field of the main domain name to the IP address corresponding to the scenario identifier through DNS to obtain an intermediate domain name; and establish a mapping relationship between the intermediate domain name and the virtual host corresponding to the scenario identifier to generate the backend domain name corresponding to the target project code block.
[0084] Optionally, the service splitting unit is configured to: if the client type is software, obtain the preset compliance rule corresponding to the regional identifier; perform code matching on the target project code blocks with the same corresponding regional identifier and the preset compliance rule, and extract the code segments that match successfully from the target project code blocks; determine the special code segments and common code segments in the code segments, wherein the special code segments are the service code segments with differences in all the preset compliance rules; the common code segments are the service code segments common to all the preset compliance rules; perform macro definition on the special code segments respectively, and abstract the common code segments to generate the code service items corresponding to the target project code blocks.
[0085] Optionally, the service splitting unit is further configured to: if the client type is a browser, obtain the preset compliance rule corresponding to the regional identifier; perform platform matching on the target project code blocks with the same corresponding regional identifier and the preset compliance rule, extract the platform identifiers that match successfully from the target project code blocks, and delete the platform identifiers that do not match successfully; and determine the rendering components associated with the platform identifiers from the target project code blocks based on the mapping relationship between the platform identifiers and the rendering components to obtain the page service items corresponding to the target project code blocks.
[0086] Optionally, the loading module is configured to: directly load the executable program corresponding to the target project name if the client type is software; if the client type is a browser, decompress the executable program corresponding to the target project name and load the decompressed executable program.
[0087] Optionally, the apparatus further includes a region matching module, configured to: obtain the region identifier of the client, traverse the executable program corresponding to the target project name, match the region identifier of the client with the region identifier associated with the executable program, and determine whether the region identifier associated with the executable program contains the region identifier of the client; if so, load the executable program corresponding to the target project name based on the client type identifier to implement the management of the executable program; if not, stop the loading operation of the executable program corresponding to the target project name and display a loading exception message to implement the management of the executable program.
[0088] Embodiment III
[0089] Figure 3 FIG. shows a block diagram of a computer device suitable for implementing the method for managing an executable program according to Embodiment III of the present invention. In this embodiment, the computer device 300 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers) that executes a program. As Figure 3 shown, the computer device 300 of this embodiment at least includes, but is not limited to: a memory 301, a processor 302, and a network interface 303 that can communicate with each other through a system bus. It should be noted that Figure 3 only the computer device 300 with components 301-303 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0090] In this embodiment, the memory 303 includes at least one type of computer-readable storage medium. The readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 301 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 301 may also be an external storage device of the computer device 300, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the computer device 300. Of course, the memory 301 may also include both the internal storage unit and the external storage device of the computer device 300. In this embodiment, the memory 301 is generally used to store the operating system and various application software installed on the computer device 300, such as the program code of the management method of the executable program, etc.
[0091] In some embodiments, the processor 302 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 302 is generally used to control the overall operation of the computer device 300. For example, it performs control and processing related to data interaction or communication with the computer device 300. In this embodiment, the processor 302 is used to run the program code of the steps of the management method of the executable program stored in the memory 301.
[0092] In this embodiment, the management method of the executable program stored in the memory 301 may also be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 302) to complete the present invention.
[0093] The network interface 303 may include a wireless network interface or a wired network interface, which is generally used to establish a communication link between the computer device 300 and other computer devices. For example, the network interface 303 is used to connect the computer device 300 to an external terminal via a network, and establish a data transmission channel and a communication link between the computer device 300 and the external terminal. The network may be a wireless or wired network such as an enterprise intranet (Intranet), the Internet, Global System of Mobile communication (GSM for short), Wideband Code Division Multiple Access (WCDMA for short), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0094] Embodiment 4
[0095] This embodiment also provides a computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disc, server, App application store, etc., on which a computer program is stored, and when the computer program is executed by a processor, the steps of the management method of the executable program are implemented.
[0096] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the embodiments of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0097] It should be noted that the serial numbers of the embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0099] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A management method for executable programs, characterized in that, The method includes: Obtain a project code package for desktop development, where the project code package includes multiple project code blocks and a project name, and the project code blocks and the project name correspond uniquely; In response to a development instruction for a project code block, obtain a target project name and a region identifier input in the display page; Extract the project code block corresponding to the target project name from the project code package, and split the project code block corresponding to the target project name according to the region identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions; Receive a loading instruction for the executable program from a client, where the loading instruction includes a target project name and a client type; Obtain the executable program corresponding to the target project name, and load the executable program corresponding to the target project name based on the client type to implement management of the executable program.
2. The method according to claim 1, wherein The splitting the project code block corresponding to the target project name according to the region identifier to generate an executable program corresponding to the target project name includes: Perform global macro definition on the project code block corresponding to the target project name to obtain a target project code block isolated from other project code blocks; Copy the same number of target project code blocks as the number of region identifiers from the project code package, and establish a one-to-one correspondence between the copied target project code blocks and the region identifiers; Determine the client type associated with the region identifier, and perform business splitting on the target project code blocks respectively based on the client type to generate business items corresponding to the target project code blocks; where the client type includes software and browsers; Configure the region identifier and the project code package according to a preset domain name generation rule to obtain a backend domain name corresponding to the target project code block; Perform resource splitting on the target project code blocks through the mapping relationship between the region identifier and the resource file to generate resource files that can be used by the target project code blocks corresponding to the region identifier; Integrate the business items, the backend domain name, and the resource files to generate an executable program corresponding to the target project code block.
3. The method according to claim 2, wherein The configuring the region identifier and the project code package according to a preset domain name generation rule to obtain a backend domain name corresponding to the target project code block includes: Determine the main domain name of the project code package and the IP address corresponding to the scenario identifier; Extract the suffix field of the main domain name, and resolve the suffix field of the main domain name to the IP address corresponding to the scenario identifier through DNS to obtain an intermediate domain name; Establish a mapping relationship between the intermediate domain name and the virtual host corresponding to the scenario identifier to generate a backend domain name corresponding to the target project code block.
4. The method according to claim 2, characterized in that, The performing business splitting on the target project code blocks respectively based on the client type to generate business items corresponding to the target project code blocks includes: If the client type is software, obtain a preset compliance rule corresponding to the region identifier; Match the target project code blocks with the same corresponding regional identifier with the preset compliance rules, and extract the successfully matched code segments from the target project code blocks; Determine the special code segments and common code segments in the code segments, where the special code segments are the business code segments with differences in all the preset compliance rules; the common code segments are the business code segments common to all the preset compliance rules; Perform macro definitions on the special code segments respectively, and abstract the common code segments to generate the code business items corresponding to the target project code blocks.
5. The method according to claim 2, wherein The business splitting of the target project code blocks based on the client type respectively to generate the business items corresponding to the target project code blocks includes: If the client type is a browser, obtain the preset compliance rules corresponding to the regional identifier; Match the target project code blocks with the same corresponding regional identifier with the preset compliance rules for the platform, extract the successfully matched platform identifiers from the target project code blocks, and delete the platform identifiers that are not successfully matched; Determine the rendering components associated with the platform identifier from the target project code blocks based on the mapping relationship between the platform identifier and the rendering components to obtain the page business items corresponding to the target project code blocks.
6. The method according to claim 1, characterized in that, The loading of the executable program corresponding to the target project name based on the client type to manage the executable program includes: If the client type is software, directly load the executable program corresponding to the target project name; If the client type is a browser, decompress the executable program corresponding to the target project name and load the decompressed executable program.
7. The method according to any one of claims 1-6, characterized in that, Before obtaining the executable program corresponding to the target project name, the method further includes: Obtain the regional identifier of the client, traverse the executable program corresponding to the target project name, match the regional identifier of the client with the regional identifier associated with the executable program, and determine whether the regional identifier associated with the executable program includes the regional identifier of the client; If so, load the executable program corresponding to the target project name based on the client type identifier to manage the executable program; If not, stop the loading operation of the executable program corresponding to the target project name and display a loading exception message to manage the executable program.
8. An executable program management device, characterized in that The device includes: A first acquisition module for acquiring a project code package for desktop development, where the project code package includes a plurality of project code blocks and a project name, and the project code blocks and the project name correspond uniquely; A second acquisition module for acquiring the target project name and regional identifier input in the display page in response to a development instruction for the project code block; A splitting module for extracting the project code block corresponding to the target project name from the project code package and splitting the project code block corresponding to the target project name according to the regional identifier to generate an executable program corresponding to the target project name, where the executable program can be applied to multiple regions; A receiving module, configured to receive a loading instruction of the executable program from a client, where the loading instruction includes a target project name and a client type; A loading module, configured to obtain the executable program corresponding to the target project name, and load the executable program corresponding to the target project name based on the client type, so as to implement the management of the executable program.
9. A computer device, the computer device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the method according to any one of claims 1 to 7.