Information identification method and device, server, electronic equipment and readable storage medium
By text recognition of the target image and constructing feature text, matching with the reference object, the problem of low accuracy in image text object recognition is solved, and efficient object recognition and simplified update process is achieved.
Patent Information
- Application Number
- CN202410952020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art has low accuracy when determining the text corresponding objects in an image, and requires long-term machine learning model construction, training and deployment through image classification or matching algorithms, which consumes manpower and resources.
By text recognition of the target image, multiple feature texts are constructed, and matching the identity information of the reference object, the target object corresponding to the initial text is determined, the accuracy is improved, and the update process is simplified.
Improve the accuracy of image text object recognition, reduce the time and resources required for updates, and reduce the need for manpower and time.
Smart Images

Figure CN119206759A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text recognition, and more specifically, to an information recognition method, device, server, electronic device and readable storage medium. Background Art
[0002] At present, with the development of electronic information technology, electronic devices can recognize images and then determine objects that match the text. However, the accuracy of determining objects corresponding to text in images is currently low. Summary of the invention
[0003] The present application proposes an information identification method, device, server, electronic device and readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides an information recognition method, which is applied to an electronic device, and the method includes: performing text recognition on a target image to obtain a recognition result of identity information of at least one object in the target image as an initial text; constructing a plurality of different feature texts based on at least one character in the initial text based on a preset construction rule; determining a reference object matching the feature text as an object to be confirmed based on a matching result between the feature text and the identity information of each reference object, wherein the feature text matching each object to be confirmed is recorded as a target text; obtaining a matching value corresponding to each object to be confirmed based on the target text corresponding to each object to be confirmed; and determining a target object corresponding to the initial text based on the matching value of each object to be confirmed.
[0005] In the second aspect, the embodiment of the present application also provides an information recognition device, which is applied to an electronic device, and the device includes: a text acquisition unit, a feature text construction unit, a matching unit, a matching value determination unit, and a role determination unit. Among them, the text acquisition unit is used to perform text recognition on the target image, and obtain the recognition result of the identity information of at least one object in the target image as the initial text; the feature text construction unit is used to construct a plurality of different feature texts according to at least one character in the initial text based on a preset construction rule; the matching unit is used to determine the reference object matching the feature text as the object to be confirmed based on the matching result of the feature text and the identity information of each reference object, wherein the feature text matching each of the objects to be confirmed is recorded as the target text; the matching value determination unit is used to obtain the matching value corresponding to each object to be confirmed based on the target text corresponding to each object to be confirmed; the role determination unit is used to determine the target object corresponding to the initial text based on the matching value of each object to be confirmed.
[0006] In a third aspect, an embodiment of the present application further provides a server, which is used to build a feature text library, wherein the feature text library includes multiple reference objects and identity information of each reference object; the server is used to send the feature text library to an electronic device so that the electronic device determines the target object corresponding to the initial text based on the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method described in the first aspect.
[0008] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method described in the first aspect above.
[0009] The information recognition method, device, server, electronic device and readable storage medium provided by the embodiment of the present application first perform text recognition on the target image to obtain the recognition result of the identity information of at least one object in the target image as the initial text; then, based on the preset construction rule, a plurality of different feature texts are constructed according to at least one character in the initial text; based on the matching result of the feature text and the identity information of each reference object, a reference object matching the feature text is determined as the object to be confirmed, wherein the feature text matching each object to be confirmed is recorded as the target text; then, based on the target text corresponding to each object to be confirmed, a matching value corresponding to each object to be confirmed is obtained; finally, based on the matching value of each object to be confirmed, the target object corresponding to the initial text is determined. If only the text recognized from the target image is directly matched to the reference object to determine the target object corresponding to the text, the accuracy is low. In the present application, the matching is not directly the initial text obtained by recognition, but is constructed into a plurality of different feature texts based on the recognized initial text, so as to improve the accuracy of determining the target object corresponding to the initial text.
[0010] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 An application scenario diagram of the information identification method provided in an embodiment of the present application is shown;
[0013] Figure 2 A method flow chart of the information identification method provided by an embodiment of the present application is shown;
[0014] Figure 3 A schematic diagram of a target image provided by an embodiment of the present application is shown;
[0015] Figure 4 A method flow chart of an information identification method provided by another embodiment of the present application is shown;
[0016] Figure 5 A method flow chart of an information identification method provided by another embodiment of the present application is shown;
[0017] Figure 6 A schematic diagram of a server provided in an embodiment of the present application is shown;
[0018] Figure 7 A structural block diagram of an information identification device provided in an embodiment of the present application is shown;
[0019] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0020] Fig. 9 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0022] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0023] At present, with the development of electronic information technology, electronic devices can recognize images and then determine the objects that match the text. However, the accuracy of determining the objects corresponding to the text in the image is currently low. How to improve the accuracy of determining the objects corresponding to the text in the image is a problem that needs to be solved urgently.
[0024] Currently, the identity of objects displayed in some images can be identified through text recognition algorithms, thereby determining the object corresponding to the image. Objects can also be matched through image classification algorithms or image matching algorithms to determine the object in the image.
[0025] However, the inventors found in their research that the above method of directly identifying and determining the corresponding object in the image through the text recognition algorithm is not very accurate. In addition, matching objects through image classification algorithms or image matching algorithms generally requires the data construction, training, verification, and deployment of machine learning models in the early stages, which requires a long period of time and requires a lot of manpower, time, and resources.
[0026] Therefore, in order to solve or partially solve the above problems, the present application provides an information identification method, device, server, electronic device and readable storage medium.
[0027] See also Figure 1 , Figure 1 An application scenario diagram of the information identification method provided in an embodiment of the present application is shown, namely, an information identification method 100, which may include an electronic device 110, a server 120, and a user 130, wherein the electronic device 110 is connected to the server 120, and the user 130 holds the electronic device 110 and runs a specific application through the electronic device 110.
[0028] The electronic device 110 can access the Internet to establish a communication connection with the server 120 that is also connected to the Internet. The electronic device 110 can access the Internet wirelessly, such as through wireless communication technologies such as Wi-Fi and Bluetooth; the electronic device 110 can also access the Internet through a wired method, such as through an Rj45 network cable or optical fiber.
[0029] The user can control the electronic device 110 so that the electronic device executes the information recognition method. For example, the user can directly operate the electronic device 110, run a specific application through the electronic device 110, and control the electronic device to execute the information recognition method; the electronic device 110 can also be configured in advance so that the electronic device 110 automatically executes the information recognition method if it detects that the user is running a specific application. For example, an information recognition application can be run on the electronic device, and the information recognition application is the application used to determine the object corresponding to the initial text later. Then the user runs the specific application through the electronic device, so that the information recognition application can automatically identify the specific application and determine the target object corresponding to the initial text through the information recognition method. Among them, the specific application can be a game application, and the detailed introduction of the information recognition method can refer to the subsequent implementation method.
[0030] The server 120 may be a cloud server or a local server.
[0031] See also Figure 2 , Figure 2 A method flow chart of an information identification method provided by an embodiment of the present application is shown. The information identification method can be applied to Figure 1 The electronic device in the information identification method shown can specifically use a processor of the electronic device as an execution subject for executing the information identification method. The information identification method can include steps S110 to S150.
[0032] Step S110: performing text recognition on the target image to obtain a recognition result of identity information of at least one object in the target image as the initial text.
[0033] The target image is an object that the user needs to perform information recognition on through the electronic device, that is, the user can perform information recognition on the target image through the electronic device, thereby determining the target object corresponding to the initial text in the target image.
[0034] Exemplarily, the target image may be an image of a certain game scene in a game application, so that the object in this scene is a game character, and the target image may include the game character and text corresponding to the identity information of each game character. In another exemplary embodiment, the target image may also be a promotional image of a sports game, such as a basketball game, a football game, a badminton game, etc., so that in this scene, the object is a participating athlete, and the target image may include text corresponding to the participating athlete and the identity information of each participating athlete. In another exemplary embodiment, the target image may also be a poster image of a film or television work, such as a movie or a TV series, so that in this scene, the object is an actor, and the target image may include text corresponding to the actor and the identity information of each actor.
[0035] Thus, the target image can be subjected to text recognition by the electronic device to obtain a recognition result of identity information of at least one object in the target image as the initial text, wherein the recognition result can be a text composed of characters.
[0036] Among them, the target image can be obtained by the electronic device taking a screenshot of a specific application running on the electronic device; it can also be obtained by an image acquisition device of the electronic device, for example, the image acquisition device can be a camera; it can also be received from another electronic device, and the embodiments of the present application do not make specific limitations.
[0037] Step S120: constructing a plurality of different feature texts based on a preset construction rule and according to at least one character in the initial text.
[0038] It is understandable that if the corresponding object is directly determined by the acquired initial text, the accuracy is low. Therefore, after acquiring the initial text, multiple feature texts can be constructed based on the initial text. In the embodiment provided in the present application, at least one character in the initial text can be constructed into multiple different feature texts based on preset construction rules. It is understandable that the feature text can include at least some of the characters in the initial text.
[0039] Exemplarily, the initial text can be constructed by a preset rule to obtain a first feature set, which can include each character in the initial text and a phrase consisting of a first specified number of adjacent characters. That is, for an initial text, multiple different feature texts corresponding to the initial text can be obtained, so that the target object corresponding to the initial text can be determined by the feature text later, which can improve the accuracy of determining the target object to a certain extent. For a detailed introduction to constructing feature texts, please refer to the subsequent embodiments.
[0040] Step S130: Based on the matching result between the feature text and the identity information of each reference object, a reference object matching the feature text is determined as an object to be confirmed, wherein the feature text matching each object to be confirmed is recorded as a target text.
[0041] After the feature text is obtained, it can be matched with the reference object based on the matching result of the feature text and the identity information of each reference object. Thus, the reference object matching the feature text can be determined as the object to be confirmed, and the feature text matching each object to be confirmed is recorded as the target text.
[0042] For some implementations, when the target image is an image of a certain game scene in a game application, the reference object may be all game characters in the game application.
[0043] It is understandable that the game application running on the electronic device can generally have different game modes, and in different game modes, the game characters that the player can control are not exactly the same. For example, in some game modes, the game characters that the player can control are all the game characters in the game, while in other game modes, the game characters that the player can control are only some of the game characters in the game application. Therefore, for some embodiments, the reference object can also be the game mode in which the current game scene of the game application running on the electronic device is located, and all the game characters that the player can control corresponding to the game mode.
[0044] A feature text library may be pre-built, and the feature text library may include each reference object and the identity information of each reference object. Thus, the electronic device may directly obtain each reference object and the identity information of each reference object through the feature text library. The feature text library may be built by a server.
[0045] For some implementations, each reference object may also correspond to a reference text, so that the matching result of the feature text and the identity information of each reference object can be determined based on whether the feature text matches the reference text corresponding to each reference object. Among them, the reference text is constructed based on the identity information of the reference object corresponding to the reference text. For example, if a feature text matches a certain reference text, it can be determined that the feature text matches the reference object corresponding to the reference text, so that the matched reference object can be used as the object to be confirmed, and the feature text matched by the object to be confirmed is the target text. For a detailed introduction, please refer to the subsequent embodiments.
[0046] Step S140: based on the target text corresponding to each of the objects to be confirmed, obtaining a matching value corresponding to each of the objects to be confirmed.
[0047] In some embodiments, the matching value corresponding to each object to be confirmed can be used to represent the degree of matching between the object to be confirmed and the initial text, and the higher the matching value, the higher the degree of matching between the object to be confirmed and the initial text. In other words, the matching value of the object to be confirmed is the matching value corresponding to the character to be matched and the initial text.
[0048] It is understandable that the target text corresponding to the object to be confirmed may be one or more, and different target texts may also correspond to scores. Therefore, in some embodiments, the matching value corresponding to each object to be confirmed can be obtained by the score corresponding to each target text corresponding to each object to be confirmed. The score can be obtained by presetting the reference text in each reference object, and a detailed description can be referred to in the subsequent embodiments.
[0049] Step S150: Determine the target object corresponding to the initial text based on the matching value of each of the objects to be confirmed.
[0050] Thus, the target object corresponding to the initial text can be determined based on the matching value of each of the objects to be confirmed. For some implementations, the object to be confirmed corresponding to the highest matching value among the matching values of the objects to be confirmed can be used as the target object corresponding to the initial text.
[0051] For example, if the object to be confirmed includes object A and object B, and the matching value between object A and the initial text is 1, and the matching value between object B and the initial text is 2, object B can be used as the target object corresponding to the initial text.
[0052] The information recognition method provided by the embodiment of the present application first performs text recognition on the target image to obtain the recognition result of the identity information of at least one object in the target image as the initial text; then, based on the preset construction rules, a plurality of different feature texts are constructed according to at least one character in the initial text; based on the matching result of the feature text and the identity information of each reference object, a reference object matching the feature text is determined as the object to be confirmed, wherein the feature text matching each object to be confirmed is recorded as the target text; then, based on the target text corresponding to each object to be confirmed, a matching value corresponding to each object to be confirmed is obtained; finally, based on the matching value of each object to be confirmed, the target object corresponding to the initial text is determined. If only the text recognized from the target image is directly matched to the reference object to determine the target object corresponding to the text, the accuracy is low. In the present application, the matching is not directly performed on the initial text obtained by recognition, but is constructed into a plurality of different feature texts based on the recognized initial text, thereby improving the accuracy of determining the target object corresponding to the initial text.
[0053] See also Figure 4 , Figure 4 A method flow chart of an information identification method provided by an embodiment of the present application is shown. The information identification method can be applied to Figure 1 The electronic device in the information identification method shown can specifically use the processor of the electronic device as the execution subject of the information identification method. The information identification method can include steps S210 to S280.
[0054] Step S210: Using the image of the current game scene of the game application running on the electronic device as the target image.
[0055] Step S220: Perform text recognition on the target image to obtain an identification result of at least one game character in the target image as the initial text.
[0056] For some embodiments, a user may run a game application through an electronic device, and the game application may include different types, such as a multiplayer online battle arena (MOBA) type, a first-person shooter (FPS) or a third-person shooter (TPS), etc. It is understandable that the identity information of the game character controlled by the player may be obtained, and then data analysis may be performed subsequently based on the identity information of each game character, such as the data analysis may be a prediction of the game situation, a suggestion on the game play, etc.
[0057] A detailed introduction is given by taking an online tactical competitive game as an example of a game application running on an electronic device. In an online tactical competitive game, there are multiple game characters for players to choose to control. Each player generally needs to reselect the game character they want to control at the beginning of a new game. Then the game application generally enters the loading and reading scene. The image displayed in the loading and reading scene generally includes information about the game character selected by each player in the game. The information may include images corresponding to the game characters selected by each player and identity information corresponding to the game character. Thus, for some implementations, the loading and reading scene of the game application can be used as the current game scene. The game application generally displays a loading image in the loading and reading scene, so that the image of the current game scene of the game application running on the electronic device can be the loading image in the loading and reading scene of the game application running on the electronic device, and the loading image can also be used as the target image.
[0058] Among them, in the loaded image, the images corresponding to the game characters selected by each player of the game will generally be displayed, and based on the image corresponding to each game character, the identity information of the game character will be displayed in a designated area. That is, the object in the target image can be a game character. Among them, the identity information can be in the form of text, and the exemplary identity information can include the title, title, nickname and name of the game character. The designated area of the image corresponding to the game character can be a position area adjacent to the bottom of the image, or a position area adjacent to the top of the image; it can also be a position area superimposed on the image and close to the bottom of the image, which is not specifically limited in the embodiments of the present application.
[0059] For example, see Figure 3 , Figure 3 300 is an image of the current game scene of the game application running on the electronic device. Specifically, the target image 300 includes images 301 corresponding to multiple game characters, and also includes identity information 302 corresponding to each game character. The identity information 302 is displayed in a designated area 303. Figure 3 The designated area 303 shown in FIG. 1 is superimposed on the position area below the image corresponding to the designated area 303. It should be noted that Figure 3 The designated area 303 shown in the dashed box is only for marking the designated area, and the dashed box is generally not displayed in actual applications. Figure 3 The identity information 302 shown in the figure is only an example. In actual application, the identity information may also include the name, title, nickname, etc. of the game character.
[0060] It should be noted that the electronic device can monitor the game application through the interface provided by the game application, so as to obtain the target image of the current game scene of the game application running on the electronic device.
[0061] Furthermore, in order to subsequently determine the target object, text recognition may be performed on the target image, thereby obtaining an identity information recognition result of at least one game character in the target image as the initial text.
[0062] For some implementations, text recognition may be performed on the target image to obtain characters corresponding to each game character, and then the characters corresponding to each game character are used as initial text corresponding to the game character.
[0063] For some other implementations, text recognition may be performed on the target image to obtain characters corresponding to each game character, and then the characters may be selected, for example, the last specified number of characters obtained may be used as the initial text corresponding to the game character. For a detailed introduction, please refer to the subsequent embodiments.
[0064] Step S230: constructing a plurality of different feature texts based on a preset construction rule and according to at least one character in the initial text.
[0065] Among them, step S230 has been introduced in detail in the above embodiment and will not be repeated here.
[0066] Step S240: Acquire a corresponding relationship, wherein the corresponding relationship includes each reference character and a plurality of reference texts corresponding thereto, wherein the reference text includes text constructed by each character of the identity information of the reference character based on the preset construction rule.
[0067] Step S250: Based on the corresponding relationship, the feature text is matched with a plurality of reference texts corresponding to each of the reference roles, and a reference role matching the feature text is found as an object to be confirmed.
[0068] It can be understood that, when the image of the current game scene of the game application running on the electronic device is used as the target image, the reference object includes a reference character, which can be all the game characters in the game application or all the game characters that the user can use in the game application.
[0069] In some implementations, in order to find a reference role that matches the feature text, the reference text corresponding to the reference role may be first obtained, and then the feature text and the reference text corresponding to each reference role are matched to find a reference role that matches the feature text.
[0070] Among them, a corresponding relationship can be obtained first, and the corresponding relationship can include each reference character and its corresponding multiple reference texts. Similar to the feature text, the reference text is a text constructed by each character of the identity information of the reference character based on a preset construction rule. Exemplarily, each character of the identity information of the reference character can be constructed according to the preset rules to obtain a second feature set, and the second feature set can include each character in the identity information of the reference character and a phrase composed of a first specified number of adjacent characters, that is, for a reference character, multiple different reference texts corresponding to the reference character can be obtained.
[0071] Among them, the corresponding relationship can be stored in a feature text library, and the feature text library can be a library file constructed corresponding to various target images. For example, in the case where the target image is an image of the current game scene of a game application running on an electronic device, the feature library file can be a library file constructed for the application. In some embodiments, the feature text library can be stored in a server, and the server can establish a communication link with the electronic device, so that the electronic device can obtain the feature text library corresponding to the running game application from the server, and then obtain the corresponding relationship in the feature text library. In other embodiments, the electronic device can also obtain the feature text library stored in the server, and store the feature text library locally in the electronic device, so that when the information recognition method is subsequently executed, the corresponding relationship can be directly obtained from the local feature text library.
[0072] The feature text is matched with multiple reference texts corresponding to each reference role, and if there is a feature text that matches a reference text corresponding to a reference role, the reference role corresponding to the matched reference text can be used as the object to be confirmed. Matching can be understood as being the same.
[0073] Exemplarily, if there are reference role A and reference role B, where reference role A corresponds to reference text A1 and reference text A2, and reference role B corresponds to reference text B1 and reference text B2; the initial text is constructed to obtain feature text A1 and feature text A2, so that reference text A1 matches feature text A1, and reference text A2 matches feature text A2, and then it can be determined that the object to be confirmed is reference role A, and feature text A1 and feature text A2 are recorded as target texts.
[0074] Step S260: Based on the corresponding relationship, determine the score corresponding to each target text corresponding to each of the objects to be confirmed.
[0075] Step S270: based on the score of the target text corresponding to each of the objects to be confirmed, obtain the matching value corresponding to each of the objects to be confirmed.
[0076] Furthermore, since each reference character may correspond to multiple reference texts, the matching degree between different reference texts and the reference character may be different. For example, if the identity information of the reference character is "Shangguan Wuliu", and the reference texts corresponding to the reference character include the reference text "Shang", the reference text "Shangguan" and the reference text "Shangguan Wuliu", it can be seen that the matching degree between the reference text "Shangguan Wuliu" and the reference character is higher than the matching degree between the reference text "Shang" and the reference character, and also higher than the matching degree between the reference text "Shangguan" and the reference character.
[0077] Therefore, in order to further improve the accuracy of the subsequent determination of the game character corresponding to the initial text, for some embodiments, the score corresponding to each target text corresponding to each of the objects to be confirmed can also be determined, wherein the target text is a feature text that matches each of the objects to be confirmed. The correspondence relationship can also include the score of each reference text in each reference character. That is, after confirming the target text, the score corresponding to each target text can also be obtained based on the correspondence relationship.
[0078] For some embodiments, the score of the reference text may be a ratio of a first numerical value to a second numerical value, wherein the first numerical value is the number of characters of the reference text, and the second numerical value is the number of characters of the identity information of the reference character. Exemplarily, the identity information of the reference character is "Shangguan Wuliu", and the reference text corresponding to the reference character includes the reference text "Shang", the reference text "Shangguan" and the reference text "Shangguan Wuliu" as an example for explanation. Among them, the number of characters of the identity information of the reference character is 4, that is, the second numerical value is 4, and the number of characters of the reference text "Shang" is 1, the number of characters of the reference text "Shangguan" is 2, and the number of characters of the reference text "Shangguan Wuliu" is 4, that is, the first numerical value of the reference text "Shang" is 1, the first numerical value of the reference text "Shangguan" is 2, and the first numerical value of the reference text "Shangguan Wuliu" is 4. Therefore, it can be seen that the score of the reference text "Shang" is 1 / 4=0.25, the score of the reference text "Shangguan" is 2 / 4=0.5, and the score of the reference text "Shangguan Wuliu" is 4 / 4=1.
[0079] For other embodiments, the score of each reference text in each reference character can also be a value after adjusting the specified value by a weight value, wherein the specified value is the ratio of a first value to a second value, the first value is the number of characters in the reference text, the second value is the number of characters in the identity information of the reference character, and the weight value is used to characterize the confidence of the reference text for the identity information of the reference character corresponding to the reference text.
[0080] That is to say, the specified value can also be adjusted by weights and then used as the score of the reference text, so as to further improve the accuracy of determining the game character corresponding to the initial text subsequently.
[0081] In the embodiments provided in this application, the weight value can be specifically determined by the position of the character in the reference text in the identity information of the reference character corresponding to the reference text. First, it can be determined that the position of the last character of the reference text in the identity information of the reference character corresponding to the reference text is the first position, and the position of the last character in the identity information of the reference character corresponding to the reference text is the second position. Then, the distance between the first position and the second position is used as the specified distance, and thus the weight value is determined based on the specified distance. Among them, the weight value can be negatively correlated with the specified distance. That is to say, the smaller the distance, the larger the determined weight value.
[0082] Exemplarily, continuing with the identity information of the reference character being "Shangguan Wuliu", and the reference texts corresponding to the reference character including the reference text "Shang", the reference text "Shangguan", and the reference text "Shangguan Wuliu" as examples for illustration. The position of the last character in the identity information of the reference character corresponding to the reference text is 4, that is, the second position is 4. And the position of the last character of the reference text "Shang" in the identity information of the reference character corresponding to the reference text is 1, that is, the first position of this reference text is 1; the position of the last character of the reference text "Shangguan" in the identity information of the reference character corresponding to the reference text is 2, that is, the first position of this reference text is 2; the position of the last character of the reference text "Shangguan Wuliu" in the identity information of the reference character corresponding to the reference text is 4, that is, the first position of this reference text is 4.
[0083] Thus, it can be known that the specified distance corresponding to the reference text "Shang" is 4 - 1 = 3; the specified distance corresponding to the reference text "Shangguan" is 4 - 2 = 2; the specified distance corresponding to the reference text "Shangguan Wuliu" is 0. Then, it can be determined that the weight value corresponding to the reference text "Shang" is smaller, for example, 0.1; the weight value corresponding to the reference text "Shangguan" is of medium size, for example, 0.5; the weight value corresponding to the reference text "Shangguan Wuliu" is larger, for example, 1.
[0084] And through the foregoing introduction, it can be known that the specified value of the reference text "Shang" in this example is 0.25, the specified value of the reference text "Shangguan" is 0.5, and the specified value of the reference text "Shangguan Wuliu" is 1.
[0085] Therefore, in this example, the score of the reference text "Shang" is 0.1 x 0.25 = 0.025, the score of the reference text "Shangguan" is 0.25 x 0.5 = 0.125, and the score of the reference text "Shangguan Wuliu" is 1 x 1 = 1.
[0086] In addition, for some feature texts, the target text may match reference texts of multiple different reference roles, so the target text may correspond to multiple objects to be confirmed. At this time, if the target distance determined by the target text based on each matched object to be confirmed is the same, it indicates that there may be errors in the target text, that is, the confidence of the target text is low, so the score of the target text can be reduced.
[0087] The method for determining the target distance between the target text and the object to be confirmed is similar to the method for determining the specified distance between the reference text and the identity information of the reference character corresponding to the reference text. First, the position of the last character of the target text in the identity information of the object to be confirmed corresponding to the target text can be determined as the third position, the position of the last character in the identity information of the object to be confirmed corresponding to the target text can be determined as the fourth position, and then the distance between the third position and the fourth position can be used as the target distance.
[0088] Thus, if there is a target text that matches the reference texts of multiple different reference characters, it is determined whether the target distances between the target text and the different reference characters are the same. If they are the same, the score of the target text can be reduced. It should be noted that the score of the target text can be determined by the method described above, and is not specifically limited here.
[0089] Exemplarily, the identity information of the reference character is "Shangguan Wuliu", and the reference text corresponding to the reference character includes the reference text "Shang", the reference text "Shangguan" and the reference text "Shangguan Wuliu", and the identity information of another reference character is "Shangguan Qiba", and the reference text corresponding to the other reference character includes the reference text "Shang", the reference text "Shangguan" and the reference text "Shangguan Qiba". The explanation will continue as an example.
[0090] If the feature text is "Shangguan", then the feature text not only matches the reference text "Shangguan" of the reference character "Shangguan Wuliu", but also matches the reference text "Shangguan" of the reference character "Shangguan Qiba". Therefore, the feature text can be used as the target text, and the reference characters "Shangguan Wuliu" and "Shangguan Qiba" are both objects to be confirmed. According to the method for determining the target distance introduced above, the target distance between the target text and the object to be confirmed "Shangguan Wuliu" is 2, and the target distance between the target text and the object to be confirmed "Shangguan Qiba" is also 2, that is, the target distance between the target text "Shangguan" and the object to be confirmed "Shangguan Wuliu" and the target distance between the target text "Shangguan" and the object to be confirmed "Shangguan Qiba" are the same, so that the score of the target text "Shangguan" can be reduced at this time, and the reduced score can be used for the subsequent determination of the matching value corresponding to the object to be confirmed. By reducing the score corresponding to the target text with the same target distance between different reference characters, the influence of noise can be reduced, thereby improving the accuracy of the subsequent determination of the game character corresponding to the initial text.
[0091] Furthermore, the matching value corresponding to each object to be confirmed may be obtained based on the score of the target text corresponding to each object to be confirmed. For some implementations, step S270 may further include step S271.
[0092] Step S271: taking the sum of the scores of the target texts corresponding to the object to be confirmed as the matching value corresponding to the object to be confirmed.
[0093] That is to say, the sum of the scores of the target texts corresponding to each object to be confirmed can be used as the matching value corresponding to the object to be confirmed. For example, if the object to be confirmed A corresponds to the target text A1 and the target text A2, where the score corresponding to the target text A1 is 0.25 and the score corresponding to the target text A2 is 0.5, then the matching value corresponding to the object to be confirmed A can be obtained as 0.25+0.5=0.75.
[0094] Step S280: Determine the target object corresponding to the initial text based on the matching value of each of the objects to be confirmed.
[0095] Among them, step S280 has been introduced in detail in the above embodiment and will not be repeated here.
[0096] The information identification method provided in the embodiment of the present application, after confirming the target text, can also obtain the score corresponding to each target text based on the corresponding relationship, so as to obtain the matching value corresponding to each object to be confirmed based on the score of the target text corresponding to each of the objects to be confirmed, and has a high accuracy of determining the target object corresponding to the initial text. In addition, in the embodiment of the present application, the score of the target feature can be obtained by adjusting the specified numerical value by the weight value, so as to further improve the accuracy of determining the target object corresponding to the initial text. Furthermore, in the information identification method provided in the embodiment of the present application, for the subsequent newly added reference objects, such as reference roles, it is only necessary to update the corresponding text, that is, to update the feature text library, without the need to re-construct data, train, verify, deploy, etc., which reduces the cycle required for updating, reduces the demand for manpower, time, and resources, and also improves the generalization ability.
[0097] See also Figure 5 , Figure 5 A method flow chart of an information identification method provided by an embodiment of the present application is shown. The information identification method can be applied to Figure 1 The electronic device in the information identification method shown can specifically use the processor of the electronic device as the execution subject of the information identification method. The information identification method can include steps S310 to S380.
[0098] Step S310: based on the location of the object's identity information in the target image, the target image is cropped to obtain at least one image to be identified.
[0099] Step S320: Perform text recognition on each image to be recognized by using an optical character detection model to obtain a recognition result of the identity information of the object in each image to be recognized as the initial text of the object corresponding to the image to be recognized.
[0100] Since the target image may include multiple objects and the identity information of each object, before identifying the target image, the target image may be cropped based on the location area of the target image where the identity information of the object is located, to obtain at least one image to be identified. That is, the image to be identified is an image corresponding to a part of the target image, and the image to be identified includes the identity information of the object.
[0101] Thus, text recognition can be performed on each image to be recognized, and a recognition result of the identity information of the object in each image to be recognized can be obtained as the initial text of the object corresponding to the image to be recognized. For some embodiments, text recognition can be performed on the image to be recognized through an optical character recognition (OCR) model, so that a recognition result of the identity information of the object in each image to be recognized can be obtained, and the recognition result can be a text content composed of characters, and then the recognition result is used as the initial text of the object corresponding to the image to be recognized.
[0102] Exemplarily, the image of the current game scene of the game application running on the electronic device is used as the target image, and the game character is used as the object for explanation. Since for the same game application, in the image of the current game scene of the game application, the relative position of the identity information corresponding to each game character in the target image is basically fixed. Therefore, for each game application, a specified area in the target image corresponding to the game application can be predetermined as the position area where the identity information of the game character is located in the target image.
[0103] It is understandable that if the recognized recognition result has too many characters, it may have a negative impact on the accuracy of the subsequent determination of the target object corresponding to the initial text. Therefore, a part of the characters can also be selected from the recognition result as the initial text of the object corresponding to the image to be recognized. Optionally, step S320 can also include step S321 and step S322.
[0104] Step S321: Perform text recognition on each image to be recognized by using an optical character detection model to obtain a recognition result of the identity information of the object in each image to be recognized.
[0105] Step S322: taking the last designated number of characters of the recognition result as the initial text of the object corresponding to the image to be recognized.
[0106] Since the optical character detection model generates characters from front to back when recognizing characters, and will make comprehensive use of the information of previously generated characters when generating the latter characters, the characters closer to the back are more likely to be accurate. Therefore, for some embodiments, the optical character detection model can first be used to perform text recognition on each image to be recognized, and obtain the recognition result of the identity information of the object in each image to be recognized. Then, the last specified number of characters of the recognition result are used as the initial text of the object corresponding to the image to be recognized. Thereby improving the accuracy of determining the object corresponding to the initial text. Exemplarily, the specified number can be 4, 5, etc.
[0107] Step S330: Obtain the total number of the first characters in the initial text.
[0108] Step S340: Construct a first feature set based on a preset construction rule for the initial text, where the first feature set includes each character in the initial text and phrases composed of the first specified number of adjacent characters, and the first specified number includes all positive integers greater than 1 and less than or equal to the total number of the first characters.
[0109] Step S350: Use each character and each phrase in the first feature set as the feature text.
[0110] First, the total number of the first characters in the initial text can be obtained. For example, if the initial text is "Brother Sima Five Six", then the total number of the first characters in this initial text is 5.
[0111] Furthermore, the initial text can be constructed based on a preset construction rule to obtain a first feature set, where the first feature set includes each character in the initial text and phrases composed of the first specified number of adjacent characters, and the first specified number includes all positive integers greater than 1 and less than or equal to the total number of the first characters. For example, if the total number of the first characters is 5, then the first feature set can include each character in the initial text, phrases composed of two adjacent characters, phrases composed of three adjacent characters, phrases composed of four adjacent characters, and phrases composed of five adjacent characters.
[0112] Exemplarily, continue to take the initial text "Brother Sima Five Six" as an example for illustration. It can be seen that the total number of the first characters in this initial text is 5, so the first specified number includes 2, 3, 4, and 5. The first feature set can include each single character in the initial text, namely "Brother", "Sima", "Five", and "Six"; it can also include phrases composed of two adjacent characters, namely "Brother Sima", "Sima Five", and "Five Six"; it can also include phrases composed of three adjacent characters, namely "Brother Sima Five", "Sima Five Six"; it can also include phrases composed of four adjacent characters, namely "Brother Sima Five" and "Sima Five Six"; it can also include phrases composed of five adjacent characters, namely "Brother Sima Five Six".
[0113] Thus, each character and each phrase in the above first feature set can be used as the feature text, that is, as the feature text corresponding to the initial text.
[0114] Step S360: Based on the matching result between the feature text and the identity information of each reference object, a reference object matching the feature text is determined as an object to be confirmed, wherein the feature text matching each object to be confirmed is recorded as a target text.
[0115] Step S370: Based on the target text corresponding to each of the objects to be confirmed, a matching value corresponding to each of the objects to be confirmed is obtained.
[0116] Step S380: Determine the target object corresponding to the initial text based on the matching value of each of the objects to be confirmed.
[0117] Among them, steps S360 to S380 have been introduced in detail in the above embodiments and will not be repeated here.
[0118] The information recognition method provided by the embodiment of the present application performs text recognition on each image to be recognized through an optical character detection model to obtain the recognition result of the identity information of the object in each image to be recognized; and then the last specified number of characters of the recognition result are used as the initial text of the object corresponding to the image to be recognized. Since the optical character detection model generates characters from front to back when recognizing characters, the information of the previously generated characters will be comprehensively utilized when generating the following characters, so the later characters are more likely to be accurate. Therefore, the last specified number of characters are used as the initial text of the object corresponding to the image to be recognized, which can improve the accuracy of determining the target object corresponding to the initial text. In addition, in the embodiment of the present application, the initial text can be constructed based on a preset construction rule to obtain a first feature set, wherein the first feature set includes each character in the initial text and a phrase composed of adjacent first specified number of characters, and the first specified number includes all positive integers greater than 1 and less than or equal to the total number of the first characters; and then each character and each phrase in the first feature set are used as the feature text. Thus, multiple feature texts corresponding to the initial text can be obtained, and then the reference role matching the feature text can be determined as the object to be confirmed based on the matching results of the constructed feature text and the identity information of each reference role; then, based on the target text corresponding to each object to be confirmed, the matching value corresponding to each object to be confirmed is obtained; based on the matching value of each object to be confirmed, the target object corresponding to the initial text is determined. The accuracy of determining the target object corresponding to the initial text is relatively high.
[0119] See also Figure 6 , Figure 6 A schematic diagram of a server provided in an embodiment of the present application is shown. Specifically, Figure 6The server 120 shown in the figure can be used to build a feature text library, wherein the feature text library includes multiple reference objects and identity information of each reference object. The server 120 can also be used to send the feature text library to an electronic device so that the electronic device determines the target object corresponding to the initial text based on the information recognition method described in the above embodiments.
[0120] The server 120 may establish a communication link with the electronic device in advance, so that the server 120 can send the feature text library to the electronic device.
[0121] Optionally, the server sends the feature text library to the electronic device, or the server sends multiple reference objects in the feature text library and identity information of each reference object to the electronic device.
[0122] Through the introduction of the above-mentioned method embodiments, it can be known that the feature text library can also include multiple reference texts corresponding to each reference object, and in the case where the target image is an image of the current game scene of the game application running on the electronic device, the reference text corresponding to the reference object is the reference text corresponding to the reference character. Therefore, for some embodiments, the server can also be used to obtain the total number of the second characters of the identity information of the reference character; construct the identity information of the reference character based on the preset construction rule to obtain a second feature set, wherein the second feature set includes each character in the identity information of the reference character and a phrase composed of a second adjacent specified number of characters, and the second specified number includes all positive integers greater than 1 and less than or equal to the total number of the second characters; determine the shape-similar character of at least one character in the identity information of the reference character, and the character in the identity information corresponding to the shape-similar character is the target character; replace the target character in the character or phrase matching the target character in the second feature set with the shape-similar character corresponding to the target character as a synonym; use the synonym, each character in the second feature set, and each phrase as the reference text corresponding to the reference character. The detailed introduction is similar to the construction of the first feature set in the above-mentioned embodiment, and will not be repeated here, and will only be introduced through the following examples.
[0123] Exemplarily, taking the identity information of the reference role as "Sima Wuliu" as an example, it can be seen that the total number of the second characters of the identity information of this reference role is 4. Therefore, the second specified numbers include 2, 3, and 4. Each single character in the identity information of the reference role can be included in the second feature set, namely "Si", "Ma", "Wu", and "Liu"; phrases composed of adjacent two characters can also be included, namely "Sima", "Ma Wu", and "Wu Liu"; phrases composed of adjacent three characters can also be included, namely "Sima Wu" and "Ma Wu Liu"; phrases composed of adjacent four characters can also be included, namely "Sima Wuliu".
[0124] Then, the similar characters of at least one character in the identity information of the reference role can be determined, and the character in the identity information corresponding to the similar character is the target character. For example, the similar character "Wu" of "Ma", then "Ma" corresponds to this similar character and serves as the target character.
[0125] Furthermore, replace the target character in the character or phrase in the second feature set that matches the target character with the similar character corresponding to the target character as the near-synonym word. That is to say, first determine that the characters or phrases in the second feature set that match the target character include "Ma", "Sima", "Ma Wu", "Sima Wu", "Ma Wu Liu", and "Sima Wuliu". Thus, replace "Ma", "Sima", "Ma Wu", "Sima Wu", "Ma Wu Liu", and "Sima Wuliu" with "Wu", "Si Wu", "Wu Wu", "Si Wu Wu", "Wu Wu Liu", and "Si Wu Wu Liu" respectively as the near-synonym words.
[0126] Thus, the near-synonym words, each character, and each phrase in the second feature set can be used as the reference text corresponding to this reference role. That is to say, for the reference role with the identity information of "Sima Wuliu", the corresponding reference text includes "Wu", "Si Wu", "Wu Wu", "Si Wu Wu", "Wu Wu Liu", "Si Wu Wu Liu", "Si", "Ma", "Wu", "Liu", "Sima", "Ma Wu", "Wu Liu", "Sima Wu", "Ma Wu Liu", and "Sima Wuliu".
[0127] Optionally, if it is found in actual application that during the process of text recognition of the target image by the electronic device, some specific characters are often misrecognized as another incorrect character, then the incorrect character can also be used as the similar character corresponding to the character that is misrecognized, and the foregoing steps are executed to generate the feature text including the incorrect character.
[0128] Therefore, in the feature text constructed by the server through the above method, in addition to the feature text constructed by the characters including the identity information of the reference character, it can also include feature text constructed based on characters similar in shape to at least one character in the identity information of the reference character, and can also include feature text constructed based on erroneous characters that are often misrecognized. Therefore, when the subsequent electronic device performs text recognition on the target image, even if it mistakenly recognizes a character, since the reference text of the reference character used in the subsequent matching with the identity information of the reference character includes feature text constructed based on characters similar in shape to at least one character in the identity information of the reference character, and can also include feature text constructed based on erroneous characters that are often misrecognized, the accuracy of determining the target object corresponding to the initial text can be improved.
[0129] For example, if the initial text obtained by text recognition of the target image is "Siwu Wuliu", since the reference texts corresponding to the reference character "Sima Wuliu" in the feature text library include "Wu", "Siwu", "Wuwu", "Siwuwu", "Wuwuliu", "Siwuwuliu", "Si", "Ma", "Wu", "Liu", "Sima", "Mawu", "Wuliu", "Simawu", "Mawuliu" and "Simawuliu", the reference character matching the feature text can be determined more accurately, thereby improving the accuracy of determining the target character corresponding to the initial text.
[0130] It should be noted that the update of the feature text library in the server can be performed by automatically obtaining relevant information of the reference objects corresponding to each target image, for example, the relevant information of the reference characters of each game application can be automatically obtained and updated, or it can be updated through manual input, which is not specifically limited in the embodiments of the present application.
[0131] The server provided by the embodiment of the present application constructs a feature text library, so that the feature text library includes multiple reference roles and the identity information of each reference role, and also includes multiple reference texts corresponding to each reference role. Subsequently, the feature text library or the content included in the feature text library can be directly sent to the electronic device, so that the electronic device executes the information recognition method in each of the foregoing method embodiments to determine the target object corresponding to the initial text. Moreover, when the identity information of the reference role corresponding to the game application changes, only the identity information of the reference role whose information has changed and the reference text corresponding to the reference role need to be correspondingly modified in the feature text library of the server; if a new reference role is added to the game application, only the corresponding reference role, the identity information of the reference role, and the corresponding reference text need to be newly added to the feature text library of the server. It has strong generalization ability. For the case of adding a new reference role, even if the electronic device side is not changed, there will be no problem of reduced accuracy in determining the target role corresponding to the initial text. In addition, the system resources, time, manpower, etc. required to update the feature text library of the server are relatively small.
[0132] Taking the image of the current game scene of the game application running on the electronic device as the target image and the game character as the object in the target image as an example, the information confirmation method provided by the embodiment of the present application is further introduced. In this example, the server can construct a feature text library, and the feature text library can include corresponding relationships. Taking "Sima Wuliu" and "Sinan Qi" as reference roles, the corresponding relationships in the feature text library can include the reference role "Sima Wuliu" and its corresponding reference texts, specifically including "Si", "Ma", "Wu", "Liu", "Sima", "Ma Wu", "Wu Liu", "Sima Wu", "Ma Wuliu", and "Sima Wuliu"; it can also include the reference role "Sinan Qi" and its corresponding reference texts, specifically including "Si", "Nan", "Qi", "Sinan", "Nan Qi", and "Sinan Qi".
[0133] Then the electronic device performs text recognition on the target image through optical character detection to obtain the identity information recognition result of at least one game character in the target image, and then takes the last 5 characters of the recognition result as the initial text of the game character. For example, the initial text is "Xiong Si Wu Liu".
[0134] Furthermore, the electronic device constructs a feature text based on the initial text "Xiong Si Wu Liu". As can be seen from the introduction of the foregoing embodiments, multiple corresponding feature texts can be constructed, specifically including "Xiong", "Si", "Wu", "Liu", "Xiong Si", "Si Wu", "Wu Liu", "Xiong Si Wu", "Si Wu Liu", "Wu Liu Xiong", "Xiong Si Wu Liu", "Si Wu Liu Xiong", and "Xiong Si Wu Liu".
[0135] Furthermore, the feature text is matched with multiple reference texts corresponding to each of the reference characters to find the reference characters that match the feature text. That is, the feature text "Si" matches the reference text "Si" corresponding to the reference character "Sima Wuliu" and the reference text "Si" corresponding to the reference character "Sinan Qi"; the feature text "Wu" matches the reference text "Wu" corresponding to the reference character "Sima Wuliu"; the feature text "Liu" matches the reference text "Liu" corresponding to the reference character "Sima Wuliu"; and the feature text "Wuliu" matches the reference text "Wuliu" corresponding to the reference character "Sima Wuliu".
[0136] Thus, it can be determined that the objects to be confirmed include the reference character "Sima Wuliu" and the reference character "Sinan Qi". The feature texts matched with each of the objects to be confirmed are recorded as target texts.
[0137] Furthermore, the score corresponding to each target text corresponding to each of the to-be-confirmed objects may be determined. The score of each reference text is taken as the ratio of the first value to the second value as an example for explanation.
[0138] The score of the target text "Si" corresponding to the reference character "Sima Wuliu" is 1 / 4, the score of "Wu" is 1 / 4, the score of "Liu" is 1 / 4, and the score of "Wuliu" is 1 / 2. The score of the target text "Si" corresponding to the reference character "Sinan Qi" is 1 / 3.
[0139] Therefore, the sum of the scores of the target texts corresponding to the object to be confirmed is taken as the matching value corresponding to the object to be confirmed. That is, the matching value corresponding to the reference character "Sima Wuliu" is 1 / 4+1 / 4+1 / 4+1 / 2=5 / 4; and the matching value corresponding to the reference character "Sinan Qi" is 1 / 3.
[0140] It can be seen that 5 / 4 is greater than 1 / 3, which means that the object to be confirmed "Sima Wuliu" can be determined as the target object corresponding to the initial text.
[0141] It can be seen that in this example, the electronic device's recognition result of the identity information of the game character in the target image is not completely correct ("Brother Sima Wuliu" is recognized as "Brother Siwu Wuliu"). However, through the information confirmation method in the embodiment of the present application, the initial text is still matched to the correct reference character "Sima Wuliu" with high accuracy.
[0142] See also Figure 7 , Figure 7 A structural block diagram of an information identification device provided in an embodiment of the present application is shown. The information identification device 700 includes: a text acquisition unit 710, a feature text construction unit 720, a matching unit 730, a matching value determination unit 740 and a role determination unit 750.
[0143] The text acquisition unit 710 is used to perform text recognition on the target image and obtain a recognition result of identity information of at least one object in the target image as the initial text.
[0144] Optionally, the text acquisition unit 710 can also be used to use an image of the current game scene of the game application running on the electronic device as the target image; perform text recognition on the target image to obtain an identity information recognition result of at least one game character in the target image as the initial text.
[0145] Optionally, the text acquisition unit 710 can also be used to crop the target image based on the location area of the target image where the identity information of the object is located, so as to obtain at least one image to be identified; perform text recognition on each image to be identified through an optical character detection model, and obtain a recognition result of the identity information of the object in each image to be identified as the initial text of the object corresponding to the image to be identified.
[0146] Optionally, the text acquisition unit 710 can also be used to perform text recognition on each image to be recognized through an optical character detection model to obtain a recognition result of the identity information of the object in each image to be recognized; and use the last specified number of characters of the recognition result as the initial text of the object corresponding to the image to be recognized.
[0147] The feature text construction unit 720 is used to construct a plurality of different feature texts according to at least one character in the initial text based on a preset construction rule.
[0148] Optionally, the feature text construction unit 720 can also be used to obtain the total number of the first characters in the initial text; construct the initial text based on a preset construction rule to obtain a first feature set, wherein the first feature set includes each character in the initial text and a phrase consisting of a first specified number of adjacent characters, and the first specified number includes all positive integers greater than 1 and less than or equal to the total number of the first characters; and take each character and each phrase in the first feature set as the feature text.
[0149] The matching unit 730 is used to determine the reference object matching the feature text as the object to be confirmed based on the matching result between the feature text and the identity information of each reference object, wherein the feature text matching each of the objects to be confirmed is recorded as the target text.
[0150] Optionally, the reference object includes a reference role, and the matching unit 730 can also be used to obtain a corresponding relationship, the corresponding relationship including each reference role and its corresponding multiple reference texts, wherein the reference text includes text constructed based on the preset construction rules through each character of the identity information of the reference role; based on the corresponding relationship, the feature text is matched with the multiple reference texts corresponding to each of the reference roles, and the reference role matching the feature text is found as the object to be confirmed.
[0151] The matching value determining unit 740 is configured to obtain a matching value corresponding to each object to be confirmed based on the target text corresponding to each object to be confirmed.
[0152] Optionally, the matching value determination unit 740 can also be used to determine the score corresponding to each target text corresponding to each of the to-be-confirmed objects based on the corresponding relationship; based on the score of the target text corresponding to each of the to-be-confirmed objects, obtain the matching value corresponding to each to-be-confirmed object. The score of each reference text in the reference role is the ratio of a first value to a second value, wherein the first value is the number of characters in the reference text, and the second value is the number of characters in the identity information of the reference role.
[0153] Optionally, the matching value determining unit 740 may also be configured to use the sum of the scores of the target texts corresponding to the object to be confirmed as the matching value corresponding to the object to be confirmed.
[0154] The score of each reference text in each reference character is a value adjusted by a weight value for a specified value, wherein the specified value is a ratio of a first value to a second value, wherein the first value is the number of characters of the reference text, and the second value is the number of characters of the identity information of the reference character, and the weight value is used to characterize the confidence of the reference text for the identity information of the reference character corresponding to the reference text. The weight value is negatively correlated with a specified distance, wherein the specified distance is the distance between a first position and a second position, wherein the first position is the position of the last character of the reference text in the identity information of the reference character corresponding to the reference text, and the second position information is the position of the last character in the identity information of the reference character corresponding to the reference text.
[0155] The role determination unit 750 is used to determine the target object corresponding to the initial text based on the matching value of each of the objects to be confirmed.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0157] In several embodiments provided in the present application, the coupling between the units may be electrical, mechanical or other forms of coupling. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0158] See also Figure 8 , Figure 8 The block diagram of a structure of an electronic device provided in an embodiment of the present application is shown. The electronic device 110 may be a smart phone, a desktop computer, a vehicle-mounted computer, a server or a tablet computer, etc. The electronic device 110 in the present application may include one or more of the following components: a processor 111, a memory 112 and one or more application programs, wherein the processor 111 is electrically connected to the memory 112, and the one or more program configurations are used to execute the methods described in the aforementioned embodiments.
[0159] The processor 111 may include one or more processing cores. The processor 111 uses various interfaces and lines to connect various parts of the entire electronic device 110, and executes various functions and processes data of the electronic device 110 by running or executing instructions, programs, code sets or instruction sets stored in the memory 112, and calling data stored in the memory 112. Optionally, the processor 111 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 111 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 111, but may be implemented separately through a communication chip. Specifically, the method described in the above embodiments may be executed by one or more processors 111 .
[0160] For some embodiments, the memory 112 may include a random access memory (RAM) or a read-only memory (ROM). The memory 112 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 110 during use, etc.
[0161] See also Fig. 9 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 900 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0162] The computer readable storage medium 900 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer readable storage medium 900 has storage space for program code 910 that performs any method step in the above method. These program codes can be read from or written into one or more computer program products. The program code 910 can be compressed, for example, in an appropriate form.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An information identification method, characterized in that: Applied to electronic equipment, the method comprises: Performing text recognition on the target image to obtain a recognition result of identity information of at least one object in the target image as the initial text; Based on a preset construction rule, constructing a plurality of different feature texts according to at least one character in the initial text; Based on the matching result between the feature text and the identity information of each reference object, determining the reference object matching the feature text as the object to be confirmed, wherein the feature text matching each of the objects to be confirmed is recorded as the target text; Based on the target text corresponding to each of the objects to be confirmed, obtaining a matching value corresponding to each of the objects to be confirmed; Based on the matching value of each of the objects to be confirmed, a target object corresponding to the initial text is determined.
2. The method according to claim 1, characterized in that The performing text recognition on the target image to obtain a recognition result of identity information of at least one object in the target image as the initial text includes: Using an image of a current game scene of a game application running on the electronic device as the target image; Text recognition is performed on the target image to obtain an identity information recognition result of at least one game character in the target image as the initial text.
3. The method according to claim 2, characterized in that The reference object includes a reference role, and the determining, based on the matching result between the feature text and the identity information of each reference object, a reference object matching the feature text as an object to be confirmed includes: Acquire a corresponding relationship, wherein the corresponding relationship includes each reference character and a plurality of reference texts corresponding thereto, wherein the reference text includes text constructed by each character of the identity information of the reference character based on the preset construction rule; Based on the corresponding relationship, the feature text is matched with a plurality of reference texts corresponding to each of the reference roles, and a reference role matching the feature text is found as an object to be confirmed.
4. The method according to claim 3, characterized in that The corresponding relationship also includes a score of each reference text in each reference role, and obtaining a matching value corresponding to each object to be confirmed based on the target text corresponding to each object to be confirmed includes: Based on the corresponding relationship, determine the score corresponding to each target text corresponding to each of the objects to be confirmed; Based on the score of the target text corresponding to each of the objects to be confirmed, a matching value corresponding to each of the objects to be confirmed is obtained.
5. The method according to claim 4, characterized in that The step of obtaining a matching value corresponding to each object to be confirmed based on the score of the target text corresponding to each object to be confirmed includes: The sum of the scores of the target texts corresponding to the object to be confirmed is taken as the matching value corresponding to the object to be confirmed.
6. The method according to claim 4 or 5, characterized in that: The score of each reference text in the reference character is a ratio of a first value to a second value, wherein the first value is the number of characters in the reference text and the second value is the number of characters in the identity information of the reference character.
7. The method according to claim 5, characterized in that The score of each reference text in each reference character is a value obtained by adjusting the specified value by a weight value, wherein the specified value is a ratio of a first value to a second value, the first value is the number of characters in the reference text, the second value is the number of characters in the identity information of the reference character, and the weight value is used to characterize the confidence of the reference text for the identity information of the reference character corresponding to the reference text.
8. The method according to claim 7, characterized in that The weight value is negatively correlated with a specified distance, wherein the specified distance is the distance between a first position and a second position, the first position being the position of the last character of a reference text in the identity information of a reference character corresponding to the reference text, and the second position information being the position of the last character in the identity information of a reference character corresponding to the reference text.
9. The method according to claim 1, characterized in that: The step of constructing a plurality of different feature texts based on a preset construction rule and according to at least one character in the initial text comprises: Get the total number of first characters in the initial text; The initial text is constructed based on a preset construction rule to obtain a first feature set, wherein the first feature set includes each character in the initial text and a phrase consisting of a first specified number of adjacent characters, and the first specified number includes all positive integers greater than 1 and less than or equal to the total number of the first characters; Each character and each phrase in the first feature set is used as the feature text.
10. The method according to claim 1, characterized in that The performing text recognition on the target image to obtain a recognition result of identity information of at least one object in the target image as the initial text includes: Based on the location of the identity information of the object in the target image, the target image is cropped to obtain at least one image to be identified; The optical character detection model is used to perform text recognition on each image to be recognized, and a recognition result of the identity information of the object in each image to be recognized is obtained as the initial text of the object corresponding to the image to be recognized.
11. The method according to claim 10, characterized in that The method of performing text recognition on each image to be recognized by using an optical character detection model to obtain a recognition result of the identity information of the object in each image to be recognized as the initial text of the object corresponding to the image to be recognized includes: Perform text recognition on each image to be recognized by using an optical character detection model to obtain a recognition result of the identity information of the object in each image to be recognized; The last designated number of characters of the recognition result is used as the initial text of the object corresponding to the image to be recognized.
12. An information recognition device, characterized in that: Applied to electronic equipment, the device comprises: A text acquisition unit, used to perform text recognition on a target image, and obtain a recognition result of identity information of at least one object in the target image as an initial text; A feature text construction unit, configured to construct a plurality of different feature texts according to at least one character in the initial text based on a preset construction rule; A matching unit, configured to determine, based on a matching result between the feature text and the identity information of each reference object, a reference object matching the feature text as an object to be confirmed, wherein the feature text matching each object to be confirmed is recorded as a target text; A matching value determination unit, configured to obtain a matching value corresponding to each object to be confirmed based on the target text corresponding to each object to be confirmed; The role determination unit is used to determine the target object corresponding to the initial text based on the matching value of each of the objects to be confirmed.
13. A server, characterized in that: The server is used to construct a feature text library, wherein the feature text library includes a plurality of reference objects and identity information of each of the reference objects; The server is used to send the feature text library to an electronic device, so that the electronic device determines a target object corresponding to the initial text based on the method according to any one of claims 1 to 11.
14. The server according to claim 13, characterized in that: The reference object includes a reference role, the feature text library also includes a plurality of reference texts corresponding to each reference role, and the server is further used for: Obtain the total number of second characters of the identity information of the reference character; The identity information of the reference character is constructed based on a preset construction rule to obtain a second feature set, wherein the second feature set includes each character in the identity information of the reference character and a phrase consisting of a second specified number of adjacent characters, and the second specified number includes all positive integers greater than 1 and less than or equal to the total number of the second characters; Determine a character similar in shape to at least one character in the identity information of the reference character, and the character in the identity information corresponding to the character similar in shape is the target character; Replacing the characters matching the target character in the second feature set or the target character in the phrase with characters with similar shapes corresponding to the target character as synonyms; The synonymous words, each character in the second feature set, and each phrase are used as reference texts corresponding to the reference role.
15. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 11.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 11.
