CN112954011A - Image resource compression method and device and electronic equipment - Google Patents

Image resource compression method and device and electronic equipment Download PDF

Info

Publication number
CN112954011A
CN112954011A CN202110110012.XA CN202110110012A CN112954011A CN 112954011 A CN112954011 A CN 112954011A CN 202110110012 A CN202110110012 A CN 202110110012A CN 112954011 A CN112954011 A CN 112954011A
Authority
CN
China
Prior art keywords
image resource
resource file
image
folder
instruction information
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.)
Granted
Application number
CN202110110012.XA
Other languages
Chinese (zh)
Other versions
CN112954011B (en
Inventor
欧阳志刚
丘晓强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology 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 Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202110110012.XA priority Critical patent/CN112954011B/en
Publication of CN112954011A publication Critical patent/CN112954011A/en
Application granted granted Critical
Publication of CN112954011B publication Critical patent/CN112954011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of computers, in particular to an image resource compression method, an image resource compression device and electronic equipment, wherein the image resource compression method comprises the following steps: acquiring instruction information; calling a corresponding tool kit to execute a script task according to the instruction information, and acquiring an image resource file; converting the image resource file into an image resource file with a preset data format; and compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file. The invention can intelligently identify image resources, has concise and efficient compression process, has the functions of batch processing and depth scanning automatic processing, occupies small operation space during operation, automatically completes instruction operation, resource uploading and resource downloading, improves the working efficiency, and can set compression configuration parameters in a user-defined manner.

Description

Image resource compression method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for compressing image resources, and an electronic device.
Background
At present, most image resource compression tools need to install corresponding application programs under each system according to different operating systems, and occupy space and computer running memory during the period that the programs are not used; when picture resources are compressed, the image resources cannot be automatically and intelligently identified, and a compression application program needs to be installed and opened to manually operate and select files and perform compression processing, so that the use program is complicated and is not efficient enough; in many image resource compression approaches, not only registration and login are required to become member users, but also many functions can adopt charging means for users, and many channels for compressing image resources through the official website require users to upload resources to a server for processing and then download the resources, so that a large amount of flow loss is wasted, the compression program is difficult to add due to complicated flow, and the downloading stability and efficiency are low after uploading compression.
Disclosure of Invention
The invention provides an image resource compression method, an image resource compression device and electronic equipment, which have the advantages of realizing the simple and efficient compression process, having the functions of batch processing and depth scanning automatic processing, occupying small running space during running, automatically completing instruction running, uploading resources and downloading resources, improving the working efficiency and setting compression configuration parameters in a user-defined manner.
An embodiment of the present specification provides an image resource compression method, including:
acquiring instruction information;
calling a corresponding tool kit to execute a script task according to the instruction information, and acquiring an image resource file;
converting the image resource file into an image resource file with a preset data format;
and compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file.
Preferably, the invoking a corresponding toolkit according to the instruction information to execute a script task includes:
calling a corresponding package management tool according to the instruction information;
and the packet management tool executes the script task according to the instruction information.
Preferably, the executing of the script task by the package management tool according to the instruction information includes:
identifying a file to be identified;
and when the file is a first folder, entering an interactive option to identify the first folder.
Preferably, the entering interactive option identifies the image resource file, including:
and when the first folder does not need to be scanned, identifying the first folder as the image resource file.
Preferably, the entering interactive option identifies the image resource file, including:
when the first folder needs to be scanned, scanning all files in the first folder;
and intelligently identifying all files in the first folder, and identifying the image resource files in the first folder.
Preferably, the intelligent identification of all files in the first folder includes:
and when all the identified files in the first folder are second folders, intelligently identifying all the files in the second folder until the image resource files are identified.
Preferably, the acquiring the image resource file includes:
carrying out intelligent identification and detection on the image resource file;
and acquiring the identified and detected image resource file.
Preferably, the preset data format includes: 16-ary data format, 64-ary data format, buffer data format.
Preferably, the generating a new compressed image resource file includes:
and generating a new compressed image resource file according to the instruction path in the instruction information.
An embodiment of the present specification further provides an image resource compression apparatus, including:
the instruction acquisition module is used for acquiring instruction information;
the tool pack calling module is used for calling a corresponding tool pack to execute a script task according to the instruction information and acquiring an image resource file;
the resource file conversion module is used for converting the image resource file into an image resource file with a preset data format;
and the resource file compression module is used for compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file.
Preferably, the invoking a corresponding toolkit according to the instruction information to execute a script task includes:
calling a corresponding package management tool according to the instruction information;
and the packet management tool executes the script task according to the instruction information.
Preferably, the executing of the script task by the package management tool according to the instruction information includes:
identifying a file to be identified;
and when the file is a first folder, entering an interactive option to identify the first folder.
Preferably, the entering interactive option identifies the image resource file, including:
and when the first folder does not need to be scanned, identifying the first folder as the image resource file.
Preferably, the entering interactive option identifies the image resource file, including:
when the first folder needs to be scanned, scanning all files in the first folder;
and intelligently identifying all files in the first folder, and identifying the image resource files in the first folder.
Preferably, the intelligent identification of all files in the first folder includes:
and when all the identified files in the first folder are second folders, intelligently identifying all the files in the second folder until the image resource files are identified.
Preferably, the acquiring the image resource file includes:
carrying out intelligent identification and detection on the image resource file;
and acquiring the identified and detected image resource file.
Preferably, the preset data format includes: 16-ary data format, 64-ary data format, buffer data format.
Preferably, the generating a new compressed image resource file includes:
and generating a new compressed image resource file according to the instruction path in the instruction information.
An electronic device, wherein the electronic device comprises:
a processor and a memory storing computer executable instructions that, when executed, cause the processor to perform the method of any of the above.
A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of the above.
The beneficial effects are that:
the invention can intelligently identify image resources, has concise and efficient compression process, has the functions of batch processing and depth scanning automatic processing, occupies small operation space during operation, automatically completes instruction operation, resource uploading and resource downloading, improves the working efficiency, and can set compression configuration parameters in a user-defined manner.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram illustrating an image resource compression method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an image resource compressing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The diagrams depicted in the figures are exemplary only, and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Referring to fig. 1, a schematic diagram of an image resource compression method provided in an embodiment of the present disclosure includes:
s101: acquiring instruction information;
in the preferred embodiment of the present invention, when the method is implemented, it is necessary to install the node operating environment on the computer and install npm package management tool, and when the user inputs an instruction at the terminal, the terminal will read the instruction information input by the user.
S102: calling a corresponding tool kit to execute a script task according to the instruction information, and acquiring an image resource file;
in a preferred embodiment of the present invention, after the terminal obtains the instruction information input by the user, the terminal will dispatch the obtained instruction information to the npm package management tool, and the npm package management tool executes the script task corresponding to the instruction information according to the instruction information, detects the resource file, determines the type of the resource file, and identifies the resource file by an intelligent identification method, thereby obtaining the image resource file.
S103: converting the image resource file into an image resource file with a preset data format;
in a preferred embodiment of the present invention, the terminal converts the obtained image resource file into an image resource file with a preset data format, wherein the preset data format includes, but is not limited to, a 16-ary data format, a 64-ary data format, a buffer data format, and the like.
S104: and compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file.
In the preferred embodiment of the invention, the image resource file in the preset data format is compressed according to the image compression algorithm to generate a new compressed image resource file, thereby reducing the flow loss and simultaneously ensuring the stability and the processing efficiency of the terminal in the uploading and downloading processes of the image resource file.
Further, the invoking a corresponding toolkit according to the instruction information to execute a script task includes:
calling a corresponding package management tool according to the instruction information;
and the packet management tool executes the script task according to the instruction information.
In a preferred embodiment of the invention, the terminal calls a corresponding package management tool according to the instruction information, and then the package management tool executes the script task according to the instruction information, wherein the script task comprises identification of a file to be detected, and when the identified resource file is a folder, an interactive option is entered to perform depth identification on the folder to obtain an image resource file; and when the identified resource file is the resource file, intelligently identifying the resource file and identifying the image resource file in the resource file.
Further, the package management tool executes the script task according to the instruction information, including:
identifying a file to be identified;
and when the file is a first folder, entering an interactive option to identify the first folder.
In a preferred embodiment of the present invention, when entering the interactive option to identify the folder, it is first determined whether the folder needs to be scanned, and when the folder does not need to be scanned, the identified folder is a resource file; when the folder needs to be scanned, all files in the folder are scanned, and all files in the folder are intelligently identified until the resource files in the folder are identified.
Further, the enter interactive option identifies the image resource file, including:
and when the first folder does not need to be scanned, identifying the first folder as the image resource file.
In a preferred embodiment of the present invention, when entering the interactive option recognition image resource file, it is required to determine whether to perform depth scanning in advance, and when it is not required to perform depth scanning on the folder, the identified folder is the resource file
Further, the enter interactive option identifies the image resource file, including:
when the first folder needs to be scanned, scanning all files in the first folder;
and intelligently identifying all files in the first folder, and identifying the image resource files in the first folder.
In a preferred embodiment of the present invention, when entering the interactive option identification image resource file, it is required to first determine whether to perform depth scanning, and when the folder needs to be scanned, all files in the folder are scanned, and all files in the folder are intelligently identified until the resource files in the folder are identified.
Further, intelligently identifying all files in the first folder comprises the following steps:
and when all the identified files in the first folder are second folders, intelligently identifying all the files in the second folder until the image resource files are identified.
In a preferred embodiment of the present invention, since there are other folders in the folder and there are also other folders in the other folders, when the resource file in the folder is not identified for the first time, the resource file needs to be identified in the other folders in the folder, and if the resource file is still not identified, the scanning and identifying are continued to be performed on the other folders until the image resource file is identified. The method is provided with a plurality of files and folders mixed mode target resource designation identification and compression processing.
Further, the acquiring the image resource file includes:
carrying out intelligent identification and detection on the image resource file;
and acquiring the identified and detected image resource file.
In a preferred embodiment of the present invention,
further, the preset data format includes: 16-ary data format, 64-ary data format, buffer data format.
In the preferred embodiment of the present invention, the resource files with different formats, such as 16-ary data format, 64-ary data format, buffer data format, etc., are converted to realize the different format requirements of the terminal,
further, the generating a new compressed image resource file includes:
and generating a new compressed image resource file according to the instruction path in the instruction information.
In a preferred embodiment of the present invention, the instruction information input by the terminal includes an instruction path, and the compressed image resource file is stored to a designated location through the instruction path, thereby completing the compression and storage of the image resource file based on the instruction information of the terminal.
In the preferred embodiment of the present invention, the compression parameters can be configured, including specifying target resources, compression ratio, output path, etc. The free setting compression is realized, and the flexibility is higher.
In the preferred embodiment of the invention, the invention supports cross-platform use, is compatible with most systems, does not need to be developed aiming at different systems again, and has strong compatibility; the method is simple in operation, files do not need to be clicked one by one, scanning and identification are automatically completed directly according to the instructions, occupied memory is small when the instruction tasks run, correspondingly occupied running space is small, and the running memory cannot be influenced; it only needs to have a node.js operating environment and install a very small npm packet management tool; the method has the advantages of intelligently appointing, identifying and compressing the target resource in the mixed mode of a plurality of files and folders.
The image resource compression device provided by the embodiment of fig. 2 is directly and automatically completed without the operation processes of uploading and downloading image resources, and the like, and the structural schematic diagram of the image resource compression device provided by the embodiment of the description comprises:
an instruction acquisition module 201 for acquiring instruction information;
in the preferred embodiment of the present invention, when the method is implemented, it is necessary to install the node operating environment on the computer and install npm package management tool, and when the user inputs an instruction at the terminal, the terminal will read the instruction information input by the user.
The tool pack calling module 202 is used for calling a corresponding tool pack to execute a script task according to the instruction information and acquiring an image resource file;
in a preferred embodiment of the present invention, after the terminal obtains the instruction information input by the user, the terminal will dispatch the obtained instruction information to the npm package management tool, and the npm package management tool executes the script task corresponding to the instruction information according to the instruction information, detects the resource file, determines the type of the resource file, and identifies the resource file by an intelligent identification method, thereby obtaining the image resource file.
The resource file conversion module 203 is used for converting the image resource file into an image resource file with a preset data format;
in a preferred embodiment of the present invention, the terminal converts the obtained image resource file into an image resource file with a preset data format, wherein the preset data format includes, but is not limited to, a 16-ary data format, a 64-ary data format, a buffer data format, and the like.
The resource file compression module 204 compresses the image resource file in the preset data format according to an image compression algorithm to generate a new compressed image resource file.
In the preferred embodiment of the invention, the image resource file in the preset data format is compressed according to the image compression algorithm to generate a new compressed image resource file, thereby reducing the flow loss and simultaneously ensuring the stability and the processing efficiency of the terminal in the uploading and downloading processes of the image resource file.
Further, the invoking a corresponding toolkit according to the instruction information to execute a script task includes:
calling a corresponding package management tool according to the instruction information;
and the packet management tool executes the script task according to the instruction information.
Further, the package management tool executes the script task according to the instruction information, including:
identifying a file to be identified;
and when the file is a first folder, entering an interactive option to identify the first folder.
Further, the enter interactive option identifies the image resource file, including:
and when the first folder does not need to be scanned, identifying the first folder as the image resource file.
Further, the enter interactive option identifies the image resource file, including:
when the first folder needs to be scanned, scanning all files in the first folder;
and intelligently identifying all files in the first folder, and identifying the image resource files in the first folder.
Further, intelligently identifying all files in the first folder comprises the following steps:
and when all the identified files in the first folder are second folders, intelligently identifying all the files in the second folder until the image resource files are identified.
Further, the acquiring the image resource file includes:
carrying out intelligent identification and detection on the image resource file;
and acquiring the identified and detected image resource file.
Further, the preset data format includes: 16-ary data format, 64-ary data format, buffer data format.
Further, the generating a new compressed image resource file includes:
and generating a new compressed image resource file according to the instruction path in the instruction information.
The invention can intelligently identify image resources, has concise and efficient compression process, has the functions of batch processing and depth scanning automatic processing, occupies small operation space during operation, automatically completes instruction operation, resource uploading and resource downloading, improves the working efficiency, and can set compression configuration parameters in a user-defined manner.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting different device components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating device, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present disclosure.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An image resource compression method, comprising:
acquiring instruction information;
calling a corresponding tool kit to execute a script task according to the instruction information, and acquiring an image resource file;
converting the image resource file into an image resource file with a preset data format;
and compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file.
2. The image resource compression method of claim 1, wherein the calling the corresponding tool kit according to the instruction information to execute a script task comprises:
calling a corresponding package management tool according to the instruction information;
and the packet management tool executes the script task according to the instruction information.
3. The image resource compression method of claim 1 or 2, wherein the package management tool executes the script task according to the instruction information, and comprises:
identifying a file to be identified;
and when the file is a first folder, entering an interactive option to identify the first folder.
4. The image asset compression method of any of claims 1-3, wherein the enter interactive option identifies the image asset file comprising:
and when the first folder does not need to be scanned, identifying the first folder as the image resource file.
5. The image resource compression method of any one of claims 1-4, wherein the enter interactive option identifies the image resource file, comprising:
when the first folder needs to be scanned, scanning all files in the first folder;
and intelligently identifying all files in the first folder, and identifying the image resource files in the first folder.
6. The image resource compression method of any one of claims 1-5, wherein intelligently identifying all files in the first folder comprises:
and when all the identified files in the first folder are second folders, intelligently identifying all the files in the second folder until the image resource files are identified.
7. The image resource compression method of any one of claims 1-6, wherein the obtaining the image resource file comprises:
carrying out intelligent identification and detection on the image resource file;
and acquiring the identified and detected image resource file.
8. An image resource compression apparatus, comprising:
the instruction acquisition module is used for acquiring instruction information;
the tool pack calling module is used for calling a corresponding tool pack to execute a script task according to the instruction information and acquiring an image resource file;
the resource file conversion module is used for converting the image resource file into an image resource file with a preset data format;
and the resource file compression module is used for compressing the image resource file with the preset data format according to an image compression algorithm to generate a new compressed image resource file.
9. An electronic device, wherein the electronic device comprises:
a processor and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-7.
CN202110110012.XA 2021-01-27 2021-01-27 Image resource compression method and device and electronic equipment Active CN112954011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110110012.XA CN112954011B (en) 2021-01-27 2021-01-27 Image resource compression method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110110012.XA CN112954011B (en) 2021-01-27 2021-01-27 Image resource compression method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112954011A true CN112954011A (en) 2021-06-11
CN112954011B CN112954011B (en) 2023-11-10

Family

ID=76237665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110110012.XA Active CN112954011B (en) 2021-01-27 2021-01-27 Image resource compression method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112954011B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434139A (en) * 2021-06-23 2021-09-24 平安普惠企业管理有限公司 Image packaging processing method and device, server and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020084921A1 (en) * 2000-12-06 2002-07-04 Chen Yu-Ling (Linda) Digital image compression and decompression
US20060222256A1 (en) * 2005-03-29 2006-10-05 Nec Corporation Device, method, and program for compressing image data
CN101989355A (en) * 2009-07-31 2011-03-23 北京邮电大学 Detection method for secondary compression of JPEG image
CN103744911A (en) * 2013-12-26 2014-04-23 乐视网信息技术(北京)股份有限公司 Video file scanning method and electronic device
CN106227751A (en) * 2016-07-14 2016-12-14 青岛海信电器股份有限公司 A kind of scan method storing file and scanning device
CN109903350A (en) * 2017-12-07 2019-06-18 上海寒武纪信息科技有限公司 Method for compressing image and relevant apparatus
CN109947722A (en) * 2019-02-13 2019-06-28 北京达佳互联信息技术有限公司 Data compression method, device and computer readable storage medium for application program
CN110232050A (en) * 2019-04-24 2019-09-13 深圳点猫科技有限公司 The method and electronic equipment that a kind of language based on programming compresses file
CN110544281A (en) * 2019-08-19 2019-12-06 南斗六星***集成有限公司 picture batch compression method, medium, mobile terminal and device
CN110825700A (en) * 2019-11-07 2020-02-21 成都品果科技有限公司 Method for efficiently scanning files in magnetic disk
CN111354050A (en) * 2020-02-25 2020-06-30 安徽以萨数据技术有限公司 Android-based picture compression method and device and storage medium
CN112181221A (en) * 2020-09-25 2021-01-05 Oppo广东移动通信有限公司 Image processing method and device, computer readable medium and electronic device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020084921A1 (en) * 2000-12-06 2002-07-04 Chen Yu-Ling (Linda) Digital image compression and decompression
US20060222256A1 (en) * 2005-03-29 2006-10-05 Nec Corporation Device, method, and program for compressing image data
CN101989355A (en) * 2009-07-31 2011-03-23 北京邮电大学 Detection method for secondary compression of JPEG image
CN103744911A (en) * 2013-12-26 2014-04-23 乐视网信息技术(北京)股份有限公司 Video file scanning method and electronic device
CN106227751A (en) * 2016-07-14 2016-12-14 青岛海信电器股份有限公司 A kind of scan method storing file and scanning device
CN109903350A (en) * 2017-12-07 2019-06-18 上海寒武纪信息科技有限公司 Method for compressing image and relevant apparatus
CN109947722A (en) * 2019-02-13 2019-06-28 北京达佳互联信息技术有限公司 Data compression method, device and computer readable storage medium for application program
CN110232050A (en) * 2019-04-24 2019-09-13 深圳点猫科技有限公司 The method and electronic equipment that a kind of language based on programming compresses file
CN110544281A (en) * 2019-08-19 2019-12-06 南斗六星***集成有限公司 picture batch compression method, medium, mobile terminal and device
CN110825700A (en) * 2019-11-07 2020-02-21 成都品果科技有限公司 Method for efficiently scanning files in magnetic disk
CN111354050A (en) * 2020-02-25 2020-06-30 安徽以萨数据技术有限公司 Android-based picture compression method and device and storage medium
CN112181221A (en) * 2020-09-25 2021-01-05 Oppo广东移动通信有限公司 Image processing method and device, computer readable medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑腾飞等: "基于HLS和压缩域运动检测的监控***设计", 工业控制计算机, vol. 29, no. 1 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434139A (en) * 2021-06-23 2021-09-24 平安普惠企业管理有限公司 Image packaging processing method and device, server and storage medium

Also Published As

Publication number Publication date
CN112954011B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN110928548B (en) Data processing method and device
WO2014185573A1 (en) Adaptive execution method using automatic conversion of android application to tizen installable package
CN111209001A (en) Method, system, equipment and medium for batch generation of APKs of android channels
CN110795181A (en) Application program interface display method and device based on skip protocol and electronic equipment
CN111930382A (en) Application page access method, device and equipment
CN110688096A (en) Method, device, medium and electronic equipment for constructing application program containing plug-in
CN111159046A (en) Test method, test device, electronic equipment, test system and storage medium
CN113961196A (en) Method, device and equipment for automatically generating codes and readable storage medium
CN112214250B (en) Application program component loading method and device
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN112954011A (en) Image resource compression method and device and electronic equipment
CN113434315B (en) Interface management method and device, storage medium and electronic equipment
CN108595178B (en) Hook-based data acquisition method, device and equipment
CN111522617B (en) Method and device for maintaining system and electronic equipment
CN112364609A (en) Business standing book generation method and device, storage medium and electronic equipment
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN110704766A (en) Interface rendering optimization method and device based on real-time snapshot and electronic equipment
JP6001199B2 (en) Method for automatic conversion of package for taizen installation of android application and computer-readable recording medium therefor
CN112150590B (en) Animation file output method and device
CN113141407B (en) Page resource loading method and device and electronic equipment
CN112929675B (en) Image resource compression method and device and electronic equipment
CN113779018A (en) Data processing method and device
CN111680032B (en) Method and device for processing information sending task and electronic equipment
CN112882698A (en) Development environment generation method and device, computer storage medium and electronic device

Legal Events

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