CN116842206A - Picture resource calling method and device, electronic equipment and storage medium - Google Patents

Picture resource calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116842206A
CN116842206A CN202310716948.6A CN202310716948A CN116842206A CN 116842206 A CN116842206 A CN 116842206A CN 202310716948 A CN202310716948 A CN 202310716948A CN 116842206 A CN116842206 A CN 116842206A
Authority
CN
China
Prior art keywords
picture resource
picture
public
layer
library
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.)
Pending
Application number
CN202310716948.6A
Other languages
Chinese (zh)
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.)
Hangzhou Ezviz Network Co Ltd
Original Assignee
Hangzhou Ezviz Network 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 Hangzhou Ezviz Network Co Ltd filed Critical Hangzhou Ezviz Network Co Ltd
Priority to CN202310716948.6A priority Critical patent/CN116842206A/en
Publication of CN116842206A publication Critical patent/CN116842206A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a picture resource calling method, a picture resource calling device, electronic equipment and a storage medium, relates to the technical field of data processing, and particularly relates to the picture resource calling method, the picture resource calling device, the electronic equipment and the storage medium, wherein the specific implementation scheme is as follows: obtaining identification information of picture resources to be called; if the software layer needing to call the picture resource is not the first software layer, calling a picture resource information obtaining interface provided by the first software layer through a native layer based on the identification information to obtain the access information of the picture resource provided by the first software layer in the public picture resource library, wherein the first software layer is the software layer configured with the public picture resource library; and calling a first picture resource obtaining mode provided by the original layer according to the access information, and calling the picture resource from the public picture resource library. By applying the scheme provided by the embodiment of the application, the inclusion of the application software can be reduced, and the occupied storage space is reduced.

Description

