Image resource processing method, electronic device and storage medium

By obtaining user terminal category information to generate image resource packages, the problems of low image resource processing efficiency and high resource occupancy in mobile development are solved, and efficient and unified management of cross-terminal image resources are realized, the development process is simplified and resource redundancy is reduced. The risk of excessive installation packages caused by the rest is huge.

CN114116624BActive Publication Date: 2025-01-14WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111450562.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-01-14
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

In mobile development, image resource processing efficiency is low and resource occupancy is high. The existing technology has failed to effectively solve this problem, resulting in complex image resource adaptation and redundant resources, resulting in excessive installation packages.

Method used

By obtaining the category information of the user terminal, obtaining the corresponding resolution information based on the information, generating an image resource package, and sending it to the user terminal, realizing automatic adaptation and unified management of image resources, avoiding manual introduction and redundant resources.

Benefits of technology

It improves the efficiency and management convenience of image resource processing, reduces resource occupancy, realizes efficient and unified management of cross-terminal image resources, simplifies the development process, and avoids the problem of excessive installation packages caused by resource redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116624B_ABST
    Figure CN114116624B_ABST
Patent Text Reader

Abstract

The present application relates to a method for processing image resources, an electronic device and a storage medium, wherein the method for processing image resources comprises: obtaining preset image information and category information of a user terminal; obtaining at least corresponding resolution information according to the category information, and generating an image resource package according to at least the image information and the resolution information; and sending the image resource package to the user terminal so that the user terminal generates an image resource coverage result based on the image resource package. Through the present application, the problems of low efficiency and high resource occupancy rate of image resource processing are solved, and efficient and convenient cross-terminal image resource management is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for processing image resources, an electronic device, and a storage medium. Background Art

[0002] Mobile terminal development is mainly based on the two major operating systems, Android and iOS. At the same time, there are devices with different resolutions based on the two major operating systems. This introduces the problem of screen adaptation, among which the adaptation of image resources is particularly important. In order to solve the problem of image resource adaptation, in related technologies, UI designers are usually required to generate the required image resources of different resolutions and formats according to the two major platforms of iOS and Android, and then hand over the different resources to developers on both iOS and Android to manually introduce the image resources into the program, which makes the work efficiency low. In addition, if there is a change in image resources, such as the abandonment of image resources, it is very likely that idle resources will not be deleted, resulting in an increasingly large program installation package and excessive resource usage.

[0003] Currently, no effective solution has been proposed for the problems of low efficiency and high resource usage in image resource processing in related technologies. Summary of the invention

[0004] The embodiments of the present application provide a method for processing image resources, an electronic device, and a storage medium to at least solve the problems of low efficiency and high resource occupancy of image resource processing in related technologies.

[0005] In a first aspect, an embodiment of the present application provides a method for processing image resources, which is applied to a server, and the method includes:

[0006] Obtain preset picture information and obtain category information of the user terminal;

[0007] Acquire at least corresponding resolution information according to the category information, and generate a picture resource package according to at least the resolution information;

[0008] The image resource package is sent to the user terminal, so that the user terminal generates an image resource coverage result based on the image resource package.

[0009] In some embodiments, the acquiring at least corresponding resolution information according to the category information, and generating a picture resource package according to at least the picture information and the resolution information includes:

[0010] Acquire the resolution information and configuration determination result according to the category information;

[0011] When the configuration determination result indicates that the configuration file is missing, performing resolution format conversion processing on the picture information according to the resolution information to obtain target picture information, so as to generate the picture resource package at least according to the target picture information;

[0012] When the configuration determination result indicates that the configuration file exists, the image information is converted into a resolution format according to the resolution information to obtain the target image information, so as to generate the image resource package at least according to the configuration file and the target image information.

[0013] In some embodiments, generating the picture resource package at least according to the target picture information includes:

[0014] Obtaining a folder directory structure for storing the image information;

[0015] The picture resource package is generated according to the folder directory structure and the target picture information.

[0016] In some embodiments, generating the image resource package at least according to the configuration file and the target image information includes:

[0017] Obtaining a folder directory structure for storing the image information;

[0018] The image resource package is generated according to the folder directory structure, the configuration file and the target image information.

[0019] In some embodiments, sending the picture resource package to the user terminal so that the user terminal generates a picture resource coverage result based on the picture resource package includes:

[0020] Compressing the image resource package to generate an image compression package;

[0021] The image compression package is sent to the user terminal, so that the user terminal decompresses the image compression package to obtain decompressed file information, and generates the image resource coverage result based on the decompressed file information.

[0022] In some embodiments, sending the compressed image package to the user terminal so that the user terminal decompresses the compressed image package to obtain decompressed file information, and generating the image resource coverage result based on the decompressed file information includes:

[0023] The image compression package is sent to the user terminal so that the user terminal decompresses the image compression package to obtain the decompressed file information, and overwrites the decompressed file information to the image resource folder corresponding to the image information to generate the image resource overwriting result.

[0024] In a second aspect, an embodiment of the present application provides a method for processing image resources, which is applied to a user terminal, and the method includes:

[0025] Receiving a picture resource package sent by a server; wherein the picture resource package is generated by the server acquiring preset picture information and category information of the user terminal, acquiring at least corresponding resolution information according to the category information, and at least based on the picture information and the resolution information;

[0026] Generate a picture resource coverage result based on the picture resource package.

[0027] In some embodiments, before receiving the image resource package from the server, the method further includes:

[0028] Obtaining initial account information sent by the server;

[0029] Acquire a user login result according to the initial account information, and if the user login result indicates that the user login is successful, acquire a picture resource folder created by the user;

[0030] Receiving the picture information uploaded by the user, importing the picture information into the picture resource folder, and generating the category information according to the storage path of the picture resource folder;

[0031] The picture resource folder and the category information are sent to the server, so that the server obtains the picture information and the category information.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the image resource processing method as described in the first and second aspects above is implemented.

[0033] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the image resource processing method described in the first aspect and the second aspect is implemented.

[0034] Compared with the related art, the picture resource processing method, electronic device and storage medium provided in the embodiments of the present application obtain preset picture information and category information of the user terminal; obtain at least corresponding resolution information according to the category information, and generate a picture resource package according to at least the picture information and the resolution information; send the picture resource package to the user terminal, so that the user terminal generates a picture resource coverage result based on the picture resource package, thereby solving the problems of low efficiency and high resource occupancy rate of picture resource processing, and realizing efficient and convenient cross-terminal picture resource management.

[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 is an application environment diagram of an image segmentation processing method according to an embodiment of the present application;

[0038] Figure 2 is a flow chart of an image segmentation processing method according to an embodiment of the present application;

[0039] Figure 3A is a schematic diagram of a folder directory structure according to an embodiment of the present application;

[0040] Figure 3B is a schematic diagram of another folder directory structure according to an embodiment of the present application;

[0041] Figure 4 is a flowchart of another image segmentation processing method according to an embodiment of the present application;

[0042] Figure 5A is a schematic diagram of a display interface of a user terminal according to an embodiment of the present application;

[0043] Figure 5B is a schematic diagram of a display interface of another user terminal according to an embodiment of the present application;

[0044] Figure 5C is a schematic diagram of a display interface of another user terminal according to an embodiment of the present application;

[0045] Figure 6 is a schematic diagram of the architecture of a picture resource processing system according to an embodiment of the present application;

[0046] Figure 7 It is a structural diagram of the inside of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.

[0048] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0049] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0050] The image segmentation processing method provided in this embodiment can be applied to Figure 1 In the application environment shown. The user terminal 102 communicates with the server 104 through a network. The server 104 obtains preset picture information and category information of the user terminal, obtains corresponding resolution information according to the category information, and generates a picture resource package at least according to the picture information and the resolution information, and finally sends the picture resource package to the user terminal 102, so that the user terminal 102 generates a picture resource coverage result based on the picture resource package. The user terminal 102 can be, but is not limited to, various smart phones, personal computers, laptops and tablet computers, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0051] This embodiment provides a method for processing image resources, which is applied to a server. Figure 2 is a flowchart of a method for processing image resources according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0052] Step S220, obtaining preset picture information and category information of the user terminal.

[0053] The above-mentioned picture information refers to the picture resources to be added to the development project. The picture information can be uploaded to the user terminal in advance by the UI designer, and sent to the above-mentioned server by the user terminal; the server can store each picture information in the picture resource folder of the development project. The category information of the above-mentioned user terminal refers to the information used to indicate the category of the operating system operated by the UI designer on the user terminal. For example, the category information can be: iOS operating system, Android operating system or Windows operating system, etc.; the category information can be directly input by the UI designer into the operating system he operates on the user terminal, and the user terminal sends the category information of the operating system to the server, and then the server obtains it; or, the category information can also be generated by the server based on the information such as the address of the storage of the picture information read from the user terminal.

[0054] Step S240: acquiring at least corresponding resolution information according to the category information, and generating a picture resource package according to at least the picture information and the resolution information.

[0055] Among them, after determining to obtain the category information of the above-mentioned user terminal corresponding to the category of the operating system through the above-mentioned step S220, the above-mentioned server can set the corresponding resolution information for different categories of operating systems according to the category information, so that the server can automatically convert the above-mentioned image information into images of corresponding resolutions according to the operating system selected by the UI designer, and generate corresponding image resource packages. For example, if the category information indicates that the operating system selected by the UI designer is the Android operating system, the corresponding resolution information obtained according to the category information may include: anydpi-v26, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi, these six resolution formats; and the server converts each image information stored in the image resource folder to generate images of these six fixed-format resolutions, and finally generates an image resource package including images of these six fixed-resolution formats, so that the best display effect can be obtained by using images with resolutions of these six formats in the project during the Android project development process, and the corresponding resolution image information is automatically selected according to the screen resolution through the program. Alternatively, if the category information indicates that the above operating system is an iOS operating system, the corresponding resolution information obtained according to the category information may include: @1x, @2x and @3x three resolution formats, and then the above server may perform resolution format conversion on the above image information to convert it into images in these three resolution formats, and finally generate an image resource package including images in these three fixed resolution formats. Alternatively, the category information may also indicate a Web operating system, a Windows operating system or a Mac operating system, and perform resolution format conversion based on different operating systems to generate a corresponding image resource package, which will not be repeated here. Through the above step S240, image resources of corresponding resolutions can be automatically generated, eliminating the problem of low efficiency caused by the need for developers to manually introduce image resource packages, and realizing online unified management of image resources across platforms.

