CN113434139A - Image packaging processing method and device, server and storage medium - Google Patents

Image packaging processing method and device, server and storage medium Download PDF

Info

Publication number
CN113434139A
CN113434139A CN202110702250.XA CN202110702250A CN113434139A CN 113434139 A CN113434139 A CN 113434139A CN 202110702250 A CN202110702250 A CN 202110702250A CN 113434139 A CN113434139 A CN 113434139A
Authority
CN
China
Prior art keywords
image
path
target image
target
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110702250.XA
Other languages
Chinese (zh)
Inventor
张克明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110702250.XA priority Critical patent/CN113434139A/en
Publication of CN113434139A publication Critical patent/CN113434139A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application relates to the field of image detection, and discloses a processing method, a device, a server and a storage medium for image packaging, wherein the method comprises the following steps: acquiring a project engineering file, and acquiring a plurality of image information aiming at a target image according to the project engineering file; determining a reference image path of the target image according to the plurality of image information, and determining an image name of the target image according to the reference image path; carrying out image name verification on the target image according to the image name; if the image name passes the verification, performing image path verification on the target image according to the reference image path; and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path. The accuracy of the image information about the image in the project engineering file can be effectively improved. The application relates to blockchain techniques, such as the writing of the above data into blockchains for image processing and like scenarios.

Description

