CN113806575B - Picture information acquisition method and device in warehouse splitting - Google Patents

Picture information acquisition method and device in warehouse splitting Download PDF

Info

Publication number
CN113806575B
CN113806575B CN202110896392.4A CN202110896392A CN113806575B CN 113806575 B CN113806575 B CN 113806575B CN 202110896392 A CN202110896392 A CN 202110896392A CN 113806575 B CN113806575 B CN 113806575B
Authority
CN
China
Prior art keywords
picture
name
warehouse
code
code file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110896392.4A
Other languages
Chinese (zh)
Other versions
CN113806575A (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.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Seashell Housing Beijing 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 Seashell Housing Beijing Technology Co Ltd filed Critical Seashell Housing Beijing Technology Co Ltd
Priority to CN202110896392.4A priority Critical patent/CN113806575B/en
Publication of CN113806575A publication Critical patent/CN113806575A/en
Application granted granted Critical
Publication of CN113806575B publication Critical patent/CN113806575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • 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)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for acquiring picture information in warehouse splitting, wherein the method comprises the following steps: acquiring a picture name of a picture under a picture resource path in a split warehouse; traversing a code path in a new warehouse to acquire a corresponding file list; inquiring whether the code files in the code file list contain picture names according to the picture names; if yes, acquiring picture information of a picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, the number of lines where the code segment is located and a code file name using the picture. According to the method and the device for acquiring the picture information in the warehouse splitting, the picture information of the picture is acquired when the picture name is inquired in the code file list of the new warehouse according to the split warehouse, so that the efficiency and the automation level of acquiring the picture information in the warehouse splitting are improved, and the accuracy of acquiring the picture information is improved.

Description

