CN111090463B - Resource identification method and device and computer storage medium - Google Patents

Resource identification method and device and computer storage medium Download PDF

Info

Publication number
CN111090463B
CN111090463B CN201911266254.7A CN201911266254A CN111090463B CN 111090463 B CN111090463 B CN 111090463B CN 201911266254 A CN201911266254 A CN 201911266254A CN 111090463 B CN111090463 B CN 111090463B
Authority
CN
China
Prior art keywords
resource
android
public
value
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911266254.7A
Other languages
Chinese (zh)
Other versions
CN111090463A (en
Inventor
饶福贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911266254.7A priority Critical patent/CN111090463B/en
Publication of CN111090463A publication Critical patent/CN111090463A/en
Application granted granted Critical
Publication of CN111090463B publication Critical patent/CN111090463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a resource identification method and device and a computer storage medium, and belongs to the technical field of computers; wherein the method comprises the following steps: configuring a fixed Identification (ID) value for Android (Android) public resources; establishing a mapping relation between the fixed ID value and the Android public resource; generating a resource identification configuration file of the Android public resource based on the mapping relation; and packaging the resource identification configuration file into a compressed file with a preset format for calling.

Description

Resource identification method and device and computer storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a resource identification method and device, and a computer storage medium.
Background
Each time the Android resource packaging tool (Android Asset Packaging Tool, AAPT) recompiles modified resources, the resources are re-assigned with identifiers (Identity document, IDs), which may cause that the same resource item is assigned with different IDs in two different compilations, and further cause trouble for the use of third party applications, and the compilation cannot be compatible with new and old Android versions once.
Disclosure of Invention
The disclosure provides a resource identification method and device and a computer storage medium.
According to a first aspect of embodiments of the present disclosure, there is provided a resource identification method, the method including:
configuring a fixed Identification (ID) value for Android (Android) public resources;
establishing a mapping relation between the fixed ID value and the Android public resource;
generating a resource identification configuration file of the Android public resource based on the mapping relation;
and packaging the resource identification configuration file into a compressed file with a preset format for calling.
In the above scheme, the configuring the fixed ID value for the Android public resource includes:
distributing a fixed ID value for each Android public resource; wherein, the fixed ID values corresponding to different Android public resources are different.
In the above scheme, the establishing the mapping relationship between the fixed ID value and the Android public resource includes:
determining the resource type, the resource name and the fixed ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the fixed ID value.
In the above scheme, the type of the Android public resource at least comprises one or more of the following:
string, ID, theme, picture, color.
In the above scheme, the packaging the resource identifier configuration file into a compressed file with a preset format includes:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool (Android Asset Packaging Tool, AAPT).
In the above scheme, the fixed ID value is located in the android ID segment, and the android ID segment is 0f000000-0fffffff.
According to a second aspect of embodiments of the present disclosure, there is provided a resource identification device, the device comprising:
an allocation unit configured to configure a fixed Identification (ID) value for an Android (Android) common resource;
the establishing unit is configured to establish a mapping relation between the fixed ID value and the Android public resource;
the generation unit is configured to generate a resource identification configuration file of the Android public resource based on the mapping relation;
and the packing unit is configured to pack the resource identification configuration file into a compressed file with a preset format for calling.
In the above aspect, the allocation unit is configured to:
distributing a fixed ID value for each Android public resource; wherein, the fixed ID values corresponding to different Android public resources are different.
In the above aspect, the establishing unit is configured to:
determining the resource type, the resource name and the fixed ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the fixed ID value.
In the above scheme, the type of the Android public resource at least comprises one or more of the following:
string, ID, theme, picture, color.
In the above aspect, the packing unit is configured to:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool AAPT.
In the above scheme, the fixed ID value is located in the android ID segment, and the android ID segment is 0f000000-0fffffff.
According to a third aspect of the embodiments of the present disclosure, there is provided a resource identification device, including:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to: executing the executable instructions to implement the resource identification method according to any one of the foregoing schemes.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer storage medium having stored therein executable instructions that, when executed by a processor, cause the processor to perform the resource identification method according to any one of the foregoing aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
configuring a fixed ID value for Android public resources; establishing a mapping relation between the fixed ID value and the Android public resource; generating a resource identification configuration file of the Android public resource based on the mapping relation; packaging the resource identification configuration file into a compressed file with a preset format for calling; in this way, because a fixed ID value is configured for each Android public resource, an independent resource identification configuration file is generated, and the configuration file is packaged into a compressed file, the configuration file can be conveniently called, the workload of a client side due to Android version compatibility is greatly reduced, and a large amount of manpower development cost is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. In the drawings:
FIG. 1 is a flow diagram illustrating a method of resource identification according to an example embodiment;
FIG. 2 is a block diagram of a resource identification device, according to an example embodiment;
fig. 3 is a block diagram illustrating an apparatus 800 implementing a resource identification process, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of embodiments of the present application as detailed in the accompanying claims.
The terminology used in the embodiments of the disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of embodiments of the present disclosure. The words "if" and "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination", depending on the context.
Example 1
Fig. 1 is a flowchart illustrating a resource identification method according to an exemplary embodiment, which is applied to an electronic device, as shown in fig. 1. The electronic devices include, but are not limited to, stationary devices including, but not limited to: personal computers (Personal Computer, PC) and the like; the mobile device includes, but is not limited to: a mobile phone, a tablet computer, etc. The resource identification method comprises the following steps:
in step S11, a fixed Identification (ID) value is configured for an Android (Android) public resource;
in step S12, a mapping relationship between the fixed ID value and the Android public resource is established;
in step S13, a resource identifier configuration file of the Android public resource is generated based on the mapping relation;
in step S14, the resource identifier configuration file is packaged into a compressed file with a preset format for calling.
In this embodiment, the type of the Android public resource at least includes one or more of the following:
string, ID, theme, picture, color.
In this embodiment, the fixed ID value is located in the android ID segment, and the android ID segment is 0f000000-0fffffff.
That is, the fixed identifier allocated for Android common resources is an 8-bit 16-ary value.
Therefore, the ID of the fixed resource is set in a segmented mode, and the application does not need to carry out re-adaptation work due to ID change after the android version is updated.
In this embodiment, the preset format includes, but is not limited to, APK format, AAR format, or the like.
By adopting the technical scheme of the embodiment, a fixed ID value is configured for the Android public resource; establishing a mapping relation between the fixed ID value and the Android public resource; generating a resource identification configuration file of the Android public resource based on the mapping relation; packaging the resource identification configuration file into a compressed file with a preset format for calling; in this way, because a fixed ID value is configured for each Android public resource, an independent resource identification configuration file is generated, and the configuration file is packaged into a compressed file, the configuration file can be conveniently called, the workload of a client side due to Android version compatibility is greatly reduced, and a large amount of manpower development cost is saved.
In some embodiments, configuring a fixed ID value for an Android common resource includes:
distributing a fixed ID value for each Android public resource; wherein, the fixed ID values corresponding to different Android public resources are different.
Therefore, since the fixed resource ID value is allocated to the Android public resources, when the Android public resources are exported for the third party application program to use, the compatibility of the third party application program can be ensured when the exported resources are modified later.
In some embodiments, establishing the mapping relationship between the fixed ID value and the Android common resource includes:
determining the resource type, the resource name and the fixed ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the fixed ID value.
The format content of the Android public resource comprises the following steps: a resource type, a resource name, and a fixed ID value.
Illustratively, the format of the Android common resource is:
< public type= "resource type" name= "resource name" id= "0x7f080000"/>
Thus, for the same public resource, compiling is compatible with new and old Android versions once, wherein the resource IDs generated after compiling different versions are the same; after the ID of the resource is fixed, the re-adaptation work is not needed because of Android upgrading, and the development work efficiency and Android version compatibility are improved.
In some embodiments, packaging the resource identification configuration file into a compressed file in a preset format includes:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool (Android Asset Packaging Tool, AAPT).
Thus, the third party application program is convenient to call, and the android system is also convenient to call.
Among Android resources, there is a type of resource called Public, i.e. Public resources, which are generally defined in res/values/Public. Xml files, in the form as follows:
<?xml version="1.0"encoding="utf-8"?>
<resources>
<public type="string"name="string3"id="0x7f040001"/>
</resources>
the following, for the purpose of example, a public. Xml file, consider the following string. Xml file:
<?xml version="1.0"encoding="utf-8"?>
<resources>
<string name="string1">String 1</string>
<string name="string3">String 3</string>
</resources>
suppose that the Android resource packaging tool AAPT allocates the following resource IDs for the string resource items string1 and string 3:
at this point, the third party application would consider the 0x7f040001 reference always to be String "String 3".
Assuming that on some future day, a new string needs to be added to the strings. Xml file, as follows:
<?xml version="1.0"encoding="utf-8"?>
<resources>
<string name="string1">String 1</string>
<string name="string2">String 2</string>
<string name="string3">String 3</string>
</resources>
if the public xml file is not available, the resource ID allocated by the Android resource packaging tool AAPT for the string resource items string1, string2 and string3 will be as follows:
at this time, the String that the third party application refers to through 0x7f040001 becomes "String 2".
If the String "String 3" is fixed to 0x7f040001 by using the public. Xml file, the resource IDs allocated by the Android resource packaging tool AAPT for the String resource items String1, string2 and String3 will be as follows:
thus, the String that the third party application references through 0x7f040001 is still "String 3".
Obviously, by adopting the resource identification scheme, the ID of the public resource is fixed, and no matter how other resources are added or deleted, the ID of the public resource is not influenced.
It should be understood that the codes shown above are merely illustrative and are not limiting in this application.
When a client program is developed, a fixed ID (identity) pulic.xml file is configured for a public resource; packaging the Android project code and the pulic. Xml file through an AAPT to generate a compressed file; providing the packed compressed file for a third party application program to use; the third party application program provides the items and the compressed files to the user client for use; obviously, convenience is provided for a developer of the third-party program, after the ID of the resource is fixed, the re-adaptation work is not needed because of Android upgrading, and the development work efficiency and the Android version compatibility are improved.
Example two
Fig. 2 is a block diagram illustrating a resource identification device, according to an example embodiment. Referring to fig. 2, the apparatus includes a distribution unit 10, a setup unit 20, a generation unit 30, and a packing unit 40.
The allocation unit 10 is configured to allocate a fixed ID value for the Android public resource;
the establishing unit 20 is configured to establish a mapping relationship between the fixed ID and the Android public resource;
the generating unit 30 is configured to generate a resource identification configuration file of the Android public resource based on the mapping relation;
the packaging unit 40 is configured to package the resource identifier configuration file into a compressed file with a preset format for calling.
In some embodiments, the dispensing unit 10 is configured to:
distributing a fixed ID value for each Android public resource; wherein, the fixed ID values corresponding to different Android public resources are different.
In some embodiments, the establishing unit 20 is configured to:
determining the resource type, the resource name and the fixed ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the fixed ID value.
In some embodiments, the type of the Android common resource at least includes one or more of the following:
string, ID, theme, picture, color.
In some embodiments, the packaging unit 40 is configured to:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool.
In some embodiments, the fixed ID value is located within an android ID field, and the android ID field is 0f000000-0fffffff.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
In practical applications, the specific structures of the allocation unit 10, the establishment unit 20, the generation unit 30, and the packaging unit 40 may be implemented by a central processing unit (CPU, central Processing Unit), a microprocessor (MCU, micro Controller Unit), a digital signal processor (DSP, digital Signal Processing), or a programmable logic device (PLC, programmable Logic Controller) in the resource identification device or an electronic device to which the resource identification device belongs.
The resource identification device described in this embodiment may be disposed in an electronic device.
It should be understood by those skilled in the art that the functions of each processing module in the resource identification device of the embodiments of the present disclosure may be understood by referring to the foregoing description of the resource identification method, and each processing module in the resource identification device of the embodiments of the present disclosure may be implemented by using an analog circuit that implements the functions of the embodiments of the present disclosure, or may be implemented by running software that implements the functions of the embodiments of the present disclosure on an electronic device.
The resource identification device disclosed by the embodiment of the invention can greatly reduce the workload of the client side caused by Android version compatibility, and saves a great amount of manpower development cost; compatibility of the third party application ID can also be ensured.
The embodiment of the disclosure also discloses a resource identification device, which comprises: the resource identification method provided by any one of the technical schemes is realized when the processor executes the program.
As an embodiment, the processor implements:
configuring a fixed ID value for Android public resources;
establishing a mapping relation between the fixed ID value and the Android public resource;
generating a resource identification configuration file of the Android public resource based on the mapping relation;
and packaging the resource identification configuration file into a compressed file with a preset format for calling.
As an embodiment, the processor implements:
distributing a fixed ID value for each Android public resource; wherein, the fixed ID values corresponding to different Android public resources are different.
As an embodiment, the processor implements:
determining the resource type, the resource name and the fixed ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the fixed ID value.
The type of the Android public resource at least comprises one or more of the following:
string, ID, theme, picture, color.
As an embodiment, the processor implements:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool.
The fixed ID value is located in an android ID segment, and the android ID segment is 0f000000-0fffffff.
The resource identification device provided by the embodiment of the application can greatly reduce the workload of the client side caused by Android version compatibility, and saves a great amount of manpower development cost; compatibility of the third party application ID can also be ensured.
The embodiments of the present application also describe a computer storage medium, where computer executable instructions are stored, where the computer executable instructions are configured to perform the resource identification method described in the foregoing embodiments. That is, the computer executable instructions, when executed by the processor, implement the resource identification method provided by any one of the foregoing technical solutions.
It should be understood by those skilled in the art that the functions of each program in the computer storage medium of the present embodiment can be understood with reference to the description of the resource identification method described in the foregoing embodiments.
Example III
Fig. 3 is a block diagram illustrating an apparatus 800 implementing a resource identification process, according to an example embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 3, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an Input/Output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The Memory 804 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as Static Random-Access Memory (SRAM), electrically erasable programmable Read-Only Memory (EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The power component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 800 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, an orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor, CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as Wi-Fi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a near field communication (Near Field Communication, NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on radio frequency identification (Radio Frequency Identification, RFID) technology, infrared data association (Infrared Data Association, irDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processor (Digital Signal Processor, DSP), digital signal processing device (Digital Signal Processing Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor, or other electronic element for performing the resource identification method described above.
In an exemplary embodiment, a non-transitory computer storage medium is also provided, such as memory 804 including executable instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer storage medium may be ROM, random access memory (Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The technical schemes described in the embodiments of the present disclosure may be arbitrarily combined without any conflict.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (14)

1. A method of resource identification, the method comprising:
configuring a resource ID value for Android public resources; wherein the Android public resource can be used by a third party application;
establishing a mapping relation between the resource ID value and the Android public resource;
generating an Android public resource independent resource identification configuration file based on the mapping relation; the resource identification configuration file capable of including a plurality of public resources is as follows: public. Xml files; the resource identification configuration file comprises: resource type, resource name, and resource ID value; when adding and deleting resources, the resource ID value in the public. Xml file is not affected;
and packaging the resource identification configuration file into a compressed file with a preset format for calling.
2. The method for identifying resources according to claim 1, wherein the configuring the resource ID value for the Android common resource includes:
distributing a resource ID value for each Android public resource; wherein, the resource ID values corresponding to different Android public resources are different.
3. The method for identifying resources according to claim 1, wherein the establishing a mapping relationship between the resource ID value and the Android public resource includes:
determining the resource type, the resource name and the resource ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the resource ID value.
4. The resource identification method according to claim 1, wherein the type of the Android common resource at least comprises one or more of the following:
string, ID, theme, picture, color.
5. The method for identifying resources according to claim 4, wherein said packaging the resource identification configuration file into a compressed file in a preset format includes:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool AAPT.
6. The resource identification method according to claim 1, wherein the resource ID value of the common resource is located in an android ID segment, and the android ID segment is 0f000000-0fffffff.
7. A resource identification device, the device comprising:
the distribution unit is configured to allocate resource ID values for Android public resources; wherein the Android public resource can be used by a third party application;
the establishing unit is configured to establish a mapping relation between the resource ID value and the Android public resource;
the generating unit is configured to generate an Android public resource independent resource identification configuration file based on the mapping relation; the resource identification configuration file capable of including a plurality of public resources is as follows: public. Xml files; the resource identification configuration file comprises: resource type, resource name, and resource ID value; when adding and deleting resources, the resource ID value in the public. Xml file is not affected;
and the packing unit is configured to pack the resource identification configuration file into a compressed file with a preset format for calling.
8. The resource identification device of claim 7, wherein the allocation unit is configured to:
distributing a resource ID value for each Android public resource; wherein, the resource ID values corresponding to different Android public resources are different.
9. The resource identification device of claim 7, wherein the establishing unit is configured to:
determining the resource type, the resource name and the resource ID value of the Android public resource;
and establishing a one-to-one correspondence between the resource type and the resource name and the resource ID value.
10. The resource identification device of claim 9, wherein the type of Android common resource at least comprises one or more of the following:
string, ID, theme, picture, color.
11. The resource identification device of claim 7, wherein the packaging unit is configured to:
and packaging the resource identification configuration file into a compressed file with a preset format through an Android resource packaging tool AAPT.
12. The resource identification device of claim 7, wherein the resource ID value of the common resource is located in an android ID segment, and the android ID segment is 0f000000-0fffffff.
13. A resource identification device, comprising:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to: executing the executable instructions to implement the resource identification method of any of claims 1 to 6.
14. A computer storage medium having stored therein executable instructions which, when executed by a processor, cause the processor to perform the resource identification method of any of claims 1 to 6.
CN201911266254.7A 2019-12-11 2019-12-11 Resource identification method and device and computer storage medium Active CN111090463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911266254.7A CN111090463B (en) 2019-12-11 2019-12-11 Resource identification method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911266254.7A CN111090463B (en) 2019-12-11 2019-12-11 Resource identification method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN111090463A CN111090463A (en) 2020-05-01
CN111090463B true CN111090463B (en) 2023-07-25

Family

ID=70394844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911266254.7A Active CN111090463B (en) 2019-12-11 2019-12-11 Resource identification method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN111090463B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076147B (en) * 2021-03-09 2024-02-02 北京一亩田新农网络科技有限公司 Dynamic APK resource loading method, device, system and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520929A (en) * 2011-11-24 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Management method and device of system resource
CN103034492A (en) * 2012-12-06 2013-04-10 广东欧珀移动通信有限公司 Method and system for carrying out segmentation and distribution on ID (Identity) for Android equipment resource
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140081A1 (en) * 2002-01-15 2003-07-24 De Bonet Jeremy S. Method and system of accessing shared resources using configurable management information bases

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520929A (en) * 2011-11-24 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Management method and device of system resource
CN103034492A (en) * 2012-12-06 2013-04-10 广东欧珀移动通信有限公司 Method and system for carrying out segmentation and distribution on ID (Identity) for Android equipment resource
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications

Also Published As

Publication number Publication date
CN111090463A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
EP3142006A2 (en) Device control method and apparatus
CN111240694B (en) Application detection method, application detection device and storage medium
CN106991018B (en) Interface skin changing method and device
CN109117144B (en) Page processing method, device, terminal and storage medium
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN105094830A (en) Method and device for executing target functions
CN110166564B (en) Information communication method, terminal and storage medium
CN111090463B (en) Resource identification method and device and computer storage medium
CN113312103A (en) Software definition method and device for intelligent camera, electronic equipment and storage medium
CN112925788A (en) Data set management method, system, device, electronic equipment and storage medium
CN112860625B (en) Data acquisition method, data storage method, device, equipment and storage medium
CN109032583B (en) Data interaction method and device
CN109194639B (en) Message receiving and processing method, device, terminal and readable storage medium
CN108958943B (en) Memory release method and device
CN111240735B (en) Application packaging method, application packaging device and storage medium
CN114745495B (en) Image generation method, device and storage medium
CN111221512B (en) Function module mixed use method, electronic device and storage medium
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN111339298B (en) Classification prediction method, device and storage medium
CN114528037B (en) Application starting method and device, electronic equipment and storage medium
CN111241097B (en) Method for processing object, device for processing object and storage medium
CN111767249B (en) Method and device for determining self-running time of function
CN114416218B (en) Data processing method and device, electronic equipment and storage medium
CN111273910B (en) Method, device and storage medium for acquiring resource number identifier
CN108205452B (en) Software execution control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant