WO2020062788A1 - Method and apparatus for intelligently recognizing picture, server, and storage medium - Google Patents

Method and apparatus for intelligently recognizing picture, server, and storage medium Download PDF

Info

Publication number
WO2020062788A1
WO2020062788A1 PCT/CN2019/077515 CN2019077515W WO2020062788A1 WO 2020062788 A1 WO2020062788 A1 WO 2020062788A1 CN 2019077515 W CN2019077515 W CN 2019077515W WO 2020062788 A1 WO2020062788 A1 WO 2020062788A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture file
user
target picture
feature value
file
Prior art date
Application number
PCT/CN2019/077515
Other languages
French (fr)
Chinese (zh)
Inventor
唐晟
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020062788A1 publication Critical patent/WO2020062788A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying

Definitions

  • the present application relates to the field of image recognition technology, and in particular, to a method, a device, a server, and a storage medium for intelligently identifying pictures.
  • Social image browsing software like Instgram, Tumblr, etc., basically require users to register to use. And during use, the user can pay attention to the browsed pictures (such as likes and favorites) according to their own preferences. With the increase of the base of the pictures to be followed, users may not be able to identify whether the same picture posted by different users has been followed, which may cause repeated attention to the same picture.
  • a method for intelligently identifying a picture includes:
  • a device for intelligently identifying pictures includes:
  • a establishing module configured to receive an operation that a user follows an image file, and establish a user attention list according to the operation, wherein the attention list includes the image file and its corresponding feature value;
  • a calculation module configured to calculate a feature value of the target picture file
  • a query module configured to query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed;
  • a prompting module is configured to confirm that the target picture file has been followed when the feature value of the target picture file exists in the user's attention list, and prompt the user that the user does not need to follow the target picture file.
  • a server includes a processor and a memory, and the processor implements the following steps when executing at least one computer-readable instruction stored in the memory:
  • a non-volatile readable storage medium stores at least one computer-readable instruction.
  • the at least one computer-readable instruction is executed by a processor, the following steps are implemented:
  • the present application provides a method, device, server, and storage medium for intelligently identifying pictures, by establishing a user's attention list, where the attention list includes feature values, obtaining a picture file currently viewed by a user, and calculating The feature value of the picture file; comparing whether the feature value is consistent with the feature value in the attention list and prompting the user not to pay attention to the picture when the feature value is consistent with the feature value in the attention list file. Therefore, a problem that a user pays attention to the same picture multiple times when there are too many pictures that the user cannot recognize the same picture posted by different users can be solved. You can filter the pictures by calculating the feature values of the pictures to avoid the repeated attention of the same picture and improve the user experience.
  • FIG. 1 is an application environment architecture diagram of a first preferred embodiment of a method for intelligently identifying pictures in this application.
  • FIG. 2 is a flowchart of a first preferred embodiment of a method for intelligently identifying pictures according to the present application.
  • FIG. 3 is a functional block diagram of the first preferred embodiment of the device for intelligently identifying pictures in the present application.
  • FIG. 4 is a schematic structural diagram of a preferred embodiment of a server in at least one example of the present application.
  • FIG. 1 it is an application environment architecture diagram of a first preferred embodiment of a method for intelligently identifying pictures in this application.
  • the method for intelligently identifying pictures in the present application is applied in an environment composed of an electronic device 1 and a server 2.
  • the electronic device 1 and the server 2 are connected through a wired or wireless network communication connection.
  • the wired network may be any type of traditional wired communication, such as the Internet and a local area network.
  • the wireless network may be any type of traditional wireless communication, such as radio, wireless fidelity (WIFI), cellular, satellite, and broadcast.
  • WIFI wireless fidelity
  • Wireless communication technologies may include, but are not limited to, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband code division multiple access (W-CDMA), CDMA2000, IMT Single Carrier, Enhanced Data Rate GSM Evolution (Enhanced Data Rates for GSM Evolution, EDGE), Long-Term Evolution (LTE) , Advanced Long Term Evolution Technology, Time-Division LTE (TD-LTE), Fifth Generation Mobile Communication Technology (5G), High Performance Radio Local Area Network (High Performance Radio Local Area Network, HiperLAN), High Performance Radio Wide Area Network (High Performance, Radio Wide Area, HiperWAN), Local Multipoint Distribution Service (LMDS), Worldwide Interoperability for Microwave Access (WiMAX), ZigBee, Bluetooth, Orthogonal Frequency Division Multiplexing (Flash Orthogonal Freq) uency-Division Multiplexing (Flash-OFDM), High-capacity Spatial Division Multiple Access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), Universal Mobile Telecommunication
  • the electronic device 1 may include a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like.
  • PC personal computer
  • PDA personal digital assistant
  • the above-mentioned electronic device 1 is merely an example, and is not exhaustive, including but not limited to the above-mentioned electronic device 1.
  • the movement can be used for human-computer interaction with a user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
  • an application is installed on the electronic device 1, and a user can upload a picture file through the application.
  • the application program may be any third-party application installed in the operating system of the electronic device 1, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this.
  • the operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
  • the electronic device 1 further includes a display screen, and the display screen may have a touch function, such as a Liquid Crystal (Crystal Display) LCD display or an Organic Light-Emitting Diode (OLED) display.
  • the display screen is used to display information such as the picture file.
  • the server 2 is a device capable of automatically performing numerical calculations and / or information processing according to an instruction set or stored in advance, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • FIG. 2 is a flowchart of a method for intelligently identifying a picture provided in Embodiment 2 of the present application. According to different requirements, the execution order in the flowchart can be changed, and some steps can be omitted.
  • Step S1. Receive a picture file.
  • a picture file uploaded by an electronic device is received.
  • the electronic device may include, but is not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like.
  • PC personal computer
  • PDA personal digital assistant
  • wireless handheld device a wireless handheld device
  • tablet computer a tablet computer
  • smart phone a smart phone
  • an application is installed on the electronic device, and a user can upload a picture file through the application.
  • the application program may be any third-party application installed in the operating system of the electronic device, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this.
  • the operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
  • the method further comprises the step of classifying the received picture file.
  • the categories of pictures can include, but are not limited to, landscapes, people, animals, buildings, and so on.
  • this solution can perform multi-level classification on the types of pictures mentioned above. For example, first classify the picture files into landscapes, people, animals, buildings, etc .; then classify the picture files after the first category, for example, subdivide the animals into cats, Dogs, birds, fish, etc., divide characters into men and women, or into the elderly, middle-aged people, teenagers, and children.
  • the step of classifying the received picture files includes:
  • the preprocessing mainly includes image segmentation, image enhancement, and morphological processing.
  • the feature extraction is mainly divided into two types: low-level visual features and intermediate semantic features.
  • the low-level visual features mainly include simple features such as color, shape and texture, and SIFT, RIFT, Complex local invariant features such as HOG;
  • the intermediate semantic features mainly include semantic attribute features, regional semantic concept features, and bag-of-words features.
  • the classifier can help users establish accurate mapping relationships between image features and keyword categories, and extract image semantic information consistent with user perception.
  • the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discriminative model.
  • the image classification method based on the generated model is based on the joint probability distribution of image features and image categories, while the image classification method based on the discriminant model is based on the conditional probability distribution of image features and image categories.
  • Step S2 Calculate a feature value of the picture file.
  • different calculation methods may be selected according to different types of the picture files to calculate the feature values of the picture files.
  • the feature value may be a vector of a certain dimension, such as (P1, P2, ..., Pn), which is an n-dimensional vector, and the n-dimensional vector may be used to describe a shape feature of an object in an image.
  • the Hough transform may be used to calculate the feature value.
  • the Hough transform is a commonly used algorithm, and details are not described herein again.
  • a better calculation method for calculating the feature value of a picture file whose first-class category is a building may include the following steps:
  • A1 Extract the image of the contained building from the original image
  • A2 fill the border of the cutout image with a single color as the background, and make the filled image the smallest square;
  • A3 the square image is fully scaled to an image of a first predetermined size, and the scaled image is divided into sub-image blocks of a second predetermined size;
  • A4 Calculate the luminance derivatives of adjacent pixels in the horizontal, vertical, positive 45 °, and negative 45 ° directions of the sub-image block, respectively. The number of extreme points of the derivative in the four directions and the four boundaries of the sub-image block. The total number of upper extreme points is used as a feature vector of the sub-image block;
  • A5 Use the feature vectors of all sub-image blocks as the feature vectors of the original image.
  • the above image feature extraction method mainly uses the difference in pixel brightness between the edge portion of the object displayed in the image and the surrounding background to find the edge of the object, so that the shape features of the object in the image can be extracted, which can be used as the The characteristic value of the image.
  • the singular value decomposition method can also be used to calculate the eigenvalues of the picture files whose first-level category is a person.
  • the specific steps include:
  • a T A is the feature value and the AA T
  • u i and v i are the A T A and AA T corresponding to Feature vector
  • Step S3 Receive an operation that a user follows a picture file, and establish a watch list according to the operation, where the watch list includes the picture file and its corresponding feature value.
  • the user when a user browses a picture file on an electronic device, the user can follow the picture file by clicking a button (such as a like button, a favorite button), and the button is displayed when the picture file is displayed Interface (such as the bottom left corner of the picture).
  • a button such as a like button, a favorite button
  • the image file to be followed is stored in a database, the feature value of the image file to be followed is calculated, and the user attention list is established according to the image file to be followed and the characteristic value.
  • Step S4 Obtain a target picture file currently browsed by the user, and calculate a feature value of the target picture file.
  • a picture file currently browsed by the user is obtained through a web crawler technology. Specific steps include:
  • a web crawler crawls a webpage content currently browsed by a user, where the webpage content includes a webpage structure; the webpage structure includes, but is not limited to, a webpage title, a webpage body content, pictures, sound, or video information.
  • the method further includes a step of classifying the obtained target picture file, and then selecting different types according to different categories of the obtained target picture file.
  • the calculation method calculates a feature value of the target picture file.
  • Step S5 Query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed.
  • step S6 when the feature value of the target picture file exists in the user's attention list, it is confirmed that the target picture file has been followed, and there is no need to repeat the attention, and the process proceeds to step S6;
  • the process may be directly ended. That is, the feature value does not exist in the attention list, and when the user has not followed the target picture file before, the process ends.
  • Step S6 When the feature value of the target picture file exists in the user's attention list, prompting the user not to pay attention to the target picture file.
  • the user may be reminded through a message prompt box, a pop-up page, or a voice prompt that the user does not need to pay attention to the target picture file.
  • a separate page pops up in the user ’s current webpage interface to display information that does not require attention to the target picture file, or a message prompt box appears in the user ’s electronic device to display the information that does not need to pay attention to the target picture file, The user is directly notified of the information that does not need to pay attention to the target picture file through a voice broadcast.
  • the method may further include, when the feature value of the target picture file does not exist in the user attention list, confirming that the target picture file is not being followed, and prompting the user to pay attention to the target picture file And add the target picture file and its feature values to the watchlist, so that the watchlist can be updated.
  • the user may also be prompted to pay attention to the target picture file through a message prompt box, a pop-up page, or a voice prompt, and the details are not described herein again.
  • the method for intelligently identifying a picture includes receiving a picture file; calculating a feature value of the picture file; establishing a user attention list, wherein the attention list includes the feature value; and obtaining a user's current browsing And calculate the feature value of the picture file; compare whether the feature value is consistent with the feature value in the attention list; and when the feature value is consistent with the feature value in the attention list, Prompt the user not to pay attention to the picture file. Therefore, a problem that a user pays attention to the same picture multiple times when there are too many pictures that the user cannot recognize the same picture posted by different users can be solved. You can filter the pictures by calculating the feature values of the pictures to avoid the repeated attention of the same picture and improve the user experience.
  • FIG. 3 is a functional block diagram of the first preferred embodiment of the device for intelligently identifying pictures in this application.
  • the device 30 for intelligently identifying pictures runs in a server.
  • the device 30 for intelligently identifying pictures may include a plurality of functional modules composed of program code segments.
  • the program code of each program segment in the device 30 for intelligently identifying pictures may be stored in a memory and executed by at least one processor to perform the function of intelligently identifying pictures.
  • the device 30 for intelligently identifying pictures may be divided into a plurality of functional modules according to functions performed by the device 30.
  • the functional modules may include: a establishing module 301, an obtaining module 302, a calculating module 303, a query module 304, and a prompting module 305.
  • the module referred to in the present application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In some embodiments, functions of each module will be described in detail in subsequent embodiments.
  • the establishing module 301 is configured to receive a picture file.
  • a picture file uploaded by an electronic device is received.
  • the electronic device may include, but is not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like.
  • PC personal computer
  • PDA personal digital assistant
  • wireless handheld device a wireless handheld device
  • tablet computer a tablet computer
  • smart phone a smart phone
  • an application is installed on the electronic device, and a user can upload a picture file through the application.
  • the application program may be any third-party application installed in the operating system of the electronic device, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this.
  • the operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
  • the method further comprises the step of classifying the received picture file.
  • the categories of pictures can include, but are not limited to, landscapes, people, animals, buildings, and so on.
  • this solution can perform multi-level classification on the types of pictures mentioned above. For example, first classify the picture files into landscapes, people, animals, buildings, etc .; then classify the picture files after the first category, for example, subdivide the animals into cats, Dogs, birds, fish, etc., divide characters into men and women, or into the elderly, middle-aged people, teenagers, and children.
  • the step of classifying the received picture files includes:
  • the preprocessing mainly includes image segmentation, image enhancement, and morphological processing.
  • the feature extraction is mainly divided into two types: low-level visual features and intermediate semantic features.
  • the low-level visual features mainly include simple features such as color, shape and texture, and SIFT, RIFT, Complex local invariant features such as HOG;
  • the intermediate semantic features mainly include semantic attribute features, regional semantic concept features, and bag-of-words features.
  • the classifier can help users establish accurate mapping relationships between image features and keyword categories, and extract image semantic information consistent with user perception.
  • the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discriminative model.
  • the image classification method based on the generated model is based on the joint probability distribution of image features and image categories, while the image classification method based on the discriminant model is based on the conditional probability distribution of image features and image categories.
  • the calculation module 303 is configured to calculate a feature value of the picture file.
  • different calculation methods may be selected according to different types of the picture files to calculate the feature values of the picture files.
  • the feature value may be a vector of a certain dimension, such as (P1, P2, ..., Pn), which is an n-dimensional vector, and the n-dimensional vector may be used to describe a shape feature of an object in an image.
  • the Hough transform may be used to calculate the feature value.
  • the Hough transform is a commonly used algorithm, and details are not described herein again.
  • a better calculation method for calculating the feature value of a picture file whose first-class category is a building may include the following steps:
  • A1 Extract the image of the contained building from the original image
  • A2 fill the border of the cutout image with a single color as the background, and make the filled image the smallest square;
  • A3 the square image is fully scaled to an image of a first predetermined size, and the scaled image is divided into sub-image blocks of a second predetermined size;
  • A4 Calculate the luminance derivatives of adjacent pixels in the horizontal, vertical, positive 45 °, and negative 45 ° directions of the sub-image block, respectively. The number of extreme points of the derivative in the four directions and the four boundaries of the sub-image block. The total number of upper extreme points is used as a feature vector of the sub-image block;
  • A5 Use the feature vectors of all sub-image blocks as the feature vectors of the original image.
  • the above image feature extraction method mainly uses the difference in pixel brightness between the edge portion of the object displayed in the image and the surrounding background to find the edge of the object, so that the shape features of the object in the image can be extracted, which can be used as the The characteristic value of the image.
  • the singular value decomposition method can also be used to calculate the eigenvalues of the picture files whose first-level category is a person.
  • the specific steps include:
  • a T A is the feature value and the AA T
  • u i and v i are the A T A and AA T corresponding to Feature vector
  • the establishing module 301 is further configured to receive an operation that a user follows a picture file, and establish a watch list according to the operation, where the watch list includes the picture file and a corresponding feature value.
  • the user when a user browses a picture file on an electronic device, the user can follow the picture file by clicking a button (such as a like button, a favorite button), and the button is displayed when the picture file is displayed Interface (such as the bottom left corner of the picture).
  • a button such as a like button, a favorite button
  • the image file to be followed is stored in a database, the feature value of the image file to be followed is calculated, and the user attention list is established according to the image file to be followed and the characteristic value.
  • the obtaining module 302 is configured to obtain a target picture file currently viewed by a user, and calculate a feature value of the target picture file.
  • a picture file currently browsed by the user is obtained through a web crawler technology. Specific steps include:
  • a web crawler crawls a webpage content currently browsed by a user, where the webpage content includes a webpage structure; the webpage structure includes, but is not limited to, a webpage title, a webpage body content, pictures, sound, or video information.
  • the method further includes a step of classifying the obtained target picture file, and then selecting different types according to different categories of the obtained target picture file.
  • the calculation method calculates a feature value of the target picture file.
  • the query module 304 is configured to query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed.
  • the process may be directly ended. That is, the feature value does not exist in the attention list, and the user has not followed the target picture file before.
  • the prompting module 305 is configured to prompt the user that the target picture file does not need to pay attention to when the feature value of the target picture file exists in the user's attention list.
  • the user may be reminded through a message prompt box, a pop-up page, or a voice prompt that the user does not need to pay attention to the target picture file.
  • a separate page pops up in the user ’s current webpage interface to display information that does not require attention to the target picture file, or a message prompt box appears in the user ’s electronic device to display the information that does not need to pay attention to the target picture file, The user is directly notified of the information that does not need to pay attention to the target picture file through a voice broadcast.
  • the prompting module 305 is further configured to confirm that the target picture file is not followed when the feature value of the target picture file does not exist in the user's attention list, and prompt the user to follow the target. A picture file, and adding the target picture file and its feature values to the watchlist, so that the watchlist can be updated.
  • the user may also be prompted to pay attention to the target picture file through a message prompt box, a pop-up page, or a voice prompt, and the details are not described herein again.
  • the device 30 for intelligently identifying pictures includes a building module 301, an obtaining module 302, a calculation module 303, a query module 304, and a prompting module 305.
  • the establishment module 301 is configured to receive an operation that a user cares about a picture file, and establish a user attention list according to the operation, wherein the attention list includes the picture file and its corresponding feature value;
  • the acquisition module 302 is used to The target picture file currently viewed by the user is obtained, and the calculation module 303 is used to calculate the feature value of the target picture file;
  • the query module 304 is used to query the user attention list according to the feature value of the target picture file, Confirming whether the target picture file has been followed;
  • the prompting module 305 is configured to confirm that the target picture file has been followed when the feature value of the target picture file exists in the user attention list, and prompt the user No need to pay attention to the target picture file.
  • the above integrated unit implemented in the form of a software functional module may be stored in a non-volatile readable storage medium.
  • the above software function module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a dual-screen device, or a network device) or a processor to execute the various embodiments described in this application. Part of the method.
  • FIG. 4 is a schematic structural diagram of a preferred embodiment of a server in at least one example of the present application.
  • the server 2 includes a database 41, a memory 42, at least one processor 43, computer-readable instructions 44 stored in the memory 42 and executable on the at least one processor 43, and at least one communication bus 45.
  • the at least one processor 43 executes the computer-readable instructions 44, the steps in the embodiment of the method for intelligently identifying pictures described above are implemented.
  • the computer-readable instructions 44 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 42 and processed by the at least one processor 43 Execute to complete this application.
  • the one or more modules / units may be a series of computer-readable instruction instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 44 in the server 2.
  • the server 2 is a device capable of automatically performing numerical calculations and / or information processing according to an instruction set or stored in advance, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • embedded equipment etc.
  • the schematic diagram 4 is only an example of the server 2 and does not constitute a limitation on the server 2. It may include more or fewer components than shown in the figure, or combine some components or different components.
  • the server 2 may further include an input / output device, a network access device, a bus, and the like.
  • the database 41 is a warehouse established on the server 2 to organize, store and manage data according to a data structure. Databases are generally divided into three types: hierarchical database, network database and relational database. In this embodiment, the database 41 is used to store information such as picture files and feature values.
  • the at least one processor 43 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), and application-specific integrated circuits (ASICs). ), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the processor 43 may be a microprocessor, or the processor 43 may be any conventional processor, etc.
  • the processor 43 is a control center of the server 2 and uses various interfaces and lines to connect the entire server 2 The various parts.
  • the memory 42 may be configured to store the computer-readable instructions 44 and / or modules / units, and the processor 43 may execute or execute the computer-readable instructions and / or modules / units stored in the memory 42 and
  • the data stored in the memory 42 is called to implement various functions of the server 2.
  • the memory 42 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc .; the storage data area may be Data (such as audio data, phone book, etc.) created according to the use of the server 2 are stored.
  • the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a Smart Memory Card (SMC), and a Secure Digital (SD).
  • a non-volatile memory such as a hard disk, an internal memory, a plug-in hard disk, a Smart Memory Card (SMC), and a Secure Digital (SD).
  • SSD Secure Digital
  • flash memory card Flash card
  • flash memory device at least one disk storage device, flash memory device, or other volatile solid-state storage device.
  • the memory 42 stores program code
  • the at least one processor 43 can call the program code stored in the memory 42 to perform related functions.
  • each module described in FIG. 3 (the establishment module 301, the acquisition module 302, the calculation module 303, the query module 304, and the prompt module 305) is a program code stored in the memory 42, and is processed by the at least one
  • the device 43 executes the functions of the various modules to achieve the purpose of intelligently identifying pictures.
  • the modules / units integrated in the server 2 When the modules / units integrated in the server 2 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile readable storage medium. Based on this understanding, this application implements all or part of the processes in the methods of the above embodiments, and can also be completed by computer-readable instructions instructing related hardware.
  • the computer-readable instructions can be stored in a non-volatile memory. In the read storage medium, when the computer-readable instructions are executed by a processor, the steps of the foregoing method embodiments can be implemented.
  • the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes may be in a source code form, an object code form, an executable file, or some intermediate form.
  • the non-volatile readable medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signals telecommunication signals
  • telecommunication signals and software distribution media.
  • the content contained in the non-volatile readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdictions. For example, in some jurisdictions, according to legislation and patent practices, non- Volatile readable media does not include electrical carrier signals and telecommunication signals.
  • the server 2 may further include a power source (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the at least one processor 43 through a power management system, so as to implement management through the power management system. Charge, discharge, and power management functions.
  • the power source may also include one or more DC or AC power sources, a recharging system, a power failure detection circuit, a power converter or inverter, a power source status indicator, and any other components.
  • the server 2 may further include a Bluetooth module, a Wi-Fi module, and the like, and details are not described herein again.
  • each functional unit in each embodiment of the present application may be integrated in the same processing unit, or each unit may exist separately physically, or two or more units may be integrated in the same unit.
  • the integrated unit can be implemented in the form of hardware, or in the form of hardware plus software functional modules.

Abstract

A method and apparatus for intelligently recognizing a picture, a server, and a storage medium. The method comprises: receiving a picture file (S1); computing the feature value of the picture file (S2); receiving an operation of following the picture file of a user and creating a list of follows of the user according to the operation, wherein the list of follows comprises the picture file and the corresponding feature value (S3); obtaining a target picture file currently viewed by the user, and computing the feature value of the target picture file (S4); querying the list of follows of the user according to the feature value of the target picture file to determine whether the target picture file has been followed (S5); and if the feature value of the target picture file exists in the list of interests of the user, determining that the target picture file has been followed and prompting the user not to follow the target picture file (S6). The method can solve problem that when a user follows a same picture for multiple times in the case that the user follows too many pictures and cannot recognize the same picture posted by different users, and can also classify picture files by means of a classifier.

Description

智能识别图片的方法、装置、服务器及存储介质Method, device, server and storage medium for intelligently identifying pictures
本申请要求于2018年09月30日提交中国专利局,申请号为201811163462.X申请名称为“智能识别图片的方法、装置、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on September 30, 2018 with the Chinese Patent Office under the application number 201811163462.X and entitled "Method, Device, Server, and Storage Medium for Intelligently Recognizing Pictures". Citations are incorporated in this application.
技术领域Technical field
本申请涉及图像识别技术领域,具体涉及一种智能识别图片的方法、装置、服务器及存储介质。The present application relates to the field of image recognition technology, and in particular, to a method, a device, a server, and a storage medium for intelligently identifying pictures.
背景技术Background technique
像Instgram、Tumblr等这些图片浏览社交软件,基本上都需要用户注册才能使用。并且在使用过程中用户可以根据自身喜好对浏览的图片进行关注(如点赞和收藏)。随着关注的图片基数的增加,用户有可能无法识别不同用户发布的同一张图片是否已被关注过,从而出现对同一张图片重复关注的情况。Social image browsing software like Instgram, Tumblr, etc., basically require users to register to use. And during use, the user can pay attention to the browsed pictures (such as likes and favorites) according to their own preferences. With the increase of the base of the pictures to be followed, users may not be able to identify whether the same picture posted by different users has been followed, which may cause repeated attention to the same picture.
申请内容Application content
鉴于以上内容,有必要提出一种智能识别图片的方法、装置、服务器及存储介质,通过计算图片特征值来对图片进行过滤,避免同一图片重复关注,提升用户体验。In view of the above, it is necessary to propose a method, a device, a server, and a storage medium for intelligently identifying pictures, and filtering pictures by calculating feature values of the pictures, avoiding repeated attention of the same picture, and improving user experience.
一种智能识别图片的方法,所述方法包括:A method for intelligently identifying a picture, the method includes:
接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
一种智能识别图片的装置,所述装置包括:A device for intelligently identifying pictures, the device includes:
建立模块,用于接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;A establishing module, configured to receive an operation that a user follows an image file, and establish a user attention list according to the operation, wherein the attention list includes the image file and its corresponding feature value;
获取模块,用于获取用户当前浏览的目标图片文件;An acquisition module for acquiring a target image file currently viewed by a user;
计算模块,用于计算所述目标图片文件的特征值;A calculation module, configured to calculate a feature value of the target picture file;
查询模块,用于根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及A query module, configured to query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
提示模块,用于当所述目标图片文件的特征值存在于所述用户关注列表中 时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。A prompting module is configured to confirm that the target picture file has been followed when the feature value of the target picture file exists in the user's attention list, and prompt the user that the user does not need to follow the target picture file.
一种服务器,所述服务器包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令时实现以下步骤:A server includes a processor and a memory, and the processor implements the following steps when executing at least one computer-readable instruction stored in the memory:
接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
一种非易失性可读存储介质,所述非易失性可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:A non-volatile readable storage medium stores at least one computer-readable instruction. When the at least one computer-readable instruction is executed by a processor, the following steps are implemented:
接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
由以上技术方案可知,本申请提供一种智能识别图片的方法、装置、服务器及存储介质,通过建立用户关注列表,其中,所述关注列表包括特征值,获取用户当前浏览的图片文件,并计算所述图片文件的特征值;比对所述特征值是否与所述关注列表中的特征值一致及当所述特征值与所述关注列表中的特征值一致时,提示用户无需关注所述图片文件。从而可以解决用户在关注的图片过多而无法识别不同用户发布的同一张图片时,对所述同一张图片多次关注的问题。可以通过计算图片特征值来对图片进行过滤,避免同一图片重复关注,提升用户体验。As can be known from the above technical solutions, the present application provides a method, device, server, and storage medium for intelligently identifying pictures, by establishing a user's attention list, where the attention list includes feature values, obtaining a picture file currently viewed by a user, and calculating The feature value of the picture file; comparing whether the feature value is consistent with the feature value in the attention list and prompting the user not to pay attention to the picture when the feature value is consistent with the feature value in the attention list file. Therefore, a problem that a user pays attention to the same picture multiple times when there are too many pictures that the user cannot recognize the same picture posted by different users can be solved. You can filter the pictures by calculating the feature values of the pictures to avoid the repeated attention of the same picture and improve the user experience.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请智能识别图片的方法的第一较佳实施例的应用环境架构图。FIG. 1 is an application environment architecture diagram of a first preferred embodiment of a method for intelligently identifying pictures in this application.
图2是本申请智能识别图片的方法的第一较佳实施例的流程图。FIG. 2 is a flowchart of a first preferred embodiment of a method for intelligently identifying pictures according to the present application.
图3是本申请智能识别图片的装置的第一较佳实施例的功能模块图。FIG. 3 is a functional block diagram of the first preferred embodiment of the device for intelligently identifying pictures in the present application.
图4是本申请至少一个实例中服务器的较佳实施例的结构示意图。FIG. 4 is a schematic structural diagram of a preferred embodiment of a server in at least one example of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而 不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and the like in the description and claims of the present application and the above-mentioned drawings are used to distinguish different objects and are not used to describe a specific order. Furthermore, the term "including" and any variations of them are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device containing a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
如图1所示,是本申请的智能识别图片的方法的第一较佳实施例的应用环境架构图。As shown in FIG. 1, it is an application environment architecture diagram of a first preferred embodiment of a method for intelligently identifying pictures in this application.
本申请的智能识别图片的方法应用在由电子设备1和服务器2构成的环境中。所述电子设备1和服务器2之间通过有线或无线网络通信连接。所述有线网络可以为传统有线通讯的任何类型,例如因特网、局域网。所述无线网络可以为传统无线通讯的任何类型,例如无线电、无线保真(Wireless Fidelity,WIFI)、蜂窝、卫星、广播等。无线通讯技术可以包括,但不限于,全球移动通信系统(Global System for Mobile Communications,GSM)、通用分组无线业务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA),宽带码分多址(W-CDMA)、CDMA2000、IMT单载波(IMT Single Carrier)、增强型数据速率GSM演进(Enhanced Data Rates for GSM Evolution,EDGE)、长期演进技术(Long-Term Evolution,LTE)、高级长期演进技术、时分长期演进技术(Time-Division LTE,TD-LTE)、第五代移动通信技术(5G)、高性能无线电局域网(High Performance Radio Local Area Network,HiperLAN)、高性能无线电广域网(High Performance Radio Wide Area Network,HiperWAN)、本地多点派发业务(Local Multipoint Distribution Service,LMDS)、全微波存取全球互通(Worldwide Interoperability for Microwave Access,WiMAX)、紫蜂协议(ZigBee)、蓝牙、正交频分复用技术(Flash Orthogonal Frequency-Division Multiplexing,Flash-OFDM)、大容量空分多路存取(High Capacity Spatial Division Multiple Access,HC-SDMA)、通用移动电信系统(Universal Mobile Telecommunications System,UMTS)、通用移动电信系统时分双工(UMTS Time-Division Duplexing,UMTS-TDD)、演进式高速分组接入(Evolved High Speed Packet Access,HSPA+)、时分同步码分多址(Time Division Synchronous Code Division Multiple Access,TD-SCDMA)、演进数据最优化(Evolution-Data Optimized,EV-DO)、数字增强无绳通信(Digital Enhanced Cordless Telecommunications,DECT)及其他。The method for intelligently identifying pictures in the present application is applied in an environment composed of an electronic device 1 and a server 2. The electronic device 1 and the server 2 are connected through a wired or wireless network communication connection. The wired network may be any type of traditional wired communication, such as the Internet and a local area network. The wireless network may be any type of traditional wireless communication, such as radio, wireless fidelity (WIFI), cellular, satellite, and broadcast. Wireless communication technologies may include, but are not limited to, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband code division multiple access (W-CDMA), CDMA2000, IMT Single Carrier, Enhanced Data Rate GSM Evolution (Enhanced Data Rates for GSM Evolution, EDGE), Long-Term Evolution (LTE) , Advanced Long Term Evolution Technology, Time-Division LTE (TD-LTE), Fifth Generation Mobile Communication Technology (5G), High Performance Radio Local Area Network (High Performance Radio Local Area Network, HiperLAN), High Performance Radio Wide Area Network (High Performance, Radio Wide Area, HiperWAN), Local Multipoint Distribution Service (LMDS), Worldwide Interoperability for Microwave Access (WiMAX), ZigBee, Bluetooth, Orthogonal Frequency Division Multiplexing (Flash Orthogonal Freq) uency-Division Multiplexing (Flash-OFDM), High-capacity Spatial Division Multiple Access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), Universal Mobile Telecommunications System Time Division Dual (UMTS Time-Division Duplexing, UMTS-TDD), Evolved High Speed Packet Access (HSPA +), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), evolution Data optimization (EV-DO), Digital Enhanced Cordless Telecommunications (DECT), and others.
所述电子设备1可以包括个人计算机(Personal Computer,PC)、个人数字助理(Personal Digital Assistant,PDA)、无线手持设备、平板电脑(Tablet Computer)、智能手机等。上述电子设备1仅是举例,而非穷举,包含但不限于上述电子设备1。所述移动可以与用户通过键盘、鼠标、遥控器、触摸板 或声控设备等方式进行人机交互。The electronic device 1 may include a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like. The above-mentioned electronic device 1 is merely an example, and is not exhaustive, including but not limited to the above-mentioned electronic device 1. The movement can be used for human-computer interaction with a user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
在本实施例中,所述电子设备1上安装有应用程序,用户可以通过所述应用程序上传图片文件。In this embodiment, an application is installed on the electronic device 1, and a user can upload a picture file through the application.
所述应用程序可以是安装于电子设备1的操作系统中任一第三方应用,例如微信、微博、QQ、Instgram、Tumblr、美图秀秀等可以进行图片浏览的社交软件。本方案对此不作限定。其中,所述操作系统包括Android系统、塞班系统、Windows系统、ios(苹果公司开发的移动操作系统)系统等。The application program may be any third-party application installed in the operating system of the electronic device 1, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this. The operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
所述电子设备1还包括显示屏,所述显示屏可以具有触摸功能,如液晶(Liquid Crystal Display,LCD)显示屏或有机发光二极管(Organic Light-Emitting Diode,OLED)显示屏。所述显示屏用于显示所述图片文件等信息。The electronic device 1 further includes a display screen, and the display screen may have a touch function, such as a Liquid Crystal (Crystal Display) LCD display or an Organic Light-Emitting Diode (OLED) display. The display screen is used to display information such as the picture file.
所述服务器2是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(应用程序lication Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The server 2 is a device capable of automatically performing numerical calculations and / or information processing according to an instruction set or stored in advance, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
图2是本申请实施例二提供的智能识别图片的方法的流程图。根据不同的需求,所述流程图中的执行顺序可以改变,某些步骤可以省略。FIG. 2 is a flowchart of a method for intelligently identifying a picture provided in Embodiment 2 of the present application. According to different requirements, the execution order in the flowchart can be changed, and some steps can be omitted.
步骤S1、接收图片文件。Step S1. Receive a picture file.
在本实施方式中,接收电子设备上传的图片文件。所述电子设备可以包括,但不限于,个人计算机(Personal Computer,PC)、个人数字助理(Personal Digital Assistant,PDA)、无线手持设备、平板电脑(Tablet Computer)、智能手机等。上述电子设备仅是举例,而非穷举,包含但不限于上述电子设备。In this embodiment, a picture file uploaded by an electronic device is received. The electronic device may include, but is not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like. The above electronic devices are merely examples, not exhaustive, including but not limited to the above electronic devices.
在本实施例中,所述电子设备上安装有应用程序,用户可以通过所述应用程序上传图片文件。In this embodiment, an application is installed on the electronic device, and a user can upload a picture file through the application.
所述应用程序可以是安装于电子设备的操作系统中任一第三方应用,例如微信、微博、QQ、Instgram、Tumblr、美图秀秀等可以进行图片浏览的社交软件。本方案对此不作限定。其中,所述操作系统包括Android系统、塞班系统、Windows系统、ios(苹果公司开发的移动操作系统)系统等。The application program may be any third-party application installed in the operating system of the electronic device, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this. The operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
优选地,在接收图片文件后,所述方法还包括对接收的图片文件进行分类的步骤。图片的类别可以包括,但不限于,风景、人物、动物、建筑等。Preferably, after receiving the picture file, the method further comprises the step of classifying the received picture file. The categories of pictures can include, but are not limited to, landscapes, people, animals, buildings, and so on.
可以理解的是,本方案可以对上述的图片的类型进行多级分类。举例而言,对所述图片文件先进行一级分类,可以分成风景、人物、动物、建筑等;再对一级分类后的图片文件进行二级分类,例如,将动物再细分成猫、狗、鸟、鱼等,将人物分成男人和女人,或者分成老人、中年人、青少年和小孩等。It can be understood that this solution can perform multi-level classification on the types of pictures mentioned above. For example, first classify the picture files into landscapes, people, animals, buildings, etc .; then classify the picture files after the first category, for example, subdivide the animals into cats, Dogs, birds, fish, etc., divide characters into men and women, or into the elderly, middle-aged people, teenagers, and children.
具体地,对接收的图片文件进行分类的步骤包括:Specifically, the step of classifying the received picture files includes:
a)对接收的图片文件进行预处理;所述预处理主要包括图像分割、图像增强和进行形态学处理等。a) Preprocessing the received picture file; the preprocessing mainly includes image segmentation, image enhancement, and morphological processing.
b)对预处理后的图片进行特征提取;所述特征提取主要分为两种:底层视觉特征和中间语义特征,所述底层视觉特征主要包括颜色、形状和纹理等简单特征和SIFT、RIFT、HOG等复杂的局部不变特征;所述中间语义特征主要包括语义属性特征、区域语义概念特征和词袋特征。b) Feature extraction on pre-processed pictures; the feature extraction is mainly divided into two types: low-level visual features and intermediate semantic features. The low-level visual features mainly include simple features such as color, shape and texture, and SIFT, RIFT, Complex local invariant features such as HOG; the intermediate semantic features mainly include semantic attribute features, regional semantic concept features, and bag-of-words features.
c)通过分类器对特征提取后的图片进行分类。所述分类器可以帮助用户在图像特征与关键字类别之间建立准确的映射关系,提取出与用户认知一致的图像语义信息。c) Classify the pictures after feature extraction through a classifier. The classifier can help users establish accurate mapping relationships between image features and keyword categories, and extract image semantic information consistent with user perception.
优选地,通过分类器对特征提取后的图片进行分类的方法包括基于生成模型的图像分类方法和基于判别模型的图像分类方法。所述基于生成模型的图像分类方法建立在图像特征与图像类别的联合概率分布基础上,而基于判别模型的图像分类方法则是建立在图像特征与图像类别的条件概率分布基础上。Preferably, the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discriminative model. The image classification method based on the generated model is based on the joint probability distribution of image features and image categories, while the image classification method based on the discriminant model is based on the conditional probability distribution of image features and image categories.
步骤S2、计算所述图片文件的特征值。Step S2: Calculate a feature value of the picture file.
在本实施方式中,将图片文件进行分类后可以根据所述图片文件的不同类型来选择不同的计算方法计算所述图片文件的特征值。In this embodiment, after classifying the picture files, different calculation methods may be selected according to different types of the picture files to calculate the feature values of the picture files.
例如,所述特征值可以为一定维度的向量,如(P1,P2,...,Pn),这个n维向量,所述n维向量可以是用来描述图像中物体的形状特征。现有技术中,可以采用霍夫(Hough)变换计算所述特征值。所述Hough变换为常用算法,在此不再赘述。For example, the feature value may be a vector of a certain dimension, such as (P1, P2, ..., Pn), which is an n-dimensional vector, and the n-dimensional vector may be used to describe a shape feature of an object in an image. In the prior art, the Hough transform may be used to calculate the feature value. The Hough transform is a commonly used algorithm, and details are not described herein again.
在本实施方式中,介绍一种较优的用于计算一级类别为建筑的图片文件的特征值的计算方法,可以包括下面步骤:In this embodiment, a better calculation method for calculating the feature value of a picture file whose first-class category is a building is introduced, which may include the following steps:
A1:从原始图像中抠出所含建筑物的图像;A1: Extract the image of the contained building from the original image;
A2:将所述抠出的图像用单一颜色为背景填充边界,并使得填充后的图像成为最小正方形;A2: fill the border of the cutout image with a single color as the background, and make the filled image the smallest square;
A3:将正方形图像全图等比缩放为第一预定大小的图像,将缩放后的图像分割为第二预定大小的子图像块;A3: the square image is fully scaled to an image of a first predetermined size, and the scaled image is divided into sub-image blocks of a second predetermined size;
A4:分别计算子图像块水平、竖直、正45°、负45°方向上相邻像素的亮度导数,将分别在四个方向导数极值点的个数、以及位于子图像块四个边界上极值点的总个数作为所述子图像块的特征向量;A4: Calculate the luminance derivatives of adjacent pixels in the horizontal, vertical, positive 45 °, and negative 45 ° directions of the sub-image block, respectively. The number of extreme points of the derivative in the four directions and the four boundaries of the sub-image block. The total number of upper extreme points is used as a feature vector of the sub-image block;
A5:将所有子图像块的特征向量作为原始图像的特征向量。A5: Use the feature vectors of all sub-image blocks as the feature vectors of the original image.
上述图像特征提取方式,主要利用了图像中显示的物体其边缘部分与周围的背景等的像素亮度差异来找出物体的边缘,也就可以提取得到图像中物体的形状特征,从而可以作为所述图像的特征值。The above image feature extraction method mainly uses the difference in pixel brightness between the edge portion of the object displayed in the image and the surrounding background to find the edge of the object, so that the shape features of the object in the image can be extracted, which can be used as the The characteristic value of the image.
另外,还可以采用奇异值分解的方法计算一级类别为人物的图片文件的特征值。具体地步骤包括:In addition, the singular value decomposition method can also be used to calculate the eigenvalues of the picture files whose first-level category is a person. The specific steps include:
B1:设定A∈R m×n为一副人脸灰度图像,其中m≥n,rank(A)=r; B1: Set A ∈ R m × n as a face gray image, where m≥n, rank (A) = r;
B2:得到两个正交矩阵以及对角矩阵如下:B2: Obtain two orthogonal matrices and diagonal matrices as follows:
U=[u 1,u 2,...,u m]∈R m×m,U TU=I, U = [u 1 , u 2 , ..., u m ] ∈R m × m , U T U = I,
正交矩阵为:V=[v 1,v 2,...,v n]∈R n×n,V TV=I The orthogonal matrix is: V = [v 1 , v 2 , ..., v n ] ∈R n × n , V T V = I
对角矩阵为:S=diag[λ 12,...,λ r,0,…,0]∈R m×n1>λ 2>…>λ r≥0; The diagonal matrix is: S = diag [λ 1 , λ 2 , ..., λ r , 0,…, 0] ∈R m × n , λ 1 > λ 2 >… > λ r ≥0;
B3:使得成立式子,
Figure PCTCN2019077515-appb-000001
其中,
Figure PCTCN2019077515-appb-000002
为A TA和AA T的特征值,u i和v i分别是AA T和A TA对应于
Figure PCTCN2019077515-appb-000003
的特征矢量;
B3: Make the formula,
Figure PCTCN2019077515-appb-000001
among them,
Figure PCTCN2019077515-appb-000002
A T A is the feature value and the AA T, u i and v i are the A T A and AA T corresponding to
Figure PCTCN2019077515-appb-000003
Feature vector
B4:获取上式的投影形式,即图像A在U、V上的投影为对角矩阵S,S=U TAV,取S的对角线上的元素构成的矢量即为图像A的奇异特征值。 B4: Obtain the projection form of the above formula, that is, the projection of image A on U and V is a diagonal matrix S, S = U T AV, and a vector composed of elements on the diagonal of S is the singular feature of image A value.
步骤S3、接收用户关注图片文件的操作,并根据所述操作建立关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值。Step S3: Receive an operation that a user follows a picture file, and establish a watch list according to the operation, where the watch list includes the picture file and its corresponding feature value.
在本实施方式中,当用户在电子设备浏览图片文件时,用户可以通过点击按钮(如点赞按钮、收藏按钮)的操作来关注所述图片文件,所述按钮显示在显示有所述图片文件的界面(如图片的左下角)。再将被关注的图片文件保存至数据库中,计算被关注的图片文件的特征值,再根据所述被关注的图片文件及所述特征值建立所述用户关注列表。In this embodiment, when a user browses a picture file on an electronic device, the user can follow the picture file by clicking a button (such as a like button, a favorite button), and the button is displayed when the picture file is displayed Interface (such as the bottom left corner of the picture). The image file to be followed is stored in a database, the feature value of the image file to be followed is calculated, and the user attention list is established according to the image file to be followed and the characteristic value.
步骤S4、获取用户当前浏览的目标图片文件,并计算所述目标图片文件的特征值。Step S4: Obtain a target picture file currently browsed by the user, and calculate a feature value of the target picture file.
在本实施方式中,通过网络爬虫技术获取用户当前浏览的图片文件。具体步骤包括:In this embodiment, a picture file currently browsed by the user is obtained through a web crawler technology. Specific steps include:
1)网络爬虫抓取用户当前浏览的网页内容,其中所述网页内容包括网页结构;所述网页结构,包括但不限于网页标题、网页正文内容、图片、声音或视频信息。1) A web crawler crawls a webpage content currently browsed by a user, where the webpage content includes a webpage structure; the webpage structure includes, but is not limited to, a webpage title, a webpage body content, pictures, sound, or video information.
2)根据所述网页结构获取用户当前浏览的所述目标图片文件。2) Acquire the target picture file currently viewed by the user according to the webpage structure.
优选地,所述方法在获取用户当前浏览的所述目标图片文件之后,还包括,对获取的所述目标图片文件进行分类的步骤,再根据获取的所述目标图片文件的不同类别来选择不同的计算方法计算所述目标图片文件的特征值。Preferably, after the method acquires the target picture file currently browsed by the user, the method further includes a step of classifying the obtained target picture file, and then selecting different types according to different categories of the obtained target picture file. The calculation method calculates a feature value of the target picture file.
步骤S5、根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注。Step S5: Query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed.
具体地,当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,无需再进行重复关注,流程执行步骤S6;Specifically, when the feature value of the target picture file exists in the user's attention list, it is confirmed that the target picture file has been followed, and there is no need to repeat the attention, and the process proceeds to step S6;
当所述目标图片文件的特征值没有存在于所述用户关注列表中时,确认所述目标图片文件没有被用户关注过,则可以直接结束流程。即,所述关注列表中不存在所述特征值,用户之前没有关注过所述目标图片文件时,结束流程。When the feature value of the target picture file does not exist in the user's attention list, if it is confirmed that the target picture file has not been followed by the user, the process may be directly ended. That is, the feature value does not exist in the attention list, and when the user has not followed the target picture file before, the process ends.
可以理解是,当所述目标图片文件的特征值没有存在于所述用户关注列表中时,用户可以根据自身喜好关注所述目标图片文件。It can be understood that when the feature value of the target picture file does not exist in the user's attention list, the user can follow the target picture file according to his preference.
步骤S6、当所述目标图片文件的特征值存在于所述用户关注列表中时,提示用户无需关注所述目标图片文件。Step S6: When the feature value of the target picture file exists in the user's attention list, prompting the user not to pay attention to the target picture file.
在本实施方式中,可以通过消息提示框、弹出页面、或语音提示等方式提示用户无需关注所述目标图片文件。例如,在用户当前浏览网页的界面中弹出单独的页面显示无需关注所述目标图片文件的信息,或在用户的电子设备中弹出消息提示框显示所述无需关注所述目标图片文件的信息,或通过语音播报的方式直接将无需关注所述目标图片文件的信息通知用户。In this embodiment, the user may be reminded through a message prompt box, a pop-up page, or a voice prompt that the user does not need to pay attention to the target picture file. For example, a separate page pops up in the user ’s current webpage interface to display information that does not require attention to the target picture file, or a message prompt box appears in the user ’s electronic device to display the information that does not need to pay attention to the target picture file, The user is directly notified of the information that does not need to pay attention to the target picture file through a voice broadcast.
在一实施方式中,所述方法还可以包括当所述目标图片文件的特征值不存在于所述用户关注列表中时,确认所述目标图片文件没有被关注,提示用户关注所述目标图片文件,并添加所述目标图片文件及其特征值至所述关注列表,从而可以更新所述关注列表。In an embodiment, the method may further include, when the feature value of the target picture file does not exist in the user attention list, confirming that the target picture file is not being followed, and prompting the user to pay attention to the target picture file And add the target picture file and its feature values to the watchlist, so that the watchlist can be updated.
可以理解的是,同样可以通过消息提示框、弹出页面、或语音提示等方式提示用户关注所述目标图片文件,在此不再赘述。It can be understood that the user may also be prompted to pay attention to the target picture file through a message prompt box, a pop-up page, or a voice prompt, and the details are not described herein again.
综上所述,本申请提供的智能识别图片的方法,包括接收图片文件;计算所述图片文件的特征值;建立用户关注列表,其中,所述关注列表包括所述特征值;获取用户当前浏览的图片文件,并计算所述图片文件的特征值;比对所述特征值是否与所述关注列表中的特征值一致;及当所述特征值与所述关注列表中的特征值一致时,提示用户无需关注所述图片文件。从而可以解决用户在关注的图片过多而无法识别不同用户发布的同一张图片时,对所述同一张图片多次关注的问题。可以通过计算图片特征值来对图片进行过滤,避免同一图片重复关注,提升用户体验。In summary, the method for intelligently identifying a picture provided by the present application includes receiving a picture file; calculating a feature value of the picture file; establishing a user attention list, wherein the attention list includes the feature value; and obtaining a user's current browsing And calculate the feature value of the picture file; compare whether the feature value is consistent with the feature value in the attention list; and when the feature value is consistent with the feature value in the attention list, Prompt the user not to pay attention to the picture file. Therefore, a problem that a user pays attention to the same picture multiple times when there are too many pictures that the user cannot recognize the same picture posted by different users can be solved. You can filter the pictures by calculating the feature values of the pictures to avoid the repeated attention of the same picture and improve the user experience.
以上所述,仅是本申请的具体实施方式,但本申请的保护范围并不局限于此,对于本领域的普通技术人员来说,在不脱离本申请创造构思的前提下,还可以做出改进,但这些均属于本申请的保护范围。The foregoing is only a specific implementation of this application, but the scope of protection of this application is not limited to this. For those of ordinary skill in the art, without departing from the creative concept of this application, they can also make Improvement, but these all belong to the protection scope of this application.
下面结合图3至图4,分别对实现上述智能识别图片的方法的服务器的功能模块及硬件结构进行介绍。The functional modules and hardware structure of the server that implements the above-mentioned method for intelligently identifying pictures are respectively introduced below with reference to FIGS. 3 to 4.
图3为本申请智能识别图片的装置的第一较佳实施例的功能模块图。FIG. 3 is a functional block diagram of the first preferred embodiment of the device for intelligently identifying pictures in this application.
在一些实施例中,所述智能识别图片的装置30运行于服务器中。所述智能识别图片的装置30可以包括多个由程序代码段所组成的功能模块。所述智能识别图片的装置30中的各个程序段的程序代码可以存储于存储器中,并由至少一个处理器所执行,以执行智能识别图片功能。In some embodiments, the device 30 for intelligently identifying pictures runs in a server. The device 30 for intelligently identifying pictures may include a plurality of functional modules composed of program code segments. The program code of each program segment in the device 30 for intelligently identifying pictures may be stored in a memory and executed by at least one processor to perform the function of intelligently identifying pictures.
本实施例中,所述智能识别图片的装置30根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:建立模块301、获取模块302、计算模块303、查询模块304及提示模块305。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器中。在一些实施例中,关于各模块的功能将在后续的实施例中详述。In this embodiment, the device 30 for intelligently identifying pictures may be divided into a plurality of functional modules according to functions performed by the device 30. The functional modules may include: a establishing module 301, an obtaining module 302, a calculating module 303, a query module 304, and a prompting module 305. The module referred to in the present application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In some embodiments, functions of each module will be described in detail in subsequent embodiments.
所述建立模块301用于接收图片文件。The establishing module 301 is configured to receive a picture file.
在本实施方式中,接收电子设备上传的图片文件。所述电子设备可以包括,但不限于,个人计算机(Personal Computer,PC)、个人数字助理(Personal Digital Assistant,PDA)、无线手持设备、平板电脑(Tablet Computer)、智能 手机等。上述电子设备仅是举例,而非穷举,包含但不限于上述电子设备。In this embodiment, a picture file uploaded by an electronic device is received. The electronic device may include, but is not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a smart phone, and the like. The above electronic devices are merely examples, not exhaustive, including but not limited to the above electronic devices.
在本实施例中,所述电子设备上安装有应用程序,用户可以通过所述应用程序上传图片文件。In this embodiment, an application is installed on the electronic device, and a user can upload a picture file through the application.
所述应用程序可以是安装于电子设备的操作系统中任一第三方应用,例如微信、微博、QQ、Instgram、Tumblr、美图秀秀等可以进行图片浏览的社交软件。本方案对此不作限定。其中,所述操作系统包括Android系统、塞班系统、Windows系统、ios(苹果公司开发的移动操作系统)系统等。The application program may be any third-party application installed in the operating system of the electronic device, such as WeChat, Weibo, QQ, Instgram, Tumblr, Meitu Xiuxiu and other social software that can browse pictures. This plan does not limit this. The operating system includes an Android system, a Symbian system, a Windows system, an iOS (mobile operating system developed by Apple Inc.) system, and the like.
优选地,在接收图片文件后,所述方法还包括对接收的图片文件进行分类的步骤。图片的类别可以包括,但不限于,风景、人物、动物、建筑等。Preferably, after receiving the picture file, the method further comprises the step of classifying the received picture file. The categories of pictures can include, but are not limited to, landscapes, people, animals, buildings, and so on.
可以理解的是,本方案可以对上述的图片的类型进行多级分类。举例而言,对所述图片文件先进行一级分类,可以分成风景、人物、动物、建筑等;再对一级分类后的图片文件进行二级分类,例如,将动物再细分成猫、狗、鸟、鱼等,将人物分成男人和女人,或者分成老人、中年人、青少年和小孩等。It can be understood that this solution can perform multi-level classification on the types of pictures mentioned above. For example, first classify the picture files into landscapes, people, animals, buildings, etc .; then classify the picture files after the first category, for example, subdivide the animals into cats, Dogs, birds, fish, etc., divide characters into men and women, or into the elderly, middle-aged people, teenagers, and children.
具体地,对接收的图片文件进行分类的步骤包括:Specifically, the step of classifying the received picture files includes:
a)对接收的图片文件进行预处理;所述预处理主要包括图像分割、图像增强和进行形态学处理等。a) Preprocessing the received picture file; the preprocessing mainly includes image segmentation, image enhancement, and morphological processing.
b)对预处理后的图片进行特征提取;所述特征提取主要分为两种:底层视觉特征和中间语义特征,所述底层视觉特征主要包括颜色、形状和纹理等简单特征和SIFT、RIFT、HOG等复杂的局部不变特征;所述中间语义特征主要包括语义属性特征、区域语义概念特征和词袋特征。b) Feature extraction on pre-processed pictures; the feature extraction is mainly divided into two types: low-level visual features and intermediate semantic features. The low-level visual features mainly include simple features such as color, shape and texture, and SIFT, RIFT, Complex local invariant features such as HOG; the intermediate semantic features mainly include semantic attribute features, regional semantic concept features, and bag-of-words features.
c)通过分类器对特征提取后的图片进行分类。所述分类器可以帮助用户在图像特征与关键字类别之间建立准确的映射关系,提取出与用户认知一致的图像语义信息。c) Classify the pictures after feature extraction through a classifier. The classifier can help users establish accurate mapping relationships between image features and keyword categories, and extract image semantic information consistent with user perception.
优选地,通过分类器对特征提取后的图片进行分类的方法包括基于生成模型的图像分类方法和基于判别模型的图像分类方法。所述基于生成模型的图像分类方法建立在图像特征与图像类别的联合概率分布基础上,而基于判别模型的图像分类方法则是建立在图像特征与图像类别的条件概率分布基础上。Preferably, the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discriminative model. The image classification method based on the generated model is based on the joint probability distribution of image features and image categories, while the image classification method based on the discriminant model is based on the conditional probability distribution of image features and image categories.
所述算模块303用于计算所述图片文件的特征值。The calculation module 303 is configured to calculate a feature value of the picture file.
在本实施方式中,将图片文件进行分类后可以根据所述图片文件的不同类型来选择不同的计算方法计算所述图片文件的特征值。In this embodiment, after classifying the picture files, different calculation methods may be selected according to different types of the picture files to calculate the feature values of the picture files.
例如,所述特征值可以为一定维度的向量,如(P1,P2,...,Pn),这个n维向量,所述n维向量可以是用来描述图像中物体的形状特征。现有技术中,可以采用霍夫(Hough)变换计算所述特征值。所述Hough变换为常用算法,在此不再赘述。For example, the feature value may be a vector of a certain dimension, such as (P1, P2, ..., Pn), which is an n-dimensional vector, and the n-dimensional vector may be used to describe a shape feature of an object in an image. In the prior art, the Hough transform may be used to calculate the feature value. The Hough transform is a commonly used algorithm, and details are not described herein again.
在本实施方式中,介绍一种较优的用于计算一级类别为建筑的图片文件的特征值的计算方法,可以包括下面步骤:In this embodiment, a better calculation method for calculating the feature value of a picture file whose first-class category is a building is introduced, which may include the following steps:
A1:从原始图像中抠出所含建筑物的图像;A1: Extract the image of the contained building from the original image;
A2:将所述抠出的图像用单一颜色为背景填充边界,并使得填充后的图像成为最小正方形;A2: fill the border of the cutout image with a single color as the background, and make the filled image the smallest square;
A3:将正方形图像全图等比缩放为第一预定大小的图像,将缩放后的图像分割为第二预定大小的子图像块;A3: the square image is fully scaled to an image of a first predetermined size, and the scaled image is divided into sub-image blocks of a second predetermined size;
A4:分别计算子图像块水平、竖直、正45°、负45°方向上相邻像素的亮度导数,将分别在四个方向导数极值点的个数、以及位于子图像块四个边界上极值点的总个数作为所述子图像块的特征向量;A4: Calculate the luminance derivatives of adjacent pixels in the horizontal, vertical, positive 45 °, and negative 45 ° directions of the sub-image block, respectively. The number of extreme points of the derivative in the four directions and the four boundaries of the sub-image block. The total number of upper extreme points is used as a feature vector of the sub-image block;
A5:将所有子图像块的特征向量作为原始图像的特征向量。A5: Use the feature vectors of all sub-image blocks as the feature vectors of the original image.
上述图像特征提取方式,主要利用了图像中显示的物体其边缘部分与周围的背景等的像素亮度差异来找出物体的边缘,也就可以提取得到图像中物体的形状特征,从而可以作为所述图像的特征值。The above image feature extraction method mainly uses the difference in pixel brightness between the edge portion of the object displayed in the image and the surrounding background to find the edge of the object, so that the shape features of the object in the image can be extracted, which can be used as the The characteristic value of the image.
另外,还可以采用奇异值分解的方法计算一级类别为人物的图片文件的特征值。具体地步骤包括:In addition, the singular value decomposition method can also be used to calculate the eigenvalues of the picture files whose first-level category is a person. The specific steps include:
B1:设定A∈R m×n为一副人脸灰度图像,其中m≥n,rank(A)=r; B1: Set A ∈ R m × n as a face gray image, where m≥n, rank (A) = r;
B2:得到两个正交矩阵以及对角矩阵如下:B2: Obtain two orthogonal matrices and diagonal matrices as follows:
U=[u 1,u 2,...,u m]∈R m×m,U TU=I, U = [u 1 , u 2 , ..., u m ] ∈R m × m , U T U = I,
正交矩阵为:V=[v 1,v 2,...,v n]∈R n×n,V TV=I The orthogonal matrix is: V = [v 1 , v 2 , ..., v n ] ∈R n × n , V T V = I
对角矩阵为:S=diag[λ 12,...,λ r,0,…,0]∈R m×n1>λ 2>…>λ r≥0; The diagonal matrix is: S = diag [λ 1 , λ 2 , ..., λ r , 0,…, 0] ∈R m × n , λ 1 > λ 2 >… > λ r ≥0;
B3:使得成立式子,
Figure PCTCN2019077515-appb-000004
其中,
Figure PCTCN2019077515-appb-000005
为A TA和AA T的特征值,u i和v i分别是AA T和A TA对应于
Figure PCTCN2019077515-appb-000006
的特征矢量;
B3: Make the formula,
Figure PCTCN2019077515-appb-000004
among them,
Figure PCTCN2019077515-appb-000005
A T A is the feature value and the AA T, u i and v i are the A T A and AA T corresponding to
Figure PCTCN2019077515-appb-000006
Feature vector
B4:获取上式的投影形式,即图像A在U、V上的投影为对角矩阵S,S=U TAV,取S的对角线上的元素构成的矢量即为图像A的奇异特征值。 B4: Obtain the projection form of the above formula, that is, the projection of image A on U and V is a diagonal matrix S, S = U T AV, and a vector composed of elements on the diagonal of S is the singular feature of image A value.
所述建立模块301还用于接收用户关注图片文件的操作,并根据所述操作建立关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值。The establishing module 301 is further configured to receive an operation that a user follows a picture file, and establish a watch list according to the operation, where the watch list includes the picture file and a corresponding feature value.
在本实施方式中,当用户在电子设备浏览图片文件时,用户可以通过点击按钮(如点赞按钮、收藏按钮)的操作来关注所述图片文件,所述按钮显示在显示有所述图片文件的界面(如图片的左下角)。再将被关注的图片文件保存至数据库中,计算被关注的图片文件的特征值,再根据所述被关注的图片文件及所述特征值建立所述用户关注列表。In this embodiment, when a user browses a picture file on an electronic device, the user can follow the picture file by clicking a button (such as a like button, a favorite button), and the button is displayed when the picture file is displayed Interface (such as the bottom left corner of the picture). The image file to be followed is stored in a database, the feature value of the image file to be followed is calculated, and the user attention list is established according to the image file to be followed and the characteristic value.
所述获取模块302用于获取用户当前浏览的目标图片文件,并计算所述目标图片文件的特征值。The obtaining module 302 is configured to obtain a target picture file currently viewed by a user, and calculate a feature value of the target picture file.
在本实施方式中,通过网络爬虫技术获取用户当前浏览的图片文件。具体步骤包括:In this embodiment, a picture file currently browsed by the user is obtained through a web crawler technology. Specific steps include:
1)网络爬虫抓取用户当前浏览的网页内容,其中所述网页内容包括网页结构;所述网页结构,包括但不限于网页标题、网页正文内容、图片、声音或视频信息。1) A web crawler crawls a webpage content currently browsed by a user, where the webpage content includes a webpage structure; the webpage structure includes, but is not limited to, a webpage title, a webpage body content, pictures, sound, or video information.
2)根据所述网页结构获取用户当前浏览的所述目标图片文件。2) Acquire the target picture file currently viewed by the user according to the webpage structure.
优选地,所述方法在获取用户当前浏览的所述目标图片文件之后,还包括,对获取的所述目标图片文件进行分类的步骤,再根据获取的所述目标图片文件的不同类别来选择不同的计算方法计算所述目标图片文件的特征值。Preferably, after the method acquires the target picture file currently browsed by the user, the method further includes a step of classifying the obtained target picture file, and then selecting different types according to different categories of the obtained target picture file. The calculation method calculates a feature value of the target picture file.
所述查询模块304用于根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注。The query module 304 is configured to query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed.
具体地,当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,无需再进行重复关注;Specifically, when the feature value of the target picture file exists in the user's attention list, it is confirmed that the target picture file has been followed, and there is no need to repeat the attention;
当所述目标图片文件的特征值没有存在于所述用户关注列表中时,确认所述目标图片文件没有被用户关注过,则可以直接结束流程。即,所述关注列表中不存在所述特征值,用户之前没有关注过所述目标图片文件。When the feature value of the target picture file does not exist in the user's attention list, if it is confirmed that the target picture file has not been followed by the user, the process may be directly ended. That is, the feature value does not exist in the attention list, and the user has not followed the target picture file before.
可以理解是,当所述目标图片文件的特征值没有存在于所述用户关注列表中时,用户可以根据自身喜好关注所述目标图片文件。It can be understood that when the feature value of the target picture file does not exist in the user's attention list, the user can follow the target picture file according to his preference.
所述提示模块305用于当所述目标图片文件的特征值存在于所述用户关注列表中时,提示用户无需关注所述目标图片文件。The prompting module 305 is configured to prompt the user that the target picture file does not need to pay attention to when the feature value of the target picture file exists in the user's attention list.
在本实施方式中,可以通过消息提示框、弹出页面、或语音提示等方式提示用户无需关注所述目标图片文件。例如,在用户当前浏览网页的界面中弹出单独的页面显示无需关注所述目标图片文件的信息,或在用户的电子设备中弹出消息提示框显示所述无需关注所述目标图片文件的信息,或通过语音播报的方式直接将无需关注所述目标图片文件的信息通知用户。In this embodiment, the user may be reminded through a message prompt box, a pop-up page, or a voice prompt that the user does not need to pay attention to the target picture file. For example, a separate page pops up in the user ’s current webpage interface to display information that does not require attention to the target picture file, or a message prompt box appears in the user ’s electronic device to display the information that does not need to pay attention to the target picture file, The user is directly notified of the information that does not need to pay attention to the target picture file through a voice broadcast.
在一实施方式中,所述提示模块305还用于当所述目标图片文件的特征值不存在于所述用户关注列表中时,确认所述目标图片文件没有被关注,提示用户关注所述目标图片文件,并添加所述目标图片文件及其特征值至所述关注列表,从而可以更新所述关注列表。In an embodiment, the prompting module 305 is further configured to confirm that the target picture file is not followed when the feature value of the target picture file does not exist in the user's attention list, and prompt the user to follow the target. A picture file, and adding the target picture file and its feature values to the watchlist, so that the watchlist can be updated.
可以理解的是,同样可以通过消息提示框、弹出页面、或语音提示等方式提示用户关注所述目标图片文件,在此不再赘述。It can be understood that the user may also be prompted to pay attention to the target picture file through a message prompt box, a pop-up page, or a voice prompt, and the details are not described herein again.
综上所述,本申请提供的智能识别图片的装置30,包括建立模块301、获取模块302、计算模块303、查询模块304及提示模块305。所述建立模块301用于接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;所述获取模块302用于获取用户当前浏览的目标图片文件,所述计算模块303用于计算所述目标图片文件的特征值;所述查询模块304用于根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及所述提示模块305用于当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。从而可以解决用户在关注的图片过多而无法识别不同用户发布的同一张图片时,对所述同一张图片多次关注的问题。可以通过计算图片特征值来对图片进行过滤,避免同一图片重复关注,提升用户体验。In summary, the device 30 for intelligently identifying pictures provided in this application includes a building module 301, an obtaining module 302, a calculation module 303, a query module 304, and a prompting module 305. The establishment module 301 is configured to receive an operation that a user cares about a picture file, and establish a user attention list according to the operation, wherein the attention list includes the picture file and its corresponding feature value; the acquisition module 302 is used to The target picture file currently viewed by the user is obtained, and the calculation module 303 is used to calculate the feature value of the target picture file; the query module 304 is used to query the user attention list according to the feature value of the target picture file, Confirming whether the target picture file has been followed; and the prompting module 305 is configured to confirm that the target picture file has been followed when the feature value of the target picture file exists in the user attention list, and prompt the user No need to pay attention to the target picture file. Therefore, a problem that a user pays attention to the same picture multiple times when there are too many pictures that the user cannot recognize the same picture posted by different users can be solved. You can filter the pictures by calculating the feature values of the pictures to avoid the repeated attention of the same picture and improve the user experience.
上述以软件功能模块的形式实现的集成的单元,可以存储在一个非易失性可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干 指令用以使得一台计算机设备(可以是个人计算机,双屏设备,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分。The above integrated unit implemented in the form of a software functional module may be stored in a non-volatile readable storage medium. The above software function module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a dual-screen device, or a network device) or a processor to execute the various embodiments described in this application. Part of the method.
图4为本申请至少一个实例中服务器的较佳实施例的结构示意图。FIG. 4 is a schematic structural diagram of a preferred embodiment of a server in at least one example of the present application.
所述服务器2包括:数据库41、存储器42、至少一个处理器43、存储在所述存储器42中并可在所述至少一个处理器43上运行的计算机可读指令44及至少一条通讯总线45。The server 2 includes a database 41, a memory 42, at least one processor 43, computer-readable instructions 44 stored in the memory 42 and executable on the at least one processor 43, and at least one communication bus 45.
所述至少一个处理器43执行所述计算机可读指令44时实现上述智能识别图片的方法实施例中的步骤。When the at least one processor 43 executes the computer-readable instructions 44, the steps in the embodiment of the method for intelligently identifying pictures described above are implemented.
示例性的,所述计算机可读指令44可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器42中,并由所述至少一个处理器43执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令指令段,所述指令段用于描述所述计算机可读指令44在所述服务器2中的执行过程。Exemplarily, the computer-readable instructions 44 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 42 and processed by the at least one processor 43 Execute to complete this application. The one or more modules / units may be a series of computer-readable instruction instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 44 in the server 2.
所述服务器2是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(应用程序lication Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。本领域技术人员可以理解,所述示意图4仅仅是服务器2的示例,并不构成对服务器2的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述服务器2还可以包括输入输出设备、网络接入设备、总线等。The server 2 is a device capable of automatically performing numerical calculations and / or information processing according to an instruction set or stored in advance, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc. Those skilled in the art may understand that the schematic diagram 4 is only an example of the server 2 and does not constitute a limitation on the server 2. It may include more or fewer components than shown in the figure, or combine some components or different components. For example, the server 2 may further include an input / output device, a network access device, a bus, and the like.
所述数据库(Database)41是按照数据结构来组织、存储和管理数据的建立在所述服务器2上的仓库。数据库通常分为层次式数据库、网络式数据库和关系式数据库三种。在本实施方式中,所述数据库41用于存储图片文件、及特征值等信息。The database 41 is a warehouse established on the server 2 to organize, store and manage data according to a data structure. Databases are generally divided into three types: hierarchical database, network database and relational database. In this embodiment, the database 41 is used to store information such as picture files and feature values.
所述至少一个处理器43可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。所述处理器43可以是微处理器或者所述处理器43也可以是任何常规的处理器等,所述处理器43是所述服务器2的控制中心,利用各种接口和线路连接整个服务器2的各个部分。The at least one processor 43 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), and application-specific integrated circuits (ASICs). ), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 43 may be a microprocessor, or the processor 43 may be any conventional processor, etc. The processor 43 is a control center of the server 2 and uses various interfaces and lines to connect the entire server 2 The various parts.
所述存储器42可用于存储所述计算机可读指令44和/或模块/单元,所述处理器43通过运行或执行存储在所述存储器42内的计算机可读指令和/或模块/单元,以及调用存储在存储器42内的数据,实现所述服务器2的各种功能。所述存储器42可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据服务器2的使用所创建的数据 (比如音频数据、电话本等)等。此外,存储器42可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 42 may be configured to store the computer-readable instructions 44 and / or modules / units, and the processor 43 may execute or execute the computer-readable instructions and / or modules / units stored in the memory 42 and The data stored in the memory 42 is called to implement various functions of the server 2. The memory 42 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc .; the storage data area may be Data (such as audio data, phone book, etc.) created according to the use of the server 2 are stored. In addition, the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a Smart Memory Card (SMC), and a Secure Digital (SD). Card, flash memory card (Flash card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
所述存储器42中存储有程序代码,且所述至少一个处理器43可调用所述存储器42中存储的程序代码以执行相关的功能。例如,图3中所述的各个模块(建立模块301、获取模块302、计算模块303、查询模块304及提示模块305)是存储在所述存储器42中的程序代码,并由所述至少一个处理器43所执行,从而实现所述各个模块的功能以达到智能识别图片的目的。The memory 42 stores program code, and the at least one processor 43 can call the program code stored in the memory 42 to perform related functions. For example, each module described in FIG. 3 (the establishment module 301, the acquisition module 302, the calculation module 303, the query module 304, and the prompt module 305) is a program code stored in the memory 42, and is processed by the at least one The device 43 executes the functions of the various modules to achieve the purpose of intelligently identifying pictures.
所述服务器2集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,所述计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述非易失性可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述非易失性可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,非易失性可读介质不包括电载波信号和电信信号。When the modules / units integrated in the server 2 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile readable storage medium. Based on this understanding, this application implements all or part of the processes in the methods of the above embodiments, and can also be completed by computer-readable instructions instructing related hardware. The computer-readable instructions can be stored in a non-volatile memory. In the read storage medium, when the computer-readable instructions are executed by a processor, the steps of the foregoing method embodiments can be implemented. The computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes may be in a source code form, an object code form, an executable file, or some intermediate form. The non-volatile readable medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media. It should be noted that the content contained in the non-volatile readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdictions. For example, in some jurisdictions, according to legislation and patent practices, non- Volatile readable media does not include electrical carrier signals and telecommunication signals.
尽管未示出,所述服务器2还可以包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理系统与所述至少一个处理器43逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述服务器2还可以包括蓝牙模块、Wi-Fi模块等,在此不再赘述。Although not shown, the server 2 may further include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 43 through a power management system, so as to implement management through the power management system. Charge, discharge, and power management functions. The power source may also include one or more DC or AC power sources, a recharging system, a power failure detection circuit, a power converter or inverter, a power source status indicator, and any other components. The server 2 may further include a Bluetooth module, a Wi-Fi module, and the like, and details are not described herein again.
应所述了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are for illustrative purposes only and are not limited by this structure in the scope of patent applications.
在本申请所提供的几个实施例中,应所述理解到,所揭露的电子设备和方法,可以通过其它的方式实现。例如,以上所描述的电子设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed electronic device and method may be implemented in other ways. For example, the embodiments of the electronic device described above are merely schematic. For example, the division of the units is only a logical function division, and there may be another division manner in actual implementation.
另外,在本申请各个实施例中的各功能单元可以集成在相同处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在相同单 元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated in the same processing unit, or each unit may exist separately physically, or two or more units may be integrated in the same unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It is obvious to a person skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the application. Therefore, the embodiments should be regarded as exemplary and non-limiting in every respect. The scope of the present application is defined by the appended claims rather than the above description, and therefore is intended to fall within the claims. All changes that are within the meaning and scope of equivalent requirements are included in this application. Any reference signs in the claims should not be construed as limiting the claims involved. Furthermore, it is clear that the word "comprising" does not exclude other units or that the singular does not exclude the plural. A plurality of units or devices stated in the system claims may also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names, but not in any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, but are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present application can be used. Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solution of the present application.

Claims (20)

  1. 一种智能识别图片的方法,其特征在于,所述方法包括:A method for intelligently identifying a picture, characterized in that the method includes:
    接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
    获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
    计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
    根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
    当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
  2. 如权利要求1所述的智能识别图片的方法,其特征在于,在所述接收用户关注图片文件的操作,并根据所述操作建立用户关注列表之前,所述方法还包括:The method for intelligently identifying a picture according to claim 1, wherein before the operation of receiving a user's attention to a picture file and establishing a user's attention list according to the operation, the method further comprises:
    接收电子设备上传的图片文件;Receiving picture files uploaded by electronic equipment;
    计算所述图片文件的特征值。Calculate a feature value of the picture file.
  3. 如权利要求2所述的智能识别图片的方法,其特征在于,在接收电子设备上传的图片文件后,所述方法还包括:The method for intelligently identifying a picture according to claim 2, wherein after receiving the picture file uploaded by the electronic device, the method further comprises:
    对接收的图片文件进行预处理;Preprocess the received image file;
    对预处理后的图片进行特征提取;及Feature extraction of pre-processed pictures; and
    通过分类器对特征提取后的图片进行分类。Classify the pictures after feature extraction.
  4. 如权利要求2所述的智能识别图片的方法,其特征在于,所述计算所述图片文件的特征值包括:The method for intelligently identifying a picture according to claim 2, wherein the calculating the feature value of the picture file comprises:
    根据分类后的所述图片文件的不同类型采用不同的计算方法计算所述图片文件的特征值。According to different types of the classified picture files, different calculation methods are used to calculate the feature values of the picture files.
  5. 如权利要求2所述的智能识别图片的方法,其特征在于,通过分类器对特征提取后的图片进行分类的方法包括基于生成模型的图像分类方法和基于判别模型的图像分类方法。The method for intelligently identifying pictures according to claim 2, wherein the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discrimination model.
  6. 如权利要求1所述的智能识别图片的方法,其特征在于,所述获取用户当前浏览的目标图片文件包括:The method for intelligently identifying pictures according to claim 1, wherein the obtaining a target picture file currently viewed by a user comprises:
    网络爬虫抓取用户当前浏览的网页内容,其中所述网页内容包括网页结构;A web crawler crawls webpage content currently viewed by a user, where the webpage content includes a webpage structure;
    根据所述网页结构获取用户当前浏览的目标图片文件。The target picture file currently browsed by the user is obtained according to the webpage structure.
  7. 如权利要求6所述的智能识别图片的方法,其特征在于,当所述目标图片文件的特征值不存在于所述用户关注列表中时,确认所述目标图片文件没有被关注,提示用户关注所述目标图片文件,并添加所述目标图片文件及其特征值至所述关注列表。The method for intelligently identifying pictures according to claim 6, wherein when the feature value of the target picture file does not exist in the user's attention list, confirming that the target picture file is not being followed, and prompting the user to pay attention The target picture file, and adding the target picture file and its feature value to the attention list.
  8. 一种智能识别图片的装置,其特征在于,所述装置包括:A device for intelligently identifying pictures is characterized in that the device includes:
    建立模块,用于接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;A establishing module, configured to receive an operation that a user follows an image file, and establish a user attention list according to the operation, wherein the attention list includes the image file and its corresponding feature value;
    获取模块,用于获取用户当前浏览的目标图片文件;An acquisition module for acquiring a target image file currently viewed by a user;
    计算模块,用于计算所述目标图片文件的特征值;A calculation module, configured to calculate a feature value of the target picture file;
    查询模块,用于根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及A query module, configured to query the user attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
    提示模块,用于当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。A prompting module is configured to confirm that the target picture file has been followed when the feature value of the target picture file exists in the user's attention list, and prompt the user that the user does not need to follow the target picture file.
  9. 一种服务器,其特征在于,所述服务器包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令时实现以下步骤:A server is characterized in that the server includes a processor and a memory, and the processor implements the following steps when executing at least one computer-readable instruction stored in the memory:
    接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
    获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
    计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
    根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
    当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
  10. 如权利要求9所述的服务器,其特征在于,在所述接收用户关注图片文件的操作,并根据所述操作建立用户关注列表之前,所述处理器执行所述至少一个计算机可读指令时还实现以下步骤:The server according to claim 9, characterized in that before the operation of receiving a user's attention to a picture file and establishing a user's attention list according to the operation, the processor further executes the at least one computer-readable instruction. Implement the following steps:
    接收电子设备上传的图片文件;Receiving picture files uploaded by electronic equipment;
    计算所述图片文件的特征值。Calculate a feature value of the picture file.
  11. 如权利要求10所述的服务器,其特征在于,在所述接收电子设备上传的图片文件后,所述处理器执行所述至少一个计算机可读指令还实现以下步骤:The server according to claim 10, wherein after receiving the picture file uploaded by the electronic device, the processor executes the at least one computer-readable instruction to further implement the following steps:
    对接收的图片文件进行预处理;Preprocess the received image file;
    对预处理后的图片进行特征提取;及Feature extraction of pre-processed pictures; and
    通过分类器对特征提取后的图片进行分类。Classify the pictures after feature extraction.
  12. 如权利要求10所述的服务器,其特征在于,根据分类后的所述图片文件的不同类型采用不同的计算方法计算所述图片文件的特征值。The server according to claim 10, wherein, according to different types of the classified picture files, different calculation methods are used to calculate the feature values of the picture files.
  13. 如权利要求10所述的服务器,其特征在于,所述通过分类器对特征提取后的图片进行分类的方法包括基于生成模型的图像分类方法和基于判别模型的图像分类方法。The server according to claim 10, wherein the method for classifying pictures after feature extraction by a classifier includes an image classification method based on a generated model and an image classification method based on a discriminative model.
  14. 如权利要求9所述的服务器,其特征在于,在获取用户当前浏览的目标图片文件时,所述处理器执行所述至少一个计算机可读指令还实现以下步骤:The server according to claim 9, wherein when acquiring the target picture file currently viewed by the user, the processor executes the at least one computer-readable instruction to further implement the following steps:
    网络爬虫抓取用户当前浏览的网页内容,其中所述网页内容包括网页结构;A web crawler crawls webpage content currently viewed by a user, where the webpage content includes a webpage structure;
    根据所述网页结构获取用户当前浏览的目标图片文件。The target picture file currently browsed by the user is obtained according to the webpage structure.
  15. 如权利要求14所述的服务器,其特征在于,所述处理器执行所述至少一个计算机可读指令还实现以下步骤:The server of claim 14, wherein the processor executes the at least one computer-readable instruction to further implement the following steps:
    当所述目标图片文件的特征值不存在于所述用户关注列表中时,确认所述目标图片文件没有被关注,提示用户关注所述目标图片文件,并添加所述目标图片文件及其特征值至所述关注列表。When the feature value of the target picture file does not exist in the user attention list, confirm that the target picture file is not being followed, prompt the user to pay attention to the target picture file, and add the target picture file and its feature value To the watchlist.
  16. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:A non-volatile readable storage medium, characterized in that the non-volatile readable storage medium stores at least one computer-readable instruction, and when the at least one computer-readable instruction is executed by a processor, the following steps are implemented: :
    接收用户关注图片文件的操作,并根据所述操作建立用户关注列表,其中,所述关注列表包括所述图片文件及其对应的特征值;Receiving an operation that a user follows a picture file, and establishing a user attention list according to the operation, wherein the attention list includes the picture file and a corresponding feature value thereof;
    获取用户当前浏览的目标图片文件;Get the target image file currently viewed by the user;
    计算所述目标图片文件的特征值;Calculating a feature value of the target picture file;
    根据所述目标图片文件的特征值查询所述用户关注列表,以确认所述目标图片文件是否已经被关注;及Querying the user's attention list according to the feature value of the target picture file to confirm whether the target picture file has been followed; and
    当所述目标图片文件的特征值存在于所述用户关注列表中时,确认所述目标图片文件已经被关注,提示用户无需关注所述目标图片文件。When the feature value of the target picture file exists in the user's attention list, confirming that the target picture file has been followed, prompting the user that the user does not need to pay attention to the target picture file.
  17. 如权利要求16所述的存储介质,其特征在于,在所述接收用户关注图片文件的操作,并根据所述操作建立用户关注列表之前,所述至少一个计算机可读指令被处理器执行时还实现以下步骤:The storage medium of claim 16, wherein before the operation of receiving a user's attention to a picture file and establishing a user's attention list according to the operation, the at least one computer-readable instruction is further executed by a processor. Implement the following steps:
    接收电子设备上传的图片文件;Receiving picture files uploaded by electronic equipment;
    计算所述图片文件的特征值。Calculate a feature value of the picture file.
  18. 如权利要求17所述的存储介质,其特征在于,在接收电子设备上传的图片文件后,所述至少一个计算机可读指令被处理器执行时还实现以下步骤:The storage medium according to claim 17, wherein after receiving the picture file uploaded by the electronic device, when the at least one computer-readable instruction is executed by a processor, the following steps are further implemented:
    对接收的图片文件进行预处理;Preprocess the received image file;
    对预处理后的图片进行特征提取;及Feature extraction of pre-processed pictures; and
    通过分类器对特征提取后的图片进行分类。Classify the pictures after feature extraction.
  19. 如权利要求16所述的存储介质,其特征在于,在获取用户当前浏览的目标图片文件时,所述至少一个计算机可读指令被处理器执行时以实现以下步骤:The storage medium of claim 16, wherein when the target picture file currently viewed by the user is obtained, the at least one computer-readable instruction is executed by a processor to implement the following steps:
    网络爬虫抓取用户当前浏览的网页内容,其中所述网页内容包括网页结构;A web crawler crawls webpage content currently viewed by a user, where the webpage content includes a webpage structure;
    根据所述网页结构获取用户当前浏览的目标图片文件。The target picture file currently browsed by the user is obtained according to the webpage structure.
  20. 如权利要求19所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时还实现以下步骤:The storage medium of claim 19, wherein when the at least one computer-readable instruction is executed by a processor, the following steps are further implemented:
    当所述目标图片文件的特征值不存在于所述用户关注列表中时,确认所述目标图片文件没有被关注,提示用户关注所述目标图片文件,并添加所述目标图片文件及其特征值至所述关注列表。When the feature value of the target picture file does not exist in the user attention list, confirm that the target picture file is not being followed, prompt the user to pay attention to the target picture file, and add the target picture file and its feature value To the watchlist.
PCT/CN2019/077515 2018-09-30 2019-03-08 Method and apparatus for intelligently recognizing picture, server, and storage medium WO2020062788A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811163462.X 2018-09-30
CN201811163462.XA CN109492121A (en) 2018-09-30 2018-09-30 Method, apparatus, server and the storage medium of intelligent recognition picture

Publications (1)

Publication Number Publication Date
WO2020062788A1 true WO2020062788A1 (en) 2020-04-02

Family

ID=65690070

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077515 WO2020062788A1 (en) 2018-09-30 2019-03-08 Method and apparatus for intelligently recognizing picture, server, and storage medium

Country Status (2)

Country Link
CN (1) CN109492121A (en)
WO (1) WO2020062788A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111557648A (en) * 2020-03-23 2020-08-21 广东艾诗凯奇智能科技有限公司 Health detection system, method and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071433A (en) * 2007-05-10 2007-11-14 腾讯科技(深圳)有限公司 Picture download system and method
CN105187635A (en) * 2015-08-12 2015-12-23 北京金山安全软件有限公司 Picture management method and device and mobile terminal
CN105404696A (en) * 2015-12-23 2016-03-16 北京奇虎科技有限公司 Method, system and device for downloading photographs in photograph album
CN105512328A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Method, system and device for realizing uploading of album photos
CN105589879A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method and apparatus for downloading picture by client

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4443722B2 (en) * 2000-04-25 2010-03-31 富士通株式会社 Image recognition apparatus and method
CN103778261A (en) * 2014-03-04 2014-05-07 福建瑞恒信息技术有限公司 Self-guided tour method based on mobile cloud computing image recognition
CN105306810A (en) * 2014-07-18 2016-02-03 小米科技有限责任公司 Photographing method and device
CN106095884A (en) * 2016-06-03 2016-11-09 深圳码隆科技有限公司 A kind of relative article information processing method based on picture and device
CN108268814A (en) * 2016-12-30 2018-07-10 广东精点数据科技股份有限公司 A kind of face identification method and device based on the fusion of global and local feature Fuzzy

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071433A (en) * 2007-05-10 2007-11-14 腾讯科技(深圳)有限公司 Picture download system and method
CN105589879A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method and apparatus for downloading picture by client
CN105187635A (en) * 2015-08-12 2015-12-23 北京金山安全软件有限公司 Picture management method and device and mobile terminal
CN105404696A (en) * 2015-12-23 2016-03-16 北京奇虎科技有限公司 Method, system and device for downloading photographs in photograph album
CN105512328A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Method, system and device for realizing uploading of album photos

Also Published As

Publication number Publication date
CN109492121A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN111368893B (en) Image recognition method, device, electronic equipment and storage medium
US10740647B2 (en) Detecting objects using a weakly supervised model
US10831819B2 (en) Hue-based color naming for an image
US20190188222A1 (en) Thumbnail-Based Image Sharing Method and Terminal
US9633448B1 (en) Hue-based color naming for an image
WO2017129018A1 (en) Picture processing method and apparatus, and smart terminal
WO2021238943A1 (en) Gif picture generation method and apparatus, and electronic device
RU2643464C2 (en) Method and apparatus for classification of images
US20210174135A1 (en) Method of matching image and apparatus thereof, device, medium and program product
CN106446950B (en) Image processing method and device
JP2013109748A (en) Input method of retrieval using area selection system, and system thereof
TW201923547A (en) Processing method, device, apparatus, and machine-readable medium
US9779294B2 (en) Methods and devices for classifying pictures
CN108898082B (en) Picture processing method, picture processing device and terminal equipment
WO2014206151A1 (en) System and method for tagging and searching documents
WO2017107855A1 (en) Picture searching method and device
WO2019105457A1 (en) Image processing method, computer device and computer readable storage medium
CA2992118A1 (en) Methods and systems for automatically generating advertisements
EP3876139B1 (en) Method for estimating object parameters and electronic device
CN108764051B (en) Image processing method and device and mobile terminal
CN107305566A (en) A kind of method and device for search information matches picture
WO2020038243A1 (en) Video abstract generating method and apparatus, computing device, and storage medium
CN112163577A (en) Character recognition method and device in game picture, electronic equipment and storage medium
US10185724B2 (en) Method for sorting media content and electronic device implementing same
WO2020062788A1 (en) Method and apparatus for intelligently recognizing picture, server, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19867360

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 09/07/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19867360

Country of ref document: EP

Kind code of ref document: A1