Picture information acquisition method and device in warehouse splitting
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for acquiring picture information in warehouse splitting.
Background
For reasons such as facilitating code maintenance, there is often a need to split the repository. Picture resources are often used in warehouses. After the new warehouse is split from the split warehouse, the information of the picture resources used in the new warehouse needs to be acquired so as to be capable of acquiring actual pictures for use.
In the prior art, manual inquiry of which picture resources are used is needed for splitting a new warehouse every time. Because of huge project code quantity, a plurality of new warehouses use picture resources, the inquiry time is long, and the energy consumption is high; the pictures are used in various modes, various modes need to be queried, and hundreds of pictures need to be processed independently. Therefore, manually querying the picture information of the new warehouse is inefficient and error-prone.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a method and a device for acquiring picture information in warehouse splitting.
The invention provides a method for acquiring picture information in warehouse splitting, which comprises the following steps: acquiring a picture name of a picture under a picture resource path in a split warehouse; traversing a code path in a new warehouse to acquire a corresponding code file list; inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
According to the method for acquiring the picture information in the warehouse splitting, whether the picture name is contained in the code file list is queried according to the picture name, and the method specifically comprises the following steps: acquiring a code file of a preset type in the code file list; inquiring whether the code file of the preset type contains the picture name or not according to the picture name.
According to the method for acquiring the picture information in the warehouse splitting, whether the picture name is contained in the code file list is queried according to the picture name, and the method specifically comprises the following steps: setting a search word according to the reference mode of the picture name in the code file, wherein the search word comprises the following steps: at least one of a character string spliced by the picture name and a preset reference symbol, a picture reference keyword, a bundle name and a character string spliced by a preset separator; and inquiring whether the code file contains the picture name according to the search word.
According to the method for acquiring the picture information in the warehouse splitting, the method for acquiring the picture name of the picture under the picture resource path in the split warehouse comprises the following steps: traversing all layers of folders under the picture resource path; acquiring a picture resource folder in each layer of folder according to the suffix of the folder name; and acquiring the picture name of the corresponding picture according to the name of the picture resource folder.
The invention provides a method for acquiring picture information in warehouse splitting, which comprises the following steps: and responding to the file in the file list, wherein the file list contains the picture name, and outputting and displaying the picture information of the picture corresponding to the picture name in a preset format.
According to the method for obtaining the picture information in the warehouse splitting, if the code files in the code file list contain the picture names, the method further comprises: traversing the code file of the split warehouse according to the picture names, and judging whether the picture corresponding to the picture name contained in the code file list is used in the split warehouse or not; if yes, marking that the split warehouse and the new warehouse are both using the pictures; if not, marking that only the new warehouse is using the picture.
The invention provides a method for acquiring picture information in warehouse splitting, which comprises the following steps: and outputting and displaying the use condition of the picture in the split warehouse and the new warehouse for the picture corresponding to the picture name contained in the code file list.
The invention also provides a device for acquiring the picture information in the warehouse splitting process, which comprises the following steps: the picture name acquisition module is used for: acquiring a picture name of a picture under a picture resource path in a split warehouse; a file list acquisition module, configured to: traversing a code path in a new warehouse to acquire a corresponding code file list; the picture information acquisition module is used for: inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the method for acquiring the picture information in the warehouse splitting process when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for obtaining picture information in warehouse splitting as described in any of the above.
According to the method and the device for acquiring the picture information in the warehouse splitting, the picture information of the picture is acquired when the picture name is inquired in the code file list of the new warehouse according to the split warehouse, so that the efficiency and the automation level of acquiring the picture information in the warehouse splitting are improved, and the accuracy of acquiring the picture information is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for obtaining picture information in warehouse splitting;
fig. 2 is a schematic diagram of an output page of a picture service condition in a picture information acquisition method in warehouse splitting provided by the invention;
FIG. 3 is a second flow chart of a method for obtaining picture information in warehouse splitting according to the present invention;
FIG. 4 is a third flow chart of a method for obtaining picture information in warehouse splitting according to the present invention;
fig. 5 is a schematic structural diagram of a device for obtaining picture information in warehouse splitting provided by the invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method and apparatus for obtaining picture information in warehouse splitting according to the present invention are described below with reference to fig. 1 to 6.
Fig. 1 is a schematic flow chart of a method for obtaining picture information in warehouse splitting. The repository may be a component library, such as an iOS component library, that contains some static resources, such as picture resources, that may be referenced in the component. As shown in fig. 1, the method includes:
step 101, obtaining the picture name of the picture under the picture resource path in the split warehouse.
There may be multiple split warehouses, i.e., code may be split from multiple split warehouses to a new warehouse. To know whether the corresponding picture is used in the new warehouse, the picture name of the picture needs to be acquired for traversing. Therefore, the picture names of the pictures under the picture resource path in the split warehouse are acquired first, which may be the picture names of all the pictures under the picture resource path in the split warehouse. Wherein the pictures under the picture resource path are not necessarily all used in the code of the split repository.
Step 102, traversing the code path in the new warehouse to obtain a corresponding code file list.
Traversing the code path in the new warehouse and obtaining the corresponding code file list. After splitting the new repository, one split code path is corresponding. Traversing the code path in the new warehouse and obtaining a code file list.
Step 103, inquiring whether the picture name is contained in a code file in the code file list according to the picture name; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
All code file lists are required to be acquired, and whether the code files in each code file list contain picture names can be inquired in a code traversing mode; if the code files in the code file list contain picture names, acquiring picture information of pictures corresponding to the picture names; the picture information may include a picture name, a code segment and a line number of a used picture, a code file name of a used picture, and the like, and the code file name may be also referred to as a class name. After the picture name is acquired, the code segment and the line number of the used picture can be acquired according to the code traversed to the picture name, and the code file name of the used picture can be acquired according to the code path.
According to the method for acquiring the picture information in the warehouse splitting, the picture information of the picture is acquired when the picture name is inquired in the code file list of the new warehouse according to the split warehouse, so that the efficiency and the automation level of acquiring the picture information in the warehouse splitting are improved, and the accuracy of acquiring the picture information is improved.
According to the method for acquiring the picture information in the warehouse splitting, whether the picture name is contained in the code file list is queried according to the picture name, and the method specifically comprises the following steps: acquiring a code file of a preset type in the code file list; inquiring whether the code file of the preset type contains the picture name or not according to the picture name.
Since the picture names are used in the code files, not in folders, it is necessary to acquire a code file list, and whether or not the picture names are contained can be queried based on the code file list. Because the code files which possibly use the picture names are code files of some specific types, in order to further improve the query efficiency, the code files of the preset types in the code file list are acquired; and inquiring whether the code files of the preset type contain the picture names according to the picture names, so as to judge whether the code files in the code file list contain the picture names.
According to the method for acquiring the picture information in the warehouse splitting, the preset type code files in the code file list are acquired, whether the preset type code files contain the picture names or not is inquired according to the picture names, and therefore processing efficiency is improved.
According to the method for acquiring the picture information in the warehouse splitting, whether the picture name is contained in the code file list is queried according to the picture name, and the method specifically comprises the following steps: setting a search word according to the reference mode of the picture name in the code file, wherein the search word comprises the following steps: at least one of a character string spliced by the picture name and a preset reference symbol, a picture reference keyword, a bundle name and a character string spliced by a preset separator; and inquiring whether the code file contains the picture name according to the search word.
The picture names and the preset picture reference symbols can be spliced to obtain spliced picture names, the spliced picture names are used for searching in the code files in the code file list, and whether the code files in the code file list contain the picture names or not is inquired.
The code segments of the pictures used in the imageName mode can be obtained by searching imageNamed in the code files in the code file list, matching is carried out in the code segments of the pictures used in the imageName mode according to the picture names, and whether the code files in the code file list contain the picture names or not is inquired;
the method can also obtain a query character string composed of the bundle name and the preset separator, obtain the code segment of the used picture in the xib or the stonyboard by searching the query character string in the code files in the code file list, match the code segment of the used picture in the xib or the stonyboard according to the picture name, and query whether the code files in the code file list contain the picture name. xib and stonyboard can be applied to iOS componentized development, both of which can be used to describe software interfaces. xib is lightweight to describe a local UI interface; the storyboard is of a heavyweight order, is used to describe multiple interfaces throughout the software, and can exhibit skip relationships between the multiple interfaces.
The manner of using the picture includes the following four types:
1. directly using picture names, examples: "image_name";
2. splice picture name, example: imageNamed [ NSString stringWithFormat @ "image_name_% d", index ];
3. xib, storyboard, directly use the picture name, example: image= "image_name";
4. xib, storyboard, a bundle name is used to splice the picture names, for example: value= "my_test_house/image_name".
bundle is an executable file in the Unix/linux system. The user may use a/filename · bundle command in the terminal to cause it to run. In the invention, the bundle names in the xib and the stonyboard represent the collection of the picture resources, and the picture names are spliced by using the bundle names to use the pictures. The bundle name can be directly taken as the name consistent with the split repository.
For the picture using mode directly using the picture names, as in the picture using modes 1 and 3, when inquiring whether the code files in the code file list contain the picture names according to the picture names, splicing the picture names with preset picture reference symbols, wherein the picture reference symbols are the quotation marks in the examples to obtain spliced picture names, searching the code files in the code file list by using the spliced picture names, and inquiring whether the code files in the code file list contain the picture names, thereby obtaining the pictures used in the modes 1 and 3 in a new warehouse. As in examples 1 and 3 above, all picture names in the split warehouse xcoss are acquired, and are spliced with "", such as "image_name", and then code files in the new warehouse are traversed according to the spliced picture names, so as to obtain information whether corresponding pictures are used in the new warehouse.
In the case of using the picture according to the imageName method, as in the picture using method of 2, when inquiring whether the code files in the code file list contain the picture names according to the picture names, the code segments using the picture according to the imageName method are obtained by searching the imagenames in the code files in the code file list, and matching is performed in the code segments using the picture according to the imageName method according to the picture names, so as to inquire whether the code files in the code file list contain the picture names. As in example 2 above, the code [ NSString stringWithFormat @ "image_name_d", index ] of using the picture in the imageName manner is obtained by searching imageName in the code files in the code file list, and then all values of the image_name_d are matched according to the picture name, so as to obtain information whether the corresponding picture is used in the new warehouse.
For the picture using mode of splicing picture names by using bundle names in xib, storyboard, when inquiring whether the code files in the code file list contain picture names according to the picture names, acquiring inquiry character strings composed of bundle names (such as names of split warehouses) and preset separators, acquiring code fragments of pictures used in xib or a staryboard by searching the inquiry character strings in the code files in the code file list, and matching in the code fragments of the pictures used in xib or the staryboard according to the picture names, so as to inquire whether the code files in the code file list contain the picture names. As described in example 4 above, the query string my_test_house/, which is composed of the bundle name and the preset separator, is obtained, and by searching the code file in the code file list for my_test_house/, the code my_test_house/image_name of the picture used in the xib or the staryboard is obtained, and matching is performed in the my_test_house/image_name according to the picture name, so as to obtain the information whether the corresponding picture is used in the new warehouse.
The above-mentioned different methods for inquiring whether the code file in the code file list contains the picture name according to the picture name can be chosen and chosen according to different use modes of the picture in the project code.
According to the picture information acquisition method in warehouse splitting, whether the code files in the code file list contain picture names or not is inquired based on different picture use modes, and the accuracy of judging whether the code files in the code file list contain the picture names or not is improved.
According to the method for acquiring the picture information in the warehouse splitting, the method for acquiring the picture name of the picture under the picture resource path in the split warehouse comprises the following steps: traversing all layers of folders under the picture resource path; acquiring a picture resource folder in each layer of folder according to the suffix of the folder name; and acquiring the picture name of the corresponding picture according to the name of the picture resource folder.
In the IOS, the picture resource folder has a suffix imageset. Traversing folders under all picture resource paths of the split warehouse, and acquiring all characters behind the first right-to-left name of the folders according to the names of the folders, wherein the acquired characters are suffixes of the names of the folders, for example, the names of the folders are mytest.imageset, and the suffixes are imageset; judging whether the obtained suffix represents that the folder is a picture resource folder or not, for example, judging whether the suffix behind the folder name is equal to imageset or not, if so, representing that the folder is a picture resource folder, and if not, representing that the folder is not a picture resource folder. If the folder is not the picture resource folder, obtaining all folders under the folder, continuing traversing, and repeating the judging process. And if the folder is a picture resource folder, acquiring the picture name of the corresponding picture according to the name of the picture resource folder. For example, all characters in front of the picture resource folder name are acquired, and the acquired characters are the picture names.
According to the picture information acquisition method in warehouse splitting, through traversing each layer of folders under a picture resource path, the picture resource folders in each layer of folders are acquired according to the suffixes of the folder names, the picture names of corresponding pictures are acquired according to the names of the picture resource folders, and a basis is provided for judging whether the corresponding pictures are used in a new warehouse according to the picture names.
The invention provides a method for acquiring picture information in warehouse splitting, which comprises the following steps: and responding to the file in the file list, wherein the file list contains the picture name, and outputting and displaying the picture information of the picture corresponding to the picture name in a preset format.
When the code file of the code file list contains a picture name, the picture corresponding to the picture name is used in the new warehouse. The picture information of the pictures used in the new warehouse can be output and displayed in a preset format for viewing. The outputted picture information includes at least one of a picture name, a code segment using the picture, a number of lines in which the code segment is located, and a code file name using the picture. The outputted picture information may be saved to a set output path.
According to the method for acquiring the picture information in the warehouse splitting, when the picture names are contained in the code files in the code file list, the picture information of the pictures corresponding to the picture names is output and displayed in the preset format, so that the information of the pictures used in the new warehouse can be checked.
According to the method for obtaining the picture information in the warehouse splitting, if the code files in the code file list contain the picture names, the method further comprises: traversing the code file of the split warehouse according to the picture names, and judging whether the picture corresponding to the picture name contained in the code file list is used in the split warehouse or not; if yes, marking that the split warehouse and the new warehouse are both using the pictures; if not, marking that only the new warehouse is using the picture.
If the code files in the code file list contain picture names, the pictures corresponding to the picture names are used in the new warehouse. It may be further determined whether the corresponding picture is used in a split repository. Therefore, whether the picture corresponding to the picture name contained in the code file list is used in the split warehouse can be further judged by traversing the code file of the split warehouse; if yes, marking the split warehouse and the new warehouse to use the pictures; if not, marking that only the new warehouse is using the picture. The code file of the split repository is traversed according to the picture names, and the judgment of whether the picture corresponding to the picture name contained in the code file list is used in the split repository can be performed in the same or similar manner as the judgment of whether the picture is used in the new repository.
According to the method for acquiring the picture information in the warehouse splitting, the code files of the split warehouse are traversed according to the picture names, whether the pictures corresponding to the picture names contained in the code file list are used in the split warehouse or not is judged, and if yes, the split warehouse and the new warehouse are marked as using the pictures; if not, only the new warehouse is marked to use the pictures, and the use condition of the pictures in the new warehouse and the split warehouse can be effectively obtained.
The invention provides a method for acquiring picture information in warehouse splitting, which comprises the following steps: and outputting and displaying the use condition of the picture in the split warehouse and the new warehouse for the picture corresponding to the picture name contained in the code file list.
And obtaining information that the pictures are used in the new warehouse and the split warehouse or the pictures are only used in the new warehouse for the pictures corresponding to the picture names contained in the code file list, namely knowing the use condition of the pictures in the split warehouse and the new warehouse, and outputting and displaying the use condition of the pictures in the split warehouse and the new warehouse for viewing.
Fig. 2 is a schematic diagram of an output page of a picture service condition in a picture information acquisition method in warehouse splitting. As shown in fig. 2, the numbers indicate pictures in which both the new warehouse and the split warehouse are in use, and the numbers indicate pictures in which only the new warehouse is in use.
According to the method for acquiring the picture information in the warehouse splitting, the use conditions of the pictures corresponding to the picture names contained in the code file list in the split warehouse and the new warehouse are output and displayed, so that the use conditions of the pictures in the new warehouse and the split warehouse can be checked.
Fig. 3 is a second flowchart of a method for obtaining picture information in warehouse splitting according to the present invention. As shown in fig. 3, the method includes:
and acquiring all picture names in the split warehouse xcassets, traversing all codes in the new warehouse according to the picture names, and matching whether the pictures in the format of 1 and 3 are contained. 1. The picture in 3 format refers to the use mode of the picture that the picture name is directly used. Wherein, the picture in the 1 format uses the format of @ "image_name"; pictures in format 3 use as image= "image_name"; if not, further matching whether the picture in the format of 2 is contained, wherein the use mode of the picture in the format of 2 is that the picture names of the pictures are spliced in an imageName mode, such as imageNamed [ NSString stringWithFormat @ "image_name_% d", index ]; if not, further matching whether the picture in the 4 format is included, wherein the use mode of the picture in the 4 format is xib, storyboard in which the picture name is spliced by using the bundle name, and if the picture is value= "my_test_house/image_name".
If the corresponding picture is not used in any mode of 1, 2, 3 and 4 (i.e. no matching result is obtained) for the current picture name, the next picture is processed continuously. If the corresponding picture is used (i.e., the matching result is obtained) by any one of modes 1, 2, 3, and 4, the picture is described as being used in the new warehouse, and the picture name, the relevant code segment, the number of lines, the class name (code file name), and the like of the picture used in the new warehouse are output.
All codes in the split warehouse can be further traversed, whether the picture used in the new warehouse is also used in the split warehouse is judged, if yes, the picture is marked as being used in both warehouses, and if not, only the picture is marked as being used in the new warehouse.
Fig. 4 is a third flow chart of a method for obtaining picture information in warehouse splitting according to the present invention. As shown in fig. 4, the method includes:
and transmitting all the split picture resource paths (the picture resource paths in the split warehouse), the split code paths (the code paths of the new warehouse) and the screening result output content paths. Traversing the folder under the transmitted split all picture resource paths, acquiring all characters behind the first right to left name according to the name of the folder, and judging whether the suffix behind the name is equal to imageset; if not, obtaining all folders under the folder, continuing traversing, and returning to the processing step of obtaining all characters behind the first right-to-left name according to the names of the folders; if so, acquiring the picture name, wherein all characters in front of the first right-to-left "-are the picture names. And acquiring the split code paths, traversing all sub-file paths in the code paths, judging whether the current paths correspond to the folder directories, if so, transmitting the current paths for regression, namely continuously traversing all the sub-file paths in the paths according to the transmitted code paths until all paths which do not correspond to the folder directories are found, namely, finding the code files, wherein the code files form a code file list. Judging whether the code file suffixes in the code file list are m, n, pch, xib, and storing the code file suffixes, if not, not processing; if yes, inquiring whether the code file contents of different file types contain the picture names of the corresponding formats through grep-q, if not, not processing, if so, judging which component warehouse (split warehouse) the current code file is positioned in according to the contents of the path, and outputting the code fragments and the line number of the line where the picture names are used.
The picture information acquisition method in warehouse splitting can be utilized to realize a script tool, and picture resources used by a new warehouse can be quickly found and listed by using the script tool, and output contents comprise: the name of the picture used by the new warehouse, the specific code segment of the picture used by the new warehouse, the number of code lines, the file name of the picture used by the new warehouse and the like can greatly save development time and reduce error probability.
The picture information obtaining device in warehouse splitting provided by the invention is described below, and the picture information obtaining device in warehouse splitting described below and the picture information obtaining method in warehouse splitting described above can be correspondingly referred to each other.
Fig. 5 is a schematic structural diagram of a device for acquiring picture information in warehouse splitting. As shown in fig. 5, the apparatus includes a picture name acquisition module 10, a file list acquisition module 20, and a picture information acquisition module 30, wherein: the picture name acquisition module 10 is used for: acquiring a picture name of a picture under a picture resource path in a split warehouse; the file list acquiring module 20 is configured to: traversing a code path in a new warehouse to acquire a corresponding code file list; the picture information acquisition module 30 is configured to: inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
According to the picture information acquisition device in the warehouse splitting, the picture information of the picture is acquired by acquiring the picture name according to the split warehouse and inquiring the code file list of the new warehouse according to the picture name, so that the picture information acquisition efficiency and automation level in the warehouse splitting are improved, and the picture information acquisition accuracy is improved.
According to the device for acquiring picture information in warehouse splitting provided by the invention, the picture information acquisition module 30 is specifically configured to, when being configured to query whether a code file in the code file list contains the picture name according to the picture name: acquiring a code file of a preset type in the code file list; inquiring whether the code file of the preset type contains the picture name or not according to the picture name.
According to the picture information acquisition device in warehouse splitting, the preset type code files in the code file list are acquired, whether the preset type code files contain picture names or not is inquired according to the picture names, and therefore processing efficiency is improved.
According to the device for acquiring picture information in warehouse splitting provided by the invention, the picture information acquisition module 30 is specifically configured to, when being configured to query whether a code file in the code file list contains the picture name according to the picture name: setting a search word according to the reference mode of the picture name in the code file, wherein the search word comprises the following steps: at least one of a character string spliced by the picture name and a preset reference symbol, a picture reference keyword, a bundle name and a character string spliced by a preset separator; and inquiring whether the code file contains the picture name according to the search word.
According to the picture information acquisition device in warehouse splitting, whether the code files in the code file list contain picture names or not is inquired according to the picture names based on different picture use modes, so that the accuracy of judging whether the code files in the code file list contain the picture names or not is improved.
According to the device for acquiring the picture information in the warehouse splitting, the picture name acquisition module 10 is specifically configured to: traversing all layers of folders under the picture resource path; acquiring a picture resource folder in each layer of folder according to the suffix of the folder name; and acquiring the picture name of the corresponding picture according to the name of the picture resource folder.
According to the picture information acquisition device in warehouse splitting, through traversing each layer of folders under a picture resource path, the picture resource folders in each layer of folders are acquired according to the suffixes of the folder names, the picture names of corresponding pictures are acquired according to the names of the picture resource folders, and a basis is provided for judging whether the corresponding pictures are used in a new warehouse according to the picture names.
The invention provides a picture information acquisition device in warehouse splitting, which further comprises an output module, wherein the output module is used for: and responding to the file in the file list, wherein the file list contains the picture name, and outputting and displaying the picture information of the picture corresponding to the picture name in a preset format.
According to the picture information acquisition device in warehouse splitting, when the picture names are contained in the code files in the code file list, the picture information of the pictures corresponding to the picture names is output and displayed in the preset format, so that the information of the used pictures in the new warehouse can be checked.
According to the device for obtaining picture information in warehouse splitting provided by the invention, if the code files in the code file list contain the picture names, the picture information obtaining module 30 is further configured to: traversing the code file of the split warehouse according to the picture names, and judging whether the picture corresponding to the picture name contained in the code file list is used in the split warehouse or not; if yes, marking that the split warehouse and the new warehouse are both using the pictures; if not, marking that only the new warehouse is using the picture.
According to the picture information acquisition device in warehouse splitting, whether pictures corresponding to picture names contained in a code file list are used in a split warehouse or not is judged by traversing codes of the split warehouse according to the picture names, and if yes, the split warehouse and a new warehouse are marked as using the pictures; if not, only the new warehouse is marked to use the pictures, and the use condition of the pictures in the new warehouse and the split warehouse can be effectively obtained.
According to the picture information acquisition device in warehouse splitting, the output module is further used for: and outputting and displaying the use condition of the picture in the split warehouse and the new warehouse for the picture corresponding to the picture name contained in the code file list.
According to the picture information acquisition device in warehouse splitting, the use conditions of the pictures corresponding to the picture names contained in the code file list in the split warehouse and the new warehouse are output and displayed, so that the use conditions of the pictures in the new warehouse and the split warehouse can be checked.
Fig. 6 is a schematic structural diagram of an electronic device according to the present invention, and as shown in fig. 6, the electronic device may include: processor 710, communication interface (Communications Interface) 720, memory 730, and communication bus 740, wherein processor 710, communication interface 720, memory 730 communicate with each other via communication bus 740. Processor 710 may invoke logic instructions in memory 730 to perform a method of picture information retrieval in warehouse splitting, the method comprising: acquiring a picture name of a picture under a picture resource path in a split warehouse; traversing a code path in a new warehouse to acquire a corresponding code file list; inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
Further, the logic instructions in the memory 730 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method for obtaining picture information in warehouse splitting provided by the above methods, the method comprising: acquiring a picture name of a picture under a picture resource path in a split warehouse; traversing a code path in a new warehouse to acquire a corresponding file list; inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided method for obtaining picture information in warehouse splitting, the method comprising: acquiring a picture name of a picture under a picture resource path in a split warehouse; traversing a code path in a new warehouse to acquire a corresponding code file list; inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The method for acquiring the picture information in the warehouse splitting is characterized by comprising the following steps:
acquiring a picture name of a picture under a picture resource path in a split warehouse;
traversing a code path in a new warehouse to acquire a corresponding code file list;
inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture;
inquiring whether the code file in the code file list contains the picture name according to the picture name specifically comprises the following steps:
setting a search word according to the reference mode of the picture name in the code file, and inquiring whether the code file contains the picture name or not according to the search word.
2. The method for obtaining picture information in warehouse splitting according to claim 1, wherein said querying whether the code file in the code file list contains the picture name according to the picture name further comprises:
acquiring a code file of a preset type in the code file list;
inquiring whether the code file of the preset type contains the picture name or not according to the picture name.
3. The method for obtaining picture information in warehouse splitting according to claim 1, wherein the search term comprises: at least one of the character string spliced by the picture name and the preset reference symbol, the picture reference keyword, the bundle name and the character string spliced by the preset separator.
4. The method for obtaining the picture information in the splitting of the warehouse according to claim 1, wherein the obtaining the picture name of the picture under the picture resource path in the split warehouse specifically comprises:
traversing all layers of folders under the picture resource path;
acquiring a picture resource folder in each layer of folder according to the suffix of the folder name;
and acquiring the picture name of the corresponding picture according to the name of the picture resource folder.
5. The method for obtaining picture information in warehouse splitting as claimed in claim 1, further comprising:
and responding to the file in the file list, wherein the file list contains the picture name, and outputting and displaying the picture information of the picture corresponding to the picture name in a preset format.
6. The method for obtaining picture information in warehouse splitting according to claim 1, wherein if the code file in the code file list includes the picture name, the method further comprises:
traversing the code file of the split warehouse according to the picture names, and judging whether the picture corresponding to the picture name contained in the code file list is used in the split warehouse or not;
if yes, marking that the split warehouse and the new warehouse are both using the pictures; if not, marking that only the new warehouse is using the picture.
7. The method for obtaining picture information in warehouse split according to claim 6, further comprising:
and outputting and displaying the use condition of the picture in the split warehouse and the new warehouse for the picture corresponding to the picture name contained in the code file list.
8. A picture information acquisition device in warehouse split, characterized by comprising:
the picture name acquisition module is used for: acquiring a picture name of a picture under a picture resource path in a split warehouse;
a file list acquisition module, configured to: traversing a code path in a new warehouse to acquire a corresponding code file list;
the picture information acquisition module is used for: inquiring whether the code files in the code file list contain the picture names according to the picture names; if yes, acquiring the picture information of the picture corresponding to the picture name; the picture information comprises at least one of a picture name, a code segment using the picture, a line number where the code segment is located and a code file name using the picture;
the picture information obtaining module is specifically configured to, when being configured to query whether a code file in the code file list includes the picture name according to the picture name: setting a search word according to the reference mode of the picture name in the code file, and inquiring whether the code file contains the picture name or not according to the search word.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of the method for obtaining picture information in a warehouse split as claimed in any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the method for obtaining picture information in warehouse splitting as claimed in any one of claims 1 to 7.
CN202110896392.4A 2021-08-05 2021-08-05 Picture information acquisition method and device in warehouse splitting Active CN113806575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110896392.4A CN113806575B (en) 2021-08-05 2021-08-05 Picture information acquisition method and device in warehouse splitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110896392.4A CN113806575B (en) 2021-08-05 2021-08-05 Picture information acquisition method and device in warehouse splitting