[0056] Step S260: sending the picture resource package to the user terminal, so that the user terminal generates a picture resource coverage result based on the picture resource package.

[0057] Specifically, the server may automatically send the image resource package to the user terminal after generating the image resource package; or, the user terminal may initiate a one-key overwrite request to the server based on the one-key overwrite instruction input by the UI designer, and the server sends the image resource package to the user terminal based on the one-key overwrite request, and the user terminal copies the image resource package to the application development project directory pre-set when creating the development project through folder copying to replace the previous initial image resource package, thereby realizing one-key overwriting of image resources. There is no need for the UI designers and developers at both ends to manually manage local image resources when replacing image resources in related technologies, thereby effectively improving development efficiency.

[0058] Since different operating systems such as Android and iOS have terminal devices with different resolutions, there is a problem of image resource adaptation. In related technologies, UI designers usually generate the required image resources of different resolutions according to each operating system, and then hand over the different image resources to the developers of each operating system to manually introduce the image resources into the program, which makes the specific implementation time-consuming, labor-intensive and prone to errors, and the work efficiency is extremely low. In addition, since the image resources between the platforms of each operating system cannot be managed in a unified manner, when the image resources are abandoned or changed, it is very likely that idle resources will not be deleted in time, resulting in the sequential installation package becoming larger and larger and the image resource occupancy rate being too high.

[0059] The present application, through the above steps S220 to S260, obtains image information and category information of the user terminal, obtains the corresponding resolution information according to the category information, and generates an image resource package at least according to the image information and the resolution information, and finally generates an image resource coverage result based on the image resource package by the above user terminal, thereby eliminating the need for designers to generate images of various resolutions according to different terminal platforms, and then manually introducing image resources into the program by developers of each terminal, so as to achieve one-click coverage of image resources, simplifying the complex business process that originally required the participation of multiple developers and designers, automating the management of related image resources in the mobile terminal development process, greatly improving the work efficiency related to image resource management in the development process, and effectively and uniformly managing image resources at both ends, avoiding phenomena such as excessive program installation packages caused by redundant image resources, solving the problems of low efficiency in image resource processing and high resource occupancy, and realizing an efficient and convenient cross-terminal image resource management method.

[0060] In some embodiments, the above step S240 further includes the following steps:

[0061] Step S241, obtaining the resolution information and the configuration determination result according to the category information.

[0062] Among them, the above configuration judgment result is used to indicate whether the operating system corresponding to the category information needs to use the configuration file. For example, if the category information indicates that the above operating system is an iOS operating system, etc., since the configuration file is required by the iOS operating system itself and can be used to select a picture with a resolution that matches the display screen, the above server can generate a configuration judgment result corresponding to the iOS operating system based on the category information, indicating that the configuration file exists, that is, it indicates that the operating system needs to use the configuration file; or, if the category information indicates that the above operating system is an Android operating system, etc., since the operating system does not need to use the configuration file, the server can generate a configuration judgment result corresponding to the Android operating system based on the category information, indicating that the configuration file is missing, that is, it indicates that the operating system does not need to use the configuration file. Through the above step S241, according to different operating systems, it is autonomously selected whether to generate a configuration file, thereby realizing a method of selecting the best display effect according to the display screen resolution corresponding to different operating systems, and effectively improving the accuracy of image resource processing.

[0063] Step S242, when the configuration judgment result indicates that the configuration file is missing, the resolution format conversion process is performed on the picture information according to the resolution information to obtain the target picture information, so as to generate the picture resource package at least according to the target picture information.

[0064] It should be noted that when the operating system selected by the above-mentioned user is an operating system such as Android, there is no need to use a configuration file. The configuration judgment result generated based on the above-mentioned category information indicates that the configuration file is missing, and then the above-mentioned image information is converted into a resolution format to obtain target image information with a resolution consistent with the above-mentioned resolution information, and the target image information is packaged to generate the above-mentioned image resource package.

[0065] In some embodiments, the above-mentioned generating the picture resource package at least according to the target picture information also includes the following steps: obtaining a folder directory structure for storing the picture information; and generating the picture resource package according to the folder directory structure and the target picture information.

[0066] The server may generate a corresponding folder structure according to the folder directory structure created by the user on the user terminal, generate target image information of corresponding resolution according to the selected operating system, store each target image information according to the folder structure, and then package the target image information according to the folder directory structure to generate the image resource package. Specifically, taking the above category information indicating the Android operating system as an example, Figure 3A is a schematic diagram of a folder directory structure according to an embodiment of the present application, such as Figure 3AAs shown, if you want to generate files of the Android project directory structure, the folders include folders named with the six folder names of anydpi-v26, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi, respectively. Different folders store target image information in six resolution formats corresponding to each folder name. Then the same-level folder directory structure under this Android development project is: mipmap-anydpi-v26, mipmap-mdpi, mipmap-hdpi, mipmap-xhdpi, mipmap-xxhdpi, mipmap-xxxhdpi. According to this folder directory structure, the folders containing the above target image information are stored, and finally the above image resource package can be packaged and generated.

