Text processing method, apparatus, electronic device and storage medium

By performing regional processing and feature extraction on text images, the problem of low information extraction efficiency in various types of materials is solved, achieving fast and accurate information extraction and improving the processing efficiency and accuracy of intelligent claims settlement.

WO2025241393A1PCT designated stage Publication Date: 2025-11-27ZHONGAN ONLINE P&C INSURANCE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/125946
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-24
Filing Date
2024-10-18
Publication Date
2025-11-27

AI Technical Summary

Technical Problem

Information extraction from diverse materials is inefficient, especially from user-uploaded free-image materials, where it is difficult to accurately and quickly determine diagnostic results from medical records.

Method used

By segmenting text images into regions, text and location information are extracted from these regions. A lightweight text coding model and a spatial feature extraction model are used to determine the spatial features of the text regions. Information is then extracted using a category extraction model, reducing the amount of data computation and improving computational speed and accuracy.

Benefits of technology

It enables rapid and accurate information extraction from diverse materials, improving processing efficiency and the accuracy of information extraction results, thereby enhancing the efficiency and accuracy of intelligent claims processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024125946_27112025_PF_FP_ABST
    Figure CN2024125946_27112025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a text processing method, an apparatus, an electronic device and a storage medium. The method comprises: acquiring a text image of a user and determining at least one text region corresponding to the text image, the text region containing a text to be classified; for any text region, extracting text information in the text region and location information corresponding to the text region, the location information being used for representing the location region of the text region within the text image; on the basis of the location information and the text information, determining spatial features of the text region; and, on the basis of the spatial features of the text region, extracting the category of said text, so as to determine at least one attribute category corresponding to the user. The method in the present application solves the technical problem in the prior art of low processing efficiency of extracting information from various types of materials to obtain processing results, thus improving text processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Text processing method and device, electronic equipment and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202410655246.6, filed on May 24, 2024, and entitled "Text processing method, device, electronic equipment and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of text processing, in particular to a text processing method, device, electronic equipment and storage medium. BACKGROUND

[0003] With the development of big data, cloud computing, artificial intelligence and other new technologies, the traditional business of many insurance companies is gradually shifting to intelligent and automated business, which can speed up the processing of business, improve user experience, and save costs for insurance companies. Intelligent claim settlement is a new technology that gradually replaces traditional claim settlement. Intelligent claim settlement can use artificial intelligence technology to automatically extract the required information from the materials uploaded by the user, and then the risk control model makes a decision on whether the information meets the claim settlement clauses. How to accurately and quickly extract information from the user-submitted medical record materials and determine the diagnosis result contained in the materials has an important influence on claim settlement processing.

[0004] In the process of intelligent claim settlement, it is necessary to automatically and accurately extract diagnosis information from the materials uploaded by the user. However, the materials uploaded by the user come from different regions and different hospitals, and are mainly free photograph images, which makes the material board style, layout and position very complex, increases the difficulty of extracting diagnosis information from the existing multi-style materials, and further reduces the efficiency of claim settlement processing.

[0005] Therefore, how to improve the processing efficiency of information extraction and processing in multi-style materials is a technical problem to be solved at present.

[0006] SUMMARY

[0007] The present application provides a text processing method, device, electronic equipment and storage medium to solve the technical problem of low processing efficiency of information extraction and processing in multi-style materials in the prior art, and improve the processing efficiency of text processing.

[0008] In a first aspect, the present application provides a text processing method, comprising:

[0009] obtaining a text image of a user, determining at least one text region corresponding to the text image; the text region contains text to be classified;

[0010] For any text region, extract text information in the text region and position information corresponding to the text region; the position information is used to represent a position area of the text region in the text image;

[0011] Determine a spatial feature of the text region according to the position information and the text information;

[0012] According to the spatial feature of the text region, category extraction is performed on the text to be classified to determine at least one attribute category corresponding to the user.

[0013] In an optional implementation, extracting the text information in the text region and the position information corresponding to the text region comprises:

[0014] Performing text extraction processing on the text region to obtain the text information in the text region;

[0015] Obtaining image coordinates of the text image, and determining position information corresponding to each text region according to the image coordinates.