Publications (2)

Publication Number Publication Date
CN113806575A CN113806575A (en) 2021-12-17
CN113806575B true CN113806575B (en) 2024-02-20

Family

ID=78893413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110896392.4A Active CN113806575B (en) 2021-08-05 2021-08-05 Picture information acquisition method and device in warehouse splitting

Country Status (1)

Country Link
CN (1) CN113806575B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902565A (en) * 2012-12-26 2014-07-02 阿里巴巴集团控股有限公司 Method and device for determining data access relation
CN105096242A (en) * 2015-08-18 2015-11-25 耿懿超 Picture processing method and picture processing device
CN105224566A (en) * 2014-06-25 2016-01-06 国际商业机器公司 Relational database is supported the method and system of injunctive graphical query
CN105868421A (en) * 2016-06-12 2016-08-17 浪潮通用软件有限公司 Data management method and data management device
CN107111617A (en) * 2014-12-19 2017-08-29 微软技术许可有限责任公司 Figure processing in database
CN108989462A (en) * 2018-08-24 2018-12-11 四川长虹电器股份有限公司 Picture method for down loading based on AWS cloud service
CN109492017A (en) * 2018-09-18 2019-03-19 平安科技(深圳)有限公司 Business information inquiry processing method, system, computer equipment and storage medium
CN111831625A (en) * 2020-07-14 2020-10-27 深圳力维智联技术有限公司 Data migration method, data migration device and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2013206449A1 (en) * 2012-06-20 2014-01-16 Visa International Service Association Multi-channel remote payment apparatuses, methods and systems
US20140334696A1 (en) * 2013-05-13 2014-11-13 Optra Systems Inc. Cloud-based method and system for digital pathology
US20200356592A1 (en) * 2019-05-09 2020-11-12 Microsoft Technology Licensing, Llc Plural-Mode Image-Based Search

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902565A (en) * 2012-12-26 2014-07-02 阿里巴巴集团控股有限公司 Method and device for determining data access relation
CN105224566A (en) * 2014-06-25 2016-01-06 国际商业机器公司 Relational database is supported the method and system of injunctive graphical query
CN107111617A (en) * 2014-12-19 2017-08-29 微软技术许可有限责任公司 Figure processing in database
CN105096242A (en) * 2015-08-18 2015-11-25 耿懿超 Picture processing method and picture processing device
CN105868421A (en) * 2016-06-12 2016-08-17 浪潮通用软件有限公司 Data management method and data management device
CN108989462A (en) * 2018-08-24 2018-12-11 四川长虹电器股份有限公司 Picture method for down loading based on AWS cloud service
CN109492017A (en) * 2018-09-18 2019-03-19 平安科技(深圳)有限公司 Business information inquiry processing method, system, computer equipment and storage medium
CN111831625A (en) * 2020-07-14 2020-10-27 深圳力维智联技术有限公司 Data migration method, data migration device and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Chuan Li."Research on FP-Growth Algorithm for Massive Telecommunication Network Alarm Data based on Spark".《IEEE Transactions on Knowledge and Data Engineering 2018》.第875-879页. *
陈冰川."基于数据源向图的数据项的表示与获取方法".《电子学报》.2012,第2239-2246页. *