[0067] Step S243, when the configuration judgment result indicates that the configuration file exists, the resolution format conversion processing is performed on the picture information according to the resolution information to obtain the target picture information, so as to generate the picture resource package at least according to the configuration file and the target picture information.

[0068] Among them, the above configuration file is used to automatically select pictures that are compatible with the display screen resolution when displaying pictures, so as to achieve the best display effect. It should be supplemented that when the operating system selected by the above user belongs to an operating system such as iOS, since the operating system such as iOS itself needs to use a configuration file for selecting pictures with corresponding resolutions, that is, the configuration file needs to be used at this time, then the configuration judgment result generated based on the above category information indicates that there is a configuration file, and then the above picture information is converted into a resolution format to obtain target picture information with a resolution consistent with the above resolution information, and the target picture information and the configuration file are packaged to generate the above picture resource package.

[0069] In some of the embodiments, the above-mentioned steps further include the following steps at least based on the configuration file and the target image information: obtaining the folder directory structure where the image information is stored; and generating the image resource package based on the folder directory structure, the configuration file and the target image information.

[0070] The server may generate a corresponding folder structure according to the folder directory structure created by the user on the user terminal, and generate target image information of corresponding resolution according to the selected operating system, store each target image information and the configuration file according to the folder structure, and then package the target image information and the configuration file according to the folder directory structure to generate the image resource package. Specifically, taking the category information indicating the iOS operating system as an example, Figure 3B is a schematic diagram of another folder directory structure according to an embodiment of the present application, such as Figure 3BAs shown in the figure, if you want to generate a directory file for an iOS development project, the name of the image resource folder should be Assets.xcassets, and each image resource generates a folder ending with the suffix .imageset, including target image information in three resolution formats: @1x, @2x, and @3x, and a configuration file named Contens.json. The folder directory structure is as follows: Figure 3B As shown, the specific content format of the Contents.json configuration file is as follows:

[0071]

[0072]

[0073] Therefore, the folders including the target image information and configuration files are stored according to the folder directory structure, and finally the image resource package can be packaged to generate the image resource package.

[0074] Through the above steps S241 to S243, unified management of image resources on both the user terminal and the server is achieved, as well as a unified image resource directory structure and file name, further reducing the complex workflow in the image resource management process, reducing the risks caused by improper image resource management, and effectively improving the efficiency and accuracy of image resource processing.

[0075] In some embodiments, the above step S260 further includes the following steps:

[0076] Step S261: compress the image resource package to generate an image compression package.

[0077] After all the image resources are successfully optimized by the server, the entire image resource package can be compressed by using a compression algorithm or calling a compression image component to generate an image compression package in rar or zip format. The above step S261 realizes compressing the image format and generating an image compression package as a whole without affecting the display effect. On the one hand, it can reduce the resource volume when downloading the image resources on the user terminal side, thereby effectively reducing the size of the mobile application installation package to improve development efficiency. On the other hand, it can improve security by setting a password during compression.

[0078] Step S262: Send the compressed image package to the user terminal so that the user terminal decompresses the compressed image package to obtain decompressed file information, and generates the image resource coverage result based on the decompressed file information.

[0079] In some embodiments, the above step S262 also includes the following steps: sending the image compression package to the user terminal so that the user terminal decompresses the image compression package to obtain the decompressed file information, and overwrites the decompressed file information to the image resource folder corresponding to the image information to generate the image resource overlay result.

[0080] Among them, the above-mentioned user terminal can download the corresponding image compression package to the local and decompress it through the download interface provided by the above-mentioned server, and the user terminal can copy the decompressed file information including the translated resource file, that is, the decompressed folder, to the application development project directory pre-set when creating the development project by means of folder copying, thereby overwriting the decompressed file information to the corresponding image resource folder to replace the original initial image resource package, and finally realizing one-click overwriting of image resources.

[0081] Through the above steps S261 to S262, the above server compresses the image resource package and sends the compressed image package to the user terminal, which effectively reduces the image resource size while ensuring the image clarity and ensures the security of image resource management. In addition, the decompressed file information obtained by the decompression process is overwritten to the image resource folder by the user terminal, realizing one-click overwriting of the image resource, further improving the efficiency of image resource processing.

[0082] This embodiment also provides a method for processing image resources, which is applied to a user terminal. Figure 4 is a flowchart of another method for processing image resources according to an embodiment of the present application. Figure 4 As shown, the process includes the following steps:

[0083] Step S420, receiving the image resource package sent by the server; wherein the image resource package is generated by the server obtaining preset image information and category information of the user terminal, obtaining at least corresponding resolution information according to the category information, and at least based on the image information and the resolution information.