[0016] In an optional implementation, determining the spatial feature of the text region according to the position information and the text information comprises:

[0017] Respectively encoding the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information;

[0018] According to the position features and the text features, determining the spatial feature of the text region.

[0019] In an optional implementation, respectively encoding the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information comprises:

[0020] Performing information encoding processing on the position information to obtain position features corresponding to the position information;

[0021] Obtaining a trained lightweight text encoding model, and performing feature encoding on the text information according to the lightweight text encoding model to obtain text features corresponding to the text information.

[0022] In an optional implementation, determining the spatial feature of the text region according to the position features and the text features comprises:

[0023] Performing splicing processing on the position features and the text features to obtain splicing features;

[0024] obtain a trained spatial feature extraction model, and perform spatial feature extraction processing on the spliced features according to the spatial feature extraction model to obtain spatial features of the text region.

[0025] In an optional implementation, the category extraction of the text to be classified according to the spatial features of each text region is performed to determine at least one attribute category corresponding to the user, including:

[0026] obtaining a trained category extraction model;

[0027] For any text region, the spatial features corresponding to the text region are input into the category extraction model to obtain a region attribute category corresponding to the text region;

[0028] The attribute category corresponding to the user is obtained according to the region attribute categories corresponding to each text region.

[0029] In an optional implementation, after the at least one attribute category corresponding to the user is determined, the method further includes:

[0030] obtaining a pre-stored attribute type corresponding to the user;

[0031] determining whether the user is a target user according to the pre-stored attribute type and the attribute category.

[0032] In a second aspect, the present application provides a text processing device, including:

[0033] a text region determination module configured to obtain a text image containing a text to be classified, and determine at least one text region corresponding to the text image;

[0034] an information extraction module configured to, for any text region, extract text information in the text region and position information corresponding to the text region; the position information is used to represent a position region of the text region in the text to be classified;

[0035] a spatial feature determination module configured to determine spatial features of the text region according to the position information and the text information;

[0036] a category extraction module configured to perform category extraction of the text to be classified according to the spatial features of each text region to determine at least one attribute category contained in the text to be classified.

[0037] In an optional implementation, the information extraction module includes:

[0038] a text information obtaining submodule configured to perform text extraction processing on the text region to obtain text information in the text region;

[0039] The position information acquisition sub-module is configured to acquire image coordinates of the text image, and determine position information corresponding to each of the text regions according to the image coordinates.

[0040] In an optional implementation, the spatial feature determination module comprises:

[0041] The feature acquisition sub-module is configured to encode the position information and the text information respectively to obtain position features corresponding to the position information and text features corresponding to the text information.

[0042] The spatial feature determination sub-module is configured to determine the spatial features of the text regions according to the position features and the text features.

[0043] In an optional implementation, the feature acquisition sub-module comprises:

[0044] The position feature acquisition unit is configured to encode the position information to obtain position features corresponding to the position information.

[0045] The text feature acquisition unit is configured to acquire a trained lightweight text encoding model, encode the text information according to the lightweight text encoding model to obtain text features corresponding to the text information.

[0046] In an optional implementation, the spatial feature determination sub-module comprises:

[0047] The splicing feature determination unit is configured to splice the position features and the text features to obtain splicing features.

[0048] The spatial feature determination unit is configured to acquire a trained spatial feature extraction model, and extract spatial features of the text regions according to the spatial feature extraction model and the splicing features.

[0049] In an optional implementation, the category extraction module comprises:

[0050] The category extraction module acquisition sub-module is configured to acquire a trained category extraction model.

[0051] The region attribute type determination sub-module is configured to input the spatial features corresponding to any text region into the category extraction model to obtain a region attribute category corresponding to the text region.

[0052] The category output determination sub-module is configured to obtain the attribute category corresponding to the user according to the region attribute category corresponding to each of the text regions.

[0053] In an optional implementation, the apparatus further comprises:

[0054] a service attribute type obtaining module, configured to obtain a service attribute type corresponding to the user;

[0055] a target user determining module, configured to determine whether the user is a target user according to the service attribute type and the attribute category.

[0056] In a third aspect, the present application provides an electronic device, comprising a processor and a memory connected with the processor in communication;

