CN110895698B - Electronic red packet identification method, electronic red packet identification device and mobile terminal - Google Patents

Electronic red packet identification method, electronic red packet identification device and mobile terminal Download PDF

Info

Publication number
CN110895698B
CN110895698B CN201811060493.2A CN201811060493A CN110895698B CN 110895698 B CN110895698 B CN 110895698B CN 201811060493 A CN201811060493 A CN 201811060493A CN 110895698 B CN110895698 B CN 110895698B
Authority
CN
China
Prior art keywords
information
picture
color histogram
preset
electronic red
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
CN201811060493.2A
Other languages
Chinese (zh)
Other versions
CN110895698A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811060493.2A priority Critical patent/CN110895698B/en
Publication of CN110895698A publication Critical patent/CN110895698A/en
Application granted granted Critical
Publication of CN110895698B publication Critical patent/CN110895698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Telephone Function (AREA)

Abstract

The application belongs to the technical field of mobile terminals, and provides an electronic red packet identification method, an electronic red packet identification device, a mobile terminal and a computer readable storage medium, which comprise: when a preset application program receives information, converting a view of the information into a picture; acquiring a color histogram of the picture; calculating the similarity between the color histogram of the picture and a first preset color histogram; and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, determining that the information is electronic red packet information. By the method and the device, the problems that in the prior art, after the application program is upgraded, the electronic red packet cannot be identified continuously, and the identification accuracy is low are solved.

Description