Picture resource calling method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for calling a picture resource, an electronic device, and a storage medium.
Background
When developing application software, developers increasingly use multiple development technologies to jointly develop the same application software, for example, the same application software can be jointly developed by using a Native development technology of an operating system such as IOS (IPhone Operating System, apple operating system), android, etc., a Flutter (open-source toolkit for constructing a user interface) development technology, a reactive Native (open-source mobile application development framework) development technology, etc.
Thus, different software layers exist in the application software, the different software layers correspond to different development technologies, and the software layers include software codes developed by adopting corresponding technologies, for example, the software layers corresponding to the native development technology can be called as a native layer, and the software layers corresponding to the Flutter development technology can be called as a Flutter layer.
The application software may need to call the picture resource in the running process, and the call of the picture resource may occur in each software layer, so as to ensure that each software layer successfully calls the picture resource, and when the software development is performed, a corresponding picture resource library is configured for each software layer, so that when each software layer needs to call the picture resource in the running process of the application software, the picture resource call can be completed by calling the picture resource from the picture resource library corresponding to each software layer.
Although the picture resource calling mode can ensure that the picture resource is successfully called in the running process of the application software, different picture resource libraries are required to be configured for different software layers to realize the picture resource calling mode, so that the volume of the application software is large, and the occupied storage space is large.
Disclosure of Invention
The embodiment of the application aims to provide a picture resource calling method, a picture resource calling device, electronic equipment and a storage medium, which are used for solving the problem that the volume of application software is large and the occupied storage space is large. The specific technical scheme is as follows:
according to an aspect of the embodiment of the present application, there is provided a picture resource calling method, including:
obtaining identification information of picture resources to be called;
if the software layer needing to call the picture resource is not a first software layer, calling a picture resource information obtaining interface provided by the first software layer through a native layer based on the identification information to obtain access information of the picture resource provided by the first software layer in a public picture resource library, wherein the first software layer is a software layer configured with the public picture resource library;
and calling a first picture resource obtaining mode provided by the native layer according to the access information, and calling the picture resource from the public picture resource library.
In one embodiment of the present application, if the software layer that needs to call the picture resource is not the first software layer, calling, by the native layer, a picture resource information obtaining interface provided by the first software layer, to obtain access information of a public picture resource library provided by the first software layer, including:
if the software layer needing to call the picture resource is other software layers except the original layer and the first software layer, calling bridging codes in the other software layers, establishing bridging between the other software layers and the original layer, and calling a picture resource information obtaining interface provided by the first software layer in the bridging to obtain access information of a public picture resource library provided by the first software layer;
and according to the access information, invoking a first picture resource obtaining mode provided by the native layer, and invoking the picture resource from the public picture resource library, wherein the invoking comprises the following steps:
and according to the access information, calling a first picture resource obtaining mode provided by the native layer in the bridging, and calling the picture resource from the public picture resource library.
In one embodiment of the present application, the obtaining, based on the identification information, the access information of the picture resource provided by the first software layer in the public picture resource library by calling, by a native layer, the picture resource information obtaining interface provided by the first software layer includes:
And calling a picture resource information obtaining interface provided by the first software layer through the native layer based on the identification information to obtain access information of the picture resource identifiable by the native layer in the public picture resource library, wherein the access information is obtained by converting a storage path of the picture resource in the public picture resource library by the first software layer based on an operating system corresponding to the native layer.
In one embodiment of the application, the access information includes at least one of the following information:
a path of the picture resource in the operating system;
a path of the picture resource in the public picture resource library;
file descriptors of the picture resources.
In one embodiment of the present application, the public picture resource library stores multiple multiplying power picture resources of picture resources;
the calling the picture resource from the public picture resource library comprises the following steps:
obtaining the current display magnification of the display screen;
selecting the picture resource closest to the current display multiplying power from the public picture resource library;
and calling the picture resource.
In one embodiment of the application, the method further comprises:
And if the software layer needing to call the picture resource is the first software layer, calling the picture resource from the public picture resource library according to the identification information.
In one embodiment of the present application, the calling the picture resource from the public picture resource library according to the identification information includes:
invoking a picture display component of the picture resource according to the identification information to invoke the picture resource, wherein the picture display component is generated in the following manner: searching a path of the picture resource from the public picture resource library based on the identification information; obtaining a storage path of the picture resource in the public picture resource library based on the search result; generating a picture display component of the picture resource based on the storage path;
or,
based on the identification information, obtaining a storage path of the picture resource in the public picture resource library; generating a picture display component of the picture resource based on the storage path; and calling the picture display component to call the picture resource.
In one embodiment of the present application, the picture resources in the public picture resource library are: picture resources obtained from a picture resource database;
Wherein, the picture resources in the picture resource database are updated according to the following modes:
after detecting that the picture resources in the resource update library are updated, the management equipment triggers a component packer deployed by the management equipment to pack the updated picture resources, generates a packing result of the updated picture resources, and uploads the packing result to the picture resource database.
In one embodiment of the application, the method further comprises:
according to the identification of the picture resource to be obtained, invoking a second picture resource obtaining mode provided by the original layer through the first software layer, and obtaining the picture resource to be obtained from an original picture resource library, wherein the original picture resource library is a picture resource library configured by the original layer;
and storing the obtained picture resources to the public picture resource library through the first software layer.
According to another aspect of the embodiment of the present application, there is provided a picture resource calling device, including:
the identification information obtaining module is used for obtaining the identification information of the picture resource to be called;
the access information obtaining module is used for obtaining access information of the picture resource provided by the first software layer in a public picture resource library through calling a picture resource information obtaining interface provided by the first software layer by a native layer based on the identification information when the software layer needing to call the picture resource is not the first software layer, wherein the first software layer is a software layer configured with the public picture resource library;
And the first picture resource calling module is used for calling a first picture resource obtaining mode provided by the native layer according to the access information, and calling the picture resource from the public picture resource library.
In one embodiment of the present application, the access information obtaining module is specifically configured to, when a software layer needing to call the picture resource is a software layer other than a native layer and a first software layer, call a bridge code in the other software layer, establish a bridge between the other software layer and the native layer, call a picture resource information obtaining interface provided by the first software layer in the bridge, and obtain access information of a public picture resource library provided by the first software layer;
the first picture resource calling module is specifically configured to call, in the bridging, a first picture resource obtaining manner provided by the native layer according to the access information, and call the picture resource from the public picture resource library.
In one embodiment of the present application, the access information obtaining module is specifically configured to obtain, based on the identification information, access information of the picture resource identifiable by the native layer in the public picture resource library by calling, by the native layer, a picture resource information obtaining interface provided by the first software layer, where the access information is obtained by converting, by the first software layer, a storage path of the picture resource in the public picture resource library based on an operating system corresponding to the native layer.
In one embodiment of the application, the access information includes at least one of the following information:
a path of the picture resource in the operating system;
a path of the picture resource in the public picture resource library;
file descriptors of the picture resources.
In one embodiment of the present application, the public picture resource library stores multiple multiplying power picture resources of picture resources;
the first picture resource calling module is specifically used for obtaining the current display multiplying power of the display screen; selecting the picture resource closest to the current display multiplying power from the public picture resource library; and calling the picture resource.
In one embodiment of the application, the apparatus further comprises:
and the second picture resource calling module is used for calling the picture resource from the public picture resource library according to the identification information under the condition that a software layer needing to call the picture resource is the first software layer.
In one embodiment of the present application, the second picture resource calling module is specifically configured to call a picture display component of the picture resource according to the identification information, so as to call the picture resource, where the picture display component is generated in the following manner: searching a path of the picture resource from the public picture resource library based on the identification information; obtaining a storage path of the picture resource in the public picture resource library based on the search result; generating a picture display component of the picture resource based on the storage path;
Or,
based on the identification information, obtaining a storage path of the picture resource in the public picture resource library; generating a picture display component of the picture resource based on the storage path; and calling the picture display component to call the picture resource.
In one embodiment of the present application, the picture resources in the public picture resource library are: picture resources obtained from a picture resource database;
wherein, the picture resources in the picture resource database are updated according to the following modes:
after detecting that the picture resources in the resource update library are updated, the management equipment triggers a component packer deployed by the management equipment to pack the updated picture resources, generates a packing result of the updated picture resources, and uploads the packing result to the picture resource database.
In one embodiment of the application, the apparatus further comprises:
the picture resource storage module is used for calling a second picture resource obtaining mode provided by the original layer through the first software layer according to the identification of the picture resource to be obtained, and obtaining the picture resource to be obtained from an original picture resource library, wherein the original picture resource library is a picture resource library configured by the original layer; and storing the obtained picture resources to the public picture resource library through the first software layer.
According to still another aspect of an embodiment of the present application, there is provided an electronic apparatus including:
a memory for storing a computer program;
and the processor is used for realizing the steps of any picture resource calling method when executing the program stored in the memory.
According to still another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above-described picture resource calling methods.
According to a further aspect of embodiments of the present application, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above described picture resource invoking methods.
The embodiment of the application has the beneficial effects that:
in the above-mentioned scheme provided by the embodiment of the application, when the software layer outside the first software layer calls the picture resource, the interface provided by the first software layer can be called by the native layer based on the identification information of the picture resource to obtain the access information of the picture resource in the public picture resource library, and then the picture resource is called from the public resource library according to the access information. Therefore, different software layers in the application software can call the picture resources from the public resource library, so that different picture resource libraries can be unnecessary to be configured for different software layers, the number of the picture resource libraries is reduced, the inclusion volume of the application software is reduced, and the occupied storage space is reduced.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic flow chart of a picture resource calling method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a public picture resource library according to an embodiment of the present application;
fig. 3 is a flowchart of another picture resource calling method according to an embodiment of the present application;
fig. 4 is a signaling schematic diagram of picture resource update according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a call relationship between each software layer and a public picture resource library according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a picture resource calling device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
The background of the embodiments of the present application is described below.
When developing application software, developers increasingly use multiple development technologies to jointly develop the same application software. For example, the development technology may be a Native development technology of an operating system such as IOS, android, etc., a router development technology, a real Native development technology, a Hybrid (a Hybrid development technology based on a Native development technology and HTML (HyperText Markup Language, hypertext markup language) 5) development technology, a Weex (a framework for building a mobile-end cross-platform UI (User Interface)) development technology, etc.
Thus, different software layers exist in the application software, and the different software layers correspond to different development technologies. Corresponding to the development technique in the above example, the above software layer may be, for example, a Native layer, a router layer, a real Native layer, a Hybrid layer, a Weex layer, and the like.
Dividing the software into multiple different software layers may assist developers in better developing and managing application software code. By the method, the corresponding relation between different software layers and development technologies can be clearly distinguished, and different developers can be allocated to different software layers for development. For example, a developer who has knowledge of the Fluter development technique may develop and maintain for the Fluter layer of the application software. Dividing the application software into different code layers may improve maintainability and flexibility of the code.
However, there are many different points in the various software layers. For example: different software layers typically use different code languages. For example, the Flutter layer typically uses Dart (a computer programming language), the language real Native layer typically uses JavaScript (a computer programming language), the Hybrid layer typically uses HTML, CSS (Cascading Style Sheets ) and JavaScript, and the Weex layer typically uses Vue. Moreover, different software layers typically run in different processes, and the compatibility of the different software layers with the operating system is also different.
During the running of the application software, each software layer may need to invoke a picture resource. Because each software layer has the different points, in order to ensure that each software layer can successfully call the picture resources, each software layer is configured with a corresponding picture resource library. Therefore, when each software layer in the application software invokes the picture resource, the picture resource can be invoked from the corresponding picture resource library, and the picture resource invocation can be completed. However, the software package of the application software needs to include a plurality of picture resource libraries, which results in large package volume and large occupied storage space.
The execution body of the embodiment of the present application is described below.
The execution subject of the embodiment of the application can be application software or a terminal provided with the application software. The respective software layers mentioned below are software layers in the application software. The application software may be application software developed by a mixture of native development technology and Flutter development technology based on an operating system such as IOS and android.
The picture resource calling method provided by the embodiment of the application is explained in detail by a specific embodiment.
In one embodiment of the present application, referring to fig. 1, fig. 1 provides a flowchart of a picture resource calling method, and the method includes the following steps S101 to S103.
Step S101: and obtaining the identification information of the picture resource to be called.
The identification information of the picture resources may be a unique identification of the picture resources, and is used for distinguishing different picture resources. For example, the name of the picture resource, the packet name of the picture resource, or the ID of the picture resource, etc.
The manner in which the identification information is obtained in step S101 is described below.
Under the condition, when a user clicks to enter a user interface, the application software can determine the identification information of the picture resource required to be displayed on the user interface according to the preset picture resource information of the user interface. For example, an identification information acquisition function may be defined in the application software, and clicking the user interface by the user may trigger calling the information acquisition function, and obtain the identification information of the picture resource to be displayed through the information acquisition function.
Step S102: if the software layer needing to call the picture resource is not the first software layer, calling a picture resource information obtaining interface provided by the first software layer through the native layer based on the identification information to obtain the access information of the picture resource provided by the first software layer in the public picture resource library.
The first software layer is a software layer configured with a public picture resource library.
The access information is described below.
The access information is information for the picture resource, and is information for enabling the native layer to determine the picture resource to be invoked according to the access information. In particular, the access information may be used to locate a storage location for the picture resource. The access information may include a unique identification of the picture resource, path information, file length, offset, file type, and the like. After the native layer calls the picture resource information obtaining interface provided by the first software layer based on the identification information, the first software layer can determine the information of the picture resource represented by the identification information according to the identification information, and generate access information which can be originally identified based on the information. The native layer may thus invoke the picture resource based on its unique identification.
For example, the first software layer may be a Flutter layer. In this case, the common picture repository may be a picture repository configured for the router layer.
The public picture resource library will be described below.
The common picture resource library is used for storing various types of picture resources. For example, picture resources may be divided into icons, images, fonts, and the like. Specifically, a fonts folder for storing font image resources, an icon folder for storing icon image resources, and an images folder for storing image resources may be respectively established for font, icon, image, and other image resources, where the three folders may be located in an assembly folder of the application software. Wherein fonts, icons, images, assets is the folder name.
The implementation of step S102 to obtain the access information is described below, and is not described in detail here.
Step S103: and calling a first picture resource obtaining mode provided by the original layer according to the access information, and calling the picture resource from the public picture resource library.
The first picture resource obtaining manner provided by the native layer may be used for obtaining a picture resource indicated by the access information according to the access information. Specifically, the picture resource obtaining mode may be related to an operating system.
Under the situation, if the operating system corresponding to the native layer is an IOS, that is, the operating system operated by the application software is an IOS, the native layer of the application software may call the picture resource from the public picture resource library by using the access information as a parameter through a main bundle (a resource call method in the IOS). If the operating system where the application software is located is android, the native layer of the application software can call the picture resources from the public picture resource library by taking the access information as a parameter through an AssetManager API (resource manager interface). In this case, the native layer may invoke the picture resource directly by the method described above.
Other implementations of invoking the picture resource in step S103 are described below and are not described in detail herein.
In the above-mentioned scheme provided by the embodiment of the application, when the software layer outside the first software layer calls the picture resource, the interface provided by the first software layer can be called by the native layer based on the identification information of the picture resource to obtain the access information of the picture resource in the public picture resource library, and then the picture resource is called from the public resource library according to the access information. Therefore, different software layers in the application software can call the picture resources from the public resource library, so that different picture resource libraries can be unnecessary to be configured for different software layers, the number of the picture resource libraries is reduced, the inclusion volume of the application software is reduced, and the occupied storage space is reduced.
Therefore, different software layers can call the picture resources of the public picture resource library, and the picture resource library corresponding to each software layer can be not required to be configured independently for each software layer, so that a developer of each software layer does not need to maintain the picture resource library corresponding to each software layer. The maintenance difficulty is reduced, and the manpower resource investment of developers is reduced.
In addition, as can be seen from the above, in the case that the first software layer is the router layer, the characteristics of mixed development of the router development technology can be utilized, so that the above-mentioned picture resource calling method can be used in both the IOS and the android systems. And furthermore, the common picture resource library can be commonly used by the IOS and the android system, so that multi-terminal maintenance on the IOS and the android system can be omitted. The maintenance difficulty is reduced, and the manpower resource investment of developers is reduced.
One implementation of obtaining the access information in step S102 is described below.
In one embodiment of the application, based on the identification information, the picture resource information obtaining interface provided by the first software layer is called by the original layer, so that the access information of the picture resource identifiable by the original layer in the public picture resource library is obtained.
The access information is obtained by converting a storage path of the picture resource in the public picture resource library by the first software layer based on an operating system corresponding to the native layer.
Specifically, the first software layer may provide a picture resource information acquisition interface. For example, the first software layer is a router layer, and a plug-in the router layer may provide the above-mentioned picture resource information obtaining interface, for example: "flutterImageWithName: and flutterimagewitername: from package: ". The access information may be obtained after the native layer invokes the interface.
The manner in which access information is obtained in the router layer is described below.
After the native layer calls the interface, in the router layer, the application software can determine the path of the picture resource in the public picture resource library through the identification information of the picture resource, and then an operating system corresponding to the native layer converts the path to obtain access information.
Specifically, if the operating system in which the application software runs is an IOS, in the router layer, the application software may use the identification information of the picture resource as an input parameter, and obtain the storage path of the picture resource indicated by the identification information in the public picture resource library through a path forresource: a storage path obtaining method or a path upkeyforasset: a from package, and then convert the obtained storage path into access information that can be identified by the IOS system.
If the operating system running by the application software is android, in the router layer, the application software can acquire the storage path of the picture resource indicated by the identification information in the public picture resource library through a plugin registry, a login keyforasset (a storage path acquisition method) by taking the identification information of the picture resource as an input parameter, and then convert the acquired storage path into access information which can be identified by the android system through an openFd (an access information acquisition method) of an AssetManager.
For the native layer, the access information may be obtained according to one implementation manner of obtaining the access information in the embodiment of the present application, and the picture resource may be directly called in the manner of step S103 described above.
In the above, the first software layer is used to convert the storage path of the picture resource in the public picture resource library to obtain the access information, so that the storage position of the picture resource can be accurately represented by the access information, the original layer can accurately identify the access information, and further the accuracy of calling the picture resource is improved.
Information included in the access information is described below.
The access information includes at least one of the following: the path of the picture resource in the operating system, the path of the picture resource in the public picture resource library, and the file descriptor of the picture resource.
In the case where the operating system on which the application software runs is android, the access information may include a file descriptor of the picture resource.
In the case where the operating system on which the application software runs is an IOS, the access information may include a path of the picture resource in a common picture resource library. The path of the picture resource in the public picture resource library, that is, the path of the picture resource relative to the public picture resource library, is the relative path of the picture resource.
In addition, in the case where the operating system in which the application software runs is an IOS, an android, or other operating system, the access information may include a path of the picture resource in the operating system, that is, an absolute path of the picture resource.
Thus, the native layer can accurately call the picture resources aiming at various conditions of the application software running in various operating systems.
Another implementation of obtaining the access information in step S102 is described below.
In another embodiment of the present application, if the software layer needing to call the picture resource is other software layers except the native layer and the first software layer, a bridge code in the other software layers is called, a bridge between the other software layers and the native layer is established, and a picture resource information obtaining interface provided by the first software layer is called in the bridge to obtain access information of a public picture resource library provided by the first software layer.
Wherein the bridge code is code for enabling data transfer and code call between other software layers and the native layer. Bridging of the real Native layer and the Native layer may be implemented, for example, using bridge mechanisms provided by the real Native development techniques. For other software layers, the picture resources may be invoked by bridging the native layer with a different bridge code.
The other software layers can call the bridge codes in the other software layers to call the picture resource information obtaining interface provided by the first software layer, so as to obtain the access information of the public picture resource library provided by the first software layer. After the other software layers call the bridge code to call the picture resource information obtaining interface provided by the first software layer, the manner of obtaining the access information by the first software layer is the same as that of obtaining the access information in the router layer in the above embodiment, which is not described in detail herein.
In the embodiment of the present application, step S103 may call the picture resource in the following manner.
And according to the access information, calling a first picture resource obtaining mode provided by the native layer in bridging, and calling a picture resource from a public picture resource library.
In one implementation, in other software layers, the bridge code is called, the access information is used as an input parameter, a first picture resource obtaining mode provided by a native layer is called, and picture resources are called from a public picture resource library. Specifically, the first picture resource obtaining manner provided by the native layer is called, and the implementation manner of calling the picture resource from the public picture resource library is the same as that of step S103, and will not be described in detail here.
And establishing bridging between other software layers and the original layer through the bridging code, so that the other software layers can also use the original layer to call the picture resource information obtaining interface provided by the first software layer to obtain the access information of the public picture resource library, and the other software layers can also use the access information to call the picture resource obtaining mode of the original layer to obtain the picture through the bridging code. The other software layers can be free from configuring an independent picture resource library, so that the volume of the application software and the occupied storage space are further reduced.
An implementation manner of invoking the picture resource in another case of step S103 is described below.
In another case, the public picture resource library stores multi-magnification picture resources of the picture resources. A schematic diagram of a public picture repository is provided in fig. 2. The illustrated images folder includes: 2.0 x and 3.0 x folders, wherein the multi-magnification picture resource can be stored under the folder of the corresponding magnification according to the magnification of the picture resource. In addition, folders such as 2.0×and 3.0×folders, and even 4.0×and 5.0×folders may be included under the icons folder, which is not limited by the embodiment of the present application. The font picture resource in the fonts folder can be a picture resource in a vector format, and the application software can display the font picture resource at any multiplying power. Therefore, the font folder may store only the picture resources in the vector format of the font, and may not store the multi-magnification picture resources of the font.
Different categories of picture resources may be distinguished by name. For example, a picture resource may be named by the format of "aaa_bbb". Where "AAA" represents the class of the picture resource and "BBB" represents the custom name of the picture resource. For example, a picture resource is named image_error, and placed under an images folder, where "image" characterizes the picture resource as an image-like picture resource, and "error" is a custom name of the picture resource. For another example, the picture resource is named icon_left_back, and placed under an icon folder, where "icon" characterizes the picture resource as an image class picture resource, and "left_back" is a custom name of the picture resource, where two words can be isolated by "_".
Picture resources of different magnifications can also be distinguished by names. For example, a picture resource may be named by the format "aaa_bbb@c×". Wherein, C in "c×" represents the magnification of the picture resource. Such as "icon_left_back @2×" and "icon_left_back @3×". Thus, the picture resources with different multiplying powers can be distinguished by reading the picture names.
In addition, under the images folder, the fonts folder, and the icons folder, it is necessary to store picture resources of arbitrary magnification, and the name of the picture resources cannot be given with magnification. Formats like "AAA BBB" name picture resources. And, the names of the picture resources in the common picture resource library cannot be repeated.
The other folders in fig. 2 are merely examples, and are not relevant to the present application in embodiments.
In the case where the multi-magnification picture resource is stored, the picture resource can be called by: obtaining the current display magnification of the display screen, selecting the picture resource closest to the current display magnification from the public picture resource library, and calling the picture resource.
Specifically, referring to fig. 3, fig. 3 provides a flowchart of another picture resource calling method. The picture resource calling method of the above step S103 can be implemented by the following steps S301 to S306.
Step S301: and obtaining the current display magnification of the display screen.
The current display magnification can be determined according to the size of the display screen, or can be set by a user.
Step S302: and judging whether the current display magnification is larger than a default magnification.
If yes, step S304 is executed, and if no, step S303 is executed.
The default multiplying power is the smallest multiplying power in the multi-multiplying power picture resources stored in the public picture resource library. For example, if 1, 2, and 3 times of the picture resources exist in the common picture resource library, the default magnification is one time, and in step S302, it may be determined whether the current display magnification is greater than 1.
Step S303: and searching a picture resource with default multiplying power from the public picture resource library.
Step S306 is performed after step S303 is performed.
Step S304: and searching the picture resource of the current display multiplying power from the public picture resource library.
In the case where the current display magnification is greater than the default magnification, it is explained that the default magnification may not be the closest picture resource to the current display magnification. Therefore, the picture resource of the current display magnification is searched from the public picture resource library.
If the picture resource of the current display magnification can be found, step S306 is executed, and if the picture resource of the current display magnification cannot be found, step S305 is executed.
Step S305: the current display magnification is reduced by 1.
After step S305 is performed, step S302 is performed.
Step S306: and calling the searched picture resources.
According to the method, the picture resource closest to the current display multiplying power is searched for calling, so that the called picture resource is as clear as possible or is adapted to the display screen of the user as possible, and the experience of the user for using the application software is improved.
The implementation manner of calling the picture resource is described below in the case that the software layer requiring calling of the picture resource is the first software layer.
In one embodiment of the present application, if the software layer requiring calling of the picture resource is the first software layer, the picture resource is called from the public picture resource library according to the identification information.
Because the public picture resource library is configured for the first software layer, the first software layer can directly call the picture resource from the public picture resource library according to the identification information, so that the picture resource can be accurately and conveniently called.
The implementation of the first software layer invoking the picture resource is described below.
In one implementation, according to the identification information, a picture display component of the picture resource is called to call the picture resource, wherein the picture display component is generated in the following manner: searching a path of the picture resource from a public picture resource library based on the identification information; obtaining a storage path of the picture resource in a public picture resource library based on the search result; and generating a picture display component of the picture resource based on the storage path.
For example, in the case where the first software layer is Flutter, the picture presentation component may be an Image Widget (a kind of picture presentation component). The picture display component can generate a picture display component of the picture resource under a storage path of the picture resource in advance.
Therefore, the method for directly calling the pre-generated picture display component can make the mode of calling the picture resource more convenient.
In another implementation, a storage path of the picture resource in the public picture resource library is obtained based on the identification information; generating a picture display component of a picture resource based on the storage path; and calling a picture display component to call a picture resource.
For the picture display components which are not generated, the picture display components of the picture resources can be generated based on the storage path when the picture display components are needed to be used. Further, in the process of generating the picture display component of the picture resource, the attribute of the picture display component can be customized to meet the use requirement. For example, attributes such as width and height of a picture, a filling mode, a color mixing mode, and the like are set. Thus, the operability of calling the picture resources can be improved, and the self-defining capability is improved.
In one embodiment of the present application, the picture resources in the public picture resource library are: and obtaining the picture resources from the picture resource database.
The picture resource database may be a database in a version control system of the development side. The public picture resource library can obtain picture resources from a picture resource database of a development end.
Wherein, the picture resources in the picture resource database are updated according to the following modes:
after the management equipment detects that the picture resources in the resource update library are updated, triggering a component packer deployed by the management equipment to pack the updated picture resources, generating a packing result of the updated picture resources, and uploading the packing result to the picture resource database.
The above-described picture resource update method will be described with reference to fig. 4.
Referring to fig. 4, fig. 4 provides a signaling diagram of a picture resource update. For example, the user interface developer may update the picture resources to the resource update library, and after detecting that the picture resources in the resource update library are updated, the management device triggers the component packer deployed by the management device to acquire the updated picture resources, generate a packing result of the updated picture resources, and upload the packing result to the picture resource database.
In addition, fig. 4 further includes: and (5) code base. The component packer can also upload the picture resources into a code base for development, debugging and backup.
From the above, it can be seen that, in this disclosure, a plurality of software layers may call the picture resources in the public picture resource library in the embodiment, so that a developer only needs to maintain the public picture resource library, that is, maintain the resource update library, the picture resource database and the public picture resource library, thereby reducing the later maintenance cost. In addition, the public picture resource library can be automatically updated, a developer can not manually update the public picture resource library, the operation difficulty of updating the public picture resource library is reduced, and designers other than the developer can also apply the scheme of the embodiment of the application to update the public picture resource library, so that the development efficiency can be improved.
The picture resource libraries corresponding to other software layers do not need to be updated, so that the problem of inconsistent picture resources caused by new omission in the process of updating the picture resources is solved, and the problem of non-uniform picture quality, picture style, picture size and the like caused by using different formats to store the picture resources by a plurality of picture resource libraries is solved.
In one embodiment of the present application, a method for storing picture resources of a native layer in a public picture resource library is provided: the application software can call a second picture resource obtaining mode provided by the original layer through the first software layer according to the identification of the picture resource to be obtained, obtain the picture resource to be obtained from the original picture resource library, and store the obtained picture resource into the public picture resource library through the first software layer.
The original picture resource library is a picture resource library configured by an original layer.
For example, in the case that the first software layer is the Flutter layer, a Platform Channel mechanism provided by the Flutter development technology is used, and in the Flutter layer, a getImageFromPlatform is called in the native layer by a Channel method so as to acquire the picture resources in the native picture resource library in the native layer.
Referring to fig. 5, fig. 5 provides a schematic diagram of the calling relationship of the software layers and the public picture resource library. In the figure, the first software layer is a software layer configured with a public picture resource library, so the public picture resource library can be regarded as a picture resource library of the first software layer. The native layer and other software layers need to call image resources from a public picture resource library corresponding to the first software layer, and the first software layer may also store the image resources in the native picture resource library to the public picture resource library.
Therefore, the picture resources in the original picture resource library can be stored in the public picture resource library, so that the public picture resource library is updated when the picture resources in the original picture resource library are updated, and the picture resources in the public picture resource library are enriched.
According to another aspect of the embodiment of the present application, referring to fig. 6, fig. 6 provides a schematic structural diagram of a picture resource calling device, where the device includes:
the identification information obtaining module 601 is configured to obtain identification information of a picture resource to be invoked.
The access information obtaining module 602 is configured to, if the software layer that needs to call the picture resource is not the first software layer, call, based on the identification information, a picture resource information obtaining interface provided by the first software layer through the native layer, and obtain access information of the picture resource provided by the first software layer in the public picture resource library, where the first software layer is a software layer configured with the public picture resource library.
The first picture resource calling module 603 is configured to call, according to the access information, a first picture resource obtaining manner provided by the native layer, and call a picture resource from the public picture resource library.
In the above-mentioned scheme provided by the embodiment of the application, when the software layer outside the first software layer calls the picture resource, the interface provided by the first software layer can be called by the native layer based on the identification information of the picture resource to obtain the access information of the picture resource in the public picture resource library, and then the picture resource is called from the public resource library according to the access information. Therefore, different software layers in the application software can call the picture resources from the public resource library, so that different picture resource libraries can be unnecessary to be configured for different software layers, the number of the picture resource libraries is reduced, the inclusion volume of the application software is reduced, and the occupied storage space is reduced.
In one embodiment of the present application, the access information obtaining module 602 is specifically configured to, when a software layer needing to call a picture resource is a software layer other than a native layer and a first software layer, call a bridge code in the other software layer, establish a bridge between the other software layer and the native layer, call a picture resource information obtaining interface provided by the first software layer in the bridge, and obtain access information of a public picture resource library provided by the first software layer;
The first picture resource calling module 603 is specifically configured to call, according to the access information, a first picture resource obtaining manner provided by the native layer in the bridging, and call a picture resource from the public picture resource library.
And establishing bridging between other software layers and the original layer through the bridging code, so that the other software layers can also use the original layer to call the picture resource information obtaining interface provided by the first software layer to obtain the access information of the public picture resource library, and the other software layers can also use the access information to call the picture resource obtaining mode of the original layer to obtain the picture through the bridging code. The other software layers can be free from configuring an independent picture resource library, so that the volume of the application software and the occupied storage space are further reduced.
In one embodiment of the present application, the access information obtaining module 602 is specifically configured to obtain, based on the identification information, access information of a picture resource identifiable by a native layer in a public picture resource library by calling a picture resource information obtaining interface provided by the first software layer by the native layer, where the access information is obtained by converting, by the first software layer, a storage path of the picture resource in the public picture resource library based on an operating system corresponding to the native layer.
In the above, the first software layer is used to convert the storage path of the picture resource in the public picture resource library to obtain the access information, so that the storage position of the picture resource can be accurately represented by the access information, the original layer can accurately identify the access information, and further the accuracy of calling the picture resource is improved.
In one embodiment of the application, the access information includes at least one of the following information:
a path of the picture resource in the operating system;
a path of the picture resource in the public picture resource library;
file descriptor of picture resource.
Thus, the native layer can accurately call the picture resources aiming at various conditions of the application software running in various operating systems.
In one embodiment of the application, a multi-multiplying-power picture resource of a picture resource is stored in a public picture resource library;
the first picture resource calling module 603 is specifically configured to obtain a current display magnification of the display screen; selecting a picture resource closest to the current display magnification from a public picture resource library; and calling a picture resource.
According to the method, the picture resource closest to the current display multiplying power is searched for calling, so that the called picture resource is as clear as possible or is adapted to the display screen of the user as possible, and the experience of the user for using the application software is improved.
In one embodiment of the present application, the apparatus further comprises:
and the second picture resource calling module is used for calling the picture resource from the public picture resource library according to the identification information under the condition that the software layer needing to call the picture resource is the first software layer.
Because the public picture resource library is configured for the first software layer, the first software layer can directly call the picture resource from the public picture resource library according to the identification information, so that the picture resource can be accurately and conveniently called.
In one embodiment of the application, the second picture resource calling module is specifically configured to call a picture display component of the picture resource according to the identification information, so as to call the picture resource, where the picture display component is generated according to the following manner: searching a path of the picture resource from a public picture resource library based on the identification information; obtaining a storage path of the picture resource in a public picture resource library based on the search result; generating a picture display component of a picture resource based on the storage path;
or,
based on the identification information, obtaining a storage path of the picture resource in a public picture resource library; generating a picture display component of a picture resource based on the storage path; and calling a picture display component to call a picture resource.
Therefore, the method for directly calling the pre-generated picture display component can make the mode of calling the picture resource more convenient. For the picture display components which are not generated, the picture display components of the picture resources can be generated based on the storage path when the picture display components are needed to be used. Further, in the process of generating the picture display component of the picture resource, the attribute of the picture display component can be customized to meet the use requirement. For example, attributes such as width and height of a picture, a filling mode, a color mixing mode, and the like are set. Thus, the operability of calling the picture resources can be improved, and the self-defining capability is improved.
In one embodiment of the present application, the picture resources in the public picture resource library are: picture resources obtained from a picture resource database;
wherein, the picture resources in the picture resource database are updated according to the following modes:
after the management equipment detects that the picture resources in the resource update library are updated, triggering a component packer deployed by the management equipment to pack the updated picture resources, generating a packing result of the updated picture resources, and uploading the packing result to the picture resource database.
From the above, it can be seen that, in this disclosure, a plurality of software layers may call the picture resources in the public picture resource library in the embodiment, so that a developer only needs to maintain the public picture resource library, that is, maintain the resource update library, the picture resource database and the public picture resource library, thereby reducing the later maintenance cost. In addition, the public picture resource library can be automatically updated, a developer can not manually update the public picture resource library, the operation difficulty of updating the public picture resource library is reduced, and designers other than the developer can also apply the scheme of the embodiment of the application to update the public picture resource library, so that the development efficiency can be improved.
In one embodiment of the present application, the apparatus further comprises:
the picture resource storage module is used for calling a second picture resource obtaining mode provided by the original layer through the first software layer according to the identification of the picture resource to be obtained, and obtaining the picture resource to be obtained from an original picture resource library, wherein the original picture resource library is a picture resource library configured by the original layer; and storing the obtained picture resources into a public picture resource library through a first software layer.
Therefore, the picture resources in the original picture resource library can be stored in the public picture resource library, so that the public picture resource library is updated when the picture resources in the original picture resource library are updated, and the picture resources in the public picture resource library are enriched.
The embodiment of the application also provides an electronic device, as shown in fig. 7, including:
a memory 701 for storing a computer program;
a processor 702, configured to implement the steps of any of the picture resource calling methods in the above embodiments when executing the program stored in the memory 701.
And the electronic device may further comprise a communication bus and/or a communication interface, through which the processor 702, the communication interface, and the memory 701 communicate with each other.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the picture resource calling methods described above.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the picture resource calling methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or other medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for method, apparatus, electronic device and storage medium embodiments, the description is relatively simple as it is substantially similar to the method embodiments, as relevant points are found in the partial description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (13)