[0057] The memory stores computer execution instructions.

[0058] The processor executes the computer execution instructions stored in the memory to implement the method according to the first aspect.

[0059] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the method according to the first aspect.

[0060] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the method according to the first aspect.

[0061] In the technical solution provided by the present application, the received text image is processed in regions to obtain at least one text region; then, taking any text region as an example, the text information in the current text region is extracted, and the position information representing the position of the current text region in the text image is determined; then, the spatial feature of the current text region is determined according to the position information and the text information; the category of the text to be classified in the text image is extracted according to the spatial features of the text regions, and at least one attribute category corresponding to the user is determined; in the above embodiment, the amount of data to be processed when the image data is used as information in the existing information extraction process is reduced, the data processing speed is accelerated, and the processing efficiency is improved; in the information extraction process, the spatial relationship between the texts to be classified in the image is determined according to the text information of the texts and the position information of the texts in the image, and then the extraction is performed according to the spatial relationship, which makes up for the problem of reduced information amount caused by the lack of image data, ensures the accuracy of the information extraction result, realizes fast and accurate information extraction, and improves the processing efficiency of text processing. BRIEF DESCRIPTION OF DRAWINGS

[0062] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0063] FIG. 1 is a diagram of an application scenario of a text processing method according to an embodiment of the present application;

[0064] FIG. 2 is a flowchart of a text processing method according to an embodiment of the present application;

[0065] FIG. 3 is a structural diagram of a text processing apparatus according to an embodiment of the present application;

[0066] FIG. 4 is a structural diagram of an electronic device according to an embodiment of the present application;

[0067] FIG. 5 is a block diagram of an electronic device according to an embodiment of the present application.

[0068] The specific embodiments of the present application have been shown through the above-described drawings, and will be described in more detail hereinafter. The drawings and the written description are not intended to restrict the scope of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0069] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same or similar components are denoted by the same or similar reference numerals throughout the drawings and the written description, unless otherwise indicated. The implementations described in the following exemplary embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.

[0071] In actual application, the traditional business of many insurance companies is gradually shifting to intelligent and automated, which can speed up the processing of business, improve user experience, and save costs for insurance companies. Among them, intelligent claim settlement is a new technology gradually replacing traditional claim settlement. Intelligent claim settlement can use artificial intelligence technology to automatically extract the required information from the materials uploaded by the user, and then enter the risk control model to make a decision on whether it meets the claim settlement clauses. How to accurately and quickly extract information from the medical record materials submitted by the user has an important influence on determining the diagnosis result contained in the materials for claim settlement processing.

[0072] In the intelligent claim processing process, it is necessary to automatically, accurately and quickly extract the diagnosis result from the user-uploaded materials. However, the user-uploaded materials come from different regions and different hospitals, and are mainly free photograph images, which leads to complex material board type, layout and position. In view of the above technical problems, in the existing diagnosis result determination manner, image recognition is performed on the user-uploaded images, information extraction is performed according to the material content contained in the image recognition result, and the diagnosis result contained in the material is determined. However, in the information extraction process, the image data of each image and the text content corresponding to the image data and other information need to be acquired as processing basis, and the large amount of data leads to the problem of low diagnosis result determination efficiency due to slow calculation speed in the processing process.

[0073] The text processing method provided in the present application aims to solve the above technical problems of the prior art. Specifically, in the process of determining the diagnosis result, the image data corresponding to the uploaded image is not used as the processing basis, and only the text information and position information of the text region contained in the image are used as the processing basis for information extraction, thereby reducing the data calculation amount, improving the calculation speed, and further improving the determination efficiency of the diagnosis result.

[0074] Fig. 1 is an application scenario diagram of a text processing method provided in an embodiment of the present application. To facilitate understanding, the application scenario to which the embodiment of the present application is applied will be described below in conjunction with Fig. 1. The text processing method provided in the present application can be applied to any user terminal, and can also be applied to a server in communication connection with the user terminal. The execution subject is not specifically limited.