Electronic red packet identification method, electronic red packet identification device and mobile terminal
Technical Field
The application belongs to the technical field of mobile terminals, and particularly relates to an electronic red packet identification method, an electronic red packet identification device, a mobile terminal and a computer readable storage medium.
Background
With the wide popularization of mobile terminals such as smart phones and tablet computers, most mobile terminals are provided with a large number of social application programs such as WeChat and QQ, electronic red envelope capturing functions in the application programs are more and more common, and the mobile terminals can enable people to communicate in a social network more interesting and have stronger interactivity. In order to quickly identify the electronic red packet, the prior art identifies the electronic red packet by monitoring the picture decoding process of the application program. However, after the application program is upgraded, the picture decoding process is modified, the first electronic red packet received by the application program is decoded, and the subsequent electronic red packet received is not decoded, so that the electronic red packet cannot be continuously identified, and the identification accuracy is low.
Disclosure of Invention
In view of the above, the present application provides an electronic red envelope identification method, an electronic red envelope identification device, a mobile terminal and a computer-readable storage medium, so as to solve the problems that the electronic red envelope cannot be continuously identified and the identification accuracy is low after an application program is upgraded in the prior art.
A first aspect of the present application provides an electronic red envelope identification method, including:
when a preset application program receives information, converting a view of the information into a picture;
acquiring a color histogram of the picture;
calculating the similarity between the color histogram of the picture and a first preset color histogram;
and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, determining that the information is electronic red packet information.
A second aspect of the present application provides an electronic red envelope identification apparatus, comprising:
the image conversion module is used for converting the view of the information into an image when the preset application program receives the information;
the first acquisition module is used for acquiring a color histogram of the picture;
the first calculation module is used for calculating the similarity between the color histogram of the picture and a first preset color histogram;
and the information determining module is used for determining that the information is the electronic red packet information if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value.
A third aspect of the present application provides a mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the electronic red packet identification method according to the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the electronic red packet identification method according to the first aspect.
A fifth aspect of the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the electronic red packet identification method according to the first aspect as described above.
Therefore, according to the scheme of the application, when the preset application program receives the information, the view of the information can be converted into the picture, the color histogram of the picture is obtained, the similarity between the color histogram of the picture and the first preset color histogram is calculated, and when the similarity between the color histogram of the picture and the first preset color histogram exceeds the first preset threshold value, the information is determined to be the electronic red packet information. According to the scheme, the similarity between the color histogram of the received image after information conversion and the first preset color histogram is compared, whether the received information is the electronic red packet information or not can be effectively identified, the influence of upgrading of the preset application program is avoided, the identification accuracy of the electronic red packet is improved, and the problems that in the prior art, after the application program is upgraded, the electronic red packet cannot be identified continuously, and the identification accuracy is low are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of an electronic red packet identification method according to an embodiment of the present application;
FIG. 2 is an exemplary diagram of a WeChat electronic Red packet;
fig. 3 is a schematic flow chart illustrating an implementation of an electronic red packet identification method according to a second embodiment of the present application;
FIG. 4 is another exemplary diagram of a WeChat electronic Red packet;
fig. 5 is a schematic flow chart illustrating an implementation of an electronic red packet identification method according to a third embodiment of the present application;
fig. 6 is a schematic view of an electronic red packet identification device according to the fourth embodiment of the present application;
fig. 7 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application;
fig. 8 is a schematic diagram of a mobile terminal according to a sixth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the mobile terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The mobile terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a digital video camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, which is a schematic view of an implementation flow of an electronic red packet identification method provided in an embodiment of the present application, where the electronic red packet identification method is applied to a mobile terminal, as shown in the figure, the electronic red packet identification method may include the following steps:
step S101, when a preset application program receives information, converting the view of the information into a picture.
In the embodiment of the present application, the preset application refers to an application of a certain type or having a certain function selected by a user from applications installed in the mobile terminal, for example, an application having a function of generating an electronic packet, such as WeChat, Paibao, and QQ. Optionally, the user may modify the selected application according to actual needs.
In the embodiment of the application, when a preset application program runs in a foreground or runs in a background, whether the preset application program receives information or not is automatically monitored in the background, and when the preset application program is monitored to receive the information, a view of the information is converted into a picture; and when monitoring that the preset application program does not receive information, continuing monitoring. Wherein the view of the information typically consists of a plurality of first views, such as, for example, "get Red envelope", "WeChat Red envelope", "May you like to buy money, great benefit! "and red envelope small figures, etc. are all the first views of the electronic red envelope that constitutes the WeChat. Converting the view of the information into the picture may be to construct a bitmap, generate a canvas using the bitmap, and then draw the content of the view of the information onto the canvas.
Step S102, acquiring a color histogram of the picture.
The color histogram of the picture describes the proportion of different colors in the picture. The color histogram may be based on different color spaces and coordinate systems, such as RGB color space and HSV color space, among others.
When the color histogram of the picture is obtained, the color space can be divided into a plurality of small color intervals, each small interval becomes one bin of the histogram, the process is called color quantization, and the color histogram can be obtained by calculating the number of pixels of which the colors fall in each small interval.
Step S103, calculating the similarity between the color histogram of the picture and a first preset color histogram.
In this embodiment of the application, the similarity between the color histogram of the picture and the first preset color value histogram is used to indicate the degree of closeness between the color histogram of the picture and the first preset color value histogram, and 1-D may be used as the similarity between the color histogram of the picture and the first preset color histogram by calculating the euclidean distance D between the color histogram of the picture and the first preset color histogram.
The first preset color histogram refers to a color histogram of the electronic red packet information preset by a user, and the color histogram of the electronic red packet information may refer to a color histogram of a picture after a view of the electronic red packet information is converted into the picture. Optionally, the user may modify the set first preset color histogram according to actual needs.
It should be noted that the number of the preset application programs may be one or more, and when the number of the preset application programs is multiple, because the electronic red packet patterns corresponding to different preset application programs (for example, WeChat and QQ) may be different, in order to be able to identify the electronic red packet information received by different preset application programs, corresponding first preset color histograms may be set for the different preset application programs, that is, each preset application program has a corresponding first preset color histogram.
In this embodiment of the application, a corresponding relationship between M preset application programs and N first preset color histograms may be pre-established, before the similarity between the color histogram of the picture and the first preset color histogram is calculated, a first preset color histogram corresponding to the preset application program in step S101 may be searched from the corresponding relationship, and after the first preset color histogram corresponding to the preset application program in step S101 is found, the similarity between the color histogram of the picture and the first preset color histogram corresponding to the preset application program (i.e., the preset application program in step S101) is calculated. Wherein N is an integer greater than zero, and M is greater than or equal to N.
And step S104, if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, determining that the information is electronic red packet information.
In this embodiment of the application, after obtaining the similarity between the color histogram of the picture and a first preset color histogram corresponding to the preset application program, the obtained similarity between the color histogram of the picture and the first preset color histogram may be compared with a first preset threshold value to determine whether the color histogram of the picture matches the first preset color histogram, and if the similarity between the color histogram of the picture and the first preset color histogram exceeds the first preset threshold value, it is determined that the color histogram of the picture matches the first preset color histogram, where the information is electronic red packet information; if the similarity between the color histogram of the picture and the first preset color histogram does not exceed a first preset threshold value, it is determined that the color histogram of the picture is not matched with the first preset color histogram, and the information is not electronic red packet information. The first preset threshold is used for indicating whether the color histogram of the picture is matched with the first preset color histogram. The electronic red packet information includes, but is not limited to, money amount, electronic red packet picture, electronic red packet ID, etc., such as an electronic red packet sent by a WeChat friend or an electronic red packet sent by a member in a WeChat group, etc.
In the embodiment of the application, after the information is determined to be the electronic red packet information, if the mobile terminal is in the preset state, the electronic red packet information can be directly displayed on the screen of the mobile terminal and corresponding voice prompt information is sent out, so that a user can conveniently and quickly identify the electronic red packet. The preset state may refer to a state in which a user cannot constantly pay attention to a preset application program in the mobile terminal, and the preset state includes, but is not limited to, a screen-off state, a screen-locking state, a screen-on state, a background running of the preset application program, and the like. The voice prompt information is used for prompting the user that a red packet arrives.
According to the embodiment of the application, the similarity between the color histogram of the received image after information conversion and the first preset color histogram is compared, whether the received information is the electronic red packet information or not can be effectively identified, the influence of upgrading of a preset application program is avoided, the identification accuracy of the electronic red packet is improved, and the problems that in the prior art, after the application program is upgraded, the electronic red packet cannot be identified continuously, and the identification accuracy is low are solved.
Referring to fig. 3, which is a schematic view of an implementation flow of an electronic red packet identification method provided in the second embodiment of the present application, where the electronic red packet identification method is applied to a mobile terminal, as shown in the figure, the electronic red packet identification method may include the following steps:
step S301, when a preset application program receives information, acquiring the height h and the width W of a view of the information and the width W of the view of a first interface, wherein the first interface is an interface for displaying the information.
Illustratively, fig. 4 is an exemplary diagram of the wechat electronic red packet information, where h in fig. 4 is a height of a view of the wechat electronic red packet information, W is a width of the view of the wechat electronic red packet information, and W is a width of a view of an interface displaying the wechat electronic red packet information.
Step S302, calculating the ratio of the height h to the width w of the view of the information
Figure GDA0003600907210000081
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure GDA0003600907210000082
Step S303, if the ratio is not equal to the predetermined value
Figure GDA0003600907210000083
Within a first predetermined range and a ratio
Figure GDA0003600907210000084
And if the information is located in a second preset range, converting the view of the information into a picture.
In the embodiment of the present application, after converting a view of information received by a preset application into a picture, a ratio of a height h to a width w of the view of the information may be determined
Figure GDA0003600907210000085
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure GDA0003600907210000086
And preprocessing the information, and screening out the information which is possibly the electronic red packet information. If the ratio is
Figure GDA0003600907210000087
Within a first predetermined range and a ratio
Figure GDA0003600907210000088
If the information is located in a second preset range, the information is determined to be possible electronic red packet information, and the view of the information can be converted into a picture; if the ratio is
Figure GDA0003600907210000089
Within a first predetermined range and a ratio
Figure GDA00036009072100000810
Not within a second predetermined range, or said ratio
Figure GDA00036009072100000811
Is not within the first predetermined range and has a ratio
Figure GDA00036009072100000812
Within a second predetermined range, or said ratio
Figure GDA00036009072100000813
Is not within the first predetermined range and has a ratio
Figure GDA00036009072100000814
If the information is not located in the second preset range, the information is determined not to be the electronic red packet information, and at this time, the electronic red packet identification process can be ended. The first preset range and the second preset range are used for indicating whether the information received by the preset application program is possible to be electronic red packet information or not.
In this embodiment of the application, the electronic red packet types corresponding to different preset applications may be different, and then the heights and widths of the views of the electronic red packet information corresponding to different preset applications may also be different, because the settings of the first preset range and the second preset range are related to the heights and widths of the views of the electronic red packet information, different first preset ranges and different second preset ranges may be set for different preset applications, the first preset range in step S303 is the first preset range corresponding to the preset application in step S301, and the second preset range is the second preset range corresponding to the preset application in step S301.
Step S304, acquiring a color histogram of the picture.
The step is the same as step S102, and reference may be made to the related description of step S102, which is not repeated herein.
Optionally, the obtaining the color histogram of the picture includes:
and converting the picture from an RGB color space to an HSV color space, and acquiring a histogram of hue H in the HSV color space.
Compared with the RGB color space, the HSV color space can express the brightness, the tone and the vividness of colors very intuitively and is convenient for color comparison, so that when the color histogram of the picture is obtained, the picture can be converted from the RGB color space to the HSV color space, and the histogram of the tone H in the HSV color space is taken as the color histogram of the picture.
Step S305, calculating a similarity between the color histogram of the picture and a first preset color histogram.
The step is the same as step S103, and reference may be made to the related description of step S103, which is not described herein again.
Step S306, if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold, determining that the information is electronic red packet information.
The step is the same as step S104, and reference may be made to the related description of step S104, which is not repeated herein.
According to the embodiment of the application, before electronic red packet identification is carried out according to the similarity between the color histogram of the received image after information conversion and the first preset color histogram, information is screened according to the ratio of the height to the width of the view of the information and the ratio of the width of the view of the information to the width of the view of the first interface, electronic red packet identification is carried out according to the similarity when the information which is possibly the electronic red packet is screened out, and the identification accuracy of the electronic red packet is improved.
Referring to fig. 5, which is a schematic view of an implementation flow of an electronic red packet identification method provided in the third embodiment of the present application, where the electronic red packet identification method is applied to a mobile terminal, as shown in the figure, the electronic red packet identification method may include the following steps:
step S501, when the preset application receives the information, converting the view of the information into a picture.
The step is the same as step S101, and reference may be made to the related description of step S101, which is not repeated herein.
Step S502, acquiring a color histogram of the picture.
The step is the same as step S102, and reference may be made to the related description of step S102, which is not repeated herein.
Step S503, calculating a similarity between the color histogram of the picture and a first preset color histogram.
The step is the same as step S103, and reference may be made to the related description of step S103, which is not described herein again.
Step S504, detecting whether a first picture exists in the pictures.
In this embodiment of the application, whether the first picture exists in the picture may be detected after converting the view of the information received by the preset application into the picture, or whether the first picture exists in the picture may be detected after performing step S503, which is not limited herein. If the first picture exists in the pictures, converting the RGB color space of the first picture into HSV color space, and acquiring a histogram of hue H in the HSV color space; and if the first picture does not exist in the pictures, determining that the information is not the electronic red packet information. The first picture may refer to identification information capable of identifying whether the information is electronic red packet information, including but not limited to an electronic red packet picture in the electronic red packet information, such as the red packet small picture in fig. 2.
In this embodiment of the application, since the position of the first picture in the electronic red packet information is usually fixed, whether the first picture exists in the picture is detected, specifically, whether the first picture exists at a preset position in the picture is detected. Because the electronic red packet information has a specific view layout, whether the first picture exists in the pictures can also be determined by detecting whether a view corresponding to the first picture exists in views of information received by a preset application program.
Step S505, if the first picture exists in the pictures, acquiring a color histogram of the first picture.
Step S506, calculating a similarity between the color histogram of the first picture and a second preset color histogram.
In the embodiment of the present application, the same method as that used for obtaining the color histogram of the picture in the first embodiment may be used for obtaining the color histogram of the first picture, and details thereof are not repeated here. The method for calculating the similarity between the color histogram of the first picture and the first preset color histogram may be used in the calculation of the similarity between the color histogram of the first picture and the second preset color histogram, and details are not repeated herein.
Step S507, if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold, and the similarity between the histogram of the first picture and the second preset color histogram exceeds a second preset threshold, determining that the information is electronic red packet information.
In this embodiment of the application, if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold and the similarity between the histogram of the first picture and the second preset color histogram does not exceed a second preset threshold, or the similarity between the color histogram of the picture and the first preset color histogram does not exceed the first preset threshold and the similarity between the histogram of the first picture and the second preset color histogram exceeds the second preset threshold, or the similarity between the color histogram of the picture and the first preset color histogram does not exceed the first preset threshold and the similarity between the histogram of the first picture and the second preset color histogram does not exceed the second preset threshold, it is determined that the information is not electronic red packet information.
According to the method and the device for recognizing the electronic red packet, whether the received information is the electronic red packet information or not is recognized according to the similarity between the color histogram of the received image after information conversion and the first preset color histogram and the similarity between the color histogram of the first image and the second preset color histogram, and the recognition accuracy of the electronic red packet is further improved.
Fig. 6 is a schematic view of an electronic red packet identification device provided in the fourth embodiment of the present application, and for convenience of description, only the relevant portions of the fourth embodiment of the present application are shown.
The electronic red packet identification device comprises:
the picture conversion module 61 is configured to convert a view of information into a picture when a preset application program receives the information;
a first obtaining module 62, configured to obtain a color histogram of the picture;
a first calculating module 63, configured to calculate a similarity between a color histogram of the picture and a first preset color histogram;
an information determining module 64, configured to determine that the information is electronic red packet information if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold.
Optionally, the picture conversion module 61 includes:
the information processing device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring the height h and the width W of a view of information and the width W of the view of a first interface when a preset application program receives the information, and the first interface is an interface for displaying the information;
a calculation unit for calculating a ratio of a height h to a width w of a view of the information
Figure GDA0003600907210000121
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure GDA0003600907210000122
A conversion unit for determining the ratio
Figure GDA0003600907210000123
Within a first predetermined range and a ratio
Figure GDA0003600907210000124
And if the information is located in a second preset range, converting the view of the information into a picture.
Optionally, the first obtaining module 62 is specifically configured to:
and converting the picture from an RGB color space to an HSV color space, and acquiring a histogram of hue H in the HSV color space.
Optionally, the electronic red packet identification apparatus further includes:
a picture detection module 65, configured to detect whether a first picture exists in the pictures;
a second obtaining module 66, configured to obtain a color histogram of the first picture if the first picture exists in the pictures;
the second calculating module 67 is configured to calculate a similarity between the color histogram of the first picture and a second preset color histogram.
Optionally, the information determining module 64 is specifically configured to:
and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, and the similarity between the histogram of the first picture and the second preset color histogram exceeds a second preset threshold value, determining that the information is electronic red packet information.
Optionally, the electronic red packet identification apparatus further includes:
a performance enhancing module 68 for enhancing the processing performance of the mobile terminal.
Optionally, the electronic red packet identification apparatus further includes:
a resource obtaining module 69, configured to generate a preset instruction for the information, and execute the preset instruction in the preset application program to obtain a resource corresponding to the information.
The electronic red packet identification device provided in the embodiment of the present application can be applied to the first method embodiment, the second method embodiment and the third method embodiment, and for details, reference is made to the description of the first method embodiment, the second method embodiment and the third method embodiment, and details are not described herein again.
Fig. 7 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application. The mobile terminal as shown in the figure may include: one or more processors 701 (only one shown); one or more input devices 702 (only one shown), one or more output devices 703 (only one shown), and memory 704. The processor 701, the input device 702, the output device 703, and the memory 704 are connected by a bus 705. The memory 704 is used for storing instructions and the processor 701 is used for executing the instructions stored by the memory 704. Wherein:
the processor 701 is configured to convert a view of information into a picture when a preset application program receives the information; acquiring a color histogram of the picture; calculating the similarity between the color histogram of the picture and a first preset color histogram; and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, determining that the information is electronic red packet information.
Optionally, the processor 701 is specifically configured to:
when a preset application program receives information, acquiring the height h and the width W of a view of the information and the width W of a view of a first interface, wherein the first interface is an interface for displaying the information;
calculating a ratio of a height h to a width w of a view of the information
Figure GDA0003600907210000141
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure GDA0003600907210000142
If the ratio is
Figure GDA0003600907210000143
Within a first predetermined range and a ratio
Figure GDA0003600907210000144
And if the information is located in a second preset range, converting the view of the information into a picture.
Optionally, the processor 701 is specifically configured to:
and converting the picture from an RGB color space to an HSV color space, and acquiring a histogram of hue H in the HSV color space.
Optionally, the processor 701 is further configured to:
detecting whether a first picture exists in the pictures or not;
if the first picture exists in the pictures, acquiring a color histogram of the first picture;
and calculating the similarity between the color histogram of the first picture and a second preset color histogram.
Optionally, the processor 701 is specifically configured to:
and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, and the similarity between the histogram of the first picture and the second preset color histogram exceeds a second preset threshold value, determining that the information is the electronic red packet information.
Optionally, after determining that the information is electronic red envelope information, the processor 701 is further configured to:
the processing performance of the mobile terminal is improved.
Optionally, the processor 701 is further configured to:
and generating a preset instruction aiming at the information, and executing the preset instruction in the preset application program to acquire the resource corresponding to the information.
It should be understood that, in the embodiment of the present Application, the Processor 701 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 702 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output devices 703 may include a display (LCD, etc.), speakers, a data transmission interface, and so forth.
The memory 704 may include both read-only memory and random-access memory, and provides instructions and data to the processor 701. A portion of the memory 704 may also include non-volatile random access memory. For example, the memory 704 may also store device type information.
In a specific implementation, the processor 701, the input device 702, the output device 703, and the memory 704 described in this embodiment may execute the implementation described in the embodiment of the electronic red packet identification method provided in this embodiment, or may execute the implementation described in the electronic red packet identification apparatus described in the fourth embodiment, which is not described herein again.
Fig. 8 is a schematic diagram of a mobile terminal according to a sixth embodiment of the present application. As shown in fig. 8, the mobile terminal 8 of this embodiment includes: a processor 80, a memory 81 and a computer program 82 stored in said memory 81 and executable on said processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-described embodiments of the electronic red packet identification method, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 61 to 69 shown in fig. 6.
Illustratively, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the mobile terminal 8. For example, the computer program 82 may be divided into a picture conversion module, a first obtaining module, a first calculating module, an information determining module, a picture detecting module, a second obtaining module, a second calculating module, a performance improving module, and a resource obtaining module, where the specific functions of the modules are as follows:
the image conversion module is used for converting the view of the information into an image when the preset application program receives the information;
the first acquisition module is used for acquiring a color histogram of the picture;
the first calculation module is used for calculating the similarity between the color histogram of the picture and a first preset color histogram;
and the information determining module is used for determining that the information is electronic red packet information if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value.
Optionally, the picture conversion module includes:
the information processing device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring the height h and the width W of a view of information and the width W of the view of a first interface when a preset application program receives the information, and the first interface is an interface for displaying the information;
a calculation unit for calculating a ratio of a height h to a width w of a view of the information
Figure GDA0003600907210000161
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure GDA0003600907210000162
A conversion unit for determining the ratio
Figure GDA0003600907210000163
Within a first predetermined range and a ratio
Figure GDA0003600907210000164
And if the information is located in a second preset range, converting the view of the information into a picture.
Optionally, the first obtaining module is specifically configured to:
and converting the picture from an RGB color space to an HSV color space, and acquiring a histogram of hue H in the HSV color space.
The picture detection module is used for detecting whether a first picture exists in the pictures;
the second obtaining module is used for obtaining a color histogram of the first picture if the first picture exists in the pictures;
and the second calculation module is used for calculating the similarity between the color histogram of the first picture and a second preset color histogram.
Optionally, the information determining module is specifically configured to:
and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, and the similarity between the histogram of the first picture and the second preset color histogram exceeds a second preset threshold value, determining that the information is electronic red packet information.
And the improving module is used for improving the processing performance of the mobile terminal.
And the resource acquisition module is used for generating a preset instruction aiming at the information and executing the preset instruction in the preset application program so as to acquire the resource corresponding to the information.
The mobile terminal 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The mobile terminal may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a mobile terminal 8 and does not constitute a limitation of the mobile terminal 8 and may include more or less components than those shown, or some of the components may be combined, or different components, e.g., the mobile terminal may also include input-output devices, network access devices, buses, etc.
The processor 80 may be a central processing unit CPU, but may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the mobile terminal 8, such as a hard disk or a memory of the mobile terminal 8. The memory 81 may also be an external storage device of the mobile terminal 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the mobile terminal 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the mobile terminal 8. The memory 81 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/mobile terminal and method may be implemented in other ways. For example, the above-described apparatus/mobile terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (7)