Image packaging processing method and device, server and storage medium
Technical Field
The present application relates to the field of image detection, and in particular, to a method, an apparatus, a server, and a storage medium for processing image packaging.
Background
The packaging of the front-end system is a necessary flow in the front-end development process, and in the packaging process, the developed codes can run in the production environment more effectively through code compression, document compression and loading of various dependent file packages and plug-ins used in the development process. At present, in the packing process, the processing mode of the pictures in the production environment is usually picture compression and the like, and the processing mode cannot effectively detect the pictures and ensure that the names or paths of the pictures are accurate. Therefore, how to improve the accuracy of the picture information of the pictures is an urgent problem to be solved in the packaging process.
Disclosure of Invention
The embodiment of the application provides a processing method, a processing device, a server and a storage medium for image packaging, which can improve the accuracy of image information of images in project engineering files, and can effectively avoid the problem caused by the inaccuracy of image names or image paths of the images in the project engineering files when the project engineering files are subsequently utilized, for example, the situation that image error report occurs or the images cannot be displayed in the development and test stage or when the project engineering files are released to a production line can be avoided.
In a first aspect, an embodiment of the present application discloses a processing method for image packaging, where the method includes:
acquiring a project file, and acquiring a plurality of image information aiming at a target image according to the project file;
determining a reference image path of the target image according to the image information, and determining an image name of the target image according to the reference image path;
carrying out image name verification on the target image according to the image name;
if the image name passes the verification, performing image path verification on the target image according to the reference image path;
and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path.
In a second aspect, an embodiment of the present application discloses an image packing processing apparatus, including:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a project file and acquiring a plurality of image information aiming at a target image according to the project file;
a determining unit, configured to determine a reference image path of the target image according to the plurality of pieces of image information, and determine an image name of the target image according to the reference image path;
the name checking unit is used for checking the image name of the target image according to the image name;
the path checking unit is used for checking the image path of the target image according to the reference image path if the image name is checked to pass;
and the replacing unit is used for acquiring a target image path of the target image and replacing the reference image path in the project engineering file with the target image path if the image path verification fails.
In a third aspect, an embodiment of the present application discloses a server, including a processor and a memory, where the memory is used for storing a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect.
In a fourth aspect, embodiments of the present application disclose a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of the first aspect.
In the embodiment of the application, a project engineering file can be acquired, a plurality of pieces of image information for a target image can be acquired according to the project engineering file, a reference image path of the target image can be determined according to the plurality of pieces of image information, and an image name of the target image can be determined according to the reference image path. Then, after obtaining the reference image path and the image name of the target image, the image name of the target image may be checked according to the image name, and the image path may be checked according to the reference image path image, so that the image name or the reference image path of the target image in the project engineering file is correct. By implementing the method, the accuracy of the image information of the image in the project engineering file can be improved, the problem caused by the inaccuracy of the image name or the image path of the image in the project engineering file when the project engineering file is subsequently utilized can be effectively avoided, and the situation that the image is wrongly reported or the image cannot be displayed in the development and test stage or when the project engineering file is released to a production line can be avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a processing method for image packaging according to an embodiment of the present application;
fig. 2a is an interface schematic diagram of an image verification interface provided in an embodiment of the present application;
fig. 2b is a schematic flowchart of another processing method for image packaging according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an image packing processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a processing method for image packing according to an embodiment of the present disclosure. The processing method for image packing described in this embodiment is applied to a server, and can be executed by the server. As shown in fig. 1, the processing method for image packing includes the following steps:
s101: and acquiring a project file, and acquiring a plurality of image information aiming at the target image according to the project file.
The project engineering file may be a program description file for an application program, for example, when a user needs to know relevant information for running the application program, the user may obtain the required information from the project engineering file. The project file may contain information such as the name of the application program, the composition module of the application program, the class library information of the class library referred by the running application program, the image information of the image referred by the running application program, and the like. Then, the target image may be an image required for running the application program, and the image information corresponding to the target image may be stored in the project engineering file. The present application describes any image of all images used for running an application, and the image is a target image.
In one implementation, project files may be obtained according to their paths. For example, the project file may be stored in a certain storage area in the terminal, and then a path of the storage area is a path for acquiring the project file, and then the project file may be acquired according to the path of the project file. After the project file is obtained, a plurality of image information for the target image can be obtained according to the project file. Alternatively, a plurality of image information for the target image may be directly acquired from the project engineering file. Considering that the content in the project engineering file is generally JSON data, that is, the content in the project engineering file is written by using JSON character strings, and the speed is slow when the content in the project engineering file is read, in order to increase the data reading speed, the project engineering file may be converted to a file which is easier to read, so as to obtain a plurality of image information for the target image from the file which is easier to read.
Alternatively, the file that is easier to read may be an Abstract Syntax Tree file, and then the project engineering file may be converted into an Abstract Syntax Tree (AST) file. The data in the abstract syntax tree file is tree-shaped representation of an abstract syntax structure of a source code, namely the data in the abstract syntax tree file is stored in a tree structure, and the tree structure has strong logicality and orderliness, so that the reading speed or the acquisition speed of the data can be effectively accelerated when the content of the file is read. After the abstract syntax tree file is obtained, corresponding image information can be obtained from the abstract syntax tree file according to the reference information identification. The reference information identifier may be an identifier corresponding to image information required to verify a target image, for example, the reference information identifier may be an identifier related to an image path or another identifier related to the target image, which is not limited in this application. For example, if the reference information identifier is an identifier about an image path, the reference information identifier may be an SRC or a URL, and then information corresponding to the SRC or the URL may be acquired, where the acquired information is a plurality of pieces of image information for the target image.
Optionally, the file that is easier to read may be a property list (Plist) file, and then, the project engineering file may be converted into a property list file. The data in the attribute table file is dictionary type data, and the dictionary type data can be understood as data stored in a Key-value pair form, that is, there are many keys (keys) in the attribute table file, and the values corresponding to the keys. Then, when reading the data in the attribute table file, the data can be read according to the Key, and reading the file in this way can also effectively accelerate the reading speed or the obtaining speed of the data. After obtaining the attribute table file, corresponding image information may be obtained from the attribute table file according to the reference information identifier.
In one implementation manner, the server may output an image verification interface and display the image verification interface on the user terminal interface, and when a user needs to verify image information of a target image in a project file, the project file may be input on the image verification interface, and a verification result obtained by the server for the project file is obtained on the image verification interface. The image verification interface can comprise an operation area and a result display area, the operation area can comprise an object setting item and a confirmation control, the operation area is used for a user to input a certain object, and the object can be a project file. The result display area can be used for displaying a verification result after the target image in the project engineering file is verified, the verification result can comprise that the verification is passed or the verification is not passed, and in the case that the verification is not passed, error prompt information can be displayed so as to remind a user which kind of problem occurs in the target image in the project engineering file. For example, the image verification interface may be as shown in fig. 2a, the operation region may be as shown in fig. 2a by the region marked 201, the object setup item may be as shown in fig. 2a by the region marked 202, and the confirmation control may be as shown in fig. 2a by the control marked 203. The user may enter a project file in an area as labeled 202 in fig. 2a and click on a control as labeled 203 in fig. 2 a. The path corresponding to the project engineering file can be input in the object setting item. Then, after the server detects the confirmation operation of the user, the project file input in the object setting item may be acquired.
S102: a reference image path of the target image is determined from the plurality of image information, and an image name of the target image is determined from the reference image path.
In one implementation, a plurality of image information may be scanned to obtain image information having a specified path format from the plurality of image information, and the image information having the specified path format may be determined as a reference image path of the target image. For example, the specified path format may be the format of the contained images in the path. Alternatively, the image path information may be obtained from a plurality of image information, and the image path information may be the information corresponding to the SRC or the URL described above. Then, the acquired image path information is further screened, so that the image information with the specified path format is screened from the image path information. After the reference image path of the target image is determined, the image name of the target image can be determined according to the reference image path. Alternatively, the path information at the target position in the reference image path may be acquired, and the path information at the target position may be determined as the image name of the target image. For example, the target location may be information corresponding to a location previous to a location of the image format identifier, where the image format identifier is usually JPG, PNG, BMP, or the like, which is not exemplified herein. For example, a certain reference image path is C \ Users \ Administrator \ … \ images \ … \ Capture JPG, the image format identifier is "JPG", and the information corresponding to the previous position of the image format identifier is "Capture", then "Capture" is taken as the image name of the target image.
S103: and carrying out image name verification on the target image according to the image name.
In one implementation, when an application is developed, all images used for developing the application may be stored in one image folder, or may be stored in a plurality of image folders. Then, when the image name of the target image is checked, it may be determined whether the image name recorded in the project engineering file is consistent with the actual storage name of the target image according to matching of the image name in the image folder corresponding to the target image with the image name recorded in the project engineering file. The number of the image folders corresponding to the target image can be one or more. If the image name recorded in the project engineering file is consistent with the actual storage name of the target image, the image name of the target image can be confirmed to pass the verification. If the image name recorded in the project engineering file is not consistent with the actual storage name of the target image, it may be determined that the image name verification of the target image fails.
In one implementation, an image folder corresponding to a target image may be obtained, where the image folder may include one or more stored images. Then, it can be detected whether the image name of the target image matches the storage name of any one of the storage images in the image folder. If the image name of the target image can be matched with the storage name of one of the storage images in the image folder, it can be determined that the image name of the target image has passed the verification. If the image name of the target image does not match the storage names of all the stored images in the image folder, it may be determined that the image name check of the target image fails.
In one implementation, in the case that the image name check of the target image fails, it may be further determined whether the target image is in the image folder; if the target image exists in the image folder, the storage name of the target image in the image folder can be acquired, and after the storage name is acquired, the image name in the reference image path can be replaced by the storage name to ensure that the image name recorded in the project engineering file is consistent with the actually stored image name of the target image. If the target image does not exist in the image folder, a target storage area of the target image can be determined, and a reference image path corresponding to the target image is replaced by a path corresponding to the target storage area.
In an implementation manner, the verification result of the image name verification may also be displayed on the image verification interface, and specifically may be displayed in a result display area of the image verification interface. For example, the result display area on the image verification interface may be as shown in the area labeled 204 in FIG. 2 a. In the case where the image name of the target image passes the verification, information that the image name passes the verification may be displayed in the result display area. In the case where the image name check of the target image fails, information that the image name check fails may be displayed in the result display area, and first error information may be displayed, and the first error information may be used to indicate that an error occurs in the image name of the target image, for example, the first error information may indicate that the target image does not exist or the image name is wrong. Then, the user can check the first error information displayed on the image verification interface, and after checking the first error information, the user can modify the path of the target image in the project engineering file to ensure that the record in the project engineering file is accurate, thereby effectively avoiding the situation that the image error occurs in the development and test stage or is released to the production line, or the situation that the image cannot be displayed.
S104: and if the image name passes the verification, performing image path verification on the target image according to the reference image path.
In one implementation, in the case that the image name check passes, it may be further determined whether a path recorded in the project engineering file (i.e., the reference image path described above) is consistent with a path corresponding to the actual storage location of the target image. If the path recorded in the project engineering file is consistent with the path corresponding to the actual storage position of the target image, it can be determined that the image name of the target image passes the verification. If the path recorded in the project engineering file is inconsistent with the path corresponding to the actual storage location of the target image, it may be determined that the image name check of the target image fails.
In one implementation, a set of target image paths for a target image may be obtained, which may include one or more target image paths. The target image path may be a path corresponding to an actual storage location of the target image, and the target image may be stored in one storage location, or may be stored in multiple storage locations, so that the number of target image paths of the target image may include one or more target image paths. The target image path set of the target image may be pre-stored in an area, and then the target image path set of the target image may be acquired from the area. After the target image path set of the target image is acquired, whether a reference image path of the target image matches any one of the target image paths in the target image path set can be detected. If the reference image path of the target image can be matched with one target image path in the target image path set, determining that the image path of the target image passes verification; if the reference image path of the target image is not matched with all target image paths in the target image path set, it can be determined that the image path check of the target image fails.
In one implementation, the verification result of the image path verification may also be displayed in the result display area. In the case where the image path verification of the target image passes, information of the image path verification passing may be displayed in the result display area. In the case that the image path verification of the target image fails, information that the image path verification fails may be displayed in the result display area, and second error information may be displayed, where the second error information may be used to indicate that an error occurs in the image path of the target image. And when the second error information is displayed, the target image path of the target image can be displayed. Then, the user may view the second error information displayed on the image verification interface, and after viewing the second error information, the user may modify the path of the target image in the project engineering file, for example, the path may be modified according to the target image path displayed in the result display area, so as to ensure that the record in the project engineering file is accurate, and effectively avoid the situation that the image error occurs during the development and test stage or when the image is released to the production line, or the situation that the image cannot be displayed.
S105: and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path.
In one implementation, in the case that the image path check fails, a target image path of the target image may be acquired, where the target image path may be any one of the target image path sets. After the target image path is obtained, the reference image path in the project engineering file can be replaced by the target image path. Then, after the replacement processing, the path recorded in the project-project file can be made to coincide with the path corresponding to the actual storage position of the target image. Therefore, the situation that the image is wrongly reported or the image cannot be displayed in the development and test stage or when the image is released to a production line can be effectively avoided.
In the embodiment of the application, a project engineering file can be acquired, a plurality of pieces of image information aiming at a target image can be acquired according to the project engineering file, a reference image path of the target image can be determined according to the plurality of pieces of image information, and an image name of the target image can be determined according to the reference image path; carrying out image name verification on the target image according to the image name; if the image name passes the verification, performing image path verification according to the reference image path image; and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path. By implementing the method, the accurate determination of the image information of the image in the project engineering file can be improved, the problem caused by the inaccuracy of the image name or the image path of the image in the project engineering file when the project engineering file is subsequently utilized can be effectively avoided, and the situation that the image is wrongly reported or the image cannot be displayed in the development and test stage or the release to a production line can be avoided.
To better understand the image packing processing method provided in the embodiment of the present application, the following further describes with reference to the flow shown in fig. 2 b. As shown in fig. 2b, the project engineering file under the fixed path may be scanned, the project engineering file may be converted into an abstract syntax tree file, and field values related to the target image, such as an SRC field and a URL field (where the field may be understood as the reference information identifier) included in the abstract syntax tree file, where the obtained field values are the image information. Then, the obtained field values are sequentially traversed, and the field values are screened out as image path field values, which are the reference image paths, for example, the image path field values can be screened out by including/images. After the reference image path of the target image is obtained, the path information located at the target position in the reference image path may be obtained, and the path information may be determined as the image name of the target image. Then, when the image name of the target image is checked, optionally, a search may be performed in a specified image folder according to the image name to determine whether the image name exists in the image folder, that is, whether the image name is consistent with a storage name of a certain storage image in the image folder. If the image name does not have the image folder, the image name can be determined not to pass the verification, and an error prompt can be performed on an image verification interface, namely first error information is displayed. Optionally, if the image name exists in the image folder, it may be determined that the image name passes verification, in this case, a path of the current image folder may also be obtained, and considering that the target image may be stored in a plurality of image folders, a path corresponding to each image folder may be obtained, and the obtained path is a target image path set. Under the condition that the image name has the image folder, the image name can be stored into an array, and the image name can be used as the array name of the target path set of the target image, so that comparison can be conveniently carried out according to the target image path set and the reference image path.
And when the image name has the image folder, the image path of the target image can be verified subsequently. Optionally, it may be determined whether the reference image path of the target image is any target image path in the target image path set, and if the reference image path of the target image is any target image path in the target image path set, it may be determined that the image path passes verification, and then the scanning is finished. If the reference image path of the target image is not any target image path in the target image path set, it can be determined that the image path verification fails, and an error notification prompt can be performed on an image verification interface, that is, second error notification information is displayed.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an image packing processing apparatus according to an embodiment of the present application, where the image packing processing apparatus includes:
an obtaining unit 301, configured to obtain a project file, and obtain a plurality of pieces of image information for a target image according to the project file;
a determining unit 302, configured to determine a reference image path of the target image according to the plurality of pieces of image information, and determine an image name of the target image according to the reference image path;
a name verifying unit 303, configured to perform image name verification on the target image according to the image name;
a path checking unit 304, configured to perform image path checking on the target image according to the reference image path if the image name checking passes;
a replacing unit 305, configured to obtain a target image path of the target image if the image path verification fails, and replace a reference image path in the project engineering file with the target image path.
In an implementation manner, the name checking unit 303 is specifically configured to:
acquiring an image folder corresponding to the target image, wherein the image folder comprises one or more storage images;
detecting whether the image name of the target image is matched with the storage name of any one storage image in the image folder;
if so, determining that the image name of the target image passes verification;
and if not, determining that the image name of the target image fails to be checked, and displaying first error information on an image checking interface, wherein the first error information is used for indicating that the image name of the target image has an error.
In one implementation, the name checking unit 303 is further configured to:
if the image name verification fails, determining whether the target image is in the image folder;
if the target image exists in the image folder, acquiring a storage name of the target image in the image folder, and replacing the image name in the reference image path with the storage name;
and if the target image does not exist in the image folder, determining a target storage area of the target image, and replacing a reference image path corresponding to the target image with a path corresponding to the target storage area.
In an implementation manner, the path checking unit 304 is specifically configured to:
acquiring a target image path set of the target image, wherein the target image path set comprises one or more target image paths;
detecting whether a reference image path of the target image is matched with any one target image path in the target image path set;
if so, determining that the image path of the target image passes verification;
and if not, determining that the image path verification of the target image fails, and displaying second error information on the image verification interface, wherein the second error information is used for indicating that the image path of the target image has errors.
In an implementation manner, the obtaining unit 301 is specifically configured to:
converting the project engineering file into an abstract syntax tree file;
and acquiring corresponding image information from the abstract syntax tree file according to the reference information identification, and determining the acquired image information as a plurality of image information aiming at the target image.
In an implementation manner, the determining unit 302 is specifically configured to:
scanning the plurality of image information, and acquiring image information with a specified path format from the plurality of image information;
and determining the image information with the specified path format as a reference image path of the target image.
In an implementation manner, the determining unit 302 is specifically configured to:
acquiring path information positioned at a target position in the reference image path;
and determining the path information at the target position as the image name of the target image.
It can be understood that the functions of the functional units of the image packing processing apparatus described in the embodiment of the present application may be specifically implemented according to the method in the method embodiment described in fig. 1, and the specific implementation process may refer to the description related to the method embodiment of fig. 1, and will not be described again here.
In the embodiment of the present application, the obtaining unit 301 obtains a project file, and obtains a plurality of pieces of image information for a target image according to the project file; the determining unit 302 determines a reference image path of the target image according to the plurality of image information, and determines an image name of the target image according to the reference image path; the name checking unit 303 performs image name checking on the target image according to the image name; if the image name passes the verification, the path verification unit 304 performs image path verification on the target image according to the reference image path; if the image path check fails, the replacing unit 305 acquires a target image path of the target image, and replaces a reference image path in the project engineering file with the target image path. The efficiency and the accuracy of the image packing processing can be effectively improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present disclosure. The server includes: a processor 401, a memory 402, and a network interface 403. Data may be exchanged between the processor 401, the memory 402, and the network interface 403.
The Processor 401 may be a Central Processing Unit (CPU), and may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 402 may include both read-only memory and random access memory, and provides program instructions and data to the processor 401. A portion of the memory 402 may also include random access memory. Wherein the processor 401, when calling the program instruction, is configured to perform:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a project file and acquiring a plurality of image information aiming at a target image according to the project file;
determining a reference image path of the target image according to the image information, and determining an image name of the target image according to the reference image path;
carrying out image name verification on the target image according to the image name;
if the image name passes the verification, performing image path verification on the target image according to the reference image path;
and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path.
In one implementation, the processor 401 is specifically configured to:
acquiring an image folder corresponding to the target image, wherein the image folder comprises one or more storage images;
detecting whether the image name of the target image is matched with the storage name of any one storage image in the image folder;
if so, determining that the image name of the target image passes verification;
and if not, determining that the image name of the target image fails to be checked, and displaying first error information on an image checking interface, wherein the first error information is used for indicating that the image name of the target image has an error.
In one implementation, the processor 401 is further configured to:
if the image name verification fails, determining whether the target image is in the image folder;
if the target image exists in the image folder, acquiring a storage name of the target image in the image folder, and replacing the image name in the reference image path with the storage name;
and if the target image does not exist in the image folder, determining a target storage area of the target image, and replacing a reference image path corresponding to the target image with a path corresponding to the target storage area.
In one implementation, the processor 401 is specifically configured to:
acquiring a target image path set of the target image, wherein the target image path set comprises one or more target image paths;
detecting whether a reference image path of the target image is matched with any one target image path in the target image path set;
if so, determining that the image path of the target image passes verification;
and if not, determining that the image path verification of the target image fails, and displaying second error information on the image verification interface, wherein the second error information is used for indicating that the image path of the target image has errors.
In one implementation, the processor 401 is specifically configured to:
converting the project engineering file into an abstract syntax tree file;
and acquiring corresponding image information from the abstract syntax tree file according to the reference information identification, and determining the acquired image information as a plurality of image information aiming at the target image.
In one implementation, the processor 401 is specifically configured to:
scanning the plurality of image information, and acquiring image information with a specified path format from the plurality of image information;
and determining the image information with the specified path format as a reference image path of the target image.
In one implementation, the processor 401 is specifically configured to:
acquiring path information positioned at a target position in the reference image path;
and determining the path information at the target position as the image name of the target image.
In a specific implementation, the processor 401 and the memory 402 described in this embodiment of the present application may execute the implementation described in the image packing processing method provided in fig. 1 in this embodiment of the present application, and may also execute the implementation of the image packing processing apparatus described in fig. 3 in this embodiment of the present application, which is not described herein again.
In this embodiment, the processor 401 may obtain a project file, and obtain a plurality of pieces of image information for a target image according to the project file; determining a reference image path of the target image according to the image information, and determining an image name of the target image according to the reference image path; carrying out image name verification on the target image according to the image name; if the image name passes the verification, performing image path verification on the target image according to the reference image path; and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path. The efficiency and the accuracy of the image packing processing can be effectively improved.
The embodiment of the present application further provides a computer-readable storage medium, in which program instructions are stored, and when the program is executed, some or all of the steps of the processing method for image packaging in the corresponding embodiment of fig. 1 may be included.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
It is emphasized that the data may also be stored in a node of a blockchain in order to further ensure the privacy and security of the data. The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The foregoing describes in detail a processing method, an apparatus, a server and a storage medium for image packaging provided in an embodiment of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the foregoing embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for processing image packaging, comprising:
acquiring a project file, and acquiring a plurality of image information aiming at a target image according to the project file;
determining a reference image path of the target image according to the image information, and determining an image name of the target image according to the reference image path;
carrying out image name verification on the target image according to the image name;
if the image name passes the verification, performing image path verification on the target image according to the reference image path;
and if the image path verification fails, acquiring a target image path of the target image, and replacing the reference image path in the project engineering file with the target image path.
2. The method of claim 1, wherein the image name checking the target image according to the image name comprises:
acquiring an image folder corresponding to the target image, wherein the image folder comprises one or more storage images;
detecting whether the image name of the target image is matched with the storage name of any one storage image in the image folder;
if so, determining that the image name of the target image passes verification;
and if not, determining that the image name of the target image fails to be checked, and displaying first error information on an image checking interface, wherein the first error information is used for indicating that the image name of the target image has an error.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
if the image name verification fails, determining whether the target image is in the image folder;
if the target image exists in the image folder, acquiring a storage name of the target image in the image folder, and replacing the image name in the reference image path with the storage name;
and if the target image does not exist in the image folder, determining a target storage area of the target image, and replacing a reference image path corresponding to the target image with a path corresponding to the target storage area.
4. The method of claim 1, wherein the image path verification of the target image according to the reference image path comprises:
acquiring a target image path set of the target image, wherein the target image path set comprises one or more target image paths;
detecting whether a reference image path of the target image is matched with any one target image path in the target image path set;
if so, determining that the image path of the target image passes verification;
and if not, determining that the image path verification of the target image fails, and displaying second error information on the image verification interface, wherein the second error information is used for indicating that the image path of the target image has errors.
5. The method of claim 1, wherein the obtaining a plurality of image information for a target image from the project file comprises:
converting the project engineering file into an abstract syntax tree file;
and acquiring corresponding image information from the abstract syntax tree file according to the reference information identification, and determining the acquired image information as a plurality of image information aiming at the target image.
6. The method of claim 1, wherein determining a reference image path for the target image from the plurality of image information comprises:
scanning the plurality of image information, and acquiring image information with a specified path format from the plurality of image information;
and determining the image information with the specified path format as a reference image path of the target image.
7. The method of claim 1, wherein determining the image name of the target image from the reference image path comprises:
acquiring path information positioned at a target position in the reference image path;
and determining the path information at the target position as the image name of the target image.
8. An image packing processing apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a project file and acquiring a plurality of image information aiming at a target image according to the project file;
a determining unit, configured to determine a reference image path of the target image according to the plurality of pieces of image information, and determine an image name of the target image according to the reference image path;
the name checking unit is used for checking the image name of the target image according to the image name;
the path checking unit is used for checking the image path of the target image according to the reference image path if the image name is checked to pass;
and the replacing unit is used for acquiring a target image path of the target image and replacing the reference image path in the project engineering file with the target image path if the image path verification fails.
9. A server, comprising a processor, a memory, wherein the memory is configured to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202110702250.XA 2021-06-23 2021-06-23 Image packaging processing method and device, server and storage medium Pending CN113434139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110702250.XA CN113434139A (en) 2021-06-23 2021-06-23 Image packaging processing method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110702250.XA CN113434139A (en) 2021-06-23 2021-06-23 Image packaging processing method and device, server and storage medium