[0075] Referring to Fig. 1, Fig. 1 exemplarily illustrates the case that the text processing method is processed in the server. Specifically, the user uploads a text image corresponding to the user to the server through the user terminal; wherein the text image contains a text to be classified; the server performs regional processing on the received text image to obtain at least one text region; and then takes any text region as an example to illustrate: extracting text information in the current text region and determining position information representing the position of the current text region in the text image; and then determining the spatial feature of the current text region according to the position information and the text information; and performing class extraction on the text to be classified in the text image according to the spatial features of the text regions to determine at least one attribute category corresponding to the user.

[0076] In the above embodiment, the amount of data to be processed when using image data as information basis in the existing information extraction process is reduced, the data processing speed is accelerated, and the processing efficiency is improved. In addition, in the information extraction process, the spatial relationship between each text is determined through the text information of the text to be classified in the image and the position information of the text in the image, and then the extraction is performed according to the spatial relationship, which makes up for the reduction of information amount caused by the absence of image data, ensures the accuracy of the information extraction result, realizes fast and accurate information extraction, and improves the processing efficiency of text processing.

[0077] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0078] FIG. 2 is a flowchart of a text processing method according to an embodiment of the present application. The method can be executed by a text processing device, which can be implemented on any electronic device with information processing function, such as cloud implementation, local deployment, user terminal implementation, IOT (Internet of Things) device implementation, etc. The method in this embodiment can be realized by software, hardware or a combination of software and hardware. As shown in FIG. 2, the method includes the following steps:

[0079] S210, obtaining a text image containing text to be classified, and determining at least one text region corresponding to the text image.

[0080] In the embodiments of the present application, the text image can be understood as a photo containing text information. Specifically, the text image is an image generated after photographing the medical record materials of a user. On this basis, the text processing method provided by the present application can be specifically understood as information extraction of the text information contained in the medical record materials to obtain the diagnosis results contained in the materials.

[0081] In actual application, there can be a case that a user uploads multiple photos. Therefore, when receiving multiple photos uploaded by a user, the multiple photos can be spliced to obtain a text image corresponding to the user.

[0082] Since the image size of the text image formed by splicing is large, directly performing information extraction on the text image takes a long time, resulting in low processing efficiency. In order to shorten the processing time, the technical solutions provided by the embodiments of the present application can perform region segmentation processing on the text image on the basis of obtaining the text image to obtain at least one corresponding text region. Each text region contains text to be classified.

[0083] Optionally, a pre-trained image segmentation model is acquired, the text image is input into the image segmentation model, and at least one text region output by the model is obtained. Of course, the text image can also be cropped to obtain at least one text region, and the application embodiments do not make specific limitations on the manner of obtaining the text region.

[0084] Specifically, the data set required for model training can be constructed by artificial shooting and labeling, and then the model is trained according to the data set to obtain the image segmentation model.

[0085] S220, for any text region, extracting text information in the text region and position information corresponding to the text region.

[0086] In the embodiments of the application, the position information is used to represent the position region of the text region in the text image. The text information can be understood as the text, character and other information contained in the text region.

[0087] In the processing process, in order to ensure the accuracy of information extraction, on the basis of taking the text information in the text region as the extraction basis of information extraction, the position information of the text can also be extracted as the extraction basis, so that more rich information can be referred to in the extraction process, and the accuracy of the extraction result is improved.

[0088] Optionally, in the embodiments of the application, extracting the text information in the text region and the position information corresponding to the text region comprises: performing text extraction processing on the text region to obtain the text information in the text region; obtaining image coordinates of the text image, and determining the position information corresponding to each text region according to the image coordinates.

[0089] Specifically, the optical character recognition (Optical Character Recognition, OCR) technology can be used to recognize the text region to obtain the recognized text information. Of course, other implementation manners can also be used to extract the text information, and the application embodiments do not make specific limitations on the extraction manner.

[0090] While determining the text information in the text region, the position information corresponding to the text region can also be determined. Specifically, the image coordinates of the text image are obtained; wherein the image coordinates can be the corresponding pixel point coordinates of each pixel point in the image. Further, the region boundary points of the text region are determined, and the pixel point coordinates corresponding to each region boundary point are determined, and each pixel point coordinate is taken as the position information of the text region.

