Detailed Description
The embodiments of the present disclosure will be described in detail below with reference to the attached drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system architectures, flows, techniques, etc. in order to provide a thorough understanding of the present application.
The technical solutions in the embodiments of the present disclosure are clearly and completely described with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to be limiting. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present disclosure are shown in the drawings. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
Reference in the present disclosure to "an embodiment" means that a particular feature, procedure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present disclosure. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The steps in the embodiments of the present disclosure are not necessarily processed according to the described step sequence, and may be rearranged selectively according to the requirement, or steps in the embodiments may be deleted, or steps in the embodiments may be added, where the description of the steps in the embodiments of the present disclosure is only an optional sequential combination, and does not represent all the sequential combinations of steps in the embodiments of the present disclosure, and the sequence of steps in the embodiments should not be considered as limiting the present disclosure.
The term "and/or" in the embodiments of the present disclosure is merely one association describing an associated object, and is a possible combination including any and all of one or more of the associated listed items, which means that three relationships may exist, for example, a and/or B, and that three cases, a alone, a and B together, and B alone, may be represented. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship. Further, "multiple" in the present disclosure means two or more than two. In addition, the term "at least one" in this disclosure means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C. It should be further noted that the terms "comprises" and/or "comprising," when used in this disclosure, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and/or components, and/or groups thereof.
The terms "first," "second," and the like in embodiments of the present disclosure are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In addition, although the terms "first," "second," etc. may be used multiple times in the embodiments of the present disclosure to describe various operations (or various elements or various applications or various instructions or various thresholds) etc., these operations (or elements or applications or instructions or thresholds) should not be limited by these terms. These terms are only used to distinguish one operation (or element or application or instruction or threshold) from another operation (or element or application or instruction or threshold). For example, a first class of objects may be referred to as second class of objects, which may also be referred to as first class of objects, with only the scope encompassed by both of them being different, without departing from the scope of the disclosure, the first class of objects and the second class of objects may both be collections of various objects, with only both of them not being collections of the same objects, and with at least one object contained in a collection of various objects.
The intelligent terminal of the embodiments of the present disclosure may be implemented in various forms. The smart terminal may be a mobile terminal including a device such as a capture and recognition device (e.g., a video camera and a video recorder), a mobile phone, a smart phone, a notebook computer, a Personal Digital Assistant (PDA), a tablet Personal computer (PAD), etc., or a fixed terminal such as a digital broadcast transmitter, a digital TV, a desktop computer, a server, etc. In the following, it is assumed that the intelligent terminal is a fixed terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiments of the present disclosure can be applied to a mobile type terminal in addition to being particularly used for a fixed type element.
In one embodiment, software design engineers currently use most Android applications to obfuscate resources and their original variable names for security and reduced installation package size. However, when a part of Resources need to acquire the storage path of the Resources through the original variable names of the Resources in the running process of the subsequent program, the Resources are not confused, the Resources are generally added into a white list uniformly, the Resources in the white list are not confused, the original variable names are kept, and when the storage path of the Resources needs to be acquired in the running process of the subsequent program, the intelligent terminal reflects the white list through the original variable names of the Resources and calls GETIDENTIFIER methods of Resources class, so that the storage path of the Resources is acquired.
However, there are some unavoidable drawbacks to the above approach by adding resources to a white list. For example, if there are more resources in the whitelist, then a significant portion of the resources are not confusing, and the effect of increasing security and reducing the size of the installation package is diminished. For another example, if a resource is needed to be acquired by a name in an item, the source of the resource is uncertain (for example, the name is not known but issued through a network), and then the resource cannot be added to a white list, only confusion can be abandoned, and the quantity of the white list is increased. And white lists require constant manual maintenance, which is prone to mistakes and leaks, causing some unknown problems.
Therefore, the application aims to provide a method for obtaining the confusing resources, which can still obtain the corresponding resources after confusing through the original variable names of the resources under the condition that all the resources are confusing, and does not need to set a white list, thereby playing the role of resource confusing to the greatest extent and reducing the manpower maintenance cost.
The method for obtaining the confusing resources in the embodiments of the present disclosure is applied to a resource installation package, where the resource installation package is a software development kit (SoftwareDevelopmentKit, abbreviated as SDK) of an intelligent terminal, which can provide general function components for application programs in the intelligent terminal, the application programs can integrate various function modules by referring to the SDK and calling interfaces of the SDK, and inside the resource installation package, there are multiple computer programs which can be run in a user mode to complete some or more specific tasks, the computer programs can be modified by a user, alternatively, the intelligent terminal can be used for program operation based on Liunx (GNU/Linux) system, mac (Macintosh) system, microsoft system, or the like, and the intelligent terminal can also be based onA platform(s),A platform(s),Platforms orPlatforms, etc. are used for program applications.
In one embodiment, as shown in fig. 1, fig. 1 is a schematic diagram of an embodiment of a file configuration in the present application, in which a custom sub-class Context (customContext) is set in a Context class (Context class) of a resource installation package, and a custom sub-class resource management file (CustomResources) of a resource management class (Resources class) is set in the sub-class Context. The Context class represents an application scenario, which describes information of an application environment, i.e. a Context, which represents a process of interaction with an operating system.
Wherein CustomResources is an extension class based on Kubernetes API, and the running state of the resource in the cluster can be controlled by dynamically registering the CustomResources class. And after installation CustomResources of the class, objects of the CustomResources class can be created and accessed through kubectl configuration as with built-in resources (e.g., pod resources). Alternatively, custom CustomResources classes typically have two ways, by way of CRD (CustomResourceDefinitions) and by way of using an aggregate API.
In one embodiment, in the application development process, if an object of the Resources class is to be used, the object needs to be acquired through an object of the Context class, and it cannot directly acquire the Resources object through the Resources class. Therefore, if the custom CustomResources class is set to the Context class, that is, the Resources object is saved in the Context object, and one resource object is saved in one Context object, the custom Resources object needs to be set to the custom customContext class in the constructor of the Resources class, and then the custom Resources object can be set to the Context object through the custom Context object, so that when the Context class is started to acquire Resources subsequently, the Context class acquires the custom Resources object.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for obtaining a confusing resource according to a first embodiment of the present application. The method is applied to the intelligent terminal in the above embodiment, so as to be executed by the intelligent terminal, and specifically, the method may include the following steps:
step 11. Before starting GETIDENTIFIER the method based on the context class, the sub-class context is passed into the first class object and the second class object of the context class to rewrite GETIDENTIFIER the method.
Specifically, before the intelligent terminal starts GETIDENTIFIER the method based on the context class to obtain the storage path of the confusing resource, the intelligent terminal needs to transfer the sub-class context into the first class object and the second class object of the context class to rewrite GETIDENTIFIER the method.
In one embodiment, the first class of objects of the Context class is an Application object of the Context class, and the second class of objects is an Activity object. The Application object and the Activity object are a sub-class Context of ContextWrapper class (wrapper class) in the Context class.
The Activity object class internally comprises a Theme (Theme) related interface which is specified by an android: theme attribute, namely the Activity object needs an android Theme.
Referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment of step 11 in the present application. Specifically, step 11 may include the steps of:
step 111, creating an Application object and an Activity object before starting GETIDENTIFIER the method based on the context class.
In one embodiment, an Application object is first created in response to an Application of the intelligent terminal being started for the first time. And, the timing of creating the Application object is in the create handleBindApplication () method whose function is in the activitythread.
In an embodiment, when the intelligent terminal detects that an Activity object needs to be newly created, the intelligent terminal requests to start an Activity object through a STARTACTIVITY () method or a startActivityForResult () method, and can call back a handleLaunchActivity () method through the two methods, and further call up a performLaunchActivity () method, a callback onCreate () method and a onStart () method through the two methods, so that an Activity instance is created. Wherein the functions of performLaunchActivity () method, onCreate () method, and onStart () method are all located in the activitythread.
Step 112, when initializing based on the Application object and the Activity object, calling attachBaseContext the method to transfer the subclass context into the Application object and the Activity object to rewrite GETIDENTIFIER the method.
Specifically, the method for rewriting GETIDENTIFIER method is that when Application object and Activity object are created, and when Application object starts initialization program, the method is called attachBaseContext to transfer the self-defined sub-class context into Application object, and when Activity object starts initialization program, the method is called attachBaseContext to transfer the self-defined sub-class context into Activity object to rewrite GETIDENTIFIER method. Further, all the places in the application that call GETIDENTIFIER methods eventually call GETIDENTIFIER methods that are rewritten in custom CustomResources.
In an embodiment, before the method GETIDENTIFIER is rewritten, a mapping relationship between the identification information of the confusion resource and the original variable name needs to be established, so that the original variable name of the confusion resource is used for mapping to the identification information of the confusion resource through the rewritten GETIDENTIFIER method, and then the actual storage path of the confusion resource is indexed through the identification information of the confusion resource. Wherein, the identification information of the confusing resource can be the resource ID of the confusing resource. Wherein the identification information of the confusing resource and the actual storage path are not changed with the confusing of the resource.
Referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment of establishing a mapping relationship between identification information of a confusing resource and an original variable name in the present application. Specifically, the method may include the steps of:
and a step a1, obtaining a resource installation package.
Specifically, the intelligent terminal can be connected with a third-party mechanism (such as a computer, a cloud server or a data processing platform) to transmit the resource installation package to the intelligent terminal through the third-party mechanism, and collect the resource installation package.
And a2, compiling the original resources in the resource installation package to generate a mapping relation table of the identification information of the confused resources and the original variable names.
Specifically, the intelligent terminal compiles the original resources in the resource installation package and simultaneously generates a mapping relation table corresponding to the identification information and the original variable names one by one. The mapping relation table may be further classified, for example, the identification information and the original variable name are the last level, the last level is the application package name to which the resource belongs, and the last level of the application package name may be the resource type of the resource. Therefore, when the mapping relation table is used for mapping index, the resource type of the resource is firstly used for indexing to the level of the resource type in the mapping relation table, then the application package name is used for mapping index so as to map to the level of the application package name of the resource, and in the application package name, the identification information of the resource is indexed through the original variable name of the resource.
Alternatively, the MAP table that confuses the identification information of the resource with the original variable name may be a MAP file. The MAP file is a mapping file generated after the CCS software is compiled and related to DSP (digital signal processing) to all programs, data and IO space. The MAP file is roughly divided into four parts, namely a file header, a memory configuration, a segment MAP and a global symbol. The MEMORY allocation is associated with a MEMORY command in the CMD file, a program defined in the CMD file and a data interval are defined, and when the MEMORY allocation is different from the CMD file, an actually used interval, that is, a space length actually used in the program, is added in the MAP file. The segment map portion is associated with the SECTION (section) instruction in the CMD file, and the start address and the actual length of the actual map of all segments in the program portion are described in detail. May be specific to the section specified in the program PROGMA (preprocessing instruction) and the OBJ (engineering project) file generated by each individual file. The global symbol may be each function used by the program, where the global variable defined in the program may find the corresponding starting address. The MAP file is enumerated in two ways, one arranged by corresponding address and the other arranged by global symbol letter.
And a step a3, storing the mapping relation table in an R.java class file.
The R.java file is automatically generated by the intelligent terminal during compiling and is used for defining indexes of all various types of resources in the Android program. And, the content in the R.java class file is read-only, and the developer does not modify the content. The mapping relation table is stored in the R.java class file, so that a user can conveniently restore and trace the confusion rules and the confusion resources.
And a step a4, confusing the original resources to form confusing resources.
Specifically, the original variable name and the resource ID given to the resource file at the time of compiling are the original resources of the resource file. After the original resource of the resource file is obtained, the original resource needs to be subjected to confusion processing through a preset confusion rule.
In one embodiment, the obfuscation process specifically refers to obfuscating the resource file and replacing the original variable name of the original resource with a simple alphabetic combination.
In one embodiment, the confusion rule is a method for generating a new resource variable name, and in this embodiment, the new resource variable name can be generated by randomly generating a letter combination of a predetermined length, randomly generating a letter combination of an indefinite length, or generating letter combinations of increasing lengths in a permutation manner. However, the resource variable names obtained by the confusion process are not limited to this, and the new resource variable names formed by the confusion rule can be (but not limited to) a numerical combination, a mixed combination of numbers and letters, or a common graphic combination according to the application scene. In this embodiment, the letters are not limited to the common english letters, and can be any one of the world text systems having letter characters according to the application scenario.
And replacing the original variable names with the new resource variable names generated according to the preset confusion rules to complete confusion. The new resource variable name is the confusing identity file of the resource file.
And 12, acquiring the identification information of the confusing resource based on the rewritten GETIDENTIFIER method.
Referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of step 12 in the present application. Specifically, step 12 may include the steps of:
step 121, call getResource method in the sub-class context to return sub-class resource management file.
Specifically, the intelligent terminal is used to return a URL (i.e., uniform resource locator) with a given resource name by calling the getResource method in the sub-class context, and therefore, the resource name of the given sub-class resource management file is required before calling the getResource method to return the uniform resource locator of the sub-class resource management file by the method.
The getResource method is a non-static method, which can only be accessed by objects of a class, and if an attempt is made to access the method using the class name, an error message is received. Also, the getResource method may be used in the java.
Step 122, reloading GETIDENTIFIER methods in the sub-class resource management file.
Specifically, the user inputs GETIDENTIFIER method instructions to the intelligent terminal to start the system to finally reload GETIDENTIFIER methods into the returned sub-class resource management file (i.e., custom CustomResources).
And 123, acquiring identification information based on a GETIDENTIFIER method of reloading.
Referring to fig. 6, fig. 6 is a flowchart illustrating an embodiment of obtaining identification information according to the present application. Specifically, step 123 may include the steps of:
And step b1, transmitting the original variable names, the resource types and the application package names of the confusing resources into the GETIDENTIFIER method so as to reload the GETIDENTIFIER method.
Specifically, in the method GETIDENTIFIER of the system, the user transmits the original variable name, the resource type and the application package name of the confusing resource into the method GETIDENTIFIER, the method GETIDENTIFIER of the system starts to start the identification information corresponding to the original variable name of the confusing resource, applies the GETIDENTIFIER method of the final system to the sub-class resource management file, and reloads the method GETIDENTIFIER in CustomResources based on the original variable name, the resource type and the application package name of the confusing resource.
And b2, reflecting and calling the R.java class file by using the original variable name, the resource type and the application package name based on the method GETIDENTIFIER of the reload so as to index the resource ID.
Referring to fig. 7, fig. 7 is a flowchart illustrating an embodiment of performing resource ID indexing in the present application. Specifically, step b2 may include the steps of:
And step c1, reflecting and calling a mapping relation table in the R.java file by using the original variable name, the resource type and the application package name.
Specifically, in the GETIDENTIFIER method in CustomResources, the intelligent terminal invokes the mapping relation table in the r.java file, reflects the application package name to which the confusing resource belongs by using the application package name, and reflects the resource type to which the confusing resource belongs in the corresponding application package name by using the resource type.
And c2, indexing the resource ID corresponding to the original variable name based on the mapping relation table.
Specifically, the intelligent terminal indexes the corresponding resource ID based on the original variable name of the confusing resource in the mapping relation table.
And b3, acquiring the ID name based on the result of the resource ID index.
Specifically, the result of the resource ID index obtained by the GETIDENTIFIER method includes returning a resource ID (i.e., the resource ID index was successful) and returning a "0" value (i.e., the resource ID index was failed).
And step 13, obtaining the confusing resource based on the identification information.
Specifically, after the intelligent terminal compiles the resource installation package, the resource ID and the actual path of the resource are not changed in the running process of the application. Therefore, the intelligent terminal indexes the path of the confusing Resource in the Resource management class (Resource class) based on the identification information (i.e. Resource ID) acquired by the GETIDENTIFIER method, so as to obtain the actual storage path of the confusing Resource, and acquires the confusing Resource according to the actual storage path.
In one embodiment, the intelligent terminal indexes the actual path of the confusing Resource in at least one of a string class file (Public STATIC CLASS STRING class), a layout class file (Public STATIC CLASS layout class), or an image class file (Public STATIC CLASS drawable class) of the Resource management class (Resource class).
Referring to fig. 8, fig. 8 is a flowchart illustrating a method for obtaining a confusing resource according to a second embodiment of the present application. The method is applied to the intelligent terminal in the above embodiment, so as to be executed by the intelligent terminal, and specifically, the method may include the following steps:
Step S1, APP calls context.
Specifically, the intelligent terminal control application program (i.e. APP) firstly calls the getResource () method in context class to return to Resource object, then the user inputs the original name of the confusing Resource to the intelligent terminal to start the program for calling GETDENTIFIER (STERING NAME) method in Resource object.
And step S2, the intelligent terminal responds to calling GETDENTIFIER (STERING NAME) the method, and the context class creates and initializes the Application class and the Activity class. When the Application class and the Activity class are initialized, the intelligent terminal transmits the self-defined Context class into the Application class and the Activity class so as to start attachBaseSontext (Context Context) methods for calling the Application class and the Activity class.
Step S3, the intelligent terminal responds to the call attachBaseSontext (Context Context) method, the custom CustomContext object in the custom Context class returns the custom CustomResources object packaged in the custom object to the system, and then the user inputs the original name of the confusing resource to the intelligent terminal to start the call GETDENTIFIER (STRING NAME) method in the CustomResources object.
And step S4, the intelligent terminal responds to the GETDENTIFIER (STRING NAME) method in the object of the call CustomResources, and the intelligent terminal reflects and calls at least one of Public STATIC CLASS STRING file, public STATIC CLASS drawable and Public STATIC CLASS layout in the R.java file in the Resource class so as to reflect the Resource ID corresponding to the original name of the confusing Resource in the at least one folder. And subsequently, the user indexes the actual storage path of the corresponding confusing Resource in the Resource class according to the Resource ID.
Compared with the prior art, the method for acquiring the confusing resources is applied to a resource installation package, wherein a self-defined sub-class context is arranged in a context class of the resource installation package, a self-defined sub-class resource management file of a resource management class is arranged in the sub-class context, the method comprises the steps of transmitting the sub-class context into a first class object and a second class object of the context class before starting GETIDENTIFIER based on the context class, overwriting GETIDENTIFIER, acquiring identification information of the confusing resources based on a rewritten GETIDENTIFIER method, and acquiring the confusing resources based on the identification information. By means of the method, the intelligent terminal utilizes the custom sub-class resource management file set in the custom sub-class context to rewrite GETIDENTIFIER methods, and under the condition that all resources are guaranteed to be confused, the corresponding resources after confusion can be obtained through the rewritten GETIDENTIFIER method, so that the flow of obtaining the confused resources is optimized, and the resource management cost is reduced.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an intelligent terminal provided by the present application, where the intelligent terminal 100 includes a processor 101 and a memory 102 connected to the processor 101, where the memory 102 stores program data, and the processor 101 retrieves the program data stored in the memory 102 to execute the above method for obtaining confusing resources.
Optionally, in an embodiment, the processor 101 is applied to a resource installation package, wherein a context class of the resource installation package is provided with a custom sub-class context, the sub-class context is provided with a custom sub-class resource management file of a resource management class, and the processor 101 is configured to execute program data to implement a method of transferring the sub-class context into a first class object and a second class object of the context class to rewrite GETIDENTIFIER before starting GETIDENTIFIER method based on the context class, acquiring identification information of the confusing resource based on GETIDENTIFIER method of the rewrite, and acquiring the confusing resource based on the identification information.
According to the scheme, the intelligent terminal 100 utilizes the custom sub-class resource management file set in the custom sub-class context to rewrite GETIDENTIFIER methods, and can obtain the corresponding resources after confusion through the rewritten GETIDENTIFIER method under the condition that all the resources are guaranteed to be confused, so that the flow of obtaining the confused resources is optimized, and the resource management cost is reduced.
The processor 101 may also be referred to as a CPU (Central Processing Unit ). The processor 101 may be an electronic chip with signal processing capabilities. The Processor 101 may also be a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 101 may be commonly implemented by an integrated circuit chip.
The memory 102 may be a memory bank, a TF card, or the like, and may store all information in the intelligent terminal 100, including input raw data, a computer program, intermediate operation results, and final operation results, which are stored in the memory 102. It stores and retrieves information based on the location specified by the processor 101. With the memory 102, the intelligent terminal 100 has a memory function, so that normal operation can be ensured. The memory 102 of the intelligent terminal 100 may be classified into a main memory (memory) and an auxiliary memory (external memory) according to the purpose, and may be classified into an external memory and an internal memory. The external memory is usually a magnetic medium, an optical disk, or the like, and can store information for a long period of time. The memory refers to a storage component on the motherboard for storing data and programs currently being executed, but is only used for temporarily storing programs and data, and the data is lost when the power supply is turned off or the power is turned off.
By way of example, and not limitation, as shown in fig. 9, memory 102 may be loaded with application programs, program data, and an operating system that may include various applications being executed, such as a Web browser, middle tier application, relational database management system (RDBMS), and the like. As an example, the operating system may include various versions of Microsoft WindowsAppleAnd/or Linux operating systems, various commercial or classOperating systems (including but not limited to various GNU/Linux operating systems, google)OS, etc.) and/or a mobile operating system, such asPhone、OS、OS、OS operating systems, as well as other operating systems.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described embodiment of the intelligent terminal 100 is merely exemplary, for example, the method of reloading GETIDENTIFIER the method according to the original variable name, the resource type and the application package name of the confusing resource, the reflection calling the r.java class file to index the resource ID, etc. is merely a collective way, and there may be another division way when actually implemented, for example, the string class file, the layout class file or the image class file of the resource management class may be combined or may be collected into another system, or some features may be omitted or not performed.
In addition, each functional unit (such as context class and resource management class) in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer readable storage medium provided in the present application, where the computer readable storage medium 110 stores program instructions 111 capable of implementing all the methods described above.
The units integrated with the functional units in the various embodiments of the present application may be stored in the computer-readable storage medium 110 if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or all or part of the technical solution in the form of a software product, and the computer readable storage medium 110 includes several instructions in a program instruction 111 to enable a computer device (which may be a personal computer, a system server, or a network device, etc.), an electronic device (such as MP3, MP4, etc., also a mobile terminal such as a mobile phone, a tablet computer, a wearable device, etc., also a desktop computer, etc.), or a processor (to perform all or part of the steps of the methods of the embodiments of the present application.
Optionally, in an embodiment, the program instruction 111 is applied to the resource installation package, where a context class of the resource installation package is provided with a custom sub-class context, the sub-class context is provided with a custom sub-class resource management file of a resource management class, and the program instruction 111 when executed by the processor is configured to implement a method of transferring the sub-class context into a first class object and a second class object of the context class to rewrite GETIDENTIFIER before starting GETIDENTIFIER method based on the context class, obtain identification information of the confusing resource based on GETIDENTIFIER method rewritten, and obtain the confusing resource based on the identification information.
In the above solution, the computer readable storage medium 110 uses the custom sub-class resource management file set in the custom sub-class context to rewrite GETIDENTIFIER the method, and can obtain the corresponding resource after confusion by using the rewritten GETIDENTIFIER method under the condition that all the resources are guaranteed to be confused, so as to optimize the flow of obtaining the confused resource and reduce the resource management cost.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media 110 (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer readable storage medium 110. These computer-readable storage media 110 may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the program instructions 111, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-readable storage media 110 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that program instructions 111 stored in the computer-readable storage media 110 produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-readable storage media 110 may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the program instructions 111 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one embodiment, these programmable data processing devices include a processor and memory thereon. The processor may also be referred to as a CPU (Central Processing Unit ). The processor may be an electronic chip with signal processing capabilities. The processor may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, or discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be a memory bank, TF card, etc. that stores and retrieves information based on the location specified by the processor. The memories can be classified into main memories (memories) and auxiliary memories (memories) according to the purpose, and there are also classification methods of external memories and internal memories. The external memory is usually a magnetic medium, an optical disk, or the like, and can store information for a long period of time. The memory refers to a storage component on the motherboard for storing data and programs currently being executed, but is only used for temporarily storing programs and data, and the data is lost when the power supply is turned off or the power is turned off.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes according to the present application and the accompanying drawings, or direct or indirect application in other related technical fields, are included in the scope of the present application.