1. An electronic red envelope identification method, comprising:
when a preset application program receives information, converting a view of the information into a picture;
acquiring a color histogram of the picture;
calculating the similarity between the color histogram of the picture and a first preset color histogram, wherein the first preset color histogram refers to the color histogram of the electronic red packet information;
if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, determining that the information is electronic red packet information;
when the preset application program receives the information, converting the view of the information into the picture comprises:
when a preset application program receives information, acquiring the height h and the width W of a view of the information and the width W of a view of a first interface, wherein the first interface is an interface for displaying the information;
calculating a ratio of a height h to a width w of a view of the information
Figure FDA0003600907200000011
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure FDA0003600907200000012
If the ratio is
Figure FDA0003600907200000013
Within a first predetermined range and a ratio
Figure FDA0003600907200000014
And if the information is located in a second preset range, converting the view of the information into a picture.
2. The electronic red packet identification method of claim 1, wherein said obtaining the color histogram of the picture comprises:
and converting the picture from an RGB color space to an HSV color space, and acquiring a histogram of hue H in the HSV color space.
3. The electronic red envelope identification method of claim 1, further comprising:
detecting whether a first picture exists in the pictures or not;
if the first picture exists in the pictures, acquiring a color histogram of the first picture;
and calculating the similarity between the color histogram of the first picture and a second preset color histogram.
4. The method of claim 3, wherein the determining that the information is electronic red packet information if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold comprises:
and if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold value, and the similarity between the histogram of the first picture and the second preset color histogram exceeds a second preset threshold value, determining that the information is the electronic red packet information.
5. An electronic red envelope identification device, comprising:
the image conversion module is used for converting the view of the information into an image when the preset application program receives the information;
the first acquisition module is used for acquiring a color histogram of the picture;
the first calculation module is used for calculating the similarity between the color histogram of the picture and a first preset color histogram, wherein the first preset color histogram refers to the color histogram of the electronic red packet information;
the information determining module is used for determining that the information is electronic red packet information if the similarity between the color histogram of the picture and the first preset color histogram exceeds a first preset threshold;
the picture conversion module includes:
the information processing device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring the height h and the width W of a view of information and the width W of the view of a first interface when a preset application program receives the information, and the first interface is an interface for displaying the information;
a calculation unit for calculating a ratio of a height h to a width w of a view of the information
Figure FDA0003600907200000021
And the ratio of the width W of the view of the information to the width W of the view of the first interface
Figure FDA0003600907200000022
A conversion unit for determining the ratio
Figure FDA0003600907200000023
Within a first predetermined range and a ratio
Figure FDA0003600907200000024
And if the information is located in a second preset range, converting the view of the information into a picture.
6. A mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the electronic red packet identification method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the electronic red packet identification method according to any one of claims 1 to 4.
CN201811060493.2A 2018-09-12 2018-09-12 Electronic red packet identification method, electronic red packet identification device and mobile terminal Active CN110895698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811060493.2A CN110895698B (en) 2018-09-12 2018-09-12 Electronic red packet identification method, electronic red packet identification device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811060493.2A CN110895698B (en) 2018-09-12 2018-09-12 Electronic red packet identification method, electronic red packet identification device and mobile terminal