[0091] For example, the number of region boundary points varies according to the region shape of the text region, and the information dimension of the obtained position information also varies accordingly. For example, if the text region is a quadrilateral, there are four region boundary points, and position information including eight position parameters can be obtained.

[0092] In S230, a spatial feature of the text region is determined according to the position information and the text information.

[0093] In the embodiments of the present application, the spatial feature is used to represent the spatial relationship between text regions. For example, the text information in the text region adjacent to the current text region can be obtained, and more abundant information can be referred to in subsequent information extraction, thereby improving the accuracy of the extraction result.

[0094] Optionally, in the embodiments of the present application, the spatial feature of the text region is determined according to the position information and the text information, including: respectively encoding the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information; and determining the spatial feature of the text region according to the position features and the text features.

[0095] Specifically, the position information and the text information can be encoded by using the same encoding method, or the two types of information can be encoded by using different encoding methods, and the encoding method is not limited. Further, after obtaining the encoded position features and text features, the position features and text features are encoded again to obtain processed spatial features.

[0096] Optionally, in the embodiments of the present application, the position information and the text information are respectively encoded to obtain position features corresponding to the position information and text features corresponding to the text information, including: encoding the position information to obtain position features corresponding to the position information; obtaining a trained lightweight text encoding model, and encoding the text information according to the lightweight text encoding model to obtain text features corresponding to the text information.

[0097] Specifically, in the process of encoding the position information, the determined position information can be encoded by using linear transformation to obtain processed position features. Optionally, a trained position encoding model can also be obtained, and the position information is input into the position encoding model to obtain the position features output by the model. Of course, other methods can also be used for processing, which are not limited in the embodiments of the present application.

[0098] Specifically, in the process of encoding the text information, the trained lightweight text encoding model can be acquired, the text information is input into the lightweight text encoding model for encoding processing, and the text features output by the model are obtained. Optionally, other ways can also be used for text encoding, which is not limited here.

[0099] For example, the lightweight text encoding model can include but is not limited to the Albert model.

[0100] Optionally, in the embodiment of the present application, the spatial feature of the text region is determined according to the position feature and the text feature, including: splicing the position feature and the text feature to obtain spliced features; acquiring a trained spatial feature extraction model, and performing spatial feature extraction processing on the spliced features according to the spatial feature extraction model to obtain the spatial feature of the text region.

[0101] Specifically, the position feature and the text feature obtained based on the above embodiments can be spliced, and the spliced features are input into a fully connected layer network for feature fusion processing to obtain a feature vector with both text information and position information, i.e., spliced features.

[0102] On this basis, a trained spatial feature extraction model is acquired; the obtained spliced features are input into the control feature extraction model to obtain the spatial features output by the model. In the above processing process, the spatial feature extraction model can include but is not limited to a single-layer transformer model. Through the self-attention mechanism in the transformer, the feature vector with position information and text information is combined to explore the spatial relationship between different text regions in the text image, i.e., to obtain more rich feature information, so as to improve the accuracy of the extraction result in the subsequent information extraction.

[0103] S240, classifying the text to be classified according to the spatial features of each text region to extract the category of the user, and determining at least one attribute category corresponding to the user.

[0104] In the embodiment of the present application, on the basis that the text to be classified is medical record materials, the attribute category is the diagnosis result determined by information extraction in the medical record materials; specifically, it can be different diagnosis types; for example, hypertension, cold and weak stomach, etc. Since the same user may have multiple diseases in actual application, information extraction on the text to be classified of the user may obtain multiple attribute categories.

[0105] Optionally, in the embodiments of the present application, the category extraction of the text to be classified is performed according to the spatial features of each text region, and the at least one attribute category corresponding to the user is determined, including: obtaining the trained category extraction model; for any text region, inputting the spatial feature corresponding to the text region into the category extraction model to obtain the region attribute category corresponding to the text region; and obtaining the attribute category corresponding to the user according to the region attribute category corresponding to each text region.