1. A picture resource calling method, the method comprising:
obtaining identification information of picture resources to be called;
if the software layer needing to call the picture resource is not a first software layer, calling a picture resource information obtaining interface provided by the first software layer through a native layer based on the identification information to obtain access information of the picture resource provided by the first software layer in a public picture resource library, wherein the first software layer is a software layer configured with the public picture resource library;
and calling a first picture resource obtaining mode provided by the native layer according to the access information, and calling the picture resource from the public picture resource library.
2. The method according to claim 1, wherein if the software layer that needs to call the picture resource is not the first software layer, the step of calling, by the native layer, the picture resource information obtaining interface provided by the first software layer to obtain the access information of the public picture resource library provided by the first software layer includes:
If the software layer needing to call the picture resource is other software layers except the original layer and the first software layer, calling bridging codes in the other software layers, establishing bridging between the other software layers and the original layer, and calling a picture resource information obtaining interface provided by the first software layer in the bridging to obtain access information of a public picture resource library provided by the first software layer;
and according to the access information, invoking a first picture resource obtaining mode provided by the native layer, and invoking the picture resource from the public picture resource library, wherein the invoking comprises the following steps:
and according to the access information, calling a first picture resource obtaining mode provided by the native layer in the bridging, and calling the picture resource from the public picture resource library.
3. The method according to claim 1, wherein the step of obtaining access information of the picture resource provided by the first software layer in a public picture resource library by calling a picture resource information obtaining interface provided by the first software layer through a native layer based on the identification information includes:
based on the identification information, calling a picture resource information obtaining interface provided by the first software layer through a native layer to obtain access information of the picture resource identifiable by the native layer in the public picture resource library, wherein the access information is: and the first software layer is based on information obtained by converting the storage path of the picture resource in the public picture resource library by an operating system corresponding to the native layer.
4. A method according to claim 3, wherein the access information comprises at least one of the following information:
a path of the picture resource in the operating system;
a path of the picture resource in the public picture resource library;
file descriptors of the picture resources.
5. The method according to any one of claims 1-4, wherein the common picture resource library stores multi-magnification picture resources of picture resources;
the calling the picture resource from the public picture resource library comprises the following steps:
obtaining the current display magnification of the display screen;
selecting the picture resource closest to the current display multiplying power from the public picture resource library;
and calling the picture resource.
6. The method according to any one of claims 1-4, further comprising:
and if the software layer needing to call the picture resource is the first software layer, calling the picture resource from the public picture resource library according to the identification information.
7. The method of claim 6, wherein invoking the picture resource from the public picture resource library based on the identification information comprises:
Invoking a picture display component of the picture resource according to the identification information to invoke the picture resource, wherein the picture display component is generated in the following manner: searching a path of the picture resource from the public picture resource library based on the identification information; obtaining a storage path of the picture resource in the public picture resource library based on the search result; generating a picture display component of the picture resource based on the storage path;
or,
based on the identification information, obtaining a storage path of the picture resource in the public picture resource library; generating a picture display component of the picture resource based on the storage path; and calling the picture display component to call the picture resource.
8. The method according to any one of claims 1 to 4, wherein,
the picture resources in the public picture resource library are as follows: picture resources obtained from a picture resource database;
wherein, the picture resources in the picture resource database are updated according to the following modes:
after detecting that the picture resources in the resource update library are updated, the management equipment triggers a component packer deployed by the management equipment to pack the updated picture resources, generates a packing result of the updated picture resources, and uploads the packing result to the picture resource database.
9. The method according to any one of claims 1-4, further comprising:
according to the identification of the picture resource to be obtained, invoking a second picture resource obtaining mode provided by the original layer through the first software layer, and obtaining the picture resource to be obtained from an original picture resource library, wherein the original picture resource library is a picture resource library configured by the original layer;
and storing the obtained picture resources to the public picture resource library through the first software layer.
10. A picture resource recall device, the device comprising:
the identification information obtaining module is used for obtaining the identification information of the picture resource to be called;
the access information obtaining module is used for obtaining access information of the picture resource provided by the first software layer in a public picture resource library through calling a picture resource information obtaining interface provided by the first software layer by a native layer based on the identification information when the software layer needing to call the picture resource is not the first software layer, wherein the first software layer is a software layer configured with the public picture resource library;
And the first picture resource calling module is used for calling a first picture resource obtaining mode provided by the native layer according to the access information, and calling the picture resource from the public picture resource library.
11. The apparatus of claim 10, wherein the device comprises a plurality of sensors,
the access information obtaining module is specifically configured to, when a software layer needing to call the picture resource is a software layer other than a native layer and a first software layer, call a bridge code in the other software layer, establish a bridge between the other software layer and the native layer, call a picture resource information obtaining interface provided by the first software layer in the bridge, and obtain access information of a public picture resource library provided by the first software layer; the first picture resource calling module is specifically configured to call, in the bridging, a first picture resource obtaining manner provided by the native layer according to the access information, and call the picture resource from the public picture resource library;
or,
the access information obtaining module is specifically configured to obtain, based on the identification information, access information of the picture resource identifiable by the native layer in the public picture resource library by calling, by the native layer, a picture resource information obtaining interface provided by the first software layer, where the access information is: the first software layer converts the storage path of the picture resource in a public picture resource library based on an operating system corresponding to the native layer to obtain information;
Or,
the access information includes at least one of the following information: a path of the picture resource in the operating system; a path of the picture resource in the public picture resource library; a file descriptor of the picture resource;
or,
the public picture resource library stores multi-multiplying power picture resources of picture resources; the first picture resource calling module is specifically used for obtaining the current display multiplying power of the display screen; selecting the picture resource closest to the current display multiplying power from the public picture resource library; invoking the picture resource;
or,
the apparatus further comprises: the second picture resource calling module is used for calling the picture resource from the public picture resource library according to the identification information under the condition that a software layer needing to call the picture resource is the first software layer;
or,
the second picture resource calling module is specifically configured to call a picture display component of the picture resource according to the identification information, so as to call the picture resource, where the picture display component is generated according to the following manner: searching a path of the picture resource from the public picture resource library based on the identification information; obtaining a storage path of the picture resource in the public picture resource library based on the search result; generating a picture display component of the picture resource based on the storage path; or, based on the identification information, obtaining a storage path of the picture resource in the public picture resource library; generating a picture display component of the picture resource based on the storage path; invoking the picture display component to invoke the picture resource;
Or,
the picture resources in the public picture resource library are as follows: picture resources obtained from a picture resource database; wherein, the picture resources in the picture resource database are updated according to the following modes: after detecting that the picture resources in the resource update library are updated, the management equipment triggers a component packer deployed by the management equipment to pack the updated picture resources, generates a packing result of the updated picture resources, and uploads the packing result to the picture resource database;
or,
the apparatus further comprises: the picture resource storage module is used for calling a second picture resource obtaining mode provided by the original layer through the first software layer according to the identification of the picture resource to be obtained, and obtaining the picture resource to be obtained from an original picture resource library, wherein the original picture resource library is a picture resource library configured by the original layer; and storing the obtained picture resources to the public picture resource library through the first software layer.
12. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-9 when executing a program stored on a memory.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-9.
CN202310716948.6A 2023-06-15 2023-06-15 Picture resource calling method and device, electronic equipment and storage medium Pending CN116842206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310716948.6A CN116842206A (en) 2023-06-15 2023-06-15 Picture resource calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310716948.6A CN116842206A (en) 2023-06-15 2023-06-15 Picture resource calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116842206A true CN116842206A (en) 2023-10-03