Publications (2)

Publication Number Publication Date
CN110895698A CN110895698A (en) 2020-03-20
CN110895698B true CN110895698B (en) 2022-05-24

Family

ID=69785068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811060493.2A Active CN110895698B (en) 2018-09-12 2018-09-12 Electronic red packet identification method, electronic red packet identification device and mobile terminal

Country Status (1)

Country Link
CN (1) CN110895698B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7751620B1 (en) * 2007-01-25 2010-07-06 Bitdefender IPR Management Ltd. Image spam filtering systems and methods
CN104590668A (en) * 2015-01-07 2015-05-06 宁波市米乐玩具礼品有限公司 Red envelope and untying method for red envelope
CN105099877A (en) * 2015-06-26 2015-11-25 小米科技有限责任公司 Instant message processing method and device
CN106326074A (en) * 2016-09-12 2017-01-11 广东欧珀移动通信有限公司 Processor operation parameter adjusting method and mobile terminal
CN108229939A (en) * 2017-12-29 2018-06-29 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment for sending and receiving electronics red packet
CN108388886A (en) * 2018-03-16 2018-08-10 广东欧珀移动通信有限公司 Method, apparatus, terminal and the computer readable storage medium of image scene identification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7751620B1 (en) * 2007-01-25 2010-07-06 Bitdefender IPR Management Ltd. Image spam filtering systems and methods
CN104590668A (en) * 2015-01-07 2015-05-06 宁波市米乐玩具礼品有限公司 Red envelope and untying method for red envelope
CN105099877A (en) * 2015-06-26 2015-11-25 小米科技有限责任公司 Instant message processing method and device
CN106326074A (en) * 2016-09-12 2017-01-11 广东欧珀移动通信有限公司 Processor operation parameter adjusting method and mobile terminal
CN108229939A (en) * 2017-12-29 2018-06-29 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment for sending and receiving electronics red packet
CN108388886A (en) * 2018-03-16 2018-08-10 广东欧珀移动通信有限公司 Method, apparatus, terminal and the computer readable storage medium of image scene identification