[0106] Specifically, the trained category extraction model is obtained, and the spatial feature is input into the category extraction model. Specifically, the category extraction model can be a model composed of a full connection layer and a softmax classifier. Further, the softmax classifier processes the spatial feature to determine whether the region attribute category, i.e., the diagnosis result, exists in the corresponding text region. Optionally, if it exists, the extracted region attribute category is output; and optionally, if it does not exist, a prompt message that the region attribute category does not exist in the current text region is output.

[0107] On the basis of the processing of each text region and the obtained at least one region attribute category according to the above-mentioned embodiments, the collection processing of each region attribute category is performed to obtain the attribute category corresponding to the user.

[0108] In the technical solution, the received text image is processed in regions to obtain at least one text region; and then, taking any text region as an example, the text information in the current text region is extracted, and the position information representing the position of the current text region in the text image is determined; then, the spatial feature of the current text region is determined according to the position information and the text information; the category extraction of the text to be classified in the text image is performed according to the spatial feature of each text region to determine the at least one attribute category corresponding to the user; in the above-mentioned embodiments, the amount of data to be processed when the image data is used as the information basis in the existing information extraction process is reduced, the data processing speed is accelerated, and the processing efficiency is improved; and in the information extraction process, the spatial relationship between the texts to be classified in the image is determined through the text information of the texts to be classified and the position information of the texts in the image, and then the extraction is performed according to the spatial relationship, which makes up for the problem of reduced information amount caused by the missing of the image data, ensures the accuracy of the information extraction result, realizes the fast and accurate information extraction, and improves the processing efficiency of the text processing.

[0109] On the basis of the above-mentioned embodiments, the technical solution of the embodiments of the present application further includes: obtaining the business attribute type corresponding to the user; and determining whether the user is the target user according to the business attribute type and the attribute category.

[0110] The business attribute type can be understood as a business attribute type contained in a business handled by the user. For example, in the application scenario, the business attribute type can be understood as a diagnosis result that can be claimed in the insurance handled by the user.

[0111] Specifically, the data in the preset business database can be queried according to the user identifier of the user, and the business attribute type corresponding to the business is obtained.

[0112] On the basis of obtaining the business attribute type, the business attribute type is matched with the attribute type respectively. If they are all matched, it is indicated that the user is a target user. The target user can be understood as a user who can be claimed by the insurance.

[0113] On the basis of quickly and accurately extracting at least one attribute category corresponding to the user in the above embodiment, the user is judged based on the attribute category to determine whether the user is a target user, that is, a user who needs to be claimed, thereby improving the claim efficiency and claim accuracy in the intelligent claim processing process.

[0114] FIG. 3 is a structural schematic diagram of a text processing apparatus provided by an embodiment of the application. Referring to FIG. 3, the text processing apparatus 30 comprises a text region determination module 310, an information extraction module 320, a spatial feature determination module 330, and a category extraction module 340. The text region determination module 310 is configured to obtain a text image containing a text to be classified, and determine at least one text region corresponding to the text image.

[0115] The text region determination module 310 is configured to obtain a text image containing a text to be classified, and determine at least one text region corresponding to the text image.

[0116] The information extraction module 320 is configured to extract text information in the text region and position information corresponding to the text region for any text region. The position information is used to represent the position region of the text region in the text to be classified.

[0117] The spatial feature determination module 330 is configured to determine the spatial feature of the text region according to the position information and the text information.

[0118] The category extraction module 340 is configured to perform category extraction on the text to be classified according to the spatial feature of each text region, and determine at least one attribute category contained in the text to be classified.

[0119] In an optional embodiment, the information extraction module 320 comprises:

[0120] The text information acquisition submodule is configured to perform text extraction processing on the text region, and obtain the text information in the text region.

[0121] The position information acquisition submodule is configured to obtain the image coordinates of the text image, and determine the position information corresponding to each text region according to the image coordinates.

[0122] In an optional implementation, the spatial feature determination module 330 comprises:

[0123] a feature acquisition submodule, configured to respectively perform information coding on the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information;

[0124] a spatial feature determination submodule, configured to determine the spatial features of the text region according to the position features and the text features.

[0125] In an optional implementation, the feature acquisition submodule comprises:

[0126] a position feature acquisition unit, configured to perform information coding processing on the position information to obtain position features corresponding to the position information;