[0084] Specifically, after the server performs resolution format conversion processing on the image information according to the resolution information to generate an image resource package, the server can automatically send the image resource package to the user terminal; alternatively, the UI designer can input a one-key overwrite instruction through the user terminal, and after receiving the one-key overwrite instruction sent by the user terminal, the server sends the image resource package to the user terminal in response to the one-key overwrite instruction, so that the user terminal can perform one-key overwrite of the image resources.

[0085] Among them, the above-mentioned image information refers to the image resources to be added to the development project. The image information can be uploaded to the user terminal in advance by the UI designer and sent to the above-mentioned server by the user terminal; the server can store each image information in the image resource folder of the development project.

[0086] The above-mentioned resolution information refers to the corresponding resolutions set for different categories of operating systems. The above-mentioned resolution information is generated according to the above-mentioned category information. The category information refers to information used to indicate the category of the operating system operated by the UI designer on the user terminal. For example, the category information can be: iOS operating system, Android operating system or Windows operating system, etc.; the category information can be directly input by the UI designer into the operating system he operates on the user terminal, and the user terminal sends the category information to the server; or, it can also be generated by the server based on information such as the address of the image information storage read from the user terminal.

[0087] After determining that the above-mentioned category information corresponding to the category of the operating system is obtained, the above-mentioned server can set corresponding resolution information for different categories of operating systems according to the category information, so that the server can automatically convert the above-mentioned image information into images of corresponding resolutions according to the operating system selected by the UI designer, and generate corresponding image resource packages. For example, if the category information indicates that the operating system selected by the UI designer is the Android operating system, the corresponding resolution information obtained according to the category information may include: anydpi-v26, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi. The server generates these six fixed-format resolutions for each image information stored in the image resource folder, so that the best display effect can be obtained by using these six formats of resolutions required by the project during the Android project development process, and the corresponding resolution image information is automatically selected according to the screen resolution through the program. Alternatively, if the terminal category indicates that the above-mentioned operating system is the iOS operating system, the corresponding resolution information obtained according to the category information may include: @1x, @2x and @3x. Alternatively, the category information may also indicate a Web operating system, a Windows operating system, or a Mac operating system, and generate corresponding image resource packages based on different operating systems, which will not be described in detail here. Through the above step S420, image resources of corresponding resolutions can be automatically generated through the above server, eliminating the problem of low efficiency caused by developers having to manually introduce image resource packages, and realizing online unified management of image resources across platforms.

[0088] Step S440: Generate a picture resource coverage result based on the picture resource package.

[0089] Among them, the above-mentioned user terminal copies the above-mentioned image resource package to the application development project directory pre-set when creating the development project through folder copying, replacing the previous initial image resource package, thereby realizing one-click overwriting of image resources. There is no need for UI designers and developers at both ends to manually manage local image resources when replacing image resources in related technologies, thereby effectively improving development efficiency.

[0090] Through the above steps S420 to S440, a picture resource package is generated according to the picture information and the resolution information corresponding to the category information sent by the receiving server, and finally a picture resource coverage result is generated based on the picture resource package, so that there is no need for designers to generate pictures of various resolutions according to different terminal platforms, and then the terminal developers manually introduce the picture resources into the program, so that one-click coverage of picture resources can be achieved, and the complex business process that originally required the participation of multiple developers and designers is simplified, and the relevant picture resources in the mobile terminal development process are automatically managed, which greatly improves the work efficiency related to picture resource management in the development process, and can effectively and uniformly manage picture resources at both ends, avoiding phenomena such as excessive program installation packages caused by redundant picture resources, and solving the problems of low efficiency in picture resource processing and high resource occupancy, thereby realizing an efficient and convenient cross-terminal picture resource management method.

[0091] In some embodiments, before the above step S420, the above image resource processing method further includes the following steps:

[0092] Step S411, obtaining the initial account information sent by the server.

[0093] Among them, the above-mentioned initial account information refers to information such as the account number and password provided by the user for login. Specifically, users such as UI designers and developers can log in on the login page of the above-mentioned user terminal according to the account number and password assigned by the above-mentioned server. It should be supplemented that, since the projects participated by each user are different in actual project development, the project permissions assigned to each user are also different, and the administrator needs to create accounts uniformly in the background. Therefore, the user terminal can be set to not provide a registration function, and the server assigns an initial account number and password, so as to realize the permission management of each user and ensure the security of image resource processing. It is understandable that the user can also click on the prompt box to change the password on the above-mentioned login page to provide the user with the function of changing the new password.

[0094] Step S412, obtaining a user login result according to the initial account information, and when the user login result indicates that the user login is successful, obtaining a picture resource folder created by the user.

[0095] The user terminal can obtain the user login result by matching the user input information with the initial account information to verify whether the user has successfully logged in, and jump to the project selection page after successful login to provide the user with a project creation function. Figure 5A is a schematic diagram of a display interface of a user terminal according to an embodiment of the present application, such as Figure 5A As shown, the display interface is a project selection page. The words "Application Development Image Resource Management System" are displayed on the top of the display interface to prompt the user that the system can be used for image resource management. The second line of the display interface also displays words used to describe the operating system used by the user and its version number, such as "Mac version v1.0.0". The central area of ​​the display interface is used to display the "Project" prompt word, helper, floating box and create project button side by side; when the user clicks the helper, a dialog box can pop up to prompt "Click the rightmost button to create a new project" and other information; when the user clicks the floating box, the above user terminal can control the filter box of each created project to appear below the floating box, and the user can select the project to be operated from the created projects displayed in the floating box; when the user clicks the create project button on the right side of the floating box, the display interface can enter the create project page to create a new project. The "Enter" prompt box is also displayed at the bottom of the display interface. After the user completes the creation or selection of the project, he can click the "Enter" prompt box, and the display interface can jump from the project selection page to the image upload page.