Also Published As

Publication number Publication date
CN110895698A (en) 2020-03-20

Similar Documents

Publication Publication Date Title
CN109376645B (en) Face image data optimization method and device and terminal equipment
CN108961267B (en) Picture processing method, picture processing device and terminal equipment
CN110119733B (en) Page identification method and device, terminal equipment and computer readable storage medium
CN109215037B (en) Target image segmentation method and device and terminal equipment
CN108961183B (en) Image processing method, terminal device and computer-readable storage medium
CN108038112B (en) File processing method, mobile terminal and computer readable storage medium
CN109118447B (en) Picture processing method, picture processing device and terminal equipment
CN112149583A (en) Smoke detection method, terminal device and storage medium
CN111142650B (en) Screen brightness adjusting method, screen brightness adjusting device and terminal
CN109358927B (en) Application program display method and device and terminal equipment
CN107679222B (en) Picture processing method, mobile terminal and computer readable storage medium
CN110618852A (en) View processing method, view processing device and terminal equipment
CN109444905B (en) Dynamic object detection method and device based on laser and terminal equipment
CN111382831B (en) Accelerating convolutional nerves network model Forward reasoning method and device
CN110874729B (en) Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN108932704B (en) Picture processing method, picture processing device and terminal equipment
CN108521460B (en) Information pushing method and device, mobile terminal and computer readable storage medium
CN108898169B (en) Picture processing method, picture processing device and terminal equipment
CN110895698B (en) Electronic red packet identification method, electronic red packet identification device and mobile terminal
CN110705653A (en) Image classification method, image classification device and terminal equipment
CN110688035B (en) Photo album processing method, photo album processing device and mobile terminal
CN110875873B (en) Information monitoring method, information monitoring device and mobile terminal
CN110874730B (en) Information processing method, information processing device and mobile terminal
CN108595569B (en) File path copying method, file path copying device and mobile terminal
CN108021648B (en) Question searching method and device and intelligent terminal

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