Family

ID=88164480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310716948.6A Pending CN116842206A (en) 2023-06-15 2023-06-15 Picture resource calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116842206A (en)

Similar Documents

Publication Publication Date Title
US11960388B2 (en) System and method for data collection and analysis of information relating to mobile applications
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
US9983892B2 (en) Deep linking to mobile application states through programmatic replay of user interface events
US9892021B2 (en) Injection of code modifications in a two session debug scripting environment
US10747510B1 (en) Application runtime modification
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN111428132A (en) Data verification method and device, computer storage medium and electronic equipment
CN113778391A (en) Page processing method, device and equipment for native application program
CN110955409A (en) Method and device for creating resources on cloud platform
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
CN113377458B (en) Plug-in management method and device, electronic equipment and storage medium
CN111158777A (en) Component calling method and device and computer readable storage medium
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium
CN108037914B (en) Method and device for developing android native system by combining js
CN116842206A (en) Picture resource calling method and device, electronic equipment and storage medium
CN112925561B (en) Software development method, device, computer equipment and storage medium
CN114579466A (en) Method, device, equipment and medium for constructing test case and code test
CN111736848B (en) Packet conflict positioning method, device, electronic equipment and readable storage medium
CN110780898B (en) Page data upgrading method and device and electronic equipment
CN115113898A (en) Dynamic updating method and device for micro application, computer equipment and storage medium
CN114115982A (en) Code issuing method, device, equipment and storage medium
CN108170557B (en) Method and apparatus for outputting information
CN110209391B (en) Plug-in package generation method and device, electronic equipment and readable storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN112306324B (en) Information processing method, apparatus, device and medium

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