[0096] Figure 5B is a schematic diagram of a display interface of another user terminal according to an embodiment of the present application, such as Figure 5B As shown in the figure, the display interface is the page for creating a project. Figure 5AThe words "Application Development Image Resource Management System" and "Mac Version v1.0.0" are shown. In addition, the central area of ​​the display interface also displays the prompt words "Project Name", "iOS Project Address", "Android Project Address", and the corresponding floating boxes for each prompt word; the user can fill in the project name of the newly created project in the floating box corresponding to the prompt word "Project Name", and fill in the project address of the corresponding operating system in the floating box corresponding to the prompt word "iOS Project Address" or the floating box corresponding to the prompt word "Android Project Address", so that the user terminal can export image resources to overwrite the image resource folder in the project. For example, a project directory of an Android development project on Windows can be E:\Android\AppFactory\src\main\res; a project directory of an iOS development project on Mac is / User / st / Documents / AppFactory / appfactory-frontend-ios / Covid / Resource. After filling in the above information, the user can click the "Create Project" prompt box at the bottom of the display interface to complete the creation of a new project.

[0097] Step S413, receiving the picture information uploaded by the user, importing the picture information into the picture resource folder, and generating the category information according to the storage path of the picture resource folder.

[0098] After the user has completed selecting or creating a development project through interaction with the above display interface, the above user terminal can obtain the image resource folder created by the user in the above development project, and the user continues to interact with the display interface to obtain the image information uploaded by the user, and automatically stores the image information in the folder specified by the user. It can be understood that the storage path of the image resource folder can refer to the above Figure 5B , the user terminal can Figure 5B The project name filled in and the project address of the iOS / Android system are used to determine and generate corresponding category information, and the category information is sent to the above server; or the user terminal can also directly Figure 5B The filled-in information in is sent to the server, and the server generates category information based on the filled-in information, and finally determines whether to generate an image resource package for the corresponding platform based on whether the project address of the corresponding operating system is filled in.

[0099] Specifically, Figure 5C is a schematic diagram of a display interface of another user terminal according to an embodiment of the present application, such as Figure 5C As shown in the figure, the display interface is the picture upload page. Figure 5A The words "Application Development Image Resource Management System" and "Mac Version v1.0.0" are shown. In addition, the third line of the display interface also displays an "Invite Colleagues" prompt box. If the user wants to invite colleagues to participate in this project, he can click the "Invite Colleagues" prompt box on the resource management page, enter the colleague's account, and then pull the colleague into the project for collaborative development. The central area of ​​the display interface displays the folder directory of the development project. The user can right-click to adjust the image folder directory and drag the designed image information into the corresponding folder directory. After clicking to select, the specific details of the image can be viewed in the "Image Details" display box on the right side of the page. The lower area of ​​the display interface also displays the "Export System" prompt and its corresponding floating box. The user can select the operating system to be exported by clicking the floating box corresponding to the "Export System" prompt. The last line of the display interface displays a "One-click Overwrite" prompt box. When the user clicks the "One-click Overwrite" prompt box, the above-mentioned user terminal sends a replacement instruction to the server, and realizes the one-click replacement of image resources through information interaction between the user terminal and the server.

[0100] It should be noted that the user can also modify the current project related information through the above display interface, including the project name or iOS / Android end image resource export path, etc. Specifically, the display interface can display the above Figure 5C A setting button is provided for user interaction, and when the user clicks the setting button, the page will jump to the resource modification page for the user to modify the relevant information.

[0101] Step S414: sending the picture resource folder and the category information to the server, so that the server obtains the picture information and category information.

[0102] Through the above steps S411 to S414, human-computer interaction with the user is achieved through the display interface of the above user terminal. The user can achieve one-click overlay of image resources through simple operations on the display interface, which is conducive to improving user experience and further improving the efficiency of image resource processing.

[0103] It should be noted that, in any of the above-mentioned methods for processing picture resources, the picture format of the above-mentioned picture information may be in PSD format (Photoshop Document); for example, see Figure 5C, the words "Only support uploading PSD images" are displayed on the right side of the help symbol in the display interface. When the user drags the image information into the designated folder, the user terminal can first determine whether the image information is in PSD file format. If not, the display interface will display a prompt message to remind that the PSD format file must be uploaded; if it is in PSD file format, it will then determine whether the image information exists in the project. If it exists, it will prompt that the uploaded image already exists. If not, the image information will be uploaded to the server, thereby avoiding the problem of abnormal clarity that is easy to occur when the image files in other formats are cropped, further improving the accuracy of image resource processing, and realizing the unified management of resolution and format in the process of image resource processing.