[0127] a text feature acquisition unit, configured to acquire the trained lightweight text coding model, perform feature coding on the text information according to the lightweight text coding model, and obtain text features corresponding to the text information.

[0128] In an optional implementation, the spatial feature determination submodule comprises:

[0129] a splicing feature determination unit, configured to perform splicing processing on the position features and the text features to obtain splicing features;

[0130] a spatial feature determination unit, configured to acquire the trained spatial feature extraction model, perform spatial feature extraction processing on the splicing features according to the spatial feature extraction model, and obtain the spatial features of the text region.

[0131] In an optional implementation, the category extraction module 340 comprises:

[0132] a category extraction module acquisition submodule, configured to acquire the trained category extraction model;

[0133] a region attribute type determination submodule, configured to, for any text region, input the spatial features corresponding to the text region into the category extraction model to obtain a region attribute category corresponding to the text region;

[0134] a category output determination submodule, configured to obtain the attribute category corresponding to the user according to the region attribute categories corresponding to the text regions.

[0135] In an optional implementation, the apparatus further comprises:

[0136] a service attribute type acquisition module, configured to acquire a service attribute type corresponding to the user;

[0137] The target user determining module is configured to determine whether the user is a target user according to the business attribute type and the attribute category.

[0138] FIG. 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in FIG. 4, the electronic device of the embodiment can include:

[0139] at least one processor 401; and

[0140] a memory 402 in communication connection with the at least one processor;

[0141] The memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401 to enable the server to perform the method of any of the foregoing embodiments.

[0142] Optionally, the memory 402 can be independent or integrated with the processor 401.

[0143] The implementation principle and technical effects of the electronic device provided by the embodiment can be referred to the foregoing embodiments, which will not be described here.

[0144] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores computer executable instructions. When the processor executes the computer executable instructions, the method of any of the foregoing embodiments is implemented.

[0145] The embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by the processor, the method of any of the foregoing embodiments is implemented.

[0146] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the device embodiments described above are only schematic; the division of the modules is only a logical function division; there can be another division manner for the actual implementation, for example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0147] The integrated modules with the software function modules described above can be stored in a computer readable storage medium. The software function modules stored in the storage medium include a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of the embodiments of the present application.

[0148] It should be appreciated that referenced processors above can be a central processing unit (CPU), and can also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general purpose processor can be a microprocessor or the processor can be any conventional processor. Steps of a method disclosed in conjunction with the application can be directly implemented in hardware processor, or implemented in combination with hardware and software modules in the processor. The memory can include a high speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0149] The storage medium described above can be realized by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

[0150] An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a server or host device.

[0151] FIG. 5 is a block diagram of an electronic device provided by an embodiment of the application. The device can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0152] Referring to FIG. 5, the apparatus 800 can include one or more of the following components: a processing component 802, a memory component 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0153] The processing component 802 generally controls the overall operations of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions delivered from the memory 804 to complete all or part of the steps of the methods described above. In addition, the processing component 802 can include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0154] The memory 804 is configured to store various types of data to support the operations of the device 800. Examples of these data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and so on. The memory 804 can be realized by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0155] The power component 806 provides power to the various components of the device 800. The power component 806 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.

[0156] The multimedia component 808 includes a screen providing an output interface between the device 800 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 808 includes a front camera and / or a back camera. The front camera and / or the back camera can receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each of the front camera and the back camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0157] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive an external audio signal when the device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0158] The I / O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which can include a keypad, a click wheel, buttons, and so on. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0159] The sensor component 814 includes one or more sensors for providing status assessments of various aspects of the device 800. For example, the sensor component 814 can detect an open / closed position of the device 800, relative positioning of components, such as a display and a keypad of the device 800, a change of position of the device 800 or a component of the device 800, presence or absence of user contact with the device 800, changes in orientation or acceleration / deceleration

[0160] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a corresponding communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an example embodiment, the communication component 816 receives broadcast signals or broadcast-related information from external broadcast management systems via a broadcast channel. In an example embodiment, the communication component 816 also includes a Near Field Communication (NFC) module to promote short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) techniques, infrared data association (IrDA) techniques, ultra-wideband (UWB) techniques, Bluetooth (BT) techniques, and other techniques.

