[go: up one dir, main page]

CN110442806B - Method and apparatus for recognizing image - Google Patents

Method and apparatus for recognizing image Download PDF

Info

Publication number
CN110442806B
CN110442806B CN201910715816.5A CN201910715816A CN110442806B CN 110442806 B CN110442806 B CN 110442806B CN 201910715816 A CN201910715816 A CN 201910715816A CN 110442806 B CN110442806 B CN 110442806B
Authority
CN
China
Prior art keywords
image
gif
dynamic image
gif dynamic
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910715816.5A
Other languages
Chinese (zh)
Other versions
CN110442806A (en
Inventor
张苗
王群
杨茗名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201910715816.5A priority Critical patent/CN110442806B/en
Publication of CN110442806A publication Critical patent/CN110442806A/en
Application granted granted Critical
Publication of CN110442806B publication Critical patent/CN110442806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for recognizing an image. The method comprises the following steps: acquiring a resource link of the GIF dynamic image; acquiring an array comprising all GIF dynamic image frames based on the resource link of the GIF dynamic images; sequentially and circularly displaying the GIF dynamic image frames in the array by adopting canvas; in response to receiving selection operation and identification operation of a user on a currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame; an identification request including an image to be identified is sent to the backend. The method can improve the accuracy of the image to be identified expected by the user, and improve the browsing experience of the user and the image recognition satisfaction of the user.

Description

Method and apparatus for recognizing image
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of Web design technologies, and in particular, to a method and an apparatus for recognizing an image.
Background
Gif (graphics exchange format) refers to an image file format developed by the company compuseserver in 1987, which is a continuous tone lossless compression format based on the LZW algorithm and can store a plurality of color images. If a plurality of image data stored in one file are read out one by one and displayed on a screen, a simplest animation, a so-called GIF moving picture, can be constructed.
At present, if an image browsed by a user in a scene browsing a Web is a GIF moving image, and the user wishes to identify content in the GIF moving image, the user may identify the GIF moving image by using a graph identifying function provided in the related art. In the prior art, when a GIF dynamic image is identified, only the identification result of the first frame image in the GIF dynamic image can be obtained.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for recognizing an image.
In a first aspect, an embodiment of the present disclosure provides a method for recognizing an image, including: acquiring a resource link of the GIF dynamic image; acquiring an array comprising all GIF dynamic image frames based on the resource link of the GIF dynamic images; sequentially and circularly displaying the GIF dynamic image frames in the array by adopting canvas; in response to receiving selection operation and identification operation of a user on a currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame; an identification request including an image to be identified is sent to the backend.
In some embodiments, based on the resource linking of the GIF motion image, obtaining an array including all of the GIF motion image frames includes: based on the resource link of the GIF dynamic image, initiating a dynamic image data request to a resource provider of the GIF dynamic image to obtain GIF dynamic image data; and analyzing the main body information of the GIF dynamic image data to obtain an array comprising the GIF dynamic image frame.
In some embodiments, sequentially cycling through the canvas to show the GIF motion image frames in the array comprises: analyzing the header information of the GIF dynamic image data to obtain the width information and the height information of the GIF dynamic image; setting the size of a canvas for displaying the GIF dynamic image based on the width information and the height information of the GIF dynamic image; and circularly displaying the GIF dynamic image frames in the array in sequence by adopting the canvas with the set size.
In some embodiments, in response to receiving a user selection operation and an identification operation of the currently presented GIF moving image frame, determining the image to be identified based on the currently presented GIF moving image frame includes: and in response to receiving the operation of clicking a pause button and the operation of clicking a picture recognition button on the currently displayed GIF dynamic image frame by the user, converting the currently displayed GIF dynamic image frame into an image to be recognized by adopting the canvas.
In some embodiments, in response to receiving a user selection operation and an identification operation of the currently presented GIF moving image frame, determining the image to be identified based on the currently presented GIF moving image frame includes: and in response to receiving a pause button clicking operation, a target object selecting operation and a picture identifying button clicking operation of a user on the currently displayed GIF dynamic image frame, adopting canvas to convert the target object in the currently displayed GIF dynamic image frame into an image to be identified.
In some embodiments, the method further comprises: receiving a result page link returned by the back end in response to the identification request; and jumping to a link of a result presenting page.
In some embodiments, the content of the results page link includes at least one of: vocabulary entry linkage of an object in the image to be recognized; news linking of objects in the image to be identified; similar image links of objects in the image to be recognized.
In a second aspect, an embodiment of the present disclosure provides an apparatus for recognizing an image, including: a link acquisition unit configured to acquire a resource link of the GIF dynamic image; an array acquisition unit configured to acquire an array including all the GIF moving image frames based on the resource link of the GIF moving image; the circulation display unit is configured to display the GIF dynamic image frames in the array in a circulation mode sequentially by adopting the canvas; an image determining unit configured to determine an image to be recognized based on a currently displayed GIF dynamic image frame in response to receiving a selection operation and a recognition operation of a user on the currently displayed GIF dynamic image frame; a request transmitting unit configured to transmit an identification request including an image to be identified to a backend.
In some embodiments, the array acquisition unit includes: a request initiating unit configured to initiate a dynamic image data request to a resource provider of the GIF dynamic image based on the resource link of the GIF dynamic image, so as to obtain GIF dynamic image data; and the data analysis subunit is configured to analyze the main body information of the GIF dynamic image data to obtain an array comprising the GIF dynamic image frame.
In some embodiments, the cycle showing unit comprises: the information analysis subunit is configured to analyze the header information of the GIF dynamic image data to obtain the width information and the height information of the GIF dynamic image; a canvas setting subunit configured to set a size of a canvas showing the GIF dynamic image based on the width information and the height information of the GIF dynamic image; and the canvas showing subunit is configured to sequentially and circularly show the GIF dynamic image frames in the array by adopting the canvas with the set size.
In some embodiments, the image determination unit comprises: and the image conversion subunit is configured to respond to the received operation of clicking a pause button and the operation of clicking a figure recognition button of the currently displayed GIF dynamic image frame by the user, and convert the currently displayed GIF dynamic image frame into an image to be recognized by adopting the canvas.
In some embodiments, the image determination unit comprises: and the object conversion subunit is configured to respond to the received user click pause button operation, target object selection operation and click image recognition button operation on the currently displayed GIF dynamic image frame, and convert the target object in the currently displayed GIF dynamic image frame into the image to be recognized by adopting the canvas.
In some embodiments, the apparatus further comprises: a link receiving unit configured to receive a result page link returned by the backend in response to the identification request; and the link presentation unit is configured to jump to a presentation result page link.
In some embodiments, the content of the result page link received by the link receiving unit includes at least one of: vocabulary entry linkage of an object in the image to be recognized; news linking of objects in the image to be identified; similar image links of objects in the image to be recognized.
In a third aspect, an embodiment of the present disclosure provides an electronic device/terminal/server, including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method for recognizing an image as described in any one of the above.
In a fourth aspect, the embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which when executed by a processor, implements the method for identifying an image as any one of the above.
According to the method and the device for identifying the image, firstly, the resource link of the GIF dynamic image is obtained; then, acquiring an array comprising all GIF dynamic image frames based on the resource link of the GIF dynamic images; then, circularly displaying the GIF dynamic image frames in the array in sequence by adopting canvas; then, in response to the fact that the selection operation and the identification operation of the user on the currently displayed GIF dynamic image frame are received, determining an image to be identified based on the currently displayed GIF dynamic image frame; finally, an identification request including the image to be identified is sent to the backend. In the process, the image to be identified which the user wants to identify can be determined according to the selection operation and the identification operation input by the user during the man-machine interaction, so that the accuracy of the image to be identified which the user expects to identify is improved, and the browsing experience of the user and the image recognition satisfaction of the user are improved.
Drawings
Other features, objects, and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present disclosure may be applied;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a method for recognizing images in accordance with an embodiment of the present disclosure;
FIG. 3 is a schematic signaling diagram of a method for identifying an image according to an embodiment of the present disclosure;
FIG. 4a is a schematic flow chart diagram of yet another embodiment of a method for recognizing an image in accordance with an embodiment of the present disclosure;
FIG. 4b is an exemplary diagram of a selection operation of a receiving user for a currently presented GIF motion image frame according to an embodiment of the present disclosure;
FIG. 4c is an exemplary diagram of receiving a user identification operation of a currently selected GIF motion image frame in accordance with an embodiment of the present disclosure;
FIG. 4d is an exemplary diagram of a render results page link according to an embodiment of the present disclosure;
FIG. 5 is an exemplary block diagram of one embodiment of an apparatus for recognizing an image according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with a server embodying embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for identifying an image or the apparatus for identifying an image of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices that support browser applications, including but not limited to tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for browser applications running on the terminal devices 101, 102, 103. The background server can analyze and process the received data such as the request and feed back the processing result to the terminal equipment.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules, for example, to provide distributed services, or as a single piece of software or software module. And is not particularly limited herein.
In practice, the method for recognizing the image provided by the embodiment of the present disclosure may be executed by the terminal device 101, 102, 103 and/or the server 105, 106, and the apparatus for recognizing the image may also be disposed in the terminal device 101, 102, 103 and/or the server 105, 106.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, fig. 2 illustrates a flow 200 of one embodiment of a method for identifying an image according to the present disclosure. The method for recognizing an image includes the steps of:
step 201, acquiring a resource link of the GIF dynamic image.
In the present embodiment, an executing subject (e.g., a terminal or a server shown in fig. 1) of the method for recognizing an image may acquire a resource link of a GIF moving image from a local or backend server. The resource link is used to indicate a resource providing the GIF moving picture. The link refers to a connection relationship of one page to one target, and the target to be pointed to can be another webpage, can be a different position on the same webpage, and can also be an image, an email address, a file or even an application program.
Step 202, acquiring an array including all the GIF dynamic image frames based on the resource link of the GIF dynamic image.
In this embodiment, the execution subject may initiate a dynamic image data request to a resource provider (e.g., a GIF dynamic image service platform or a GIF dynamic image database, etc.) indicated by the resource link of the GIF dynamic image based on the resource link of the GIF dynamic image, so as to obtain the GIF dynamic image data. Then, an array including all the GIF moving image frames is extracted from the GIF moving image data.
In some specific examples, if the resource provider indicated by the resource link of the GIF dynamic image is the GIF image service platform, the execution subject may initiate a dynamic image data request of XMLHttpRequest to the GIF image service platform, so as to obtain the GIF dynamic image data, and then the execution subject extracts an array including all the GIF dynamic image frames from the GIF dynamic image data.
In some optional implementations of this embodiment, based on the resource link of the GIF moving image, acquiring the array including all the GIF moving image frames includes: based on the resource link of the GIF dynamic image, initiating a dynamic image data request to a resource provider of the GIF dynamic image to obtain GIF dynamic image data; and analyzing the main body information of the GIF dynamic image data to obtain an array comprising the GIF dynamic image frame.
In this implementation, after obtaining the GIF moving image data, the execution subject may parse the subject information of the GIF moving image data, so as to extract an array including the GIF moving image frame from the subject information for subsequent use in displaying to a user. The method for acquiring the array comprising all the GIF dynamic image frames in the implementation mode improves the efficiency of acquiring the array of the GIF dynamic image frames.
And step 203, circularly displaying the GIF dynamic image frames in the array in sequence by adopting the canvas.
In this embodiment, the execution subject may circularly display the GIF moving image frames in the array using a canvas (http canvas). The size of the canvas and the time interval for displaying the GIF dynamic image frames of each frame may be set by those skilled in the art according to experience or application scenarios, which are not limited in the present application.
In some optional implementations of the present embodiment, circularly displaying the GIF dynamic image frames in the array in sequence by using the canvas includes: analyzing the header information of the GIF dynamic image data to obtain the width information and the height information of the GIF dynamic image; setting the size of a canvas for displaying the GIF dynamic image based on the width information and the height information of the GIF dynamic image; and circularly displaying the GIF dynamic image frames in the array in sequence by adopting the canvas with the set size.
In this implementation, by analyzing the header information of the GIF moving image data, the width information and the height information of the GIF moving image can be obtained according to the meta information tag in the header information. Furthermore, the execution main body can set the size of the canvas for displaying the GIF dynamic image according to the width information and the height information of the GIF dynamic image, thereby improving the accuracy of the size of the canvas for displaying the GIF dynamic image and avoiding incomplete display caused by overlarge size of the canvas or insufficient size of the canvas.
And step 204, in response to receiving the selection operation and the identification operation of the user on the currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame.
In this embodiment, when the execution main body sequentially and circularly displays the GIF dynamic image frames in the array by using the canvas, if the user finds that the content in the currently displayed GIF dynamic image frame is the content that the user wishes to identify, the currently displayed GIF dynamic image frame may be selected.
When the currently displayed GIF dynamic image frame is selected, a user can select a selection option presented on a page to realize the selection of the currently displayed GIF dynamic image frame, and can also adopt input conforming to a prompt to realize the selection of the currently displayed GIF dynamic image frame according to the prompt.
After the user selects the currently presented GIF dynamic image frame, the user may select an identification option presented on the page to effect triggering generation of an identification request. Specifically, the executing body may first determine the image to be recognized based on the GIF moving picture frame currently selected by the user.
In some optional implementations of the present embodiment, in response to receiving a selection operation and an identification operation of a user on a currently presented GIF dynamic image frame, determining an image to be identified based on the currently presented GIF dynamic image frame includes: responding to the received operation of clicking a pause button and clicking a picture recognition button of a user on the currently displayed GIF dynamic image frame, and acquiring the currently displayed GIF dynamic image frame; and adopting canvas to convert the currently displayed GIF dynamic image frame into an image to be identified.
In this implementation manner, in the canvas displaying the currently displayed GIF dynamic image frame, a pause button and a map recognition button may be simultaneously presented or sequentially presented, and the user may stop the circular display of the GIF dynamic image frame in the array by the canvas by clicking the pause button, and click the map recognition button to instruct to recognize the currently displayed GIF dynamic image frame when confirming that the currently displayed GIF dynamic image frame is the dynamic image frame desired to be queried. At this time, the execution subject may convert the content currently presented by the canvas into an image to be recognized.
For example, the execution subject may export the content currently presented by the canvas as the image to be recognized using todatauerl () of http canvas.
In the implementation mode, the execution main body determines the image to be recognized according to the operation of the user on the pause button and the image recognition button, so that the user can conveniently click the pause button to check the content of the dynamic image frame, and can conveniently click the image recognition button after the dynamic image frame is determined to submit the image to be recognized, and the accuracy and the efficiency of determining the image to be recognized are improved.
In some optional implementations of the present embodiment, in response to receiving a selection operation and an identification operation of a user on a currently presented GIF dynamic image frame, determining an image to be identified based on the currently presented GIF dynamic image frame includes: and in response to receiving a pause button clicking operation, a target object selecting operation and a picture identifying button clicking operation of a user on the currently displayed GIF dynamic image frame, adopting canvas to convert the target object in the currently displayed GIF dynamic image frame into an image to be identified.
In this implementation manner, in the canvas displaying the currently displayed GIF dynamic image frame, a pause button, a target object selection button and a map recognition button may be simultaneously presented or sequentially presented, the user may stop the circular display of the GIF dynamic image frame in the array by the canvas by clicking the pause button, and when it is determined that the currently displayed GIF dynamic image frame is the dynamic image frame desired to be queried, click the target object selection button to select the target object desired to be recognized in a frame, and then click the map recognition button to indicate to recognize the selected target object. At this time, the execution subject may convert the selected target object into an image to be recognized. When the user clicks the target object selection button to select the target object desired to be identified, the position and size of the frame selection interface may be adjusted according to the user's needs.
For example, the execution subject may export the target object selected by the user as the image to be recognized, using todatauerl () of http canvas.
In the implementation mode, the execution main body determines the image to be recognized according to the operation of the user on the pause button, the target object selection button and the image recognition button, so that the user can conveniently click the pause button to check the content of the dynamic image frame, and conveniently click the target object selection button to select the target object to be recognized in a frame after the dynamic image frame is determined, and finally click the image recognition button to submit the image to be recognized, and the accuracy and the efficiency of determining the image to be recognized are improved.
Step 205, sending an identification request including an image to be identified to the backend.
In this embodiment, after determining the image to be recognized, the execution main body may send a recognition request including the image to be recognized to the backend, so as to obtain a recognition result of the image to be recognized returned by the backend.
An exemplary application scenario of the method for recognizing an image of the present disclosure is described below in conjunction with fig. 3.
As shown in fig. 3, fig. 3 illustrates one exemplary application scenario of the method for recognizing an image according to the present disclosure.
As shown in fig. 3, a method 300 for recognizing an image operates in an electronic device 310 and may include:
first, the resource link 301 of the GIF moving image is acquired.
Thereafter, an array 302 including all the GIF moving image frames is acquired based on the resource link 301 of the GIF moving image.
Thereafter, the canvas 303 is employed to sequentially cycle through the GIF dynamic image frames 304 in the display array.
Thereafter, in response to receiving the user's selection operation 305 and recognition operation 306 of the currently presented GIF dynamic image frame 304, an image to be recognized 307 is determined based on the currently presented GIF dynamic image frame 304.
Finally, an identification request 309 comprising the image to be identified is sent to the backend.
It should be understood that the application scenario of the method for recognizing an image shown in fig. 3 is only an exemplary description of the method for recognizing an image, and does not represent a limitation to the method. For example, the steps shown in fig. 3 above may be implemented in further detail. Other steps for recognizing the image may be further added to the above-described fig. 3.
According to the method for identifying the image, the image which the user wants to identify can be accurately determined according to the selection operation and the identification operation input by the user during the man-machine interaction, so that the accuracy of the identified image to be identified is improved, and the browsing experience of the user and the satisfaction degree of the user on the image identifying result are further improved.
With further reference to fig. 4a, fig. 4a shows a schematic flow chart of yet another embodiment of a method for recognizing an image according to the present disclosure.
As shown in fig. 4a, the method 400 for recognizing an image of the present embodiment may include the following steps:
step 401, acquiring a resource link of the GIF dynamic image.
In the present embodiment, an executing subject (e.g., a terminal or a server shown in fig. 1) of the method for recognizing an image may acquire a resource link of a GIF moving image from a local or backend server. The resource link is used to indicate a resource providing the GIF moving picture. The link refers to a connection relationship of one page to one target, and the target to be pointed to can be another webpage, can be a different position on the same webpage, and can also be an image, an email address, a file or even an application program.
Step 402, acquiring an array including all the GIF dynamic image frames based on the resource link of the GIF dynamic images.
In this embodiment, the execution subject may initiate a dynamic image data request to a resource provider (e.g., a GIF dynamic image service platform or a GIF dynamic image database, etc.) indicated by the resource link of the GIF dynamic image based on the resource link of the GIF dynamic image, so as to obtain the GIF dynamic image data. Then, an array including all the GIF moving image frames is extracted from the GIF moving image data.
And 403, circularly displaying the GIF dynamic image frames in the array in sequence by adopting the canvas.
In this embodiment, the execution subject may circularly display the GIF moving image frames in the array using a canvas (http canvas). The size of the canvas and the time interval for displaying the GIF dynamic image frames of each frame may be set by those skilled in the art according to experience or application scenarios, which are not limited in the present application.
And step 404, in response to receiving the selection operation and the identification operation of the user on the currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame.
In this embodiment, when the execution main body sequentially and circularly displays the GIF dynamic image frames in the array by using the canvas, if the user finds that the content in the currently displayed GIF dynamic image frame is the content that the user wishes to identify, the currently displayed GIF dynamic image frame may be selected.
When the currently displayed GIF dynamic image frame is selected, a user can select a selection option presented on a page to realize the selection of the currently displayed GIF dynamic image frame, and can also adopt input conforming to a prompt to realize the selection of the currently displayed GIF dynamic image frame according to the prompt.
After the user selects the currently presented GIF dynamic image frame, the user may select an identification option presented on the page to effect triggering generation of an identification request. Specifically, the executing body may first determine the image to be recognized based on the GIF moving picture frame currently selected by the user.
In some specific examples, as shown in fig. 4b, an exemplary schematic diagram of a selection operation of a currently presented GIF motion image frame by a receiving user is shown. As further shown in fig. 4c, an exemplary diagram of a receiving user's recognition operation of a currently selected GIF motion image frame is shown.
Step 405, sending an identification request including an image to be identified to the backend.
In this embodiment, the execution main body may send an identification request including an image to be identified to the backend after determining the image to be identified.
At step 406, a result page link returned by the back end in response to the identification request is received.
In this embodiment, the execution body may receive a result page connection returned by the backend in response to the identification request, based on the following steps: identifying an image to be identified to obtain a mark of the image to be identified; based on the logo of the image to be recognized, a result page link is generated.
The method for identifying the image by the back-end identification may be a method for identifying an image in the prior art or a technology developed in the future, and the method is not limited in the present application. For example, an image recognition method based on a neural network, an image recognition method based on a wavelet moment, an image recognition method based on a fractal feature, or the like may be employed.
Step 407, jump to the present result page link.
In this embodiment, after the execution body receives the returned result page link, the current human-computer interaction interface may jump to the presentation result page link. Here, the result page link presented may be link contents preset at the back end by those skilled in the art according to experience or application scenarios.
In some specific examples, fig. 4d shows an exemplary diagram of the content of the result page link presented by the execution body, corresponding to fig. 4b and 4c above.
In some optional implementations of the embodiment, the content of the result page link includes a vocabulary entry link of an object in the image to be recognized. Alternatively or additionally, the content of the result page link includes a news link to an object in the image to be identified. Alternatively or additionally, the content of the result page link includes a similar image link to the object in the image to be recognized.
In the implementation manner, the entry links including the objects in the images to be recognized are presented to the user in the result page links, so that the efficiency of recognizing the GIF dynamic image frames by the user can be improved; by presenting the news link including the object in the image to be identified to the user in the result page link, the user can know the latest dynamic state of the object in the image to be identified, and the efficiency of acquiring the related information of the GIF dynamic image frame by the user is improved; by presenting the similar image link including the object in the image to be recognized to the user in the result page connection, the user can know other dynamic states of the object in the image to be recognized, and the efficiency of acquiring the related information of the GIF dynamic image frame by the user is improved.
It will be appreciated by those skilled in the art that steps 401, 402, 403 and 404 in the embodiment shown in fig. 4 described above correspond to steps 201, 202, 203 and 204, respectively, in the embodiment shown in fig. 2 described above. Therefore, the operations and features described above for steps 201, 202, 203, and 204 in the embodiment shown in fig. 2 are also applicable to steps 401, 402, 403, and 404 in the embodiment shown in fig. 4, and are not described again here.
In the method for identifying an image in the embodiment of fig. 4 of the present disclosure, on the basis of the method for identifying an image shown in fig. 2, a step of presenting a result page link to a user by an execution subject is added, so that an identification result of an image to be identified, which meets the user's will, can be presented to the user, the presented result page link is more pertinent, and the browsing experience of the user and the satisfaction of the user on the image identifying result are improved.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, an embodiment of the present disclosure provides an embodiment of an apparatus for recognizing an image, where the embodiment of the apparatus corresponds to the embodiments of the methods shown in fig. 2 to fig. 4, and the apparatus may be specifically applied to an apparatus including a publishing terminal and a service terminal.
As shown in fig. 5, the apparatus 500 for recognizing an image of the present embodiment may include: a link acquiring unit 510 configured to acquire a resource link of the GIF moving image; an array acquiring unit 520 configured to acquire an array including all the GIF moving image frames based on the resource link of the GIF moving image; a circulation showing unit 530 configured to sequentially and circularly show the GIF dynamic image frames in the array by using the canvas; an image determining unit 540 configured to determine an image to be recognized based on the currently displayed GIF dynamic image frame in response to receiving a selection operation and a recognition operation of the currently displayed GIF dynamic image frame by a user; a request transmitting unit 550 configured to transmit an identification request including an image to be identified to the backend.
In some optional implementations of the present embodiment, the array obtaining unit 520 includes (not shown in the figure): a request initiating unit configured to initiate a dynamic image data request to a resource provider of the GIF dynamic image based on the resource link of the GIF dynamic image, so as to obtain GIF dynamic image data; and the data analysis subunit is configured to analyze the main body information of the GIF dynamic image data to obtain an array comprising the GIF dynamic image frame.
In some optional implementations of the present embodiment, the circulation display unit 530 includes (not shown in the figure): the information analysis subunit is configured to analyze the header information of the GIF dynamic image data to obtain the width information and the height information of the GIF dynamic image; a canvas setting subunit configured to set a size of a canvas showing the GIF dynamic image based on the width information and the height information of the GIF dynamic image; and the canvas showing subunit is configured to sequentially and circularly show the GIF dynamic image frames in the array by adopting the canvas with the set size.
In some optional implementations of the present embodiment, the image determining unit 540 comprises (not shown in the figure): and the image conversion subunit is configured to respond to the received operation of clicking a pause button and the operation of clicking a figure recognition button of the currently displayed GIF dynamic image frame by the user, and convert the currently displayed GIF dynamic image frame into an image to be recognized by adopting the canvas.
In some optional implementations of the present embodiment, the image determining unit 540 comprises (not shown in the figure): and the object conversion subunit is configured to respond to the received user click pause button operation, target object selection operation and click image recognition button operation on the currently displayed GIF dynamic image frame, and convert the target object in the currently displayed GIF dynamic image frame into the image to be recognized by adopting the canvas.
In some optional implementations of this embodiment, the apparatus further comprises: a link receiving unit 560 configured to receive a result page link returned by the backend in response to the identification request; a link presentation unit 570 configured to jump to a presentation results page link.
In some optional implementations of the embodiment, the content of the result page link received by the link receiving unit includes at least one of: vocabulary entry linkage of an object in the image to be recognized; news linking of objects in the image to be identified; similar image links of objects in the image to be recognized.
It should be understood that the various elements recited in the apparatus 500 correspond to the various steps recited in the method described with reference to fig. 2-4. Thus, the operations and features described above for the method are equally applicable to the apparatus 500 and the various units included therein and will not be described again here.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the server or terminal device of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, devices such as notebook computers, desktop computers, and the like. The terminal device/server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a resource link of the GIF dynamic image; acquiring an array comprising all GIF dynamic image frames based on the resource link of the GIF dynamic images; sequentially and circularly displaying the GIF dynamic image frames in the array by adopting canvas; in response to receiving selection operation and identification operation of a user on a currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame; an identification request including an image to be identified is sent to the backend.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a link acquisition unit, an array acquisition unit, a loop presentation unit, an image determination unit, and a request transmission unit. Where the names of these cells do not in some cases constitute a limitation on the cell itself, for example, the link acquisition unit may also be described as a "cell acquiring a resource link of a GIF moving image".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (16)

1. A method for recognizing an image, comprising:
acquiring a resource link of the GIF dynamic image;
acquiring an array comprising all GIF dynamic image frames based on the resource link of the GIF dynamic image;
circularly displaying the GIF dynamic image frames in the array in sequence by adopting canvas;
in response to receiving selection operation and identification operation of a user on a currently displayed GIF dynamic image frame, determining an image to be identified based on the currently displayed GIF dynamic image frame;
and sending an identification request comprising the image to be identified to a back end.
2. The method of claim 1, wherein the GIF motion image based resource linking, acquiring an array comprising all GIF motion image frames comprises:
based on the resource link of the GIF dynamic image, initiating a dynamic image data request to a resource provider of the GIF dynamic image to obtain GIF dynamic image data;
and analyzing the main body information of the GIF dynamic image data to obtain the array comprising the GIF dynamic image frame.
3. The method of claim 2, wherein the sequentially looping through the canvas to show GIF motion image frames in the array comprises:
analyzing the header information of the GIF dynamic image data to obtain the width information and the height information of the GIF dynamic image;
setting the size of a canvas for displaying the GIF dynamic image based on the width information and the height information of the GIF dynamic image;
and circularly displaying the GIF dynamic image frames in the array in sequence by adopting the canvas with the set size.
4. The method of claim 1, wherein the determining an image to be identified based on the currently presented GIF motion image frame in response to receiving a user selection operation and an identification operation of the currently presented GIF motion image frame comprises:
and in response to receiving the operation of clicking a pause button and the operation of clicking a picture recognition button on the currently displayed GIF dynamic image frame by the user, converting the currently displayed GIF dynamic image frame into an image to be recognized by adopting the canvas.
5. The method of claim 1, wherein the determining an image to be identified based on the currently presented GIF motion image frame in response to receiving a user selection operation and an identification operation of the currently presented GIF motion image frame comprises:
and in response to receiving a pause button clicking operation, a target object selecting operation and a picture identifying button clicking operation of a user on the currently displayed GIF dynamic image frame, converting the target object in the currently displayed GIF dynamic image frame into an image to be identified by adopting the canvas.
6. The method of any of claims 1-5, wherein the method further comprises:
receiving a result page link returned by the back end in response to the identification request;
and jumping to the link of the result page.
7. The method of claim 6, wherein the content of the results page link comprises at least one of:
the entry of the object in the image to be recognized is linked;
a news link to an object in the image to be identified;
similar image links of objects in the image to be recognized.
8. An apparatus for recognizing an image, comprising:
a link acquisition unit configured to acquire a resource link of the GIF dynamic image;
an array acquisition unit configured to acquire an array including all the GIF moving image frames based on the resource links of the GIF moving images;
the circulation display unit is configured to display the GIF dynamic image frames in the array in a circulation mode sequentially by adopting a canvas;
an image determining unit configured to determine an image to be recognized based on a currently displayed GIF dynamic image frame in response to receiving a selection operation and a recognition operation of a user on the currently displayed GIF dynamic image frame;
a request transmitting unit configured to transmit an identification request including the image to be identified to a backend.
9. The apparatus of claim 8, wherein the array fetch unit comprises:
a request initiating unit configured to initiate a dynamic image data request to a resource provider of the GIF dynamic image based on the resource link of the GIF dynamic image, so as to obtain GIF dynamic image data;
a data parsing subunit configured to parse the subject information of the GIF dynamic image data to obtain the array including the GIF dynamic image frame.
10. The apparatus of claim 9, wherein the cycle demonstration unit comprises:
the information analysis subunit is configured to analyze the header information of the GIF dynamic image data to obtain width information and height information of the GIF dynamic image;
a canvas setting subunit configured to set a size of a canvas showing the GIF dynamic image based on the width information and the height information of the GIF dynamic image;
and the canvas showing subunit is configured to adopt the canvas with the set size to sequentially and circularly show the GIF dynamic image frames in the array.
11. The apparatus of claim 8, wherein the image determination unit comprises:
and the image conversion subunit is configured to respond to the received operation of clicking a pause button and the operation of clicking a figure recognition button of the currently displayed GIF dynamic image frame by the user, and convert the currently displayed GIF dynamic image frame into an image to be recognized by adopting the canvas.
12. The apparatus of claim 8, wherein the image determination unit comprises:
and the object conversion subunit is configured to respond to the receiving of the operation of clicking a pause button, the operation of selecting a target object and the operation of clicking a figure recognition button of the currently displayed GIF dynamic image frame by a user, and convert the target object in the currently displayed GIF dynamic image frame into the image to be recognized by adopting the canvas.
13. The apparatus of any one of claims 8-12, wherein the apparatus further comprises:
a link receiving unit configured to receive a result page link returned by the backend in response to the identification request;
a link presentation unit configured to jump to present the result page link.
14. The apparatus of claim 13, wherein the content of the result page link received by the link receiving unit comprises at least one of:
the entry of the object in the image to be recognized is linked;
a news link to an object in the image to be identified;
similar image links of objects in the image to be recognized.
15. An electronic device/terminal/server comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
16. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201910715816.5A 2019-08-05 2019-08-05 Method and apparatus for recognizing image Active CN110442806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910715816.5A CN110442806B (en) 2019-08-05 2019-08-05 Method and apparatus for recognizing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910715816.5A CN110442806B (en) 2019-08-05 2019-08-05 Method and apparatus for recognizing image

Publications (2)

Publication Number Publication Date
CN110442806A CN110442806A (en) 2019-11-12
CN110442806B true CN110442806B (en) 2022-04-26

Family

ID=68433192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910715816.5A Active CN110442806B (en) 2019-08-05 2019-08-05 Method and apparatus for recognizing image

Country Status (1)

Country Link
CN (1) CN110442806B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257638A (en) * 2020-10-30 2021-01-22 重庆紫光华山智安科技有限公司 Image comparison method, system, equipment and computer readable storage medium
CN115348463A (en) * 2022-07-11 2022-11-15 西安诺瓦星云科技股份有限公司 Display monitoring method, system, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255923A (en) * 2017-11-06 2018-07-06 优视科技有限公司 Image presentation method, equipment and electronic equipment
CN108255922A (en) * 2017-11-06 2018-07-06 优视科技有限公司 Video frequency identifying method, equipment, client terminal device, electronic equipment and server
CN109034115A (en) * 2018-08-22 2018-12-18 Oppo广东移动通信有限公司 Video image recognizing method, device, terminal and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8516365B2 (en) * 2007-06-15 2013-08-20 Microsoft Corporation Dynamically laying out images and associated text using pre-defined layouts
GB2499449A (en) * 2012-02-20 2013-08-21 Taiwan Colour And Imaging Technology Corp Surveillance by face recognition using colour display of images
JP6340567B2 (en) * 2014-05-30 2018-06-13 株式会社アクセル Movie playback method and movie playback system
CN108431800B (en) * 2015-12-17 2021-12-14 株式会社日立制作所 Image processing device and display method of image retrieval interface
CN106022424B (en) * 2016-05-10 2019-04-26 腾讯科技(深圳)有限公司 Generate the method and device with the two-dimension code image of dynamic effect
CN109918605B (en) * 2019-03-07 2021-09-24 杭州又拍云科技有限公司 A method for generating dynamic pictures based on content distribution network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255923A (en) * 2017-11-06 2018-07-06 优视科技有限公司 Image presentation method, equipment and electronic equipment
CN108255922A (en) * 2017-11-06 2018-07-06 优视科技有限公司 Video frequency identifying method, equipment, client terminal device, electronic equipment and server
CN109034115A (en) * 2018-08-22 2018-12-18 Oppo广东移动通信有限公司 Video image recognizing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN110442806A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
CN107622135B (en) Method and apparatus for displaying information
CN109740018B (en) Method and device for generating video label model
US11016716B2 (en) Picture interface display method and apparatus according to jump protocol
US20200322570A1 (en) Method and apparatus for aligning paragraph and video
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN112306793A (en) Method and apparatus for monitoring web pages
CN104112002A (en) Form adaption method, device and system
US20240311285A1 (en) Testing control method and apparatus for application, and electronic device and storage medium
CN114510305B (en) Model training method and device, storage medium and electronic equipment
KR20210058768A (en) Method and device for labeling objects
CN109816023B (en) Method and device for generating picture label model
US20230239546A1 (en) Theme video generation method and apparatus, electronic device, and readable storage medium
CN113407882A (en) Component generation method and device, computer-readable storage medium and electronic equipment
CN114417782B (en) Display method, device and electronic device
CN110442806B (en) Method and apparatus for recognizing image
CN105809162B (en) Method and device for acquiring WIFI hotspot and picture associated information
CN108667915B (en) Information pushing system, method and device
CN110704294B (en) Method and apparatus for determining response time
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN112309387A (en) Method and apparatus for processing information
CN113704079B (en) Protobuf-based interface testing method and device
CN111400581B (en) System, method and apparatus for labeling samples
US20190172263A1 (en) Method and apparatus for augmenting reality
CN111930761B (en) Information interaction method and device and model-view-renderer architecture
CN109947526A (en) Method and apparatus for outputting information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant