Image recognition method and device
By identifying the text in the picture and using the convolutional neural network recognition model, the problem of low picture review efficiency and poor accuracy is solved, fast and accurate target behavior recognition and unified discrimination standards are achieved, and the review efficiency and accuracy are improved. .
Patent Information
- Application Number
- CN202010108125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-02-21
AI Technical Summary
The existing technology has low picture review efficiency and poor accuracy, and cannot process pictures of a large number of items in real time, resulting in poor merchant experience.
By receiving pictures, identifying the text in the image, performing character category extraction and correlation analysis, preprocessing the text, using the text semantic extraction model to obtain the vector representation, and inputting it into the trained convolutional neural network recognition model to determine whether there is a target. behavioral information.
It achieves rapid and accurate identification of whether items in the e-commerce field have target behaviors, reduces labor costs, and has unified discrimination standards, covering all objects that need to be reviewed.
Smart Images

Figure CN111767918B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for image recognition. Background Art
[0002] There are a large number of items for sale on e-commerce platforms, and user reviews of items are crucial to consumers' purchasing behavior. However, in order to increase the rate of positive reviews of items, relevant information about positive reviews and cashback will be printed on the main picture of the item or the details page, such as: positive reviews and cashback, etc. This behavior seriously misleads consumers and leads to a poor shopping experience.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] Since the number of items that change every day is very large, and the number of pictures of each item can be more than a dozen or even dozens. Manual review cannot cover all items to be reviewed, and the standards are not unified. Reviewing using rules does not take into account contextual information. For example, if a merchant insists on normal operation and does not offer cash back for positive reviews, it will express this meaning on the item details page: "We do not have cash back for positive reviews" or "We refuse cash back for positive reviews." Using rules will lead to misjudgment. Using rules plus manual review, first use rules to build a set of items to be reviewed, and then manually review them. This method cannot achieve real-time processing and is very bad for the merchant experience. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for image recognition, which can solve the problems of low efficiency and poor accuracy of existing image review.
[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, there is provided an image recognition method, including receiving an image and recognizing text in the image; extracting the text into categories according to preset character categories to calculate a correlation analysis report of the corresponding character category; preprocessing the text according to the correlation analysis report of each character category; intercepting the preprocessed text based on a preset target vocabulary; processing the intercepted text through a text semantic extraction model to obtain a vector representation of the text; and inputting the vector representation of the text into a preset recognition model to determine whether there is target behavior information.
[0007] Optionally, a correlation analysis report of the corresponding character category is calculated, including:
[0008] All characters of the corresponding character category in the text are extracted, and all the characters are mapped into a preset number of dimensional vectors based on the Pearson coefficient, thereby obtaining a corresponding analysis report.
[0009] Optionally, preprocessing of the text is performed based on the correlation analysis report of each character category, including:
[0010] In the character category correlation analysis report, determine whether there is a value greater than a preset threshold; if so, determine that the character category is related to the target behavior information, and retain all characters belonging to the character category in the object text; if not, determine that the character category is not related to the target behavior information, and discard all characters belonging to the character category in the object text.
[0011] Optionally, based on a preset target word library, the preprocessed text is intercepted, including:
[0012] Based on the preset target vocabulary, locate the target characters in the preprocessed text;
[0013] intercepting a first text of a first preset length before the target character, and intercepting a second text of a second preset length after the target character;
[0014] A truncated text is obtained according to the first text, the target character and the second text.
[0015] Optionally, the recognition model is a trained convolutional neural network; wherein, the optimizer used when training the convolutional neural network is adaptive moment estimation, and the loss function is cross entropy loss.
[0016] Optionally, the vector representation of the text is input into a preset recognition model, including:
[0017] The vector representation of the text is fed into the recognition model using GPU acceleration.
[0018] Optionally, before inputting the vector representation of the text into a preset recognition model, the process further includes:
[0019] The trained recognition model is deployed online using multiple concurrent deployment methods.
[0020] In addition, the present invention also provides an image recognition device, including a receiving module, which is used to receive an image and recognize the text in the image; a processing module, which is used to extract the text into categories according to preset character categories to calculate the correlation analysis report of the corresponding character category; preprocess the text according to the correlation analysis report of each character category; based on a preset target vocabulary, the preprocessed text is intercepted; through a text semantic extraction model, the intercepted text is processed to obtain a vector representation of the text; and a recognition module, which is used to input the vector representation of the text into a preset recognition model to determine whether there is target behavior information.
[0021] An embodiment of the above invention has the following advantages or beneficial effects: because it adopts the method of receiving pictures and identifying the text in the pictures; according to the preset character categories, the text is respectively extracted by categories to calculate the correlation analysis report of the corresponding character category; the text is preprocessed according to the correlation analysis report of each character category; based on the preset target vocabulary, the preprocessed text is intercepted; through the text semantic extraction model, the intercepted text is processed to obtain the vector representation of the text; the vector representation of the text is input into the preset recognition model to determine whether there is the target behavior information. Therefore, the technical problems of low efficiency and poor accuracy of existing image review are overcome, and the technical effect of covering all objects that need to be reviewed and unifying the judgment standards is achieved.
[0022] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0024] Figure 1 is a schematic diagram of the main process of the image recognition method according to the first embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of the main process of the image recognition method according to the second embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of the main process of the image recognition method according to the third embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of main modules of a picture recognition device according to an embodiment of the present invention;
[0028] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0029] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] Figure 1 is a schematic diagram of the main process of the image recognition method according to the first embodiment of the present invention. Figure 1 As shown, the picture recognition method includes:
[0032] Step S101, receiving a picture and identifying text in the picture.
[0033] In some embodiments, the received image is subjected to OCR recognition to obtain the object text. OCR (Optical Character Recognition) refers to the process in which an electronic device (such as a scanner or a digital camera) examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then uses a character recognition method to translate the shapes into computer text.
[0034] Step S102, extracting the categories of the text according to the preset character categories to calculate the correlation analysis report of the corresponding character categories; and preprocessing the text according to the correlation analysis report of each character category.
[0035] In some embodiments, all characters of the corresponding character category in the text can be extracted, and all the characters can be mapped into a preset number of dimensional vectors based on the Pearson coefficient, thereby obtaining a corresponding analysis report. Furthermore, in the correlation analysis report of the character category, it is determined whether there is a value greater than a preset threshold. According to the judgment result, if it exists, it is determined that the character category has a relationship with the target behavior information, and all characters belonging to the character category in the text are retained; if it does not exist, it is determined that the character category has no relationship with the target behavior information, and all characters belonging to the character category in the text are discarded.
[0036] It can be seen that the importance of each character in the text (for example, English, numbers, special symbols, etc.) can be analyzed through the preprocessing process, so as to avoid the poor quality and various types of object texts, which do not perform well in the later recognition.
[0037] In a specific embodiment, the character categories can be set as special characters, English characters, and numeric characters. For Chinese characters, only the interception of step S103 is performed without preprocessing. For example, take English characters as an example (regardless of uppercase and lowercase): extract the English characters AbcaBcde in the text, and use the Pearson coefficient to map them into a 26-dimensional vector:
[0038] abcdefghijklmnopqrstu vwxyz 2 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0040] That is, the relationship between each dimension and the final result can be determined separately, and 26 values can be obtained. It is determined whether there is a value greater than 0.5 (preset threshold). If so, it is considered that the English character has a relationship with the final result and all are retained, otherwise they are discarded.
[0041] Step S103: based on the preset target word library, the preprocessed text is intercepted and the intercepted text is processed by the text semantic extraction model to obtain a vector representation of the text.
[0042] In some embodiments, when the preprocessed text is intercepted based on the preset target word library, the following methods can be used:
[0043] Based on the preset target word library, locate the target character in the preprocessed text. Then, intercept the first text of the first preset length before the target character, and intercept the second text of the second preset length after the target character. According to the first text, the target character and the second text, the intercepted text is obtained. Both the first preset length and the second preset length can be tested and debugged many times to obtain a reasonable length value. Too long will make the text redundant and have too much invalid information. Too short will make the text information insufficient.
[0044] Among them, the target vocabulary is a statistical high-frequency sensitive vocabulary, such as: cash back for good reviews, cash back for good reviews, etc.
[0045] For example: the object text is: "Our products are of high quality and low price, some products have cash back activities for favorable comments, welcome to buy", after interception (the first preset length is 6, the second preset length is 2), we get: "Some products have cash back activities for favorable comments".
[0046] It should be noted that the text semantic extraction model can be word2vec (including cbow and skip-gram implementations, and the skip-gram implementation is selected in the preferred embodiment.), fasttext, glove, etc., and when the intercepted text is processed to obtain the vector representation of the text, the word vector representation can be set to 80 dimensions, 128 dimensions or 256 dimensions, etc.
[0047] Step S104: input the vector representation of the text into a preset recognition model to determine whether there is target behavior information.
[0048] In some embodiments, the recognition model is a trained convolutional neural network, the optimizer used in training the convolutional neural network is adaptive moment estimation, and the loss function is cross entropy loss. Among them, the convolutional neural network is a type of feedforward neural network (Feedforward Neural Networks) that includes convolution calculations and has a deep structure, and is one of the representative algorithms of deep learning.
[0049] Preferably, in order to reduce computing time, a GPU is used to accelerate the training of the convolutional neural network.
[0050] In addition, accuracy, precision, recall, etc. can be used as evaluation criteria for the recognition model. Preferably, accuracy is used as the evaluation criterion, the test set is predicted on the obtained recognition model, the predicted result is compared with the actual result, and the accuracy is calculated.
[0051] In addition, in the process of optimizing the recognition model, in order to obtain the best results on the validation set, it is necessary to adjust the parameters of the recognition model. The main targets of parameter adjustment are the number of layers of the convolutional neural network, the activation function, the number of EarlyStop rounds, etc.
[0052] Furthermore, due to the large amount of online traffic, multiple calls will be made in a short period of time. In order to speed up the calculation efficiency, it is preferred to input the vector representation of the text into the recognition model using GPU acceleration (GPU acceleration is to use hardware modules to replace software algorithms to make full use of the inherent fast characteristics of hardware and effectively improve the running speed of the software.) to determine whether there is target behavior information, that is, to determine whether there is any violation through the recognition model. For example: the item details page is printed with the possibility of participating in the cashback activity for positive reviews.
[0053] It is worth noting that before inputting the vector representation of the text into the preset recognition model, the trained recognition model can be deployed online using multiple concurrent deployments.
[0054] In summary, the image recognition method proposed in the present invention can quickly and accurately identify whether there is a target behavior (such as cash back for positive reviews) in the e-commerce field, and can discover the target behavior (such as violations of cash back for positive reviews) with extremely low manpower costs, and has very high scalability.
[0055] Figure 2 is a schematic diagram of the main process of the image recognition method according to the second embodiment of the present invention. The image recognition method may include:
[0056] Step S201, receiving a picture and identifying text in the picture.
[0057] Step S202: extract all characters of the corresponding character category in the text according to the preset character category.
[0058] Step S203, mapping all the characters into a preset number of dimensional vectors based on the Pearson coefficient, and then obtaining a corresponding analysis report.
[0059] Step S204, in the character category correlation analysis report, determine whether there is a value greater than a preset threshold, if so, proceed to step S205, if not, proceed to step S206.
[0060] Step S205, determining whether the character category has a relationship with the target behavior information, retaining all characters in the text that belong to the character category, and proceeding to step S207.
[0061] Step S206, determining that there is no relationship between the character category and the target behavior information, discarding all characters belonging to the character category in the object text, and proceeding to step S207.
[0062] Step S207: locating target characters in the preprocessed text based on a preset target vocabulary.
[0063] Step S208, intercepting a first text of a first preset length before the target character, and intercepting a second text of a second preset length after the target character; obtaining the intercepted text according to the first text, the target character and the second text.
[0064] Step S209: Process the intercepted text using a text semantic extraction model to obtain a vector representation of the text.
[0065] Step S210: input the vector representation of the text into a preset recognition model to determine whether there is target behavior information.
[0066] Figure 3 is a schematic diagram of the main process of the image recognition method according to the third embodiment of the present invention. The image recognition method may include:
[0067] Step S301, receiving a picture and identifying text in the picture.
[0068] Step S302, extracting the categories of the text according to the preset character categories, so as to calculate and obtain a correlation analysis report of the corresponding character categories.
[0069] Step S303: pre-process the text according to the correlation analysis report of each character category.
[0070] Step S304: intercepting the preprocessed text based on a preset target vocabulary.
[0071] Step S305: Process the intercepted text using a text semantic extraction model to obtain a vector representation of the text.
[0072] Step S306: deploy the trained recognition model online using multiple concurrent deployment methods.
[0073] In some embodiments, the recognition model is a trained convolutional neural network, the optimizer used when training the convolutional neural network is adaptive moment estimation, and the loss function is cross entropy loss.
[0074] Step S307: input the vector representation of the text into a recognition model accelerated by GPU to determine whether there is target behavior information.
[0075] It is worth noting that step S306 may be executed after steps S301 to S306, or before steps S301 to S306, or simultaneously with steps S301 to S306.
[0076] Figure 4 is a schematic diagram of the main modules of the image recognition device according to an embodiment of the present invention. Figure 4 As shown, the image recognition device 400 includes a receiving module 401, a processing module 402 and a recognition module 403. The receiving module 401 receives an image and recognizes the text in the image. The processing module 402 extracts the text according to the preset character categories to calculate the correlation analysis report of the corresponding character category; pre-processes the text according to the correlation analysis report of each character category; intercepts the pre-processed text based on the preset target vocabulary; and processes the intercepted text through the text semantic extraction model to obtain the vector representation of the text. The recognition module 403 inputs the vector representation of the text into the preset recognition model to determine whether there is target behavior information.
[0077] In some embodiments, the processing module 402 calculates and obtains a correlation analysis report corresponding to the character category, including:
[0078] All characters of the corresponding character category in the text are extracted, and all the characters are mapped into a preset number of dimensional vectors based on the Pearson coefficient, thereby obtaining a corresponding analysis report.
[0079] In a further embodiment, the processing module 402 performs text preprocessing according to the correlation analysis report of each character category, including:
[0080] In the character category correlation analysis report, determine whether there is a value greater than a preset threshold; if so, determine that the character category is related to the target behavior information, and retain all characters belonging to the character category in the object text; if not, determine that the character category is not related to the target behavior information, and discard all characters belonging to the character category in the object text.
[0081] As some other embodiments, the processing module 402 intercepts the preprocessed text based on a preset target word library, including:
[0082] Based on the preset target vocabulary, locate the target characters in the preprocessed text;
[0083] intercepting a first text of a first preset length before the target character, and intercepting a second text of a second preset length after the target character;
[0084] A truncated text is obtained according to the first text, the target character and the second text.
[0085] In a preferred embodiment, the recognition model is a trained convolutional neural network; wherein the optimizer used when training the convolutional neural network is adaptive moment estimation, and the loss function is cross entropy loss.
[0086] In addition, the recognition module 403 inputs the vector representation of the text into a preset recognition model, including: inputting the vector representation of the text into a recognition model accelerated by a GPU.
[0087] It is also worth noting that before the recognition module 403 inputs the vector representation of the text into the preset recognition model, it includes:
[0088] The trained recognition model is deployed online using multiple concurrent deployment methods.
[0089] It should be noted that the image recognition method and the image recognition device of the present invention have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.
[0090] Figure 5 An exemplary system architecture 500 is shown to which the picture recognition method or picture recognition device according to the embodiment of the present invention can be applied.
[0091] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0092] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0093] The terminal devices 501, 502, 503 may be various electronic devices having an image recognition screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0094] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0095] It should be noted that the image recognition method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the computing device is generally disposed in the server 505 .
[0096] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0097] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0099] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal picture recognizer (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0100] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0101] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, it may be described as follows: a processor includes a receiving module, a processing module, and an identification module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0104] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes receiving a picture and identifying the text in the picture; extracting the text according to the preset character category to calculate the correlation analysis report of the corresponding character category; preprocessing the text according to the correlation analysis report of each character category; intercepting the preprocessed text based on the preset target vocabulary; processing the intercepted text through the text semantic extraction model to obtain the vector representation of the text; inputting the vector representation of the text into the preset recognition model to determine whether there is target behavior information.
[0105] The technical solution according to the embodiment of the present invention can solve the problems of low efficiency and poor accuracy of existing image review.
[0106] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for image recognition, characterized in that: include: Receive pictures and recognize text in the pictures; According to the preset character categories, the text is respectively extracted into categories to calculate the correlation analysis report of the corresponding character categories; Preprocessing the text according to the correlation analysis report of each character category includes: judging whether there is a value greater than a preset threshold in the correlation analysis report of the character category; if so, determining that the character category has a relationship with the target behavior information, and retaining all characters belonging to the character category in the object text; if not, determining that the character category has no relationship with the target behavior information, and discarding all characters belonging to the character category in the object text; Based on a preset target word library, the preprocessed text is intercepted, including: based on the preset target word library, locating a target character in the preprocessed text; intercepting a first text of a first preset length before the target character, and intercepting a second text of a second preset length after the target character; obtaining the intercepted text according to the first text, the target character, and the second text; Through the text semantic extraction model, the intercepted text is processed to obtain the vector representation of the text; The vector representation of the text is input into the preset recognition model to determine whether the target behavior information exists.
2. The method according to claim 1, characterized in that The correlation analysis report of the corresponding character category is calculated, including: All characters of the corresponding character category in the text are extracted, and all the characters are mapped into a preset number of dimensional vectors based on the Pearson coefficient, thereby obtaining a corresponding analysis report.
3. The method according to claim 1, characterized in that: The recognition model is a trained convolutional neural network; wherein the optimizer used when training the convolutional neural network is adaptive moment estimation, and the loss function is cross entropy loss.
4. The method according to claim 1, characterized in that: Input the vector representation of the text into the preset recognition model, including: The vector representation of the text is fed into the recognition model using GPU acceleration.
5. The method according to any one of claims 1 to 4, characterized in that: Before the vector representation of the text is input into the preset recognition model, it also includes: The trained recognition model is deployed online using multiple concurrent deployment methods.
6. A picture recognition device, characterized in that: include: A receiving module, used for receiving pictures and recognizing text in the pictures; A processing module is used to extract the text into categories according to the preset character categories, so as to calculate the correlation analysis report of the corresponding character categories; Preprocessing the text according to the correlation analysis report of each character category includes: judging whether there is a value greater than a preset threshold in the correlation analysis report of the character category; if so, determining that the character category has a relationship with the target behavior information, and retaining all characters belonging to the character category in the object text; if not, determining that the character category has no relationship with the target behavior information, and discarding all characters belonging to the character category in the object text; Based on a preset target word library, the preprocessed text is intercepted, including: based on the preset target word library, locating a target character in the preprocessed text; intercepting a first text of a first preset length before the target character, and intercepting a second text of a second preset length after the target character; obtaining the intercepted text according to the first text, the target character, and the second text; Through the text semantic extraction model, the intercepted text is processed to obtain the vector representation of the text; The recognition module is used to input the vector representation of the text into a preset recognition model to determine whether there is target behavior information.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