[0161] In exemplary embodiments, the apparatus 800 can be implemented using one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronics units to perform the methods described above.

[0162] In exemplary embodiments, a non-transitory computer readable storage medium including instructions, such as the memory 804 including instructions, is also provided, which when executed by the processor 820 of the apparatus 800, causes the apparatus 800 to perform the methods described above. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and optical data storage device, etc.

[0163] A non-transitory computer readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, causes the electronic device to perform the method of the electronic device described above.

[0164] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the application be limited only by the scope of the claims, which will be construed in accordance with the principles of patent law including 35 U.S.C. § 112(f). All references cited herein are incorporated by reference in their entirety and for all purposes.

[0165] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be defined only by the claims appended hereto.

Claims

1. A text processing method characterized by, The method comprises: obtaining a text image of a user, and determining at least one text region corresponding to the text image; the text region contains text to be classified; for any text region, extracting text information in the text region and position information corresponding to the text region; the position information is used to represent the position region of the text region in the text image; determining a spatial feature of the text region according to the position information and the text information; performing category extraction on the text to be classified according to the spatial feature of the text region, and determining at least one attribute category corresponding to the user.

2. The method of claim 1, wherein, extracting the text information in the text region and the position information corresponding to the text region comprises: performing text extraction processing on the text region to obtain the text information in the text region; obtaining image coordinates of the text image, and determining the position information corresponding to each text region according to the image coordinates.

3. The method of claim 1, wherein, determining the spatial feature of the text region according to the position information and the text information comprises: respectively performing information coding on the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information; determining the spatial feature of the text region according to the position features and the text features.

4. The method of claim 3, wherein, respectively performing information coding on the position information and the text information to obtain position features corresponding to the position information and text features corresponding to the text information comprises: performing information coding processing on the position information to obtain the position features corresponding to the position information; obtaining a trained lightweight text coding model, and performing feature coding on the text information according to the lightweight text coding model to obtain the text features corresponding to the text information.

5. The method of claim 3, wherein, determining the spatial feature of the text region according to the position features and the text features comprises: performing splicing processing on the position features and the text features to obtain splicing features; obtaining a trained spatial feature extraction model, and performing spatial feature extraction processing on the splicing features according to the spatial feature extraction model to obtain the spatial feature of the text region.

6. The method of claim 1, wherein, performing category extraction on the text to be classified according to the spatial feature of each text region, and determining at least one attribute category corresponding to the user comprises: obtaining a trained category extraction model; for any text region, inputting the spatial feature corresponding to the text region into the category extraction model to obtain a regional attribute category corresponding to the text region; obtaining the attribute category corresponding to the user according to the regional attribute category corresponding to each text region.

7. The method according to any one of claims 1 to 6, characterized in that, After determining the at least one attribute category corresponding to the user, the method further comprises: obtaining a business attribute type corresponding to the user; determining whether the user is a target user according to the business attribute type and the attribute category.

8. A text processing apparatus characterized by comprising: The device comprises: a text region determination module configured to obtain a text image containing text to be classified, and determine at least one text region corresponding to the text image; An information extraction module is configured to extract, for any text region, text information in the text region and position information corresponding to the text region, the position information being used to represent a position region of the text region in the text to be classified; A spatial feature determination module is configured to determine a spatial feature of the text region according to the position information and the text information; A category extraction module is configured to perform category extraction on the text to be classified according to the spatial feature of each text region, and determine at least one attribute category contained in the text to be classified.

9. An electronic device, comprising: The method comprises the following steps: A processor and a memory connected with the processor; The memory stores computer execution instructions; The processor is configured to implement the text processing method according to any one of claims 1 to 7 when executing the computer execution instructions.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are configured to implement the text processing method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Document element determination method and device, equipment and storage medium

    CN116416640A

  • Graph neural network training method and device, graph neural network classification method and device, equipment and medium

    CN116757262A

  • Image processing method and device, computer equipment and computer readable storage medium

    CN117253237A

  • Image processing method, image processing device, electronic equipment and storage medium

    CN117994803A

  • Image processing method, electronic device and storage medium

    US20220253631A1