Business resource packaging method, computer program product, device and storage medium
By performing multi-level obfuscation and packaging of shared library resources and target business resources, the problem of increased complexity and time-consuming under traditional packaging strategies is solved, and efficient and secure Vue.js project management and code protection are achieved.
Patent Information
- Application Number
- CN202411356100.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In multiple Vue.js project management, traditional compilation and packaging strategies have led to increased complexity and time-consuming, making it difficult to effectively manage and maintain, especially when confidential sensitive information is required.
Through a business resource packaging method, obfuscation rules are used to perform multi-level obfuscation processing on shared library resources and target business resources, and obfuscation files are generated and packaged into target business resource obfuscation packages to ensure the security and efficiency of the code.
It improves packaging efficiency and obfuscation accuracy, reduces the impact of rack topology adjustment on system performance, enhances code security and maintenance convenience, and is suitable for large-scale multi-project development environments.
Smart Images

Figure CN118885210B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a business resource packaging method, a computer program product, a device and a storage medium. Background Art
[0002] In modern Web development, with the increase in business complexity and the deepening of team collaboration, development teams are often faced with the need to maintain multiple Vue.js projects at the same time. Although these projects have many similarities in architecture, dependencies, and basic configuration, they each carry unique functions and business logic, requiring highly customized implementation. At the same time, for security reasons, the front-end packaged code must exclude any potential sensitive information to ensure that key details are not leaked.
[0003] With its outstanding flexibility and user-friendliness, Vue.js has demonstrated strong adaptability in projects of different sizes. In order to effectively cope with the challenges of multi-project management, developers can adopt a centralized management strategy to coordinate multiple Vue projects in a single code repository. This approach not only promotes code reuse and dependency sharing, but also simplifies the configuration process and significantly improves development efficiency. However, as the number of projects grows, the traditional Vue compilation and packaging strategy begins to show limitations. If each project needs to complete code obfuscation compilation and packaging independently, the complexity and time consumption of the build process will rise sharply, which not only slows down the development cycle, but also increases the maintenance burden. Summary of the invention
[0004] Based on this, it is necessary to provide a business resource packaging method, computer program product, device and storage medium that can effectively perform obfuscation and reduce the impact of rack topology adjustment on system performance in response to the above technical problems.
[0005] In order to solve the above technical problems, in a first aspect, a business resource packaging method is provided, the method comprising:
[0006] In one of the embodiments, in response to receiving a target business resource packaging instruction, triggering a target business resource obfuscation instruction, obtaining target component information and a first configuration identification library, the first configuration identification library including a resource tag and a first obfuscation rule;
[0007] Determine the shared library resources according to the target component information and the resource tag, and confuse the shared library resources according to the first obfuscation rule to obtain the target obfuscated file;
[0008] Acquire a target business resource to be obfuscated according to the resource tag, and obfuscate the target business resource to be obfuscated according to a first obfuscation rule to obtain a first obfuscated file;
[0009] Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file;
[0010] Obtaining a target configuration identification file, the target configuration file including a third obfuscation rule, and obfuscating the second obfuscated file based on the third obfuscation rule to obtain a third obfuscated file;
[0011] The third obfuscated file and the target obfuscated file are packaged to obtain a target business resource obfuscated package.
[0012] In one embodiment, determining the shared library resource according to the target component information and the resource tag includes:
[0013] Load the pre-configured component library resources and obtain the common component information from the pre-configured component library resources;
[0014] The common component information is matched with the resource tag, and the common component information matching the resource tag is used as a common library resource.
[0015] In one embodiment, the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file including:
[0016] Obtain the shared library resource volume of each code in the shared library resource;
[0017] Compare the shared library resource size of each code with a preset obfuscation threshold;
[0018] When the shared library resource volume of any code is greater than a preset obfuscation threshold, determining whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter;
[0019] Taking the supply library resource corresponding to the shared library resource volume of the code including the preset obfuscation parameter and greater than the preset threshold as the target file;
[0020] The target file in the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file.
[0021] In one embodiment, obfuscating a target file in a shared library resource according to a first obfuscation rule to obtain a target obfuscated file includes:
[0022] Obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, where the types of preset obfuscation parameters include specific class names, method names, and variable names;
[0023] Search for replacement text from a preset dictionary based on the type of preset obfuscation parameters;
[0024] Use the replacement text to confuse and replace the preset obfuscation parameters to generate the target obfuscated file.
[0025] In one embodiment, obtaining a target business resource to be obfuscated according to a resource tag, performing a first obfuscation on the target business resource to be obfuscated according to a first obfuscation rule, and obtaining a first obfuscated file includes:
[0026] Extract the target code core elements corresponding to the target business resources to be obfuscated, the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, and target string;
[0027] Obfuscating a target code name, a target enumeration type, and a target global constant name to generate first obfuscation information, and generating an obfuscation mapping table according to the first obfuscation information;
[0028] Obfuscating the target character string to generate second obfuscated information;
[0029] Obtaining a target position relationship between an obfuscated element in the first obfuscated information and an obfuscated element in the second obfuscated information according to the target code structure, and obfuscating the target position relationship to obtain third obfuscated information;
[0030] A first obfuscation file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
[0031] In one embodiment, a second configuration identification library is obtained, the second configuration identification library includes a second obfuscation rule, and the first obfuscated file is obfuscated based on the second obfuscation rule to obtain a second obfuscated file including:
[0032] Loading a second configuration identification library, obtaining a second obfuscation rule, the second obfuscation rule at least including a resource path obfuscation rule and a general function obfuscation rule;
[0033] Identify resource paths and common functions from the first obfuscated file;
[0034] The resource path in the first obfuscated file is obfuscated according to the resource path obfuscation rule; the general function in the first obfuscated file is obfuscated according to the general function obfuscation rule to obtain a second obfuscated file.
[0035] In one embodiment, a target configuration identification file is obtained, the target configuration file includes a third obfuscation rule, and the second obfuscated file is obfuscated based on the third obfuscation rule to obtain a third obfuscated file including:
[0036] Obtain a project packaging identifier, and obtain a target configuration identification file according to the project packaging identifier, wherein the target configuration identification file includes specific business resources, specific business forms, and a third obfuscation rule corresponding to the target project;
[0037] Identifying a target specific business resource and a target specific business form from the second obfuscated file;
[0038] Encode the target specific business resource based on the third obfuscation rule to obtain a first specific business code, and use the first specific business code to obfuscate the target specific business resource in the second obfuscated file to obtain a first specific obfuscated file;
[0039] Parsing the target specific business form based on the third obfuscation rule to extract text information in the target specific business form and target business form structure information;
[0040] Encode the text information in the target specific business form to obtain a second specific business code, and obfuscate the target specific business form in the second obfuscated file based on the second specific business code and the target business form structure information to obtain a second specific obfuscated file;
[0041] A third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
[0042] In one embodiment, the method further comprises:
[0043] Obtaining a target public key, and using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain an encrypted first configuration identification library, an encrypted second configuration identification library, and an encrypted target configuration identification file;
[0044] The encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file are stored in their corresponding code directories.
[0045] In one embodiment, obtaining the target public key includes:
[0046] Get the name of the target business resource and the key fields of the target business resource;
[0047] Calculate the hash value of the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sort the hash values to generate a first secret key;
[0048] Select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key.
[0049] In one embodiment, the third obfuscated file and the target obfuscated file are packaged to obtain the target business resource obfuscated package, including:
[0050] Obtaining text structure information corresponding to the third obfuscated file and the target obfuscated file, and determining a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file;
[0051] Importing the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array;
[0052] According to the row information in the data array, the characteristic information of the row information is edited layer by layer;
[0053] The data array is encoded based on the feature information and the data is packaged.
[0054] In one embodiment, the method further comprises:
[0055] Obtain a target project corresponding to a target business resource, take the target project as a root node, and construct a confusion tree with the target obfuscated file, the first obfuscated file, the second obfuscated file, and the third obfuscated file as nodes, and place the obfuscated tree in a confusion tree set. Each node of the obfuscated tree includes at least one link table, and the link table stores obfuscation rules.
[0056] In one embodiment, the method further comprises:
[0057] In response to receiving the target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information;
[0058] According to the target project information, search for the target obfuscation tree corresponding to the target project from the obfuscation tree set;
[0059] In response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of a target node matching the deobfuscated content according to the deobfuscated content;
[0060] Dividing the deobfuscated content according to the target node type of the target node matching the deobfuscated content, and obtaining the deobfuscated content corresponding to each target node type;
[0061] Obtain the obfuscation rules corresponding to each target node type based on the target link table;
[0062] The deobfuscation operation is performed on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
[0063] In order to solve the above technical problem, in a second aspect, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0064] In order to solve the above technical problem, in the third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: the processor implements the steps of the method described in the first aspect when executing the computer program.
[0065] In order to solve the above technical problem, in a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0066] Different from the prior art, in the present application, in response to receiving a target business resource packaging instruction, a target business resource obfuscation instruction is triggered, and the target component information and a first configuration identification library are obtained, the first configuration identification library includes a resource tag and a first obfuscation rule; a shared library resource is determined according to the target component information and the resource tag, and the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file; the target business resource to be obfuscated is obtained according to the resource tag, and the target business resource to be obfuscated is obfuscated according to the first obfuscation rule to obtain a first obfuscated file; a second configuration identification library is obtained, the second configuration identification library includes a second obfuscation rule, and the first obfuscated file is obfuscated based on the second obfuscation rule to obtain a second obfuscated file; a target configuration identification file is obtained, and the target configuration file includes a third obfuscation rule, and the second obfuscated file is obfuscated based on the third obfuscation rule to obtain a third obfuscated file; the third obfuscated file and the target obfuscated file are packaged to obtain a target business resource obfuscation package. In this way, by obfuscating the shared library resources according to different obfuscation rules and obfuscating the target business resources at multiple levels, corresponding obfuscated files are obtained, and the obfuscated files are packaged, which can not only improve the packaging efficiency but also improve the obfuscation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A schematic diagram of a process of packaging business resources in one embodiment;
[0068] Figure 2 A schematic diagram of a flow chart of a business resource packaging method in another embodiment;
[0069] Figure 3 It is a structural block diagram of a service resource packaging device in one embodiment;
[0070] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0072] In one embodiment, Figure 1 As shown, the present application provides a business resource packaging method, which specifically includes the following steps:
[0073] Step 101, in response to receiving a target business resource packaging instruction, triggering a target business resource obfuscation instruction, obtaining target component information and a first configuration identification library, the first configuration identification library including a resource tag and a first obfuscation rule.
[0074] Step 102, determining the shared library resources according to the target component information and the resource tag, and obfuscating the shared library resources according to the first obfuscation rule to obtain the target obfuscated file.
[0075] Specifically, after receiving the target business resource packaging instruction, the target business resource obfuscation instruction will be triggered, and the target component information and the first configuration identification library can be obtained. The resource label and the first obfuscation rule are obtained from the first configuration identification library, and the pre-configured component library resources are loaded. The pre-configured component library resources can be configured by the operator based on actual experience, and can specifically include components and plug-in information with high frequency of application in multiple projects. Obtain common component information from the pre-configured component library resources; the common component information here refers to some components and plug-in resources that need to be applied between multiple projects. Match the common component information with the resource label, and use the common component information matching the resource label as a common library resource. The resource label can reflect the target project corresponding to the target value business resource. By using the common component information matching the resource label as a common library resource, the common components applied by the target project can be screened out, and the relevant information of the common components applied by the target project can be obtained.
[0076] Furthermore, the shared library resources can be obfuscated according to the first obfuscation rule to obtain a target obfuscated file, specifically including: obtaining the shared library resource volume of each code in the shared library resources; comparing the shared library resource volume of each code with a preset obfuscation threshold; when the shared library resource volume of any code is greater than the preset obfuscation threshold, determining whether the shared library resources of the code greater than the preset obfuscation threshold include preset obfuscation parameters; taking the supply library resources corresponding to the shared library resource volume of the code greater than the preset threshold that includes the preset obfuscation parameters as the target file; and obfuscating the target file in the shared library resources according to the first obfuscation rule to obtain a target obfuscated file.
[0077] In a specific implementation, the folder name of the shared library resource and the shared library resource path can be obtained and matched with the resource tag. The shared library resource path here can be a mapping path from the shared library resource to the pre-configured component library resource, and the shared library resource can be directly called from the pre-configured component library resource according to the path.
[0078] The first obfuscation rule may also include a preset obfuscation threshold and a preset obfuscation parameter. Files in the shared library resources whose code volume is greater than the preset obfuscation threshold and includes the preset obfuscation parameter may be screened out as shared library resources to be obfuscated, that is, target files. The shared library resources other than the target files are collectively referred to as non-target files. The target files in the shared library resources are obfuscated according to the first obfuscation rule.
[0079] In one embodiment, a target file in a shared library resource is obfuscated according to a first obfuscation rule to obtain a target obfuscated file, including: obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, the types of preset obfuscation parameters including specific class names, method names, and variable names; searching for replacement text from a preset dictionary according to the types of preset obfuscation parameters; and using the replacement text to perform obfuscation replacement on the preset obfuscation parameters to generate a target obfuscated file.
[0080] Specifically, the types of preset obfuscation parameters may include specific class names, method names, variable names, etc. The target files in the shared library resources may be divided according to the types of preset obfuscation parameters, and the target files may be obfuscated respectively according to the types of preset obfuscation parameters. Replacement texts corresponding to different types of preset obfuscation parameters may be stored in a dictionary, and replacement texts may be searched from a preset dictionary according to the types of preset obfuscation parameters; the preset obfuscation parameters may be obfuscated and replaced using the replacement texts to generate target obfuscated files.
[0081] In a feasible implementation manner, the target file can be divided into multiple parts to obtain multiple sub-target files, and each of the multiple sub-target files is byte-flipped so that the front bytes and the rear bytes of each sub-target file are swapped to generate multiple flipped target files, and each byte in each flipped target file is subjected to an OR operation to obtain multiple sub-obfuscated files, and the multiple sub-obfuscated files are spliced to obtain a target obfuscated file. In this way, the diversity of obfuscation rules is enriched, the security of obfuscating the target file is improved, and the user experience can be improved.
[0082] Step 103: Obtain the target business resource to be obfuscated according to the resource tag, and obfuscate the target business resource to be obfuscated according to the first obfuscation rule to obtain a first obfuscated file.
[0083] Specifically, after obtaining the target business resource to be obfuscated according to the resource tag, the target code core elements corresponding to the target business resource to be obfuscated can be extracted, and the target code core elements include the target code name, the target code structure, the target enumeration type, the target global constant name, and the target character string; the target code name, the target enumeration type, and the target global constant name are obfuscated to generate first obfuscation information, and an obfuscation mapping table is generated according to the first obfuscation information; the target character string is obfuscated to generate second obfuscation information; the obfuscated elements in the first obfuscation information and the target position relationship of the obfuscated elements in the second obfuscation information are obtained according to the target code structure, and the target position relationship is obfuscated to obtain third obfuscation information; a first obfuscated file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
[0084] In this implementation, the target code core elements can be split, and the constituent elements of the target code core elements can be refined based on the splitting, and the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, target string, etc. The constituent elements of different target code core elements are obfuscated respectively, and corresponding obfuscation information is generated, and a first obfuscation file is generated according to the obtained obfuscation information. In this way, when it is necessary to change the constituent elements of a certain target code core element, it can be determined whether the constituent elements of the target code core element to be changed are the first obfuscation file or the second obfuscation file. Only the obfuscation file corresponding to the constituent elements of the target code core element to be changed can be changed, and the precise positioning of the change position can be achieved according to the target code structure in the third obfuscation file. In this way, it has certain convenience and versatility, and meets the use requirements of the obfuscation of the code core elements.
[0085] Step 104: Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file.
[0086] Specifically, a second configuration identification library is loaded to obtain second obfuscation rules, wherein the second obfuscation rules include at least resource path obfuscation rules and general function obfuscation rules; resource paths and general functions are identified from the first obfuscated file; the resource paths in the first obfuscated file are obfuscated according to the resource path obfuscation rules; and the general functions in the first obfuscated file are obfuscated according to the general function obfuscation rules to obtain a second obfuscated file.
[0087] The second configuration identification library is configured with a general obfuscation solution for functions and methods commonly used in target business resources. The resource path in the first obfuscated file is replaced with text according to the resource path obfuscation rule; the general functions in the first obfuscated file are replaced with text according to the general function obfuscation rule to obtain the second obfuscated file. The resource path refers to the introduction path of the general functions and methods in the business resources, and the general functions, methods and other target business resources are obtained according to the path. In this embodiment, the first obfuscated file that has been initially obfuscated is obfuscated for the second time using the second configuration identification library, so that deeply obfuscated business resources can be obtained, which reduces the code volume while increasing the security of the code.
[0088] Step 105, obtaining a target configuration identification file, the target configuration file including a third obfuscation rule, and obfuscating the second obfuscated file based on the third obfuscation rule to obtain a third obfuscated file.
[0089] Specifically, in this implementation, by inputting the project packaging identifier, the specific business resources, specific business forms and the third single obfuscation rule corresponding to the target project can be obtained. The specific business resources and specific business forms corresponding to the target project can be identified from the second obfuscated file, and the specific business resources and specific business forms corresponding to the target project are obfuscated respectively. The target specific business resources are encoded based on the third obfuscation rule to obtain the first specific business code, and the target specific business resources in the second obfuscated file are obfuscated using the first specific business code to obtain the first specific obfuscated file; the target specific business form is parsed to extract the text information in the target specific business form and the target business form structure information; the text information in the target specific business form is encoded to obtain the second specific business code, and then the correspondence between the text information in the encoded target specific form and the text information in the target specific business form before encoding is established, and the corresponding relationship, the target business form structure information and the second specific business code are obtained to obtain the second obfuscated file. Finally, the third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
[0090] In this application, the first configuration identification library is used to perform refined obfuscation operations on the common library resources shared by all projects, that is, the common component resources, and then an efficient packaging process is executed to ensure the security and compression efficiency of the resources. Then, according to the specific business needs of each project, the system will dynamically call three independent configuration identification libraries to formulate differentiated code obfuscation rules. The first configuration identification library focuses on the core elements of the code, such as specified variables and sensitive parameters, and performs preliminary obfuscation on them to enhance protection; the second configuration identification library provides a general obfuscation solution for functions and methods commonly used in business resources, so that the business code can be obfuscated for the second time on the basis of the first obfuscation; the target configuration identification file provides a customized obfuscation solution for functions and methods in the specific business resources of the target project. These three sets of obfuscation rules not only streamline the code size, but also significantly improve the security of the code, ensuring that the code protection strategy of each project can be accurately in place.
[0091] In one embodiment, the method further includes: obtaining a target public key, using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain the encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file; storing the encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file in their corresponding code directories. Wherein, obtaining the target public key includes: obtaining the name of the target business resource and the key field of the target business resource; performing hash value calculation on the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sorting the hash values to generate a first secret key; selecting a text of a preset length at any position in the first secret key for obfuscation operation to generate a target public key.
[0092] This application is set up to calculate the hash value of the name of the target business resource and the key fields of the target business resource, which can strengthen the association between the secret key and the target business resource and adapt to the target business resources corresponding to a variety of target projects. Randomly sort the hash values to generate the first secret key; select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key, which avoids the first secret key being stored in plain text on the client, helping to ensure the security of sensitive data.
[0093] Step 106: Pack the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package.
[0094] Obtain text structure information corresponding to the third obfuscated file and the target obfuscated file, and determine a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file; import the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array; edit feature information of the row information layer by layer according to the row information in the data array; encode the data array based on the feature information, and perform data packaging processing.
[0095] Specifically, the type or format of the data file to be compressed can be determined by the third obfuscated file and the target obfuscated file, and the corresponding compression model can be screened out in the compression model by the type or format of the data file. The compression model can be a method for compressing data samples of different types or formats, or a preset editing process. The data file can be placed in a screening model for screening, and the screening model automatically calls a suitable compression model according to the type or format of the data sample. After confirming that the data file is compressible, the compression rate, resource overhead and compression speed, as well as parallelization and data synchronization can also be analyzed, and the analysis results can be obtained. When packaging the data, the third obfuscated file and the target obfuscated file can be converted into the form of a data array and stored in a matrix database. The row information in the data array can be edited layer by layer according to the row information or column information of the data array. The Harman algorithm and the feature information can be used to encode the data array, and the encoded character sequence is sent to the compression engine for compression and packaging. In this way, through the matrix storage method of the matrix database layer, the method of editing the data is used for encoding, and when the high compression ratio is met, the file size is greatly reduced, and the storage resource occupation is reduced.
[0096] In one embodiment, the method also includes: obtaining a target project corresponding to the target business resource, taking the target project as the root node, and constructing a confusion tree with the target obfuscation file, the first obfuscation file, the second obfuscation file, and the third obfuscation file as nodes, placing the obfuscation tree in a confusion tree set, each node of the obfuscation tree includes at least one link table, and the link table stores obfuscation rules.
[0097] The present application also includes creating an obfuscation tree for each project, with the target project as the root node and multiple obfuscated files as nodes, as well as a link table corresponding to each obfuscated file generated by obfuscation rules, obfuscation replacement text, etc. corresponding to each obfuscated file, building an obfuscation tree corresponding to the target project, and placing the obfuscation tree in an obfuscation tree collection. In this way, when the target business resource is subsequently deobfuscated, the obfuscation tree corresponding to the target business resource to be deobfuscated can be directly obtained from the obfuscation tree collection, and related information can be obtained, which can increase the rate of the deobfuscation operation.
[0098] In one embodiment, the method further includes: in response to receiving a target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information; searching for a target obfuscation tree corresponding to the target project from an obfuscation tree set according to the target project information; in response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of target nodes matching the deobfuscation content according to the deobfuscation content; dividing the deobfuscation content according to the target node type of the target node matching the deobfuscation content to obtain the deobfuscation content corresponding to each target node type; obtaining the obfuscation rule corresponding to each target node type based on the target link table; and performing a deobfuscation operation on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
[0099] Specifically, when an instruction to deobfuscate a target business resource is received, the deobfuscation content and target project information carried in the deobfuscation instruction for the target business resource can be obtained, the target obfuscation tree can be searched from the obfuscation tree set according to the target project information, and the deobfuscation content can be matched with the nodes of the target obfuscation tree, that is, it is determined which obfuscated files the deobfuscation content specifically covers. In the present application, it is not necessary to perform deobfuscation operations on all target business resources. It is only necessary to deobfuscate the contents of the obfuscated files covered by the deobfuscation content, and obtain a link table corresponding to the covered nodes, that is, a link table corresponding to the target node, to obtain the obfuscation rules and obfuscation replacement text corresponding to each target node type, and perform deobfuscation operations on the deobfuscated content corresponding to each target node type according to the deobfuscation content corresponding to each target node type and the obfuscation rules corresponding to each target node type, which helps to accurately complete the deobfuscation operation of the deobfuscated content.
[0100] In this application, by using different configuration identification libraries, multi-level precise obfuscation is performed on the shared library resources and the target business resources of the target project, and they are packaged independently to ensure the isolation and security of resources between projects. Through this project-level customized obfuscation and independent packaging process, not only the security protection of the code is enhanced, but also the packaging efficiency is significantly improved, providing strong support for rapid iteration in a large-scale multi-project development environment.
[0101] In order to better illustrate the business resource packaging method provided by the present application, in a specific implementation manner, the steps of the business resource packaging method are as follows: Figure 2 As shown:
[0102] S1: Dynamically obtain project configuration information based on project identification: Before project packaging, first read the project configuration file (this file is a file that stores the configuration information of all projects, including the basic information and specific configuration of each project), and then dynamically obtain the target project configuration identification file by entering the project packaging identification, which includes information such as target specific business resources. In this way, different business configuration files can be loaded according to project requirements during the packaging process to improve the configurability and maintainability of the project.
[0103] S2: Load the first configuration identification library and obfuscate and package the shared library resources: obtain the configuration identification file in the first configuration identification library, and use the first obfuscation rule stored in the configuration identification file to perform an obfuscation operation on the public plug-in and component resources (shared library resources).
[0104] S201: Load shared library resources.
[0105] 1) Parse the pre-configured component library resources: Get the names and versions (common component information) of the common plug-ins and components configured in the YAML file (project configuration file).
[0106] 2) Obtain shared library resources: Load these plug-ins and components from the local warehouse according to the component library configuration file, obtain the project shared library resources, that is, match the public component information with the resource tag, and use the public component information that matches the resource tag as the shared library resource.
[0107] S202: Implementing shared library resource obfuscation based on the first configuration identification library.
[0108] 1) Read obfuscation rules: Read the obfuscation.object preset obfuscation parameters (replace specific class names, method names, and variable names), the preset obfuscation threshold obfuscation.threshold, and the resource tag obfuscation.resourceName of the code obfuscation rules in the configuration table of the first configuration identification library. The specific code operation is as follows:
[0109] var object={"cookie":"otrd1","xsrfCookie":"otrd2","document.cookie":"otrd3"}
[0110] 2) Filter obfuscated resources: First, match the shared library resource folder name and path loaded in S201 with the resource tag obfuscation.resourceName to identify that the current obfuscated resource is a shared library resource. Then, according to the preset obfuscation thresholds obfuscation.threshold and obfuscation.object read in 1), filter out the files in the shared library resources whose code volume is greater than the preset obfuscation threshold and whose code contains preset obfuscation parameters, and put them into the target file (shared library resources to be obfuscated), and put other files into non-target files (shared library resources not to be obfuscated).
[0111] 3) Performing common library code obfuscation: According to the obfuscation rules configured in the first configuration identification library, the target file in 2) is specifically processed according to the preset obfuscation parameter configuration and the preset obfuscation threshold, so that the obfuscation processing of the target file can be realized to increase the complexity and security of the code. At the same time, the verification code of the obfuscated target file is recorded and updated to the first configuration identification library.
[0112] S203: Packing the obfuscated shared library resources.
[0113] The obfuscated shared library codes (target files and non-target files) obtained in S202 are integrated and compressed to form a deployable module with compact size and enhanced security, that is, a target obfuscated file is generated.
[0114] S3: obfuscating and packaging business resources according to multiple configuration identification libraries (first configuration identification library, second configuration identification library and target configuration identification file);
[0115] S301: Dynamically load business resources: load the project-specific business resources from the business resource pool according to the project packaging identifier obtained in S1.
[0116] S302: Preliminary obfuscation of business resources based on the first configuration identification library: Obtain the business resource file (target file) that currently needs to be obfuscated according to the resource tag obfuscation.resourceName in the first configuration identification library, and then perform code obfuscation on the methods, variables, class names, etc. specified in the business code according to the code obfuscation parameters configured by obfuscation.object to obtain the first obfuscated resource FirstObfuscationCode.
[0117] S303: Deeply obfuscate the initially obfuscated business resources according to the second configuration identification library: load the second configuration identification library, which is configured with obfuscation rules such as the introduction path and public functions shared by the business resources, and use the second configuration identification library to replace the public functions and introduction paths in the business resources in S302, and perform secondary code obfuscation on the obfuscated business resource FirstObfuscationCode to obtain the deeply obfuscated business resource SecondObfuscationCode, thereby reducing the code volume and increasing the code security.
[0118] S304: Perform final obfuscation on the deeply obfuscated business resources through the project-specific target configuration identification file: Load the project-specific target configuration identification file in the project configuration identification pool according to the project packaging identifier. The file is configured with specific business resources, specific business forms and obfuscation factors that are unique to this project. The specific business resources and specific business forms corresponding to the target project are obfuscated respectively. The loading of tables and forms in the unique business resources can be replaced with simplified codes to increase the difficulty of reverse engineering. Finally, the obfuscation factor is inserted into the code-specified method to enhance the security of the code.
[0119] S305: Packing the final obfuscated business resources: Pack and compress the final business resources (third obfuscated file) after obfuscation in S304 to reduce the code volume. At the same time, record the MD5 code of the obfuscated target business resources and update it to the verification code of the project-specific target configuration identification file.
[0120] In the server management system, there are multiple different projects, and each project requires different components (such as network cards, Raid cards, HCA cards, etc.) to be displayed. It is necessary to implement the function of separate obfuscation and packaging of component business resources on the basis of minimizing the code volume as much as possible, so as to flexibly load different component resources as needed:
[0121] 1) Business resource pool: All business resource information of the project is stored in the business resource pool, including various component resource files such as network cards, raid cards, HAC cards, etc.;
[0122] 2) Project configuration file design: The project configuration file contains the business requirements configuration of each project display component. For example, project 1 needs to display network card information, project 2 needs to display raid card information, and project 3 needs to display network card and HAC card information;
[0123] 3) Dynamically load the resources of the corresponding components according to the needs of different projects: obtain the business information configured in the project configuration file according to the project ID, and then dynamically load the resources of the corresponding components in the business resource pool. If you package project 1, you need to enter build:networkhard to obtain the network card resource information;
[0124] 4) Initial obfuscation of business resources: By loading the first configuration identification library, the identification library is configured as follows:
[0125] var object={"cookie":"otrd1","xsrfCookie":"otrd2","document.cookie":"otrd3"}
[0126] By configuring the identification library to replace meaningless characters in the variable names specified by business resources, the code security is enhanced without destroying the readability of the code.
[0127] 5) Deep obfuscation of business resources: By loading the obfuscation rules of the second configuration identification library, the obtained preliminary obfuscated code is obfuscated again (the first obfuscated file is obfuscated based on the second obfuscation rules). The obfuscation rules of the second configuration identification library include obfuscation of common functions and path introductions. Optionally, regular expressions can be used to determine frequently used files, functions, etc. in the code, and hash algorithms can be used to replace them, reducing the code size while reducing the risk of malicious analysis and exploitation of the code.
[0128] 6) Final obfuscation of business resources: The project-specific target configuration identification file (config: networkhard) in the project configuration identification pool is loaded through the project packaging identification. This file confuses the acquired deep obfuscation code again (the second obfuscated file is obfuscated based on the third obfuscation rule to obtain the third obfuscated file). The target project configuration identification file contains the project's unique business coding, obfuscation rules, and obfuscation factors, which increases the difficulty of reverse engineering and enhances the security of the code.
[0129] When a project adds new business functions or modifies existing business functions (the functions only involve business resources and not shared library resources), only the S3 step needs to be repackaged, and the shared library resources in the S2 step do not need to be packaged, which significantly improves the speed and efficiency of code packaging. This modular packaging strategy helps reduce maintenance costs and improve the maintainability and scalability of the project.
[0130] S4: Encrypted configuration identification library.
[0131] S401: Obtain public key: call the backend interface to obtain public key information for subsequent configuration file encryption.
[0132] S402: Encrypt the first configuration identification library: Use the public key obtained in S401 to encrypt the first configuration identification library, and then put the encrypted configuration identification library into the specified code directory var / config_one.
[0133] S403: Encrypt the second configuration identification library: Use the public key obtained in S401 to encrypt the second configuration identification library, and then put the encrypted configuration identification library into the specified code directory var / config_two.
[0134] S404: Encrypt the target project configuration identification file: Use the public key obtained in S401 to encrypt the project-specific configuration identification file, and then put the encrypted configuration identification file into the specified code directory var / config_private.
[0135] S5: Code deployment: put the component library resources packaged in S2, the business resources of the specific project packaged in S3, and the encrypted multi-configuration identification library in S4 into the server.
[0136] S6 resource decryption and interface rendering: By loading and decrypting multiple configuration identification libraries, the obfuscated shared library resources and business resources are restored, allowing the business code to execute normally.
[0137] S601: Obtain the decrypted configuration file pool: call the interface to obtain the decrypted configuration file pool, which contains the public key and the key encryption information required to decrypt the encrypted configuration identification library in S4, use the public key to decrypt the obtained configuration file, and obtain the key that can decrypt the configuration identification library.
[0138] S602: Decrypt the configuration identification library: use the key obtained in S601 to decrypt the encrypted configuration identification library (including the first configuration identification library, the second configuration identification library and the target configuration identification file) transmitted in S4.
[0139] S603: Deobfuscation of shared library resources: Using the first configuration identification library obtained in S602, first identify the shared library resource target file according to the resource tag obfuscation.resourceName configured in the identification library, then load the verification code in the identification library to verify the target file, and after the verification is qualified, use the preset obfuscation parameters and preset obfuscation thresholds to deobfuscate the target file and restore the shared library resources to their original state.
[0140] S604: Preliminary deobfuscation of specific business resources: Using the target configuration identification file obtained in S602, first load the verification code and business code in the specific configuration identification to verify the business resource file. After the verification is qualified, use the obfuscation rules, obfuscation factors, etc. of the business resources corresponding to the deobfuscation to perform preliminary deobfuscation on the business resources.
[0141] S605: Deep deobfuscation of business resources: Use the second configuration library decrypted in S602 to deeply deobfuscate the business resources initially deobfuscated in S604, and restore common functions, paths, etc. in the business resources.
[0142] S606: Final business resource restoration: Use the resource tag of the first configuration library decrypted in S602 to verify the deeply deobfuscated business resources in 605. After the verification passes, use the obfuscation parameters to perform the final deobfuscation on 605 to completely restore the original business resources.
[0143] S607: Rendering the user interface: After completing resource loading and deobfuscation, execute the deobfuscated code, trigger page rendering, and display the complete user interface.
[0144] The use of separate mixed packaging of shared library resources and business resources can not only significantly reduce the project packaging volume and reduce maintenance costs, but also comprehensively improve performance, maintainability, and security, especially for embedded application scenarios (BMC servers) with limited resources.
[0145] The business resource packaging method of the present invention can separate the shared library resources from the business resources, and perform obfuscation processing on the two respectively, which is helpful to accurately locate and update the business logic while maintaining the stability and security of the shared library; the shared library resources are obfuscated using the first configuration identification library, and the business resources are obfuscated in multiple layers using the first configuration identification library, the second configuration identification library and the project-specific configuration identification file, which increases the complexity and security of the code and increases the difficulty of reverse engineering; when the business function is modified, only the affected business resources need to be repackaged, which improves the packaging efficiency and reduces the maintenance cost, especially in a resource-constrained environment; the configuration identification library is encrypted and stored to protect the obfuscation rules from being leaked, ensure the security of the obfuscation rules, and prevent malicious users from restoring the original code by analyzing the obfuscation rules.
[0146] At the same time, it also improves development efficiency. Through refined management and incremental packaging mechanisms, it reduces unnecessary repetitive work, allowing developers to focus more on the implementation and optimization of business logic. The dual obfuscation mechanism and encryption mechanism provide a higher level of protection for the front-end code, effectively resisting the risks of reverse engineering and malicious attacks. Improve code maintainability: By clearly distinguishing between shared libraries and business resources, the code structure is clearer, improving development and maintenance efficiency. It can reduce learning costs: unified configuration management and clear process design lower the learning threshold for team members, allowing developers to quickly master and apply them to different projects. Improve operating performance: By streamlining the code size and on-demand loading mechanism, the server's operating performance is optimized, especially suitable for scenarios with limited resources.
[0147] It should be understood that although Figure 1-Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0148] In one embodiment, Figure 3 As shown, a business resource packaging device is provided, including: an acquisition module 30, an obfuscation module 31 and a packaging module 32, wherein:
[0149] An acquisition module 30, configured to trigger a target business resource obfuscation instruction in response to receiving a target business resource packaging instruction, and acquire target component information and a first configuration identification library, wherein the first configuration identification library includes a resource tag and a first obfuscation rule;
[0150] The obfuscation module 31 is used to determine the shared library resources according to the target component information and the resource label, and obfuscate the shared library resources according to the first obfuscation rule to obtain the target obfuscated file; obtain the target business resource to be obfuscated according to the resource label, and obfuscate the target business resource to be obfuscated according to the first obfuscation rule to obtain the first obfuscated file; obtain the second configuration identification library, the second configuration identification library includes the second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain the second obfuscated file; obtain the target configuration identification file, the target configuration file includes the third obfuscation rule, and obfuscate the second obfuscated file based on the third obfuscation rule to obtain the third obfuscated file;
[0151] The packaging module 32 is used to package the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package.
[0152] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0153] Determine the shared library resources based on the target component information and resource tags, including:
[0154] Load the pre-configured component library resources and obtain the common component information from the pre-configured component library resources;
[0155] The common component information is matched with the resource tag, and the common component information matching the resource tag is used as a common library resource.
[0156] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0157] The shared library resources are obfuscated according to the first obfuscation rule, and the target obfuscated file obtained includes:
[0158] Obtain the shared library resource volume of each code in the shared library resource;
[0159] Compare the shared library resource size of each code with a preset obfuscation threshold;
[0160] When the shared library resource volume of any code is greater than a preset obfuscation threshold, determining whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter;
[0161] Taking the supply library resource corresponding to the shared library resource volume of the code including the preset obfuscation parameter and greater than the preset threshold as the target file;
[0162] The target file in the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file.
[0163] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0164] Obfuscate the target file in the shared library resource according to the first obfuscation rule, and obtain the target obfuscated file including:
[0165] Obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, where the types of preset obfuscation parameters include specific class names, method names, and variable names;
[0166] Search for replacement text from a preset dictionary based on the type of preset obfuscation parameters;
[0167] Use the replacement text to confuse and replace the preset obfuscation parameters to generate the target obfuscated file.
[0168] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0169] Obtaining a target business resource to be obfuscated according to a resource tag, performing a first obfuscation on the target business resource to be obfuscated according to a first obfuscation rule, and obtaining a first obfuscated file includes:
[0170] Extract the target code core elements corresponding to the target business resources to be obfuscated, the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, and target string;
[0171] Obfuscating a target code name, a target enumeration type, and a target global constant name to generate first obfuscation information, and generating an obfuscation mapping table according to the first obfuscation information;
[0172] Obfuscating the target character string to generate second obfuscated information;
[0173] Obtaining a target position relationship between an obfuscated element in the first obfuscated information and an obfuscated element in the second obfuscated information according to the target code structure, and obfuscating the target position relationship to obtain third obfuscated information;
[0174] A first obfuscation file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
[0175] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0176] Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file including:
[0177] Loading a second configuration identification library, obtaining a second obfuscation rule, the second obfuscation rule at least including a resource path obfuscation rule and a general function obfuscation rule;
[0178] Identify resource paths and common functions from the first obfuscated file;
[0179] The resource path in the first obfuscated file is obfuscated according to the resource path obfuscation rule; the general function in the first obfuscated file is obfuscated according to the general function obfuscation rule to obtain a second obfuscated file.
[0180] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0181] Obtain a target configuration identification file, the target configuration file includes a third obfuscation rule, and the second obfuscated file is obfuscated based on the third obfuscation rule to obtain a third obfuscated file including:
[0182] Obtain a project packaging identifier, and obtain a target configuration identification file according to the project packaging identifier, wherein the target configuration identification file includes specific business resources, specific business forms, and a third obfuscation rule corresponding to the target project;
[0183] Identifying a target specific business resource and a target specific business form from the second obfuscated file;
[0184] Encode the target specific business resource based on the third obfuscation rule to obtain a first specific business code, and use the first specific business code to obfuscate the target specific business resource in the second obfuscated file to obtain a first specific obfuscated file;
[0185] Parsing the target specific business form based on the third obfuscation rule to extract text information in the target specific business form and target business form structure information;
[0186] Encode the text information in the target specific business form to obtain a second specific business code, and obfuscate the target specific business form in the second obfuscated file based on the second specific business code and the target business form structure information to obtain a second specific obfuscated file;
[0187] A third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
[0188] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0189] The method also includes:
[0190] Obtaining a target public key, and using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain an encrypted first configuration identification library, an encrypted second configuration identification library, and an encrypted target configuration identification file;
[0191] The encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file are stored in their corresponding code directories.
[0192] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0193] Obtaining the target public key includes:
[0194] Get the name of the target business resource and the key fields of the target business resource;
[0195] Calculate the hash value of the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sort the hash values to generate a first secret key;
[0196] Select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key.
[0197] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0198] The third obfuscated file and the target obfuscated file are packaged to obtain the target business resource obfuscated package including:
[0199] Obtaining text structure information corresponding to the third obfuscated file and the target obfuscated file, and determining a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file;
[0200] Importing the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array;
[0201] According to the row information in the data array, the characteristic information of the row information is edited layer by layer;
[0202] The data array is encoded based on the feature information and the data is packaged.
[0203] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0204] The method also includes:
[0205] Obtain a target project corresponding to a target business resource, take the target project as a root node, and construct a confusion tree with the target obfuscated file, the first obfuscated file, the second obfuscated file, and the third obfuscated file as nodes, and place the obfuscated tree in a confusion tree set. Each node of the obfuscated tree includes at least one link table, and the link table stores obfuscation rules.
[0206] In one embodiment, the above device can implement another implementation of the service resource packaging method, and the specific steps are as follows:
[0207] The method also includes:
[0208] In response to receiving the target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information;
[0209] According to the target project information, search for the target obfuscation tree corresponding to the target project from the obfuscation tree set;
[0210] In response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of a target node matching the deobfuscated content according to the deobfuscated content;
[0211] Dividing the deobfuscated content according to the target node type of the target node matching the deobfuscated content, and obtaining the deobfuscated content corresponding to each target node type;
[0212] Obtain the obfuscation rules corresponding to each target node type based on the target link table;
[0213] The deobfuscation operation is performed on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
[0214] For the specific definition of the business resource packaging device, please refer to the definition of the business resource packaging method above, which will not be repeated here. Each module in the above-mentioned business resource packaging device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0215] In one embodiment, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the business resource packaging method provided by the above methods.
[0216] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business resource packaging method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0217] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0218] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0219] Step 101, in response to receiving a target business resource packaging instruction, triggering a target business resource obfuscation instruction, obtaining target component information and a first configuration identification library, the first configuration identification library including a resource tag and a first obfuscation rule.
[0220] Step 102, determining the shared library resources according to the target component information and the resource tag, and obfuscating the shared library resources according to the first obfuscation rule to obtain the target obfuscated file.
[0221] Step 103: Obtain the target business resource to be obfuscated according to the resource tag, and obfuscate the target business resource to be obfuscated according to the first obfuscation rule to obtain a first obfuscated file.
[0222] Step 104: Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file.
[0223] Step 105, obtaining a target configuration identification file, the target configuration file including a third obfuscation rule, and obfuscating the second obfuscated file based on the third obfuscation rule to obtain a third obfuscated file.
[0224] Step 106: Pack the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package.
[0225] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0226] Determine the shared library resources based on the target component information and resource tags, including:
[0227] Load the pre-configured component library resources and obtain the common component information from the pre-configured component library resources;
[0228] The common component information is matched with the resource tag, and the common component information matching the resource tag is used as a common library resource.
[0229] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0230] The shared library resources are obfuscated according to the first obfuscation rule, and the target obfuscated file obtained includes:
[0231] Obtain the shared library resource volume of each code in the shared library resource;
[0232] Compare the shared library resource size of each code with a preset obfuscation threshold;
[0233] When the shared library resource volume of any code is greater than a preset obfuscation threshold, determining whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter;
[0234] Taking the supply library resource corresponding to the shared library resource volume of the code including the preset obfuscation parameter and greater than the preset threshold as the target file;
[0235] The target file in the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file.
[0236] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0237] Obfuscate the target file in the shared library resource according to the first obfuscation rule, and obtain the target obfuscated file including:
[0238] Obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, where the types of preset obfuscation parameters include specific class names, method names, and variable names;
[0239] Search for replacement text from a preset dictionary based on the type of preset obfuscation parameters;
[0240] Use the replacement text to confuse and replace the preset obfuscation parameters to generate the target obfuscated file.
[0241] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0242] Obtaining a target business resource to be obfuscated according to a resource tag, performing a first obfuscation on the target business resource to be obfuscated according to a first obfuscation rule, and obtaining a first obfuscated file includes:
[0243] Extract the target code core elements corresponding to the target business resources to be obfuscated, the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, and target string;
[0244] Obfuscating a target code name, a target enumeration type, and a target global constant name to generate first obfuscation information, and generating an obfuscation mapping table according to the first obfuscation information;
[0245] Obfuscating the target character string to generate second obfuscated information;
[0246] Obtaining a target position relationship between an obfuscated element in the first obfuscated information and an obfuscated element in the second obfuscated information according to the target code structure, and obfuscating the target position relationship to obtain third obfuscated information;
[0247] A first obfuscation file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
[0248] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0249] Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file including:
[0250] Loading a second configuration identification library, obtaining a second obfuscation rule, the second obfuscation rule at least including a resource path obfuscation rule and a general function obfuscation rule;
[0251] Identify resource paths and common functions from the first obfuscated file;
[0252] The resource path in the first obfuscated file is obfuscated according to the resource path obfuscation rule; the general function in the first obfuscated file is obfuscated according to the general function obfuscation rule to obtain a second obfuscated file.
[0253] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0254] Obtain a target configuration identification file, the target configuration file includes a third obfuscation rule, and the second obfuscated file is obfuscated based on the third obfuscation rule to obtain a third obfuscated file including:
[0255] Obtain a project packaging identifier, and obtain a target configuration identification file according to the project packaging identifier, wherein the target configuration identification file includes specific business resources, specific business forms, and a third obfuscation rule corresponding to the target project;
[0256] Identifying a target specific business resource and a target specific business form from the second obfuscated file;
[0257] Encode the target specific business resource based on the third obfuscation rule to obtain a first specific business code, and use the first specific business code to obfuscate the target specific business resource in the second obfuscated file to obtain a first specific obfuscated file;
[0258] Parsing the target specific business form based on the third obfuscation rule to extract text information in the target specific business form and target business form structure information;
[0259] Encode the text information in the target specific business form to obtain a second specific business code, and obfuscate the target specific business form in the second obfuscated file based on the second specific business code and the target business form structure information to obtain a second specific obfuscated file;
[0260] A third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
[0261] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0262] The method also includes:
[0263] Obtaining a target public key, and using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain an encrypted first configuration identification library, an encrypted second configuration identification library, and an encrypted target configuration identification file;
[0264] The encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file are stored in their corresponding code directories.
[0265] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0266] Obtaining the target public key includes:
[0267] Get the name of the target business resource and the key fields of the target business resource;
[0268] Calculate the hash value of the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sort the hash values to generate a first secret key;
[0269] Select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key.
[0270] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0271] The third obfuscated file and the target obfuscated file are packaged to obtain the target business resource obfuscated package including:
[0272] Obtaining text structure information corresponding to the third obfuscated file and the target obfuscated file, and determining a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file;
[0273] Importing the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array;
[0274] According to the row information in the data array, the characteristic information of the row information is edited layer by layer;
[0275] The data array is encoded based on the feature information and the data is packaged.
[0276] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0277] The method also includes:
[0278] Obtain a target project corresponding to a target business resource, take the target project as a root node, and construct a confusion tree with the target obfuscated file, the first obfuscated file, the second obfuscated file, and the third obfuscated file as nodes, and place the obfuscated tree in a confusion tree set. Each node of the obfuscated tree includes at least one link table, and the link table stores obfuscation rules.
[0279] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0280] The method also includes:
[0281] In response to receiving the target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information;
[0282] According to the target project information, search for the target obfuscation tree corresponding to the target project from the obfuscation tree set;
[0283] In response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of a target node matching the deobfuscated content according to the deobfuscated content;
[0284] Dividing the deobfuscated content according to the target node type of the target node matching the deobfuscated content, and obtaining the deobfuscated content corresponding to each target node type;
[0285] Obtain the obfuscation rules corresponding to each target node type based on the target link table;
[0286] The deobfuscation operation is performed on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
[0287] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0288] Step 101, in response to receiving a target business resource packaging instruction, triggering a target business resource obfuscation instruction, obtaining target component information and a first configuration identification library, the first configuration identification library including a resource tag and a first obfuscation rule.
[0289] Step 102, determining the shared library resources according to the target component information and the resource tag, and obfuscating the shared library resources according to the first obfuscation rule to obtain the target obfuscated file.
[0290] Step 103: Obtain the target business resource to be obfuscated according to the resource tag, and obfuscate the target business resource to be obfuscated according to the first obfuscation rule to obtain a first obfuscated file.
[0291] Step 104: Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file.
[0292] Step 105, obtaining a target configuration identification file, the target configuration file including a third obfuscation rule, and obfuscating the second obfuscated file based on the third obfuscation rule to obtain a third obfuscated file.
[0293] Step 106: Pack the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package.
[0294] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0295] Determine the shared library resources based on the target component information and resource tags, including:
[0296] Load the pre-configured component library resources and obtain the common component information from the pre-configured component library resources;
[0297] The common component information is matched with the resource tag, and the common component information matching the resource tag is used as a common library resource.
[0298] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0299] The shared library resources are obfuscated according to the first obfuscation rule, and the target obfuscated file obtained includes:
[0300] Obtain the shared library resource volume of each code in the shared library resource;
[0301] Compare the shared library resource size of each code with a preset obfuscation threshold;
[0302] When the shared library resource volume of any code is greater than a preset obfuscation threshold, determining whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter;
[0303] Taking the supply library resource corresponding to the shared library resource volume of the code including the preset obfuscation parameter and greater than the preset threshold as the target file;
[0304] The target file in the shared library resource is obfuscated according to the first obfuscation rule to obtain a target obfuscated file.
[0305] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0306] Obfuscate the target file in the shared library resource according to the first obfuscation rule, and obtain the target obfuscated file including:
[0307] Obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, where the types of preset obfuscation parameters include specific class names, method names, and variable names;
[0308] Search for replacement text from a preset dictionary based on the type of preset obfuscation parameters;
[0309] Use the replacement text to confuse and replace the preset obfuscation parameters to generate the target obfuscated file.
[0310] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0311] Obtaining a target business resource to be obfuscated according to a resource tag, performing a first obfuscation on the target business resource to be obfuscated according to a first obfuscation rule, and obtaining a first obfuscated file includes:
[0312] Extract the target code core elements corresponding to the target business resources to be obfuscated, the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, and target string;
[0313] Obfuscating a target code name, a target enumeration type, and a target global constant name to generate first obfuscation information, and generating an obfuscation mapping table according to the first obfuscation information;
[0314] Obfuscating the target character string to generate second obfuscated information;
[0315] Obtaining a target position relationship between an obfuscated element in the first obfuscated information and an obfuscated element in the second obfuscated information according to the target code structure, and obfuscating the target position relationship to obtain third obfuscated information;
[0316] A first obfuscation file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
[0317] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0318] Obtain a second configuration identification library, the second configuration identification library includes a second obfuscation rule, and obfuscate the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file including:
[0319] Loading a second configuration identification library, obtaining a second obfuscation rule, the second obfuscation rule at least including a resource path obfuscation rule and a general function obfuscation rule;
[0320] Identify resource paths and common functions from the first obfuscated file;
[0321] The resource path in the first obfuscated file is obfuscated according to the resource path obfuscation rule; the general function in the first obfuscated file is obfuscated according to the general function obfuscation rule to obtain a second obfuscated file.
[0322] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0323] Obtain a target configuration identification file, the target configuration file includes a third obfuscation rule, and the second obfuscated file is obfuscated based on the third obfuscation rule to obtain a third obfuscated file including:
[0324] Obtain a project packaging identifier, and obtain a target configuration identification file according to the project packaging identifier, wherein the target configuration identification file includes specific business resources, specific business forms, and a third obfuscation rule corresponding to the target project;
[0325] Identifying a target specific business resource and a target specific business form from the second obfuscated file;
[0326] Encode the target specific business resource based on the third obfuscation rule to obtain a first specific business code, and use the first specific business code to obfuscate the target specific business resource in the second obfuscated file to obtain a first specific obfuscated file;
[0327] Parsing the target specific business form based on the third obfuscation rule to extract text information in the target specific business form and target business form structure information;
[0328] Encode the text information in the target specific business form to obtain a second specific business code, and obfuscate the target specific business form in the second obfuscated file based on the second specific business code and the target business form structure information to obtain a second specific obfuscated file;
[0329] A third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
[0330] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0331] The method also includes:
[0332] Obtaining a target public key, and using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain an encrypted first configuration identification library, an encrypted second configuration identification library, and an encrypted target configuration identification file;
[0333] The encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file are stored in their corresponding code directories.
[0334] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0335] Obtaining the target public key includes:
[0336] Get the name of the target business resource and the key fields of the target business resource;
[0337] Calculate the hash value of the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sort the hash values to generate a first secret key;
[0338] Select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key.
[0339] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0340] The third obfuscated file and the target obfuscated file are packaged to obtain the target business resource obfuscated package including:
[0341] Obtaining text structure information corresponding to the third obfuscated file and the target obfuscated file, and determining a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file;
[0342] Importing the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array;
[0343] According to the row information in the data array, the characteristic information of the row information is edited layer by layer;
[0344] The data array is encoded based on the feature information and the data is packaged.
[0345] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0346] The method also includes:
[0347] Obtain a target project corresponding to a target business resource, take the target project as a root node, and construct a confusion tree with the target obfuscated file, the first obfuscated file, the second obfuscated file, and the third obfuscated file as nodes, and place the obfuscated tree in a confusion tree set. Each node of the obfuscated tree includes at least one link table, and the link table stores obfuscation rules.
[0348] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0349] The method also includes:
[0350] In response to receiving the target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information;
[0351] According to the target project information, search for the target obfuscation tree corresponding to the target project from the obfuscation tree set;
[0352] In response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of a target node matching the deobfuscated content according to the deobfuscated content;
[0353] Dividing the deobfuscated content according to the target node type of the target node matching the deobfuscated content, and obtaining the deobfuscated content corresponding to each target node type;
[0354] Obtain the obfuscation rules corresponding to each target node type based on the target link table;
[0355] The deobfuscation operation is performed on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
[0356] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0357] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0358] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A business resource packaging method, characterized in that: include: In response to receiving a target business resource packaging instruction, triggering a target business resource obfuscation instruction, acquiring target component information and a first configuration identification library, wherein the first configuration identification library includes a resource tag and a first obfuscation rule; Determine the shared library resource according to the target component information and the resource tag, and obfuscate the shared library resource according to the first obfuscation rule to obtain a target obfuscated file; Acquire a target business resource to be obfuscated according to the resource tag, and obfuscate the target business resource to be obfuscated according to the first obfuscation rule to obtain a first obfuscated file; Obtaining a second configuration identification library, where the second configuration identification library includes a second obfuscation rule, and obfuscating the first obfuscated file based on the second obfuscation rule to obtain a second obfuscated file; Obtaining a target configuration identification file, wherein the target configuration identification file includes a third obfuscation rule, and obfuscating the second obfuscated file based on the third obfuscation rule to obtain a third obfuscated file; Packing the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package; Wherein, determining the shared library resource according to the target component information and the resource tag includes: acquiring the common component information from the pre-configured component library resources, and using the common component information matching the resource tag as the shared library resource; Obfuscating the shared library resources according to the first obfuscation rule to obtain the target obfuscated file includes: determining whether the shared library resource volume of each code in the shared library resources is greater than a preset obfuscation threshold, and if so, determining whether the shared library resources of the code greater than the preset obfuscation threshold include preset obfuscation parameters; taking the shared library resources corresponding to the shared library resource volume of the code greater than the preset obfuscation threshold including the preset obfuscation parameters as the target file; and obfuscating the target file in the shared library resources according to the first obfuscation rule to obtain the target obfuscated file.
2. The method according to claim 1, characterized in that The determining the shared library resource according to the target component information and the resource tag further includes: Loading a pre-configured component library resource, and acquiring common component information from the pre-configured component library resource; The common component information is matched with the resource tag, and the common component information matching the resource tag is used as a shared library resource.
3. The method according to claim 1, characterized in that The step of determining whether the shared library resource volume of each code in the shared library resource is greater than a preset obfuscation threshold, and if so, determining whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter includes: Obtain the shared library resource volume of each code in the shared library resource; Compare the shared library resource size of each code with a preset obfuscation threshold; When the shared library resource volume of any code is greater than a preset obfuscation threshold, it is determined whether the shared library resource of the code greater than the preset obfuscation threshold includes a preset obfuscation parameter.
4. The method according to claim 1, characterized in that: Obfuscating the target file in the shared library resource according to the first obfuscation rule to obtain the target obfuscated file comprises: Obtaining preset obfuscation parameters and types of preset obfuscation parameters included in the target file, wherein the types of preset obfuscation parameters include specific class names, method names, and variable names; Searching for replacement text from a preset dictionary according to the type of the preset obfuscation parameter; Use the replacement text to confuse and replace the preset obfuscation parameters to generate the target obfuscated file.
5. The method according to claim 1, characterized in that The step of acquiring the target service resource to be obfuscated according to the resource tag, and performing a first obfuscation on the target service resource to be obfuscated according to the first obfuscation rule to obtain a first obfuscated file comprises: Extracting the target code core elements corresponding to the target business resources to be obfuscated, wherein the target code core elements include the target code name, target code structure, target enumeration type, target global constant name, and target string; Obfuscating the target code name, the target enumeration type, and the target global constant name to generate first obfuscation information, and generating an obfuscation mapping table according to the first obfuscation information; Performing obfuscation processing on the target character string to generate second obfuscated information; Obtaining a target position relationship between an obfuscated element in the first obfuscated information and an obfuscated element in the second obfuscated information according to the target code structure, and obfuscating the target position relationship to obtain third obfuscated information; A first obfuscation file is generated according to the first obfuscation information, the second obfuscation information, and the third obfuscation information.
6. The method according to claim 1, characterized in that The obtaining of the second configuration identification library, wherein the second configuration identification library includes a second obfuscation rule, and the obfuscating of the first obfuscated file based on the second obfuscation rule to obtain the second obfuscated file includes: Loading a second configuration identification library to obtain second obfuscation rules, wherein the second obfuscation rules at least include resource path obfuscation rules and general function obfuscation rules; Identify resource paths and common functions from the first obfuscated file; The resource path in the first obfuscated file is obfuscated according to the resource path obfuscation rule; the general function in the first obfuscated file is obfuscated according to the general function obfuscation rule to obtain a second obfuscated file.
7. The method according to claim 1, characterized in that The acquiring of the target configuration identification file, wherein the target configuration identification file includes a third obfuscation rule, and the obfuscating of the second obfuscated file based on the third obfuscation rule to obtain the third obfuscated file includes: Obtaining a project packaging identifier, and obtaining a target configuration identification file according to the project packaging identifier, wherein the target configuration identification file includes specific business resources, specific business forms, and a third obfuscation rule corresponding to the target project; Identifying a target specific business resource and a target specific business form from the second obfuscated file; Encoding the target specific service resource based on the third obfuscation rule to obtain a first specific service code, and using the first specific service code to obfuscate the target specific service resource in the second obfuscated file to obtain a first specific obfuscated file; Parsing the target specific business form based on the third obfuscation rule to extract text information in the target specific business form and target business form structure information; Encoding the text information in the target specific business form to obtain a second specific business code, and obfuscating the target specific business form in the second obfuscated file based on the second specific business code and the target business form structure information to obtain a second specific obfuscated file; A third obfuscated file is obtained based on the first specific obfuscated file and the second specific obfuscated file.
8. The method according to claim 1, characterized in that The method further comprises: Obtaining a target public key, and using the target public key to encrypt the first configuration identification library, the second configuration identification library, and the target configuration identification file, to obtain an encrypted first configuration identification library, an encrypted second configuration identification library, and an encrypted target configuration identification file; The encrypted first configuration identification library, the encrypted second configuration identification library, and the encrypted target configuration identification file are stored in their corresponding code directories.
9. The method according to claim 8, characterized in that The obtaining of the target public key comprises: Get the name of the target business resource and the key fields of the target business resource; Performing hash value calculation on the name of the target business resource and the key field of the target business resource to obtain multiple hash values, and randomly sorting the hash values to generate a first secret key; Select a text of a preset length at any position in the first secret key for obfuscation operation to generate the target public key.
10. The method according to claim 9, characterized in that The step of packaging the third obfuscated file and the target obfuscated file to obtain a target business resource obfuscated package includes: Obtaining text structure information corresponding to the third obfuscated file and the target obfuscated file, and determining a compression model according to the text structure information corresponding to the third obfuscated file and the target obfuscated file; Importing the third obfuscated file and the target obfuscated file into a matrix database for storage as a data array; According to the row information in the data array, editing characteristic information of the row information layer by layer; The data array is encoded based on the feature information and the data is packaged.
11. The method according to claim 1, characterized in that: The method further comprises: A target project corresponding to a target business resource is obtained, a confusion tree is constructed with the target project as a root node, a target obfuscated file, a first obfuscated file, a second obfuscated file, and a third obfuscated file as nodes, and the obfuscated tree is placed in a confusion tree set, each node of the obfuscated tree includes at least one link table, and the link table stores obfuscation rules.
12. The method according to claim 11, characterized in that The method further comprises: In response to receiving a target business resource deobfuscation instruction, obtaining the target business resource deobfuscation carrying corresponding deobfuscation content and target project information; Searching for a target obfuscation tree corresponding to the target project from the obfuscation tree set according to the target project information; In response to finding the target obfuscation tree corresponding to the target project, searching for target node information and a target link table of a target node matching the deobfuscated content according to the deobfuscated content; Dividing the deobfuscated content according to the target node type of the target node matching the deobfuscated content to obtain the deobfuscated content corresponding to each target node type; Obtain the obfuscation rules corresponding to each target node type based on the target link table; A deobfuscation operation is performed on the deobfuscation content corresponding to each node type according to the deobfuscation content corresponding to each target node type and the obfuscation rule corresponding to each target node type.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
14. A computer 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, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