Also Published As

Publication number Publication date
CN113806575A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN110109681B (en) Method and system for converting codes between different platforms
CN111881183B (en) Enterprise name matching method and device, storage medium and electronic equipment
US20160321268A1 (en) Entity-driven logic for improved name-searching in mixed-entity lists
CN111506608A (en) Method and device for comparing structured texts
WO2020142300A1 (en) Automatic resource management for build systems
US20190220441A1 (en) Method, device and computer program product for data migration
CN112527291A (en) Webpage generation method and device, electronic equipment and storage medium
CN112434250B (en) CMS (content management system) identification feature rule extraction method based on online website
CN111858355B (en) Test case processing method and device, computer equipment and readable storage medium
US11675772B2 (en) Updating attributes in data
CN113806575B (en) Picture information acquisition method and device in warehouse splitting
CN117130990A (en) Data processing method and device
CN110196952B (en) Program code search processing method, device, equipment and storage medium
CN111984595B (en) File processing method and device and storage medium
JP2021140430A (en) Database migration method, database migration system, and database migration program
CN116069725A (en) File migration method, device, apparatus, medium and program product
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN112307736A (en) Application project creating method, device, equipment and storage medium
US10824671B2 (en) Organizing multiple versions of content
US20190340253A1 (en) Managing online help information in a data center
CN112988457A (en) Data backup method, device and system and computer equipment
CN112905164A (en) Project code processing method and device
CN112379891B (en) Data processing method and device
CN116028444B (en) File fingerprint generation method, device and system, electronic equipment and storage medium
CN112148710B (en) Micro-service library separation method, system and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231122

Address after: Room 102, 1st Floor, Building 1, No. 2 Chuangye Road, Haidian District, Beijing, 100080

Applicant after: Seashell Housing (Beijing) Technology Co.,Ltd.

Address before: 101309 room 24, 62 Farm Road, Erjie village, Yangzhen, Shunyi District, Beijing

Applicant before: Beijing fangjianghu Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant