Icon intelligent warehousing method and device, electronic equipment and storage medium
By identifying and querying the shape features of icons, the process of automating icon entry into the database is solved, addressing the problem of low efficiency in icon entry in existing technologies and realizing a highly efficient icon entry method.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-08-22
- Publication Date
- 2026-07-14
Smart Images

Figure CN115357744B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent decision-making, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for intelligent icon entry into a database. Background Technology
[0002] Icon storage refers to the process of saving and recording icons in an icon library. Icons act as interpreters of information; as a combination of "image" and "sign," they also possess symbolic attributes. Visualizing icons effectively facilitates the communication of functional information, thereby reducing cognitive barriers for users. Furthermore, storing icons in a library greatly improves the ease of subsequent user searches.
[0003] Currently, adding icons to a library typically requires manually maintaining text tags for a large number of icons to support text search. During development, when adding icons to the library, users need to perform text searches based on their guesses about the icon names; for example, searching for "download" might be necessary to find the icon. However, this method usually requires manual searching, which consumes a lot of time and results in low icon retrieval efficiency, thus affecting the efficiency of icon addition to the library. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for intelligent icon entry into a database, the main purpose of which is to improve the efficiency of icon entry into a database.
[0005] To achieve the above objectives, the present invention provides a method for intelligent icon import into a database, comprising:
[0006] Obtain the icon to be added to the database and identify its shape features;
[0007] Based on the shape characteristics, query whether the icon to be added to the library exists in the pre-built icon library as an icon group;
[0008] If the icon to be added to the library exists in an icon group in the pre-built icon library, mark the feature position of the icon to be added to the library in the icon group, and search for similar icons of the icon to be added to the library in the icon group based on the feature position;
[0009] Determine whether the similar icons are identical to the icons to be added to the database;
[0010] If the similar icon is identical to the icon to be added to the database, the similar icon will be used as the icon to be added to the database.
[0011] If the similar icon is inconsistent with the icon to be added to the database, the icon to be added to the database will be stored in the icon group.
[0012] If the icon to be added to the library does not exist in the pre-built icon library, an icon group to be added to the library is created in the pre-built icon library, and the icon to be added to the library is stored in the icon group.
[0013] Optionally, identifying the shape features of the icon to be added to the database includes:
[0014] Obtain the icon image of the icon to be added to the database, and preprocess the icon image to obtain the target icon image;
[0015] The edge image in the target icon image is detected using a preset edge detection algorithm;
[0016] Based on the target icon image, identify the local features of the icon to be added to the database; based on the edge image, identify the global features of the icon to be added to the database.
[0017] Based on the global features and the local features, the shape features of the icon to be added to the database are generated.
[0018] Optionally, the preprocessing of the icon image to obtain the target icon image includes:
[0019] The icon image is converted to grayscale to obtain a grayscale image;
[0020] The grayscale image is binarized to obtain a binary image;
[0021] The binarized image is then subjected to median filtering for noise reduction to obtain the target icon image.
[0022] Optionally, identifying the global features of the icon to be added to the database based on the edge image includes:
[0023] Based on the edge image, determine the measured height and measured width of the icon to be added to the warehouse;
[0024] Based on the edge image, calculate the icon pixel points of the icon to be added to the database, and based on the icon pixel points, calculate the icon area and icon perimeter of the icon to be added to the database.
[0025] Based on the measured height, measured width, icon area, and icon perimeter, the global features of the icon to be added to the database are identified.
[0026] Optionally, marking the characteristic position of the icon to be added to the database within the icon group includes:
[0027] Using a preset local feature detection algorithm, stable feature points of the icons to be added to the database are extracted from the grouped images in the icon grouping;
[0028] Based on the stable feature points, the region growing algorithm is used to extract the local feature regions of the icons to be added to the database in the grouped images;
[0029] The local feature regions are superimposed to obtain the target coverage region. The minimum bounding rectangle of the target coverage region is calculated, and the position of the minimum bounding rectangle in the grouped image is marked to obtain the feature position of the icon to be added to the database in the icon group.
[0030] Optionally, determining whether the similar icon matches the icon to be added to the database includes:
[0031] Divide the similar icons and the icons to be added to the database into a consistency verification area, and determine whether the icon information of the similar icons and the icons to be added to the database is the same in the consistency verification area;
[0032] If the similar icon is different from the icon to be added to the database, then the similar icon is inconsistent with the icon to be added to the database.
[0033] If the similar icon has the same icon information as the icon to be added to the database, then the similar icon is consistent with the icon to be added to the database.
[0034] Optionally, determining whether the icon information of similar icons is the same as that of the icon to be added to the database in the consistency verification area includes:
[0035] In the consistency verification area, the similar icons and the icons to be added to the database are subjected to image difference operation to obtain a difference image;
[0036] Calculate the number of pixels with a value of 0 in the difference image and the total number of pixels in the difference image, and calculate the ratio of the number of pixels with a value of 0 in the difference image to the total number of pixels in the difference image;
[0037] If the ratio is not less than the preset ratio, then it is determined that the similar icon and the icon to be added to the database have the same icon information;
[0038] If the ratio is less than a preset ratio, it is determined that the icon information of the similar icon is different from that of the icon to be added to the database.
[0039] To address the above problems, the present invention also provides an intelligent icon entry device, the device comprising:
[0040] The shape feature recognition module is used to acquire icons to be added to the database and recognize the shape features of the icons to be added to the database.
[0041] The icon grouping query module is used to query whether the icon to be added to the library exists in the pre-built icon library based on the shape characteristics.
[0042] The similar icon retrieval module is used to mark the feature position of the icon to be added to the library in the icon group if the icon to be added to the library exists in the pre-built icon library, and retrieve similar icons of the icon to be added to the library in the icon group according to the feature position;
[0043] The icon consistency determination module is used to determine whether the similar icons are consistent with the icons to be added to the database.
[0044] An icon determination module is used to identify the similar icon as the icon to be added to the database if the similar icon is the same as the icon to be added to the database.
[0045] The icon grouping and classification module is used to store the icon to be added to the database into the icon group if the similar icon is inconsistent with the icon to be added to the database.
[0046] The icon grouping creation module is used to create an entry group for the icon to be entered into the pre-built icon library if the icon to be entered into the library does not exist in the pre-built icon library, and to store the icon to be entered into the entry group.
[0047] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:
[0048] At least one processor; and,
[0049] A memory communicatively connected to the at least one processor; wherein,
[0050] The memory stores a computer program that can be executed by the at least one processor to implement the above-described intelligent icon storage method.
[0051] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the aforementioned intelligent icon warehousing method.
[0052] As can be seen, this embodiment of the invention, by performing shape feature recognition on the acquired icons to be added to the database, provides a guarantee for the subsequent grouping of icons to be added to the database. Based on the shape features, it queries whether the icon to be added to the database exists in an icon group in the pre-built icon library, thus determining the method of adding subsequent icons to the database, thereby reducing the time and improving the efficiency of icon addition. Secondly, when the icon to be added to the database exists in an icon group in the pre-built icon library, this embodiment of the invention marks the feature position of the icon to be added to the database within the icon group. Based on the feature position, it retrieves similar icons of the icon to be added to the database within the icon group, ensuring the efficiency of subsequent icon addition to the database. Furthermore, by judging similarity... The method checks whether the icons to be added to the database are consistent to further determine the subsequent addition method for icons, thereby further improving the efficiency of icon addition. Specifically, when a similar icon matches the icon to be added, the similar icon is used as the icon to be added; when a similar icon does not match the icon to be added, the icon to be added is stored in an icon group. This intelligently realizes the addition of icons to the database, ensuring efficiency. Furthermore, in this embodiment, if the icon to be added does not exist in the pre-built icon library, an addition group is created in the pre-built icon library, and the icons to be added are stored in the addition group, achieving intelligent addition of icons to the database and ensuring efficiency. Therefore, the intelligent icon addition method, apparatus, electronic device, and storage medium proposed in this embodiment can improve icon addition efficiency. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating an embodiment of the intelligent icon import method provided by the present invention.
[0054] Figure 2 This is a schematic diagram of a module of an icon intelligent warehousing device provided in an embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the internal structure of an electronic device that implements the intelligent icon warehousing method according to an embodiment of the present invention;
[0056] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0057] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0058] This invention provides a method for intelligent icon entry into a database. The executing entity of this method includes, but is not limited to, at least one of the following: a server, a terminal, or other electronic devices configured to execute the method provided in this invention. In other words, the intelligent icon entry method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cluster of cloud servers. The server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0059] Reference Figure 1 The diagram shown is a flowchart illustrating an icon intelligent database entry method according to an embodiment of the present invention. In this embodiment, the icon intelligent database entry method includes:
[0060] S1. Obtain the icon to be added to the database and identify the shape features of the icon to be added to the database.
[0061] In this embodiment of the invention, the icon to be added to the icon library refers to an icon that is about to be stored in the icon library. It can be obtained through a data script, which can be compiled using the JavaScript scripting language. The icon is a graphic with identifying properties; it is not only a graphic but also a symbol, possessing the characteristics of highly condensed and quick information delivery, and easy memorability, such as time and date button icons. The icon library refers to a database used to store icons of standard sizes and attribute formats. In this invention, the icon library can be understood as a file, which can be directly linked into the executable program by the compiler during compilation, or dynamically loaded into memory by the operating system's runtime environment as needed at runtime.
[0062] Furthermore, by recognizing the shape features of the icon to be added to the library, this embodiment of the invention can quickly locate the icon group of the icon to be added to the pre-built icon library. The shape feature is a global or local feature used to describe the shape of an object. Common shape features can be divided into two categories: one is the contour feature describing the boundary shape of an object, i.e., the global feature; the other is the region feature describing the internal shape of an object, i.e., the local feature. Optionally, the global feature can be a circle, a square, etc., and the local feature can contain arrows, underlines, etc.
[0063] As an embodiment of the present invention, the step of identifying the shape features of the icon to be added to the database includes: acquiring an icon image of the icon to be added to the database; preprocessing the icon image to obtain a target icon image; detecting edge images in the target icon image using a preset edge detection algorithm; identifying local features of the icon to be added to the database based on the target icon image; identifying global features of the icon to be added to the database based on the edge images; and generating the shape features of the icon to be added to the database based on the global features and the local features.
[0064] The icon image refers to the image obtained by converting the icon using an icon image conversion function. The icon image is generally an RGB color image. The edge image refers to the image obtained after edge extraction of the target icon image. The edge is the junction between an image region and another attribute region; it is where regional attributes change abruptly, where there is the greatest uncertainty in the image, and also where image information is most concentrated. The edges of an image contain rich information.
[0065] Furthermore, in an optional embodiment of the present invention, the preprocessing of the icon image to obtain the target icon image includes: converting the icon image to grayscale to obtain a grayscale image; binarizing the grayscale image to obtain a binarized image; and performing median filtering on the binarized image to remove noise, thereby obtaining the target icon image.
[0066] In an optional embodiment of the present invention, the preset edge detection algorithm includes the Sobel operator or the Canny operator, etc., and the local features of the icon to be added to the database can be identified by a preset local feature extraction algorithm, such as the LBP algorithm, the Gabor algorithm, etc.
[0067] Further, in an optional embodiment of the present invention, the step of identifying the global features of the icon to be added to the database based on the edge image includes: determining the measured height and measured width of the icon to be added to the database based on the edge image; calculating the icon pixels of the icon to be added to the database based on the edge image; calculating the icon area and icon perimeter of the icon to be added to the database based on the icon pixels; and identifying the global features of the icon to be added to the database based on the measured height, measured width, icon area, and icon perimeter.
[0068] For example, based on the edge image of the icon to be added to the warehouse, 10 measurement points are selected at equal intervals along the horizontal axis of the icon to be added to the warehouse, and the current height of the 10 measurement points is measured. The average value of the current heights of the 10 measurement points is used as the measured height of the icon to be added to the warehouse. Similarly, 10 measurement points are selected at equal intervals along the vertical axis of the icon to be added to the warehouse, and the current width of the 10 measurement points is measured. The average value of the current widths of the 10 measurement points is used as the measured width of the icon to be added to the warehouse. The number of pixels corresponding to the icon pixels is accumulated within the closed area formed by the edge image of the icon to be added to the warehouse, and the accumulated result of the closed area is used as the measured area of the icon to be added to the warehouse. Finally, the number of pixels corresponding to the icon pixels is accumulated within the edge points of the edge image of the icon to be added to the warehouse, and the accumulated result of the edge points is used as the measured perimeter of the icon to be added to the warehouse.
[0069] S2. Based on the shape characteristics, query whether the icon to be added to the library exists in the pre-built icon library as an icon group.
[0070] This invention, through its embodiments, determines the subsequent icon insertion method by querying whether the icon to be added to the database exists in a pre-built icon library based on its shape characteristics. This reduces the icon insertion time and improves insertion efficiency. The pre-built icon library refers to a pre-established icon library. The icon grouping refers to the initial classification and grouping of icons within the pre-built icon library based on icon characteristics.
[0071] As an embodiment of the present invention, the step of querying whether the icon to be added to the library exists in the pre-built icon library based on the shape features includes: identifying the group icon features of each icon group in the pre-built icon library, converting the group icon features and the shape features into group icon vectors and shape feature vectors respectively, calculating the similarity between the group icon vectors and the shape feature vectors, and if the similarity is less than a preset first threshold, then the icon to be added to the library does not exist in the pre-built icon library; if the similarity is not less than the preset first threshold, then the icon to be added to the library exists in the pre-built icon library.
[0072] Furthermore, in an optional embodiment of the present invention, the recognition principle of the group icon feature is the same as that of the shape feature recognition described above, and will not be elaborated further here. The group icon vector and the shape feature vector can be obtained by converting the group icon feature and the shape feature respectively through a vector conversion algorithm, such as the word2vec vector algorithm. The similarity between the group icon vector and the shape feature vector can be calculated by a similarity algorithm, such as the cosine similarity algorithm. The preset first threshold can be set to 0.88, or it can be set according to the actual business scenario.
[0073] S3. If the icon to be added to the library exists in an icon group in the pre-built icon library, mark the feature position of the icon to be added to the library in the icon group, and search for similar icons of the icon to be added to the library in the icon group according to the feature position.
[0074] It should be understood that if the icon to be added to the database exists in an icon group in the pre-built icon library, it means that a similar icon group can be found in the pre-built icon library. Therefore, this embodiment of the invention marks the feature position of the icon to be added to the database in the icon group, so as to retrieve similar icons of the icon to be added to the database in the icon group according to the feature position, thereby ensuring the efficiency of subsequent icons to be added to the database.
[0075] Further, as an embodiment of the present invention, marking the feature position of the icon to be added to the database in the icon group includes: using a preset local feature detection algorithm to extract stable feature points of the icon to be added to the database in the grouped image of the icon group; based on the stable feature points, using a region growing algorithm to extract local feature regions of the icon to be added to the database in the grouped image; performing region superposition on the local feature regions to obtain a target coverage area; calculating the minimum bounding rectangle of the target coverage area; and marking the position of the minimum bounding rectangle in the grouped image to obtain the feature position of the icon to be added to the database in the icon group.
[0076] The feature location refers to the position of a region within the icon that has significant local features. Region growing refers to the process of combining pixels or regions with similar properties into a larger region based on image grayscale similarity and discontinuity. The minimum bounding rectangle refers to the maximum extent of several two-dimensional shapes (e.g., points, lines, polygons) represented by two-dimensional coordinates; that is, the rectangle whose lower boundary is defined by the maximum and minimum x-coordinates, maximum and minimum y-coordinates of each vertex of a given two-dimensional shape.
[0077] Furthermore, in an optional embodiment of the present invention, the preset local feature detection algorithm includes SIFT detection algorithm, SURF detection algorithm, etc. The region growing algorithm includes element algorithms such as determining the growth seed point, defining the growth rules, and determining the growth stopping condition. The region superposition of the local feature regions is achieved by setting the gray values of the pixel distribution of the local feature regions to 1 to obtain a white region. The minimum bounding rectangle of the target coverage area is obtained by calculating the maximum and minimum values of the pixel distribution coordinates of the target coverage area.
[0078] Furthermore, by retrieving similar icons to the icon to be added to the database within the icon group based on the feature location, this embodiment of the invention can greatly narrow the search scope and improve search efficiency. Here, the similar icons refer to icons that have a certain degree of similarity to the icon to be added to the database. This similarity can generally be quantified using a similarity score, which can be determined by adjusting a threshold value.
[0079] It should be noted that, in this invention, the principle of searching for similar icons of the icon to be added to the library in the icon group is the same as the principle of determining whether the icon to be added to the library exists in the pre-built icon library, and will not be elaborated further here.
[0080] S4. Determine whether the similar icon is consistent with the icon to be added to the database.
[0081] This invention improves the efficiency of icon storage by determining whether a similar icon matches the icon to be stored, thereby further determining the storage method for subsequent icons. As one embodiment, determining whether a similar icon matches the icon to be stored includes: dividing the similar icon and the icon to be stored into a consistency verification area; determining whether the icon information of the similar icon and the icon to be stored is the same within the consistency verification area; if the icon information of the similar icon and the icon to be stored is different, then the similar icon and the icon to be stored are inconsistent; if the icon information of the similar icon and the icon to be stored is the same, then the similar icon and the icon to be stored are consistent.
[0082] The consistency verification area refers to the area where the original data and the data to be compared are directly compared, and the icon information refers to the resources and knowledge of the objective world reflected in the form of icons, which is the result of data being arranged in a meaningful way.
[0083] Furthermore, in an optional embodiment of the present invention, the consistency verification area can be the area where the similar icon and the icon to be added to the database have the same position as the verification area.
[0084] Further, in an optional embodiment of the present invention, the step of determining whether the icon information of the similar icon and the icon to be added to the database is the same in the consistency verification area includes: performing image difference operation on the similar icon and the icon to be added to the database in the consistency verification area to obtain a difference image; calculating the number of pixels with a pixel value of 0 in the difference image and the number of pixels in the difference image; calculating the ratio of the number of pixels with a pixel value of 0 in the difference image to the number of pixels in the difference image; if the ratio is not less than a preset second threshold, then the icon information of the similar icon and the icon to be added to the database is determined to be the same; if the ratio is less than the preset second threshold, then the icon information of the similar icon and the icon to be added to the database is determined to be different. The image difference operation refers to the process of subtracting the corresponding pixel values of two images. The preset second threshold can be set to 0.98, or it can be set according to the actual business scenario.
[0085] S5. If the similar icon is the same as the icon to be added to the database, the similar icon shall be used as the icon to be added to the database.
[0086] It should be understood that when the similar icon is the same as the icon to be added to the database, it means that the similar icon and the icon to be added to the database are the same icon. Therefore, this embodiment of the invention directly uses the similar icon as the icon to be added to the database to achieve intelligent database entry of the icon to be added to the database and ensure the efficiency of icon entry.
[0087] S6. If the similar icon is inconsistent with the icon to be added to the database, store the icon to be added to the database in the icon group.
[0088] It should be understood that if the similar icon is inconsistent with the icon to be added to the database, it means that the similar icon and the icon to be added to the database are not the same icon. Therefore, in this embodiment of the invention, the icon to be added to the database is stored in the icon group to achieve intelligent database entry of the icon to be added to the database and ensure the efficiency of icon entry.
[0089] S7. If the icon to be added to the library does not exist in the pre-built icon library, an icon to be added to the library is created in the pre-built icon library, and the icon to be added to the library is stored in the icon to be added to the library.
[0090] It should be understood that if the icon to be added to the database does not exist in the pre-built icon library, it means that the icon to be added to the database does not have an icon entry position in the pre-built icon library. Therefore, this embodiment of the invention constructs an entry group for the icon to be added to the database in the pre-built icon library, so as to store the icon to be added to the database in the entry group, thereby realizing the entry of the icon to be added to the database and ensuring the efficiency of icon entry. Optionally, the entry group for the icon to be added to the database can be constructed using SQL statements.
[0091] As can be seen, this embodiment of the invention, by performing shape feature recognition on the acquired icons to be added to the database, provides a guarantee for the subsequent grouping of icons to be added to the database. Based on the shape features, it queries whether the icon to be added to the database exists in an icon group in the pre-built icon library, thus determining the method of adding subsequent icons to the database, thereby reducing the time and improving the efficiency of icon addition. Secondly, when the icon to be added to the database exists in an icon group in the pre-built icon library, this embodiment of the invention marks the feature position of the icon to be added to the database within the icon group. Based on the feature position, it retrieves similar icons of the icon to be added to the database within the icon group, ensuring the efficiency of subsequent icon addition to the database. Furthermore, by judging similarity... The method checks whether the icons to be added to the database are consistent to further determine the subsequent addition method for icons, thereby further improving the efficiency of icon addition. Specifically, when a similar icon matches the icon to be added, the similar icon is used as the icon to be added; when a similar icon does not match the icon to be added, the icon to be added is stored in an icon group. This intelligently realizes the addition of icons to the database, ensuring efficiency. Furthermore, in this embodiment, if the icon to be added does not exist in the pre-built icon library, an addition group is created in the pre-built icon library, and the icons to be added are stored in the addition group, achieving intelligent addition of icons to the database and ensuring efficiency. Therefore, the intelligent icon addition method proposed in this embodiment can improve the efficiency of icon addition.
[0092] like Figure 2 The diagram shown is a functional block diagram of the intelligent icon warehousing device of the present invention.
[0093] The intelligent icon storage device 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the intelligent icon storage device may include a shape feature recognition module 101, an icon grouping query module 102, a similar icon retrieval module 103, an icon consistency judgment module 104, an icon determination module 105, an icon grouping classification module 106, and an icon grouping creation module 107. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0094] In this embodiment, the functions of each module / unit are as follows:
[0095] The shape feature recognition module 101 is used to acquire icons to be added to the database and recognize the shape features of the icons to be added to the database.
[0096] The icon grouping query module 102 is used to query whether the icon to be added to the library exists in the pre-built icon library based on the shape features;
[0097] The similar icon retrieval module 103 is used to mark the feature position of the icon to be added to the icon in the icon group if the icon to be added to the icon exists in the pre-built icon library, and retrieve similar icons of the icon to be added to the icon in the icon group according to the feature position.
[0098] The icon consistency discrimination module 104 is used to determine whether the similar icon is consistent with the icon to be added to the database.
[0099] The icon determination module 105 is used to determine the similar icon as the icon to be added to the database if the similar icon is the same as the icon to be added to the database.
[0100] The icon grouping and classification module 106 is used to store the icon to be added to the icon group if the similar icon is inconsistent with the icon to be added to the database.
[0101] The icon grouping creation module 107 is used to create an entry group for the icon to be entered into the pre-built icon library if the icon to be entered into the library does not exist in the pre-built icon library, and to store the icon to be entered into the entry group.
[0102] In detail, the modules in the icon intelligent data entry device 100 described in this embodiment of the invention employ the same methods as described above during use. Figure 1 The method used is the same as the intelligent icon import method described above, and it can produce the same technical effect, so it will not be repeated here.
[0103] like Figure 3 The diagram shown is a structural schematic of an electronic device 1 that implements the intelligent icon warehousing method of the present invention.
[0104] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as an icon intelligent warehousing program.
[0105] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device 1, connecting various components of the electronic device 1 via various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing an icon intelligent warehousing program) and calls data stored in the memory 11 to perform various functions and process data of the electronic device 1.
[0106] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 1. Furthermore, the memory 11 can include both internal and external storage units of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of an icon intelligent warehousing program, but also to temporarily store data that has been output or will be output.
[0107] The communication bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0108] The communication interface 13 is used for communication between the aforementioned electronic device 1 and other devices, including a network interface and an employee interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish a communication connection between the electronic device 1 and other electronic devices 1. The employee interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual employee interface.
[0109] Figure 3 Only electronic device 1 with components is shown; those skilled in the art will understand that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0110] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0111] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in terms of the scope of the patent invention.
[0112] The icon intelligent warehousing program stored in the memory 11 of the electronic device 1 is a combination of multiple computer programs. When run in the processor 10, it can achieve the following:
[0113] Obtain the icon to be added to the database and identify its shape features;
[0114] Based on the shape characteristics, query whether the icon to be added to the library exists in the pre-built icon library as an icon group;
[0115] If the icon to be added to the library exists in an icon group in the pre-built icon library, mark the feature position of the icon to be added to the library in the icon group, and search for similar icons of the icon to be added to the library in the icon group based on the feature position;
[0116] Determine whether the similar icons are identical to the icons to be added to the database;
[0117] If the similar icon is identical to the icon to be added to the database, the similar icon will be used as the icon to be added to the database.
[0118] If the similar icon is inconsistent with the icon to be added to the database, the icon to be added to the database will be stored in the icon group.
[0119] If the icon to be added to the library does not exist in the pre-built icon library, an icon group to be added to the library is created in the pre-built icon library, and the icon to be added to the library is stored in the icon group.
[0120] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0121] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0122] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device 1, can perform the following:
[0123] Obtain the icon to be added to the database and identify its shape features;
[0124] Based on the shape characteristics, query whether the icon to be added to the library exists in the pre-built icon library as an icon group;
[0125] If the icon to be added to the library exists in an icon group in the pre-built icon library, mark the feature position of the icon to be added to the library in the icon group, and search for similar icons of the icon to be added to the library in the icon group based on the feature position;
[0126] Determine whether the similar icons are identical to the icons to be added to the database;
[0127] If the similar icon is identical to the icon to be added to the database, the similar icon will be used as the icon to be added to the database.
[0128] If the similar icon is inconsistent with the icon to be added to the database, the icon to be added to the database will be stored in the icon group.
[0129] If the icon to be added to the library does not exist in the pre-built icon library, an icon group to be added to the library is created in the pre-built icon library, and the icon to be added to the library is stored in the icon group.
[0130] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0131] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0133] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0134] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0135] The embodiments of this invention can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that utilize digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0136] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.
[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for intelligent icon import into a database, characterized in that, The method includes: Obtain the icon to be added to the database and identify its shape features; Based on the shape characteristics, query whether the icon to be added to the library exists in the pre-built icon library as an icon group; If the icon to be added to the library exists in an icon group in the pre-built icon library, mark the feature position of the icon to be added to the library in the icon group, and search for similar icons of the icon to be added to the library in the icon group based on the feature position; Determine whether the similar icons are identical to the icons to be added to the database; If the similar icon is identical to the icon to be added to the database, the similar icon will be used as the icon to be added to the database. If the similar icon is inconsistent with the icon to be added to the database, the icon to be added to the database will be stored in the icon group. If the icon to be added to the library does not exist in the pre-built icon library, an icon group to be added to the library is created in the pre-built icon library, and the icon to be added to the library is stored in the icon group. The step of marking the characteristic position of the icon to be added to the database within the icon group includes: A preset local feature detection algorithm is used to extract stable feature points of the icons to be added to the database in the grouped images of the icons; Based on the stable feature points, the region growing algorithm is used to extract the local feature regions of the icons to be added to the database in the grouped images; The target coverage area is obtained by overlaying the local feature regions. The minimum bounding rectangle of the target coverage area is calculated, and the position of the minimum bounding rectangle in the grouped image is marked to obtain the feature position of the icon to be added to the database in the icon group.
2. The intelligent icon import method as described in claim 1, characterized in that, The identification of the shape features of the icon to be added to the database includes: Obtain the icon image of the icon to be added to the database, and preprocess the icon image to obtain the target icon image; The edge image in the target icon image is detected using a preset edge detection algorithm; Based on the target icon image, identify the local features of the icon to be added to the database; based on the edge image, identify the global features of the icon to be added to the database. Based on the global features and the local features, the shape features of the icon to be added to the database are generated.
3. The intelligent icon import method as described in claim 2, characterized in that, The preprocessing of the icon image to obtain the target icon image includes: The icon image is converted to grayscale to obtain a grayscale image; The grayscale image is binarized to obtain a binary image; The binarized image is then subjected to median filtering for noise reduction to obtain the target icon image.
4. The intelligent icon import method as described in claim 2, characterized in that, The step of identifying global features of the icon to be added to the database based on the edge image includes: Based on the edge image, determine the measured height and measured width of the icon to be added to the warehouse; Based on the edge image, calculate the icon pixel points of the icon to be added to the database, and based on the icon pixel points, calculate the icon area and icon perimeter of the icon to be added to the database. Based on the measured height, measured width, icon area, and icon perimeter, the global features of the icon to be added to the database are identified.
5. The intelligent icon import method as described in claim 1, characterized in that, The step of determining whether the similar icon is consistent with the icon to be added to the database includes: Divide the similar icons and the icons to be added to the database into a consistency verification area, and identify whether the icon information of the similar icons and the icons to be added to the database is the same in the consistency verification area; If the similar icon is different from the icon to be added to the database, then the similar icon is inconsistent with the icon to be added to the database. If the similar icon has the same icon information as the icon to be added to the database, then the similar icon is consistent with the icon to be added to the database.
6. The intelligent icon import method as described in claim 5, characterized in that, The step of determining whether the icon information of similar icons is the same as that of the icon to be added to the database in the consistency verification area includes: In the consistency verification area, the similar icons and the icons to be added to the database are subjected to image difference operation to obtain a difference image; Calculate the number of pixels with a value of 0 in the difference image and the total number of pixels in the difference image, and calculate the ratio of the number of pixels with a value of 0 in the difference image to the total number of pixels in the difference image; If the ratio is not less than the preset ratio, then it is determined that the similar icon and the icon to be added to the database have the same icon information; If the ratio is less than a preset ratio, it is determined that the icon information of the similar icon is different from that of the icon to be added to the database.
7. An icon intelligent database entry device, used to implement the icon intelligent database entry method as described in any one of claims 1 to 6, characterized in that, The device includes: The shape feature recognition module is used to acquire icons to be added to the database and recognize the shape features of the icons to be added to the database. The icon grouping query module is used to query whether the icon to be added to the library exists in the pre-built icon library based on the shape characteristics. The similar icon retrieval module is used to mark the feature position of the icon to be added to the library in the icon group if the icon to be added to the library exists in the pre-built icon library, and retrieve similar icons of the icon to be added to the library in the icon group according to the feature position; The icon consistency determination module is used to determine whether the similar icons are consistent with the icons to be added to the database; An icon determination module is used to identify the similar icon as the icon to be added to the database if the similar icon is identical to the icon to be added to the database. The icon grouping and classification module is used to store the icon to be added to the icon group if the similar icon is inconsistent with the icon to be added to the database. The icon grouping creation module is used to create an entry group for the icon to be entered into the pre-built icon library if the icon to be entered into the library does not exist in the pre-built icon library, and to store the icon to be entered into the entry group.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the icon intelligent warehousing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the intelligent icon storage method as described in any one of claims 1 to 6.