An image processing method, apparatus and electronic device
By vectorizing user-input images or text through terminal devices, generating image processing request vectors, and matching tag vectors, the low recall and result rate problems in existing technologies are solved, achieving more efficient image processing results.
Patent Information
- Application Number
- CN202210362744.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-04-06
AI Technical Summary
In existing technologies, image processing has low recall and result rates, especially insufficient coverage of non-written and online terms, resulting in users being unable to find images with similar meanings.
By vectorizing user-input images or text through terminal devices, image processing request vectors are generated. Pre-trained vector models are then used to match label vectors, improving the accuracy and efficiency of image processing.
It improves the recall rate and result rate of image processing, can more accurately understand user intentions, and efficiently process images, including recall, classification, and sorting.
Smart Images

Figure CN114862497B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an image processing method, device, and electronic device in the field of image processing. Background Art
[0002] With the rapid development of Internet technology, image processing based on user-entered text or images is being widely applied in an increasing number of scenarios. For example, by entering a product name or image on a shopping platform, users can search for similar products on the platform. Therefore, efficient image processing based on input information has always been a goal pursued in the field of image processing technology. Summary of the Invention
[0003] The present disclosure provides an image processing method, apparatus, and electronic device.
[0004] According to a first aspect of the present disclosure, there is provided an image processing method, comprising:
[0005] The terminal device receives the image processing request;
[0006] The terminal device generates an image processing request vector corresponding to the image processing request;
[0007] The terminal device searches for a label vector that matches the image processing request vector;
[0008] The label vector is used by the terminal device and / or server to process the image.
[0009] According to a second aspect of the present disclosure, there is provided an image processing apparatus, the image processing apparatus comprising:
[0010] A receiving module, configured to receive an image processing request;
[0011] A generating module, configured to generate an image processing request vector corresponding to the image processing request;
[0012] A matching module, configured to search for a label vector that matches the image processing request vector;
[0013] The label vector is used by the terminal device and / or server to process the image.
[0014] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0015] at least one processor; and a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned image processing method.
[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned image processing method.
[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which implements the above-mentioned image processing method when executed by a processor.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0021] Figure 1 This is a schematic diagram of a processing flow of the image processing method provided by an embodiment of the present disclosure;
[0022] Figure 2 This is a schematic diagram of a specific implementation process of a terminal device generating an image processing request vector corresponding to an image processing request provided by an embodiment of the present disclosure;
[0023] Figure 3 This is a schematic diagram of a specific implementation process of a terminal device searching for a label vector that matches an image processing request vector provided by an embodiment of the present disclosure;
[0024] Figure 4 This is a schematic diagram of a vectorized representation of classification labels provided by an embodiment of the present disclosure;
[0025] Figure 5 This is a schematic diagram of a specific implementation process of a terminal device searching for a label vector that matches each word vector, provided by an embodiment of the present disclosure;
[0026] Figure 6 is a detailed processing flow diagram of the image processing method provided by the embodiment of the present disclosure;
[0027] Figure 7 is a schematic diagram of an image input by a user provided in an embodiment of the present disclosure;
[0028] Figure 8is another detailed processing flow diagram of the image processing method provided by an embodiment of the present disclosure;
[0029] Figure 9 This is a schematic diagram of an optional structural composition of an image processing device provided by an embodiment of the present disclosure;
[0030] Figure 10 is a block diagram of an electronic device for implementing the image processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0032] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0033] In the following description, the terms "first\second\third" are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art of the present disclosure. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.
[0035] In related technologies, images stored in the cloud can be classified, and classification labels can be assigned to images of each category; and corresponding synonym dictionaries can be established for each classification label. If a user inputs an image or text, and searches for images corresponding to the input image or text in the cloud storage, if a word in a synonym dictionary is hit, the image corresponding to the classification label to which the synonym dictionary belongs will be recalled. Synonym dictionaries are usually compiled by staff using synonym query tools to query and filter common synonyms for each classification label, and a synonym dictionary is constructed based on the words obtained from the query and filtering. However, when staff expand the synonym dictionary, non-written terms such as spoken language and Internet terms are generally not included, and the expansion of the synonym dictionary is limited and inefficient, resulting in low image recall and result rates when users search for images. The result rate can refer to the ratio of the number of search requests that have query results for the user's search request to the total number of search requests from the user.
[0036] This disclosure provides an image processing method, wherein a terminal device receives an image processing request; the terminal device generates an image processing request vector corresponding to the image processing request; and the terminal device searches for a label vector that matches the image processing request vector. The label vector is used by the terminal device and / or a server to process the image. This method enables efficient image processing, improving image recall and result rates.
[0037] Figure 1 This is a schematic diagram of an optional processing flow of the image processing method provided by the present disclosure. The image processing method may include at least the following steps:
[0038] Step S201: The terminal device receives an image processing request.
[0039] In some optional embodiments, the image processing request may be an image input by a user, such as a user inputting an image in an e-commerce platform to request products similar to the input image.
[0040] In other optional embodiments, the image processing request may also be text entered by the user, such as a user entering "mobile phone" in an e-commerce platform to request to view mobile phone products on the e-commerce platform.
[0041] In some further optional embodiments, the image processing request may also be a combination of an image and text input by the user, such as a user inputting "delete photos in the cloud album" and a landscape image to request deletion of landscape-related images in the cloud album.
[0042] Step S202: The terminal device generates an image processing request vector corresponding to the image processing request.
[0043] In some optional embodiments, a specific implementation process of the terminal device generating an image processing request vector corresponding to the image processing request may be as follows: Figure 2 As shown, including at least:
[0044] Step S202a: The terminal device processes the image processing request to obtain a processing result; the processing result includes at least one word.
[0045] In some embodiments, if the image processing request is text entered by the user, processing the image processing request may include: performing font conversion on the text, such as converting traditional Chinese characters in the text to simplified Chinese; deleting redundant information in the text, such as deleting symbols in the text; and performing word segmentation on the text after performing font conversion and deleting redundant information. For example, if the text after font conversion and deleting redundant information is "drinking photos", the processing results obtained by processing the text are "drinking", "of", and "photos".
[0046] In step S202b, the terminal device generates a word vector corresponding to each word.
[0047] Taking the text "Drinking and singing photos" as an example after font conversion and deletion of redundant information, the processing results of the text are "drinking", "singing", "of" and "photos", then the word vectors corresponding to "drinking" and "singing" are generated respectively.
[0048] In some embodiments, the word vector corresponding to a word can be determined using a pre-trained vector model. For example, a sample Chinese vocabulary can be established. The word samples in the sample Chinese vocabulary can be obtained from the Internet, books, dictionaries, etc. The vector model is trained using the word samples in the sample Chinese vocabulary as input, so that the vector matrix output by the vector model can vector-represent the words input into the vector model.
[0049] In step S202c, the terminal device determines the set of word vectors as an image processing request vector.
[0050] In some embodiments, the image processing request vector is a set of word vectors corresponding to each word obtained after processing the text input by the user.
[0051] Step S203: The terminal device searches for a label vector that matches the image processing request vector.
[0052] In some optional embodiments, a specific implementation process of the terminal device searching for a tag vector that matches the image processing request vector is as follows: Figure 3 Shown, including:
[0053] In step S203a, the terminal device searches for a label vector that matches each word vector.
[0054] In some optional embodiments, for images stored on the terminal device, a classification label corresponding to the image can be determined. The classification label is used to indicate the category to which the image belongs. For example, the classification label can be a label for content such as dinner parties, singing, animals, plants, scenery, and people. The classification label can also be a label for functions such as cleaning, deduplication, sorting, and classification.
[0055] In some embodiments, if an image contains no people and includes the sea, the image is classified as landscape; if an image contains no people and includes a variety of green plants, the image is classified as plant; if an image contains no people and includes animals, the image is classified as animal; if an image contains both plants and animals, the image is classified as both animals and plants. An image can have multiple classification labels.
[0056] In some embodiments, a pre-trained vector model can be used to convert each classification label into a corresponding label vector. As an example, a sample Chinese vocabulary can be established first. The word samples in the sample Chinese vocabulary can come from the Internet, books, dictionaries, etc. The word samples in the sample Chinese vocabulary are used as input to train the vector model so that the vector matrix output by the vector model can vectorize the words input to the vector model. A schematic diagram of the vectorized representation of classification labels, such as Figure 4 As shown, each word has a corresponding label vector.
[0057] In step S203b, the terminal device determines a set of label vectors that match the word vectors as label vectors that match the image processing request vector.
[0058] Regarding step S203a, a specific implementation process of the terminal device searching for a tag vector matching each word vector is as follows: Figure 5 Shown, including:
[0059] Step 1: The terminal device calculates the distance between each word vector and each stored label vector for each word vector.
[0060] In some optional embodiments, if the text input by the user includes N words after processing, a word vector corresponding to each of the N words is calculated to obtain a first word vector, a second word vector, and so on. The terminal device stores X label vectors, namely, a first label vector, a second label vector, and so on. The distances between the first word vector and the first label vector, the second label vector, and so on, for a total of X label vectors, are calculated; the distances between the second word vector and the first label vector, the second label vector, and so on, for a total of X label vectors, are calculated; and the distances between the first N word vectors and the first label vector, the second label vector, and so on, for a total of X label vectors, are calculated.
[0061] In step 2, the terminal device determines that the label vector when the distance is less than the distance threshold is the label vector that matches the word vector.
[0062] In some embodiments, for the first word vector, the terminal device determines a distance less than a distance threshold among the X distances between the first word vector and the X label vectors, and determines that the label vector corresponding to the distance less than the distance threshold is the label vector that matches the first word vector.
[0063] For example, if the distance between the first word vector and the first label vector, the distance between the first word vector and the second label vector, and the distance between the first word vector and the third label vector are all less than a distance threshold, then the first label vector, the second label vector, and the third label vector are label vectors that match the first word vector. For example, if the first word is "gathering," the classification labels corresponding to the first label vector, the second label vector, and the third label vector are "party," "barbecue," and "KTV."
[0064] For other word vectors except the first word vector, the same processing method as the first word vector is adopted to determine the classification label corresponding to each word.
[0065] In the embodiment of the present disclosure, by matching the word vector corresponding to the image processing request input by the user with the label vector corresponding to the classification label, the classification label corresponding to the image processing request input by the user is obtained, which can more accurately understand the user's intention and efficiently determine the image that the user needs to process.
[0066] In some embodiments, after the terminal device determines the label vector that matches the image processing request vector, the image processing method may further include:
[0067] Step S204: The terminal device sends a label vector that matches the image processing request vector to the server.
[0068] In some embodiments, the terminal device sends a label vector that matches the image processing request vector to the server, so that the server can process the images corresponding to the label vector stored in the server, such as deduplicating the images, classifying the images, recalling the images, and sorting the images.
[0069] In some embodiments, after the terminal device determines the label vector that matches the image processing request vector, the image processing method may further include:
[0070] Step S204 ′: the terminal device determines an image corresponding to a label vector that matches the image processing request vector, and processes the image based on the image processing request.
[0071] In some embodiments, the terminal device may process images by performing deduplication processing on the images, classifying the images, recalling the images, and sorting the images.
[0072] In some embodiments, after processing the image, the image processing method may further include:
[0073] Step S205: The terminal device determines an image processing result for the image processing request.
[0074] In some embodiments, the terminal device can receive image processing results sent by the server. For example, if the image processing request is to search for images, the server searches and recalls images based on the image processing request and sends the search and recall results to the terminal device. If the image processing request is to deduplicate images with the first category label, the server sends the deduplication results to the terminal device.
[0075] In some embodiments, the terminal device may further collect statistics on image processing results to obtain a result-yielding rate for image processing requests. The result-yielding rate for image processing requests may refer to the ratio of the number of image processing requests that received processing results to the total number of image processing requests. For example, if the terminal device receives M image processing requests from a user, and P of these image processing requests have processing results, the result-yielding rate is P / M.
[0076] In the disclosed embodiment, the text or image input by the user is vectorized by the terminal device, so that the server or terminal device can intelligently understand the user's search intention based on the vectorization conversion result of the text, avoiding the problem of limited expansion rate of the synonym dictionary caused by the staff expanding the synonym dictionary of words, and improving the coverage of non-written terms and network uses.
[0077] By comparing the vectorized conversion results of the user-entered text or image with pre-stored label vectors, it is possible to resolve the problem of not being able to search for text or images that have different classification labels than stored images but have similar meanings. For example, if the user enters the text "dinner party," the related art cannot match images with the classification label "KTV" based on the user's text input; however, using the image processing method disclosed in this disclosure, images with the assigned label "KTV" can be matched based on the user's input "dinner party."
[0078] The image processing method provided by the present disclosure is described below with respect to different image processing requests input by users.
[0079] A detailed processing flow of the image processing method provided by the embodiment of the present disclosure is as follows: Figure 6 As shown, it can at least include:
[0080] Step S301: The user sends an image processing request to a terminal device.
[0081] In some embodiments, the user can send an image processing request based on an application or applet installed on the terminal device. The image processing request is in the form of an image or text. For example, if a user enters an image in a cloud album application, the user hopes to recall images in the cloud album that are similar to the input image. For example, the image entered by the user is Figure 7 shown.
[0082] Step S302: The terminal device converts the image input by the user into text and processes the text.
[0083] In some embodiments, the terminal device obtains the text "photos of eating and drinking" based on the image input by the user, and performs word segmentation processing on "photos of eating and drinking" to obtain "eating", "drinking", "of" and "photos".
[0084] Step S303: The terminal device determines the word vector of the processed text.
[0085] In some embodiments, the terminal device calculates word vectors corresponding to "eating", "drinking" and "photo" respectively.
[0086] In step S304, the terminal device calculates the distance between each word vector and the label vector of the classification label corresponding to the image stored in the cloud album.
[0087] In some embodiments, the word vectors include: a word vector corresponding to "eating", a word vector corresponding to "drinking", and a word vector corresponding to "photo".
[0088] In the specific implementation, the terminal device calculates the distances dis11, dis12,…, dis1N between the vector corresponding to “eating” and the label vectors of the classification labels corresponding to the images stored in the cloud album; the terminal device calculates the distances dis21, dis22,…, dis2N between the vector corresponding to “drinking” and the label vectors of the classification labels corresponding to the images stored in the cloud album; the terminal device calculates the distances dis31, dis32,…, dis3N between the vector corresponding to “photo” and the label vectors of the classification labels corresponding to the images stored in the cloud album.
[0089] Step S305: The terminal device determines a classification label corresponding to a distance less than a distance threshold.
[0090] In some embodiments, the terminal device compares dis11, dis12, ..., dis1N, dis21, dis22, ..., dis2N, dis31, dis32, ..., dis3N with a distance threshold; if the distance threshold is less than the distance threshold, it indicates that the classification label is the classification label corresponding to the image that the user wants to search for.
[0091] Step S306: The terminal device sends a classification label corresponding to a distance less than the distance threshold to the server.
[0092] In step S307, the server sends the image corresponding to the classification tag in the cloud album to the terminal device.
[0093] In the embodiment of the present disclosure, if the user requests to obtain photos in the cloud album, the server will send the images corresponding to the classification label in the cloud album to the terminal device; if the user only requests to obtain photos and does not limit the acquisition to photos in the cloud album, the server can send all photos that meet the conditions in the user's corresponding applications to the terminal device, such as sending all photos that meet the conditions in the user's corresponding social applications, music applications, and storage applications to the terminal device.
[0094] above Figure 6 The image processing method provided by the present disclosure is described by taking the recall image as an example. The image processing method provided by the present disclosure is described by taking the deletion of the image as an example. Another detailed processing flow of the image processing method provided by the embodiment of the present disclosure is as follows. Figure 8 As shown, this may include:
[0095] Step S401: The user sends an image processing request in text form to a terminal device.
[0096] In some embodiments, the user can send an image processing request based on an application or applet installed on the terminal device, where the image processing request is in the form of text, such as the user inputting the text "clean up landscape photos in the local album" in the application.
[0097] Step S402: The terminal device converts the text input by the user into a word vector.
[0098] In some embodiments, the terminal device performs word segmentation processing on the text input by the user to obtain "clean up", "local album" and "landscape photos"; and uses a pre-trained vector model to determine the word vectors corresponding to "clean up", "local album" and "landscape photos" respectively.
[0099] In step S403 , the terminal device calculates the distance between the word vector and the label vector stored in the terminal device, and determines the label vector whose distance is less than the distance threshold as the target label vector.
[0100] In some embodiments, semantic understanding is performed on the text input by the user based on the target label vector.
[0101] In some embodiments, it can be determined with respect to the target tag vector that the user wishes to delete the landscape photos in the local album.
[0102] Step S404: The terminal device deletes the photos including the scenery in the local album.
[0103] The present disclosure also provides an image processing device, the composition structure of which is as follows: Figure 9 Shown, including:
[0104] Receiving module 501, used for receiving an image processing request;
[0105] A generating module 502 is configured to generate an image processing request vector corresponding to the image processing request;
[0106] A matching module 503 is configured to search for a label vector that matches the image processing request vector;
[0107] The label vector is used by the terminal device and / or server to process the image.
[0108] In some optional embodiments, the generating module 502 is configured to process the image processing request to obtain a processing result; the processing result includes at least one word;
[0109] Generate word vectors corresponding to each word;
[0110] The set of word vectors is determined as the image processing request vector.
[0111] In some optional embodiments, the matching module 503 is configured to respectively search for a label vector that matches each of the word vectors;
[0112] A set of label vectors matching the word vectors is determined as label vectors matching the image processing request vector.
[0113] In some optional embodiments, the matching module 503 is configured to calculate, for each of the word vectors, a distance between the word vector and each stored label vector;
[0114] The label vector when the distance is less than the distance threshold is determined to be the label vector that matches the word vector.
[0115] In some optional embodiments, the image processing apparatus further includes: a sending module 504, configured to send a label vector matching the image processing request vector to a server;
[0116] The label vector that matches the image processing request vector is used by the server to process the image corresponding to the label vector stored in the server.
[0117] In some optional embodiments, the image processing apparatus further includes: a processing module 505 for determining an image corresponding to a label vector matching the image processing request vector;
[0118] The image is processed based on the image processing request.
[0119] In some optional embodiments, the processing module 505 is configured to recall, classify, sort, and remove duplicates from the images.
[0120] In some optional embodiments, the matching module 503 is further configured to determine an image processing result for the image processing request.
[0121] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0122] Figure 10 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. In some optional embodiments, the electronic device 800 can be a terminal device or a server. In some optional embodiments, the electronic device 800 can implement the image processing method provided by the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0123] In actual applications, the electronic device 800 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing. The electronic device 800 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart TV, smart watch, etc., but is not limited to these.
[0124] Electronic device is intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device may also refer to various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, vehicle-mounted terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are intended to be examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0125] like Figure 10 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0126] Multiple components in the electronic device 800 are connected to the I / O interface 805, including an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0127] The computing unit 801 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the image processing method. For example, in some optional embodiments, the image processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 808. In some optional embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the image processing method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured as the image processing method by any other appropriate means (e.g., by means of firmware).
[0128] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The program code for implementing the image processing method of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0130] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0133] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0134] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0135] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. An image processing method, comprising: The terminal device receives the image processing request; The terminal device generates an image processing request vector corresponding to the image processing request; The terminal device searches for a label vector that matches the image processing request vector; The label vector is used by the terminal device and / or server to process the image; the label vector includes a vector of content-related labels and / or a vector of function-related labels; The method further comprises: The terminal device determines an image corresponding to a label vector matching the image processing request vector; The terminal device performs semantic understanding on the image processing request based on the label vector; The terminal device performs at least one of recalling, classifying, sorting, deduplicating, and deleting the image based on a semantic understanding result of the image processing request.
2. The method according to claim 1, wherein The terminal device generating an image processing request vector corresponding to the image processing request includes: The terminal device processes the image processing request to obtain a processing result; the processing result includes at least one word; The terminal device generates a word vector corresponding to each word; The terminal device determines the set of word vectors as the image processing request vector.
3. The method according to claim 2, wherein: The terminal device searches for a label vector that matches the image processing request vector, including: The terminal device respectively searches for a label vector that matches each of the word vectors; The terminal device determines a set of label vectors that match the word vector as the label vector that matches the image processing request vector.
4. The method according to claim 3, wherein: The terminal device searching for a label vector that matches each of the word vectors includes: The terminal device calculates, for each of the word vectors, a distance between the word vector and each stored label vector; The terminal device determines that the label vector when the distance is less than the distance threshold is the label vector that matches the word vector.
5. The method according to any one of claims 1 to 4, wherein: The method further comprises: The terminal device sends a label vector matching the image processing request vector to the server; The label vector that matches the image processing request vector is used by the server to process the image corresponding to the label vector stored in the server.
6. The method according to claim 1, wherein The method further comprises: The terminal device determines an image processing result for the image processing request.
7. An image processing device, comprising: A receiving module, configured to receive an image processing request; A generating module, configured to generate an image processing request vector corresponding to the image processing request; A matching module, configured to search for a label vector that matches the image processing request vector; The label vector is used by the terminal device and / or the server to process the image; the label vector includes a vector of content-related labels and / or a vector of function-related labels; A processing module is configured to determine an image corresponding to a label vector that matches the image processing request vector; perform semantic understanding of the image processing request based on the label vector; and perform at least one of recalling, classifying, sorting, deduplicating, and deleting the image based on the semantic understanding result of the image processing request.
8. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image processing method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the image processing method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the image processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Image retrieval method, image retrieval device and electronic equipment
CN112765387A
Method and apparatus for cosmetic recommendation
CN114207650A