[0104] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0105] This embodiment also provides a picture resource processing device, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the terms "module", "unit", "sub-unit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0106] The above-mentioned image resource processing device is applied to a server, and the device includes: an acquisition module, a resolution module and a sending module; the acquisition module is used to acquire preset image information and acquire category information of a user terminal; the resolution module is used to acquire at least corresponding resolution information according to the category information, and generate an image resource package according to at least the resolution information; the sending module is used to send the image resource package to the user terminal, so that the user terminal generates an image resource coverage result based on the image resource package. Through the above-mentioned embodiment, the resolution information corresponding to the category information is acquired through the resolution module, and the image resource coverage result is finally generated, thereby solving the problems of low efficiency of image resource processing and high resource occupancy rate, and realizing an efficient and convenient cross-terminal image resource management device.

[0107] The present embodiment also provides a picture resource processing device, which is applied to a user terminal, and the device includes: a receiving module and a generating module; the receiving module is used to receive a picture resource package sent by a server; wherein the picture resource package is obtained by the server from preset picture information and category information of the user terminal, and at least corresponding resolution information is obtained according to the category information, and is generated at least according to the picture information and the resolution information; the generating module is used to generate a picture resource coverage result based on the picture resource package. Through the above embodiment, the picture resource coverage result is generated based on the received picture resource package by the generating module, thereby solving the problems of low efficiency of picture resource processing and high resource occupancy rate, and realizing an efficient and convenient cross-terminal picture resource management device.

[0108] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0109] This embodiment also provides a picture resource processing system, which includes a user terminal and a server; the server obtains preset picture information and category information of the user terminal; the server obtains at least corresponding resolution information based on the category information, and generates a picture resource package based on at least the picture information and the resolution information; the server sends the picture resource package to the user terminal, so that the user terminal generates a picture resource coverage result based on the picture resource package.

[0110] Through the above embodiment, the image information and category information are obtained through the above service, the resolution information corresponding to the category information is obtained according to the category information, and a picture resource package is generated according to the image information and the resolution information. Finally, the above user terminal generates a picture resource coverage result based on the picture resource package, thereby eliminating the need for designers to generate pictures of various resolutions according to different terminal platforms, and then manually introducing picture resources into the program through the developers of each terminal, so as to achieve one-click coverage of picture resources, simplifying the complex business process that originally required the participation of multiple developers and designers, and automating the management of related picture resources in the mobile terminal development process, greatly improving the work efficiency related to picture resource management in the development process, and being able to effectively and uniformly manage picture resources at both ends, avoiding phenomena such as excessive program installation packages caused by redundant picture resources, and solving the problems of low efficiency in picture resource processing and high resource occupancy, thereby realizing an efficient and convenient cross-terminal picture resource management system.

[0111] In some of the embodiments, the server is further used to obtain the resolution information and the configuration judgment result based on the category information; when the configuration judgment result indicates that the configuration file is missing, the server performs resolution format conversion processing on the picture information according to the resolution information to obtain the target picture information, so as to generate the picture resource package at least based on the target picture information; when the configuration judgment result indicates that the configuration file exists, the server performs resolution format conversion processing on the picture information according to the resolution information to obtain the target picture information, so as to generate the picture resource package at least based on the configuration file and the target picture information.

[0112] In some of the embodiments, the server is further used to obtain a folder directory structure for storing the image information; the server generates the image resource package according to the folder directory structure and the target image information.

[0113] In some of the embodiments, the server is further used to obtain a folder directory structure for storing the image information; the server generates the image resource package according to the folder directory structure, the configuration file and the target image information.

[0114] In some of the embodiments, the server is also used to compress the image resource package to generate an image compression package; the server sends the image compression package to the user terminal, so that the user terminal decompresses the image compression package to obtain decompressed file information, so as to generate the image resource coverage result based on the decompressed file information.

[0115] In some embodiments, the server is also used to send the image compression package to the user terminal, so that the user terminal decompresses the image compression package to obtain the decompressed file information, and overwrites the decompressed file information to the image resource folder corresponding to the image information to generate the image resource overlay result.

[0116] In some of the embodiments, the user terminal is also used to obtain initial account information sent by the server; the user terminal obtains a user login result based on the initial account information, and when the user login result indicates that the user login is successful, obtains a picture resource folder created by the user; the user terminal receives the picture information uploaded by the user, imports the picture information into the picture resource folder, and generates the category information according to the storage path of the picture resource folder; the user terminal sends the picture resource folder and the category information to the server, so that the server obtains the picture information and the category information.

[0117] Preferably, the above-mentioned picture resource processing system further includes a transmission device; information can be transmitted between the above-mentioned server and the above-mentioned user terminal through the transmission device.