Publications (1)

Publication Number Publication Date
CN113434139A true CN113434139A (en) 2021-09-24

Family

ID=77753746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110702250.XA Pending CN113434139A (en) 2021-06-23 2021-06-23 Image packaging processing method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113434139A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117633900A (en) * 2024-01-24 2024-03-01 中国信息通信研究院 File path verification method and device based on distributed network, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335395A (en) * 2014-07-14 2016-02-17 株式会社理光 Document image management device and document image management system
US20160266887A1 (en) * 2015-03-11 2016-09-15 Echelon Corporation Method and System of Processing an Image Upgrade
US20180203719A1 (en) * 2016-11-17 2018-07-19 Huawei Technologies Co., Ltd. Image file conversion method and apparatus
CN109522282A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Picture management method, device, computer installation and storage medium
US20190207823A1 (en) * 2018-01-03 2019-07-04 International Business Machines Corporation Dynamic delivery of software functions
CN110059214A (en) * 2019-04-01 2019-07-26 北京奇艺世纪科技有限公司 A kind of image resource processing method and processing device
CN110348436A (en) * 2019-06-19 2019-10-18 平安普惠企业管理有限公司 Text information in image is carried out to know method for distinguishing and relevant device
CN110362338A (en) * 2019-07-14 2019-10-22 广州泳泳信息科技有限公司 Game resource packaging and resource quick access method under mobile platform
CN112068920A (en) * 2020-09-22 2020-12-11 深圳市欢太科技有限公司 Content display method and device, electronic equipment and readable storage medium
CN112954011A (en) * 2021-01-27 2021-06-11 上海淇玥信息技术有限公司 Image resource compression method and device and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335395A (en) * 2014-07-14 2016-02-17 株式会社理光 Document image management device and document image management system
US20160266887A1 (en) * 2015-03-11 2016-09-15 Echelon Corporation Method and System of Processing an Image Upgrade
US20180203719A1 (en) * 2016-11-17 2018-07-19 Huawei Technologies Co., Ltd. Image file conversion method and apparatus
US20190207823A1 (en) * 2018-01-03 2019-07-04 International Business Machines Corporation Dynamic delivery of software functions
CN109522282A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Picture management method, device, computer installation and storage medium
CN110059214A (en) * 2019-04-01 2019-07-26 北京奇艺世纪科技有限公司 A kind of image resource processing method and processing device
CN110348436A (en) * 2019-06-19 2019-10-18 平安普惠企业管理有限公司 Text information in image is carried out to know method for distinguishing and relevant device
CN110362338A (en) * 2019-07-14 2019-10-22 广州泳泳信息科技有限公司 Game resource packaging and resource quick access method under mobile platform
CN112068920A (en) * 2020-09-22 2020-12-11 深圳市欢太科技有限公司 Content display method and device, electronic equipment and readable storage medium
CN112954011A (en) * 2021-01-27 2021-06-11 上海淇玥信息技术有限公司 Image resource compression method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117633900A (en) * 2024-01-24 2024-03-01 中国信息通信研究院 File path verification method and device based on distributed network, equipment and medium
CN117633900B (en) * 2024-01-24 2024-05-31 中国信息通信研究院 File path verification method and device based on distributed network, equipment and medium

Similar Documents

Publication Publication Date Title
JP2021515427A (en) Blockchain-based data validation methods and equipment, as well as electronic devices
CN111209206B (en) Automatic test method and system for software products
WO2018059393A1 (en) Test method for mobile application program, server, terminal and storage medium
CN110474900B (en) Game protocol testing method and device
CN104091616A (en) Method for detecting data consistency of set top box built-in flash chip
CN114116496A (en) Automatic testing method, device, equipment and medium
CN112433705A (en) Script generation method and device, electronic equipment and storage medium
CN113608692A (en) Method, system, equipment and medium for verifying data consistency of storage system
CN113434139A (en) Image packaging processing method and device, server and storage medium
CN111159482A (en) Data verification method and system
CN114237754A (en) Data loading method and device, electronic equipment and storage medium
CN111611465B (en) Product detection system, method, device, computer equipment and storage medium
CN109343891B (en) Data processing system, method and device
CN112711563A (en) Method and system for detecting electronic file tetragonality
CN106021087A (en) Method and device for detecting code
CN113704123B (en) Interface testing method, device, equipment and storage medium
CN112445461B (en) Business rule generation method and device, electronic equipment and readable storage medium
CN114817047A (en) Compiler test method, case generation method and device and instruction storage structure
CN114637636A (en) UI (user interface) verification method, device, equipment and medium based on artificial intelligence
CN114637675A (en) Software evaluation method and device and computer readable storage medium
CN113360405A (en) Test case generation method and device
EP4170502A1 (en) Method and device for automatically detecting potential failures in mobile applications
CN115481445B (en) Signature verification method, device and equipment for portable document format file and storage medium
CN112783759B (en) White box test task execution method and device, storage medium and computer equipment
CN114924978A (en) Multi-branch increment checking method based on artificial intelligence and related equipment

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210924

WD01 Invention patent application deemed withdrawn after publication