[0118] The embodiments of the present invention are described in detail below in conjunction with actual application scenarios. Figure 6 is a schematic diagram of the architecture of a picture resource processing system according to an embodiment of the present application, such as Figure 6 As shown, the architecture includes a client and a server; wherein the client is deployed with the above-mentioned user terminal, and the server includes a first server and a second server. The client application includes versions for both Windows and Mac platforms, and mainly provides a functional interface for users. The user-oriented functions of the functional interface include: logging into the system, changing passwords, creating projects, inviting colleagues, updating and modifying the image resource storage directory, uploading PSD format image resources, and one-click downloading and overwriting. The functions provided by the server to the client include: user management, image resource management, automatic compression and optimization of image resources, and download management. It can be understood that the first server and the second server can be the same server, or they can be different servers or form a server cluster.

[0119] Specifically, after the user logs in, the client can modify the password and synchronize information to the first server; or, the client enters the project selection page and the user creates a new project, and synchronizes the new project information to the first server; then the client enters the picture upload page for picture resource management, which can be used by the user to invite colleagues and synchronize information to the first server for storage. After the user uploads the picture resource, the client initiates a detection request to the second server; the second server determines whether there is already a picture with the same name as the picture information uploaded by the user, and if the judgment result is yes, the user is prompted to modify the picture name; if the judgment result is no or the user has modified the picture name, the second server adds a new picture resource and saves it. After the above process is completed, the client can send a one-key overwrite instruction and the selected client type to the second server through interaction with the user to initiate a one-key overwrite request. The second server generates a picture compression package corresponding to the client type based on the one-key overwrite request, and sends the picture compression package to the client. The client downloads the picture compression package to the local, decompresses and replaces the picture resource folder, and finally realizes one-key overwrite of the picture resource.

[0120] In some embodiments, a computer device is provided, which may be a server. Figure 7 is a structural diagram of the inside of a computer device according to an embodiment of the present application, such as Figure 7As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing image resources is implemented.

[0121] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0122] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0123] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0124] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0125] S1, obtaining preset picture information and obtaining category information of the user terminal.

[0126] S2: Obtain at least corresponding resolution information according to the category information, and generate a picture resource package according to at least the resolution information.

[0127] S3: Send the picture resource package to the user terminal, so that the user terminal generates a picture resource coverage result based on the picture resource package.

[0128] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0129] In addition, in combination with the image resource processing method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the image resource processing methods in the above embodiment is implemented.

[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0131] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for processing image resources, characterized in that: Applied to a server, the method comprises: Obtain preset picture information and category information of user terminals; Acquiring at least corresponding resolution information according to the category information, and generating a picture resource package according to at least the picture information and the resolution information, including: Acquire the resolution information and configuration determination result according to the category information; When the configuration judgment result indicates that the configuration file is missing, performing resolution format conversion processing on the picture information according to the resolution information to obtain target picture information, and obtaining a folder directory structure for storing the picture information; generating the picture resource package according to the folder directory structure and the target picture information; In the case where the configuration judgment result indicates that the configuration file exists, performing resolution format conversion processing on the picture information according to the resolution information to obtain the target picture information, and obtaining a folder directory structure for storing the picture information; generating the picture resource package according to the folder directory structure, the configuration file and the target picture information; the folder directory structure corresponds to the category information; The image resource package is sent to the user terminal, so that the user terminal generates an image resource coverage result based on the image resource package.

2. The image resource processing method according to claim 1, characterized in that: The sending the picture resource package to the user terminal so that the user terminal generates a picture resource coverage result based on the picture resource package includes: Compressing the image resource package to generate an image compression package; The image compression package is sent to the user terminal, so that the user terminal decompresses the image compression package to obtain decompressed file information, and generates the image resource coverage result based on the decompressed file information.

3. The image resource processing method according to claim 2, characterized in that: The picture compression package is sent to the user terminal so that the user terminal decompresses the picture compression package to obtain the decompressed file information, and overwrites the decompressed file information to the picture resource folder corresponding to the picture information to generate the picture resource overwriting result.

4. A method for processing image resources, characterized in that: Applied to a user terminal, the method comprises: Receive a picture resource package sent by a server; wherein the picture resource package is generated by the server acquiring preset picture information and category information of the user terminal, acquiring at least corresponding resolution information according to the category information, and at least according to the picture information and the resolution information, including: The server obtains the resolution information and the configuration determination result according to the category information; When the configuration judgment result indicates that the configuration file is missing, the server performs resolution format conversion processing on the image information according to the resolution information to obtain target image information, and obtains a folder directory structure for storing the image information; and generates the image resource package according to the folder directory structure and the target image information; The server, when the configuration judgment result indicates that the configuration file exists, performs resolution format conversion processing on the picture information according to the resolution information to obtain the target picture information, and obtains a folder directory structure for storing the picture information; generates the picture resource package according to the folder directory structure, the configuration file and the target picture information; the folder directory structure corresponds to the category information; Generate a picture resource coverage result based on the picture resource package.

5. The image resource processing method according to claim 4, characterized in that: Before receiving the image resource package from the server, the method further includes: Obtaining initial account information sent by the server; Acquire a user login result according to the initial account information, and if the user login result indicates that the user login is successful, acquire a picture resource folder created by the user; The picture information uploaded by the user is received, and the picture information is imported into the picture resource server to obtain the picture information and the category information.

6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the image resource processing method according to any one of claims 1 to 5.

7. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the image resource processing method according to any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Picture processing method and system

    CN106157247A