Order information correction method, device, equipment and storage medium

By using the order information correction method in OCR technology, the order reference information is used to correct the order information to be corrected, and the problem of low accuracy of order information recognition in OCR technology is solved, and the effect of quickly obtaining accurate order information is achieved.

CN112395874BActive Publication Date: 2025-04-22BEIJING TIANYIXING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011339777.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-25
Publication Date
2025-04-22
Estimated Expiration
2040-11-25

AI Technical Summary

Technical Problem

Existing OCR technology has accuracy problems when identifying order information, which may cause errors in the extracted information and makes it difficult to obtain accurate order information.

Method used

By obtaining the order information to be corrected based on the text recognition results of the order, determining the target search information, obtaining the order reference information matching the target search information using the preset search method, and finally using the order reference information to be corrected to obtain the target order information.

Benefits of technology

It realizes the rapid acquisition of accurate target order information from the text recognition results of the order, and improves the accuracy and efficiency of information processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395874B_ABST
    Figure CN112395874B_ABST
Patent Text Reader

Abstract

Disclosed is a method for correcting order information, the method comprising: obtaining order information to be corrected according to a text recognition result of an order; determining target search information from the text recognition result; obtaining order reference information matching the target search information through a preset search method; and correcting the order information to be corrected using the order reference information to obtain target order information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to computer vision technology, and more particularly to a method, device, equipment and storage medium for correcting order information. Background Art

[0002] Currently, OCR (Optical Character Recognition) technology has been widely used in many fields and industries. Through this technology, most text characters in text document images can be recognized. However, due to the accuracy of OCR results, the information extracted from OCR results may be wrong. How to obtain accurate information based on OCR results needs further research. Summary of the invention

[0003] The disclosed embodiment provides a solution for correcting order information.

[0004] According to one aspect of the present disclosure, a method for correcting order information is provided, the method comprising: obtaining order information to be corrected based on a text recognition result of an order; determining target search information from the text recognition result; obtaining order reference information matching the target search information through a preset search method; and correcting the order information to be corrected using the order reference information to obtain target order information.

[0005] In combination with any implementation manner provided in the present disclosure, the target search information includes partial content of the order information to be corrected; the partial content includes at least one of the subject name and at least one element.

[0006] In combination with any embodiment provided by the present disclosure, the obtaining of order reference information that matches the target search information through a preset search method includes at least one of the following: accessing a setting database to obtain order reference information that matches the target search information from the setting database; obtaining order reference information that matches the target search information through the Internet.

[0007] In combination with any embodiment provided in the present disclosure, the setting database includes reference unit information of multiple levels, and the reference unit information of the lowest level among the multiple levels corresponds to multiple reference subject names.

[0008] In combination with any embodiment provided by the present disclosure, the setting database stores first reference information corresponding to a reference subject name; determining target search information from the text recognition result includes: obtaining unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; obtaining order reference information matching the target search information from the setting database includes: determining target unit information matching the unit information of the lowest level in the order information to be corrected in the reference unit information of the lowest level in the setting database; determining a target subject name that meets preset conditions among multiple reference subject names corresponding to the target unit information; and obtaining order reference information matching the target search information according to the first reference information corresponding to the target subject name.

[0009] In combination with any embodiment provided by the present disclosure, the setting database stores second reference information corresponding to a reference subject name; obtaining order reference information matching the target search information from the setting database includes: obtaining unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; determining target unit information in the reference unit information of the lowest level in the setting database that matches the unit information of the lowest level in the order information to be corrected; determining a target subject name that meets preset conditions among multiple reference subject names corresponding to the target subject information; obtaining order reference information matching the target search information based on the reference unit information of each level corresponding to the target subject name and the second reference information corresponding to the target subject name.

[0010] In combination with any embodiment provided in the present disclosure, the determination of the target subject name that meets the preset conditions among the multiple reference subject names corresponding to the target unit information includes: matching the subject name corresponding to the order information to be corrected with the multiple reference subject names corresponding to the target unit information respectively; and determining the reference subject name with the highest matching score that exceeds a first set threshold as the target subject name.

[0011] In combination with any embodiment provided by the present disclosure, the obtaining of order reference information matching the target search information through the Internet includes: searching the Internet based on partial content of the order information to be corrected to obtain at least one reference information matching the target search information; matching the reference information corresponding to the target search information with the order information to be corrected; and obtaining order reference information having the highest matching score and exceeding a second set threshold.

[0012] In combination with any embodiment provided in the present disclosure, the method further includes: adding the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected to the information corresponding to the reference unit information at the lowest level in the setting database.

[0013] In combination with any embodiment provided in the present disclosure, the method further includes: updating the information corresponding to the lowest level reference unit information in the setting database according to the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected.

[0014] In combination with any embodiment provided in the present disclosure, the order information to be corrected includes at least address information, and at least one element included in the order information to be corrected includes at least one of the following: administrative district, postal code, and the reference unit information of multiple levels included in the setting database includes reference administrative district information or postal code information.

[0015] In combination with any embodiment provided by the present disclosure, the method of obtaining the order information to be corrected based on the text recognition result of the order includes: obtaining the text recognition result of the order, the text recognition result includes multiple text boxes; determining a first text box containing key information from the multiple text boxes, the key information includes partial content of the order information to be corrected, and the partial content includes at least one element in the order information to be corrected and at least one of the keywords indicating the order information to be corrected; according to the first text box, merging at least part of the multiple text boxes to obtain a merged text box; and obtaining the order information to be corrected from the merged text box.

[0016] According to one aspect of the present disclosure, a device for correcting order information is provided, the device comprising: an acquisition unit, used to obtain order information to be corrected based on a text recognition result of the order; a determination unit, used to determine target search information from the text recognition result; a matching unit, used to obtain order reference information matching the target search information through a preset search method; and a correction unit, used to correct the order information to be corrected using the order reference information to obtain target order information.

[0017] In combination with any implementation manner provided in the present disclosure, the target search information includes partial content of the order information to be corrected; the partial content includes at least one of the subject name and at least one element.

[0018] In combination with any embodiment provided in the present disclosure, the matching unit is specifically used for at least one of the following: accessing a setting database to obtain order reference information matching the target search information from the setting database; obtaining order reference information matching the target search information through the Internet.

[0019] In combination with any embodiment provided in the present disclosure, the setting database includes reference unit information of multiple levels, and the reference unit information of the lowest level among the multiple levels corresponds to multiple reference subject names.

[0020] In combination with any embodiment provided by the present disclosure, the setting database stores first reference information corresponding to a reference subject name; the determination unit is specifically used to: obtain the unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; the obtaining of order reference information matching the target search information from the setting database includes: determining target unit information matching the unit information of the lowest level in the order information to be corrected in the reference unit information of the lowest level in the setting database; determining a target subject name that meets preset conditions among multiple reference subject names corresponding to the target unit information; and obtaining order reference information matching the target search information according to the first reference information corresponding to the target subject name.

[0021] In combination with any embodiment provided by the present disclosure, the setting database stores second reference information corresponding to a reference subject name; the matching unit is specifically used to: obtain the unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; determine the target unit information in the reference unit information of the lowest level in the setting database that matches the unit information of the lowest level in the order information to be corrected; determine the target subject name that meets preset conditions among multiple reference subject names corresponding to the target subject information; obtain the order reference information that matches the target search information according to the reference unit information of each level corresponding to the target subject name and the second reference information corresponding to the target subject name.

[0022] In combination with any embodiment provided in the present disclosure, the matching unit is used to determine the target subject name that meets the preset conditions among the multiple reference subject names corresponding to the target unit information, and is specifically used to: match the subject name corresponding to the order information to be corrected with the multiple reference subject names corresponding to the target unit information; and determine the reference subject name with the highest matching score that exceeds the first set threshold as the target subject name.

[0023] In combination with any embodiment provided in the present disclosure, the matching unit is specifically used to: search the Internet based on part of the content of the order information to be corrected to obtain at least one reference information that matches the target search information; match the reference information corresponding to the target search information with the order information to be corrected; and obtain the order reference information with the highest matching score that exceeds a second set threshold.

[0024] In combination with any embodiment provided in the present disclosure, the device also includes an adding unit for adding the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected to the information corresponding to the reference unit information at the lowest level in the setting database.

[0025] In combination with any embodiment provided in the present disclosure, the device also includes an updating unit for updating the information corresponding to the reference unit information at the lowest level in the setting database based on the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected.

[0026] In combination with any embodiment provided in the present disclosure, the order information to be corrected includes at least address information, and at least one element included in the order information to be corrected includes at least one of the following: administrative district, postal code, and the reference unit information of multiple levels included in the setting database includes reference administrative district information or postal code information.

[0027] In combination with any embodiment provided by the present disclosure, the acquisition unit is specifically used to: acquire a text recognition result of the object to be processed, the text recognition result includes multiple text boxes; determine a first text box containing key information from the multiple text boxes, the key information includes partial content of the order information to be corrected, the partial content includes at least one element in the order information to be corrected and at least one of the keywords indicating the order information to be corrected; according to the first text box, merge at least part of the multiple text boxes to obtain a merged text box; acquire the order information to be corrected from the merged text box.

[0028] According to one aspect of the present disclosure, an electronic device is provided, the device comprising a memory and a processor, the memory being used to store computer instructions executable on the processor, the processor being used to implement the method for correcting order information described in any embodiment of the present disclosure when executing the computer instructions.

[0029] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for correcting order information described in any embodiment of the present disclosure is implemented.

[0030] The method, apparatus, device and storage medium for correcting order information of one or more embodiments of the present invention obtain the order information to be corrected based on the text recognition result of the order, determine the target search information from the text recognition result, obtain the order reference information matching the target search information through a preset search method, and use the order reference information to correct the order information to obtain the target order information, so that accurate target order information can be quickly obtained from the text recognition result of the order.

[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0033] Figure 1 is a flow chart of a method for correcting order information proposed by at least one embodiment of the present disclosure;

[0034] Figure 2 is a schematic diagram of a structure of a database set in a method for correcting order information provided in at least one embodiment of the present disclosure;

[0035] Figure 3A , 3B 3C is a schematic diagram of an information extraction method proposed in at least one embodiment of the present disclosure;

[0036] Figure 4 is a schematic diagram of a device for correcting order information provided by at least one embodiment of the present disclosure;

[0037] Figure 5 It is a structural schematic diagram of an electronic device proposed by at least one embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0039] Figure 1 A flow chart of a method for correcting order information according to some embodiments of the present disclosure is shown. Figure 1 As shown, the method includes steps 101 to 104.

[0040] In step 101, order information to be corrected is obtained according to the text recognition result of the order.

[0041] In the embodiment of the present disclosure, the order for text recognition includes at least one of the following: an order image, an order in the form of an electronic document, such as a PDF document. Those skilled in the art should understand that the order may also include other types suitable for text recognition.

[0042] In one example, a text box included in the order can be obtained by performing text detection on the order; and text recognition can be performed on the obtained text box to identify the text in the text box, thereby obtaining a text recognition result; or text recognition, such as OCR, can be directly performed on the order to be processed to obtain a text recognition result of the text box included in the order. The embodiments of the present disclosure do not limit the specific method for obtaining the text recognition result.

[0043] The order information to be corrected is the order information to be corrected obtained from the text recognition result of the order according to the set rules. For example, when the order information to be corrected includes address information, the address information to be corrected can be obtained from the text recognition result according to the address information rule.

[0044] In step 102, target search information is determined from the text recognition result. The target search information is information related to the order information to be corrected or can reflect the characteristics of the order information to be corrected.

[0045] In one example, the target search information includes part of the information of the order to be corrected; the part includes at least one of the subject name and at least one element. Taking address information as an example, the part of the content of the order to be corrected indicated by the target search information may include the subject name (such as name, place name, etc.) to which the address information belongs, and at least one element included in the address information (such as postal codes corresponding to administrative districts at all levels and bank districts at all levels, etc.).

[0046] In step 103, order reference information matching the target search information is obtained through a preset search method.

[0047] In the disclosed embodiment, the setting database can be accessed to obtain the order reference information matching the target search information from the setting database. The setting database stores a plurality of reference subject names and corresponding reference information. For example, in the case where the processing information is address information, the setting database is a database storing a plurality of subject names and corresponding address information. According to the subject name corresponding to the order information to be corrected, such as "XX Hotel" and the postal code, the matching "XX Hotel" can be searched in the setting database, and the corresponding address information can be used as the order reference information.

[0048] In the disclosed embodiment, the order reference information matching the target search information can also be obtained through the Internet. Still taking the address information as an example, the search engine can be used to search the Internet according to the subject name and postal code corresponding to the order information to be corrected, and the information corresponding to the retrieved matching subject name is used as the order reference information.

[0049] In the disclosed embodiment, the order reference information matching the target search information can also be obtained from the setting database and the Internet at the same time. In the case of order reference information obtained from both the setting database and the Internet, any one of them, or a designated one, can be used as the target order reference information; in the case of order reference information only obtained from the Internet, the setting database can be updated using the search results of the Internet.

[0050] In step 104, the order information to be corrected is corrected using the order reference information to obtain target order information.

[0051] In the embodiments of the present disclosure, at least one embodiment of the present disclosure proposes a method, apparatus, device and storage medium for correcting order information, which obtains order information to be corrected based on a text recognition result of an order, determines target search information from the text recognition result, obtains order reference information matching the target search information through a preset search method, and uses the order reference information to correct the order information to obtain target order information, so that accurate target order information can be quickly obtained from the text recognition result of the order.

[0052] The address database in the related art usually only supports the query from the subject name to the address, and has a certain fault tolerance only at the beginning and end of the input word. Since the correction method of the order information proposed in the embodiment of the present disclosure obtains the matching order reference information based on the target search information determined from the text recognition result, and the target search information can be part of the order information to be corrected, such as the subject name, or an element in the order information to be corrected, even if there is wrong information or even a wrong subject name in the order information, the correction method can also use other information in the order information as the target search information to obtain the order reference information to correct the order information to be corrected, which has a high fault tolerance.

[0053] In addition, since the acquisition of target search information is independent of the text layout of the order, the method for correcting order information proposed in at least one embodiment of the present disclosure is applicable to orders of different layouts.

[0054] In some embodiments, from the text recognition result of the order, the subject name corresponding to the order information to be corrected can be obtained as the target search information, wherein the subject name and the order information to be corrected are, for example, key-value pair information, wherein the subject name indicates an attribute, and the order information to be corrected indicates the value of the attribute.

[0055] In one example, the order information to be corrected may be address information, the subject corresponding to the address information is the object to which the address information belongs, and the corresponding subject name is the name of the object to which it belongs. For example, when the object to which the address information belongs is an individual, the corresponding subject name is the name; when the object to which the address information belongs is a place, the corresponding subject name is the place name. The order information to be corrected may also be identity information, and the subject name corresponding to the identity information is the name. Those skilled in the art should understand that the order information to be corrected may also be other types of information, and the present disclosure does not limit this.

[0056] In some embodiments, the setting database may include multiple levels of reference unit information, and the reference unit information of each lowest level in the multiple levels corresponds to multiple reference subject names. In the setting database, the reference unit information is organized and stored in a hierarchical manner from top to bottom, and the lower the level, the narrower the scope or the lower the authority corresponding to the reference unit information. Among them, the lowest level is the reference information unit with the smallest scope or the lowest authority. Taking the setting database for storing address information as an example, the multiple levels of reference unit information included in the setting database include reference administrative district information and / or postal code information, then the reference unit information of the lowest level includes the name of the administrative district with the smallest scope and / or the postal code corresponding to the smallest administrative district.

[0057] In one example, the reference unit information in the setting database may be stored in a tree structure, with non-leaf nodes at different levels storing reference unit information at different levels, and leaf nodes being used to store reference subject names belonging to upper-level nodes.

[0058] In some embodiments, the setting database also stores first reference information corresponding to each reference subject name. The first reference information is usually complete information corresponding to the reference subject name, including reference unit information at each level and specific reference information corresponding to the reference subject name. Taking address information as an example, the first reference information can be complete address information, including administrative district information at each level and a specific address corresponding to the reference subject name, such as a street and / or unit. The first reference information is pre-acquired reference information corresponding to the reference subject name with high credibility and accuracy.

[0059] Taking the order information to be corrected as the address information in the hotel order as an example, the multiple levels of reference unit information in the setting database can be multiple levels of administrative regions. The tree structure storing the address information can be a rooted tree structure, and the root node has no actual meaning; the child nodes of the root can be used to store the travel agency of the order (such as XX travel agency), and the remaining non-leaf nodes can be used to store the administrative region components or postal codes of the country; each leaf node can store an object name, and each leaf node can also store the complete address information corresponding to the object name. In the subtree corresponding to the same travel agency, all non-leaf nodes are unique, and the father node of the non-leaf node represents its own direct high administrative region.

[0060] Figure 2 Schematic diagram of the structure of setting a database in the method for correcting order information proposed in at least one embodiment of the present disclosure. Figure 2 As shown, the subtree of the traveling salesman can be constructed according to the hierarchy from top to bottom (from shallow to deep): country-province-city-district. In some cases, the next level of the district can also include sub-districts, and each administrative district can also be replaced by a postal code, for example, constructed as country-province-postal code-district. It should be understood by those skilled in the art that the above is only an example, and the postal code can replace any administrative district, and the present disclosure does not limit this.

[0061] For the setting database that stores address information, the reference administrative district information of each level stored in the tree structure can be obtained based on the administrative division tables of various countries and the correspondence table between postal codes and administrative districts disclosed on the Internet; the reference entity name stored in the leaf node and the corresponding first reference information can be obtained by manual marking.

[0062] In the case where the setting database further stores the first reference information corresponding to each reference subject name, the order reference information corresponding to the order information to be corrected may be obtained in the following manner.

[0063] First, according to the hierarchical division in the setting database, the unit information of the lowest level in the order information to be corrected can be obtained as the target search information.

[0064] Taking the order information to be corrected as the address information of a hotel order as an example, according to the hierarchical division of the address in the set database, that is, the tree structure of the database, the unit information of each level contained in the order information to be corrected can be obtained. For example, by splitting the order information to be corrected according to the tree structure "country-province-city-district" in the database, the administrative district information of each level contained in the address information can be obtained. Among them, the administrative district information of the lowest level can be used as the target search information. For example, in the case where the smallest administrative district contained in the address information is a sub-district, the sub-district information can be used as the target search information; in the case where the smallest administrative district contained in the address information is a district, the district information can be used as the target search information; other situations are similar and will not be repeated.

[0065] Next, the target unit information matching the unit information at the lowest level in the order information to be corrected is determined in the reference unit information at the lowest level of the setting database. That is, in the tree structure of the setting database, the location of the unit information at the lowest level in the order information to be corrected is located. In the tree structure of the setting database, the location where the unit information at the lowest level is stored is located, that is, the reference unit information corresponding to (matching) the unit information at the lowest level is determined, and the reference unit information is used as the target unit information.

[0066] Afterwards, a target subject name that meets a preset condition among a plurality of reference subject names corresponding to the target unit information is determined.

[0067] Each lowest level of reference unit information in the database is set to correspond to a plurality of reference subject names, so that among the plurality of reference subject names, a target subject name can be determined according to a preset condition.

[0068] In one example, the subject name corresponding to the order information to be corrected can be matched with multiple reference subject names corresponding to the target unit information respectively; and the reference subject name with the highest matching score and exceeding a first set threshold is determined as the target subject name.

[0069] Finally, order reference information matching the target search information is obtained according to the first reference information corresponding to the target subject name.

[0070] In the case where reference information corresponding to each reference subject name is stored in the preset library, the order reference information of the order information to be corrected can be obtained according to the first reference information corresponding to the determined target subject name. The reference information stored in the setting database has a high degree of credibility and accuracy. By using the reference information to correct the order information to be corrected, more accurate target order information can be obtained.

[0071] In some embodiments, the setting database stores second reference information corresponding to each reference subject name. The second reference information is other reference information other than the reference unit information of each level, and is usually more specific information than the reference unit information of each level. Taking the order information to be corrected as the address information contained in the hotel order as an example, the second reference information can be, for example, the street and / or unit where the hotel is located. The second reference information is pre-acquired reference information corresponding to the reference subject name with high credibility and accuracy.

[0072] In the case where the second reference information corresponding to each reference entity name is stored in the setting database, the method of determining the target entity name is similar to the above method, except that after the target entity name is determined, the order reference information corresponding to the order information to be corrected is obtained based on the reference unit information of each level corresponding to the target entity name and the second reference information corresponding to the target entity name.

[0073] According to the reference unit information of each level corresponding to the target entity name and the second reference information corresponding to the target entity name, the complete information of the target entity name can be obtained. By correcting the order information to be corrected according to the complete information, more accurate and complete target order information can be obtained.

[0074] In some embodiments, order reference information corresponding to the order information to be corrected may also be obtained from the Internet based on the target search information.

[0075] In one example, based on partial content of the order information to be corrected, such as the subject name or at least one element, a search can be performed on the Internet to obtain at least one order reference information corresponding to the subject name, and the order reference information corresponding to the subject name can be matched with the order information to be corrected to obtain the reference information with the highest matching score that exceeds a second set threshold.

[0076] Still taking the address information of the hotel order as the order information to be corrected as an example, the target search information may include the postal code contained in the address information, and / or the administrative district information of one level. According to the subject name corresponding to the address information, that is, the hotel name, together with at least one element included in the order information to be corrected, multiple address information that may be hotel addresses can be obtained from the Internet. By fuzzy matching the address information obtained from the Internet with the order information to be corrected according to the address components, the address information with the highest match and exceeding the second set threshold can be used as the order reference information of the order information to be corrected for correction, so as to obtain more accurate hotel address information.

[0077] When the matching scores of two or more address information are the same, any one of the address information may be retained and the other address information may be deleted.

[0078] In the disclosed embodiment, the organization and storage of administrative regions at all levels and the postal codes corresponding to the administrative regions in the address database can be set according to the regulations of the target country, so that the correction method can be easily extended to the correction of itinerary information for destinations in any country.

[0079] In some embodiments, the target search information may be first searched in a setting database, and then searched in the interconnection.

[0080] In the case that there is no target subject name matching the subject name corresponding to the order information to be corrected in the setting database, the reference information corresponding to the order information to be corrected obtained from the Internet and the subject name corresponding to the order information to be corrected can be added to the information corresponding to the reference unit information at the lowest level in the setting database, that is, the subject name is added to the reference subject name corresponding to the reference unit information at the corresponding lowest level. For the setting database with a tree structure, the subject name corresponding to the order information to be corrected and the order reference information are stored in the leaf nodes of the tree structure as the newly added reference subject name and the corresponding first reference information.

[0081] In the case where the reference information obtained from the setting database is inconsistent with the reference information obtained from the Internet, the information corresponding to the reference unit information at the lowest level in the setting database can be updated based on the reference information corresponding to the order information to be corrected obtained from the Internet and the subject name corresponding to the order information to be corrected. That is, the reference information corresponding to the order to be corrected obtained from the Internet is used to replace the reference information of the target subject name corresponding to the reference unit information at the lowest level in the setting database. For a setting database with a tree structure, the reference information corresponding to the order information to be corrected is used to replace the reference information corresponding to the reference subject name originally stored in the leaf node of the tree structure, thereby updating the reference information of the reference subject name.

[0082] In one example, before updating the reference information of the reference subject name, the last update time of the reference information corresponding to the order information to be corrected obtained from the Internet can be obtained, and based on the update time, it is determined whether to update the reference information of the reference subject name. For example, if the last update time is within a set time range, such as within the last year or within the last 6 months, the update can be performed; on the contrary, if the last update time exceeds the set time range, a prompt message can be output, and the technician can determine whether to update to avoid incorrect updates.

[0083] In the embodiment of the present disclosure, by using reference information obtained from the Internet to add and update the setting database, the credibility and accuracy of the reference information obtained from the setting database can be improved, so that more accurate order information to be corrected can be obtained from the pending orders.

[0084] When applying for a visa for outbound travel, you need to fill in hotel information and provide a hotel itinerary for review. Text recognition and information extraction from the hotel itinerary can reduce the tedious user filling and simplify the review process. However, due to the accuracy of the OCR results, the information extracted from the OCR results may be wrong.

[0085] In the related technology, N-gram model is usually used to correct the text recognition results. However, since the training of N-gram model depends on the vocabulary, and the vocabulary of address information, especially the vocabulary of foreign place names, is usually incomplete, the correction effect of N-gram model on the order text recognition results of hotel orders is poor.

[0086] By applying the order information correction method proposed in at least one embodiment of the present disclosure to automatic visa processing, the hotel address information in the text recognition result of the hotel itinerary can be corrected, such as correcting the wrong information in the hotel address, or completing the incomplete hotel address, thereby improving the accuracy and reliability of automatic visa information filling, improving the user experience, and facilitating the approval process. In addition, since the correction method of the present disclosure can use reference information obtained from the Internet for correction, or update the setting database based on the reference information obtained from the Internet, the problem of incomplete vocabulary can be solved, and a better correction effect can be obtained.

[0087] In the embodiment of the present disclosure, the order information to be corrected includes at least address information and identity information. In this case, the order information to be corrected can be obtained from the text recognition result of the order to be processed by the following method.

[0088] First, a text recognition result of the order is obtained, where the text recognition result includes a plurality of text boxes.

[0089] Next, a first text box containing key information is determined from the multiple text boxes. The key information may include partial content of the order information to be corrected, and the partial content includes at least one element in the order information to be corrected and at least one of keywords indicating the order information to be corrected.

[0090] In the case where the order information to be corrected is address information, the key information may include the element "postal code" in the address information. When the region to which the address information belongs is known, the number of digits in the postal code can be determined. Taking the case where the order information to be corrected is a Thailand address as an example, since the Thailand postal code is 5 digits, it can be determined that the key information is 5 digits. In this step, a text box containing 5 digits is determined as the first text box. Taking into account the situation that the identified content may include more than 5 digits, for example, the text box includes 8 digits, etc., in order to reduce additional discrimination operations, a text box containing only 5 digits can be determined as the first text box in the actual application process.

[0091] In some embodiments, the found postal code may also be searched in a list of postal codes of the region to which the found postal code belongs, to confirm that the found postal code is indeed the postal code of the region to which it belongs.

[0092] In the case of an unknown region to which the address information belongs, the key information can be determined as a 4- to 9-digit number by combining the number of digits of postal codes around the world. In this step, a text box containing a 4- to 9-digit number is determined as the first text box. In a possible implementation, in order to reduce additional discrimination operations, a text box containing only a 4- to 9-digit number can be determined as the first text box, that is, a text box containing 10 or more digits is not considered.

[0093] The key information may also include an element in the address information—administrative district information, such as “xx”. Then, among the multiple text boxes, a text box containing text content such as “xx” is determined as the first text box.

[0094] The key information also includes keywords indicating the order information to be corrected. Taking the order information to be corrected as an address as an example, the keywords include "address", "address", and keywords representing addresses in other languages. It should be noted that the form of keywords is not limited in this application, for example, it can include a variety of forms such as full names and abbreviations.

[0095] Afterwards, according to the first text box, at least part of the multiple text boxes are merged to obtain a merged text box.

[0096] In the embodiment of the present disclosure, the text frame to be merged is determined based on the first text frame. For example, the text frame to be merged can be determined based on the positional relationship with the first text frame, and the text frames to be merged are merged to obtain a merged text frame.

[0097] Finally, the order information to be corrected is obtained from the merged text box.

[0098] The order information to be corrected can be extracted from the merged text box according to the content contained in the merged text box or the format information of the merged text box, or according to the content contained in the merged text box and the format information of the merged text box.

[0099] In an embodiment of the present disclosure, by determining a first text box containing key information among multiple text boxes included in the text recognition results of the order to be processed, merging at least part of the text boxes based on the first text box to obtain a merged text box, and obtaining the order information to be corrected from the merged text box, efficient information processing can be achieved in the order to be processed based on the key information in the order information to be corrected.

[0100] In some embodiments, the text boxes may be merged in the following manner to obtain a merged text box.

[0101] First, the positional relationship between each text box except the first text box among the multiple text boxes and the first text box is obtained. The positional relationship includes the orientation relationship between other text boxes (i.e., any text box except the first text box or a specified text box) and the first text box, such as above or below the first text box, and also includes the distance from the first text box, such as the pixel distance from the first text box in the vertical direction and the pixel distance in the horizontal direction. The distance between the text boxes is determined according to the distance between the center points of the two text boxes.

[0102] Next, in each of the text boxes, the text box whose positional relationship with the first text box is within a set range is determined as the second text box. For example, the text box above the first text box can be determined as the second text box, or the text box whose pixel distance with the first text box in the vertical direction is within a set threshold can be determined as the second text box, etc.

[0103] Afterwards, the first text box and the second text box are taken as text boxes to be merged to obtain the merged text box.

[0104] In the disclosed embodiment, the text boxes to be merged are determined based on the positional relationship between the multiple text boxes in the text recognition results and the first text box containing the key information, and the merged text boxes are merged. The text box objects to be merged can be narrowed down to the range related to the order information to be corrected, thereby reducing the amount of information processing and improving information processing efficiency.

[0105] The merging of the text boxes to be merged may be performed based on rows, that is, the text boxes to be merged are merged according to the rows to which the text boxes in the text boxes to be merged belong, to obtain the merged text box.

[0106] When the number of text boxes belonging to the same row among the text boxes to be merged is one, one text box belonging to the same row is determined as a merged text box.

[0107] When there are multiple text boxes belonging to the same row among the text boxes to be merged, the multiple text boxes belonging to the same row are merged to obtain a merged text box.

[0108] Figure 3A An exemplary merging result is shown. Figure 3A As shown, it includes multiple lines of merged text boxes, including merged text boxes 301-303, wherein each line of the merged text boxes is obtained by merging one or more text boxes contained in the line.

[0109] In the embodiment of the present disclosure, by merging the text boxes to be merged with the rows to which the text boxes belong, a merged text box corresponding to each row is obtained, which is beneficial to subsequent information processing.

[0110] In some embodiments, for multiple text boxes belonging to the same row, when the distance between two adjacent text boxes is less than a first threshold, the two adjacent text boxes are merged; by merging every two adjacent text boxes that meet the above conditions in the same row, a merged text box corresponding to the row is obtained. The first threshold can be specifically determined according to the format characteristics of the order information to be corrected.

[0111] For multiple text boxes belonging to the same row, when the distance between adjacent text boxes is greater than or equal to the first threshold, it indicates that the two adjacent text boxes may not have related content and do not belong to the order information to be corrected, so the adjacent text boxes are not merged.

[0112] When more than one merged text box is obtained by merging adjacent text boxes in the same row, the merged text box corresponding to the row is determined according to the positional relationship between the merged text box obtained and the first text box. For example, the merged text box that is closest to the first text box in the horizontal direction is used as the final merged text box.

[0113] In the embodiment of the present disclosure, by restricting the merging conditions between adjacent text boxes in the same row, it is possible to avoid merging text boxes with irrelevant contents into the merged text box, thereby improving the accuracy of information processing.

[0114] In some embodiments, the order information to be corrected may be obtained from the merged text box according to the format characteristics of the order to be processed.

[0115] The format features of the order to be processed include distance features between lines of text, font features of lines of text, positional relationship features between texts, and the like.

[0116] According to the format feature, a target direction for acquiring the order information to be corrected can be determined, and the order information to be corrected can be acquired according to the target direction.

[0117] For example, when the order information to be corrected is address information and the key information is a postal code, since the postal code is usually located at the end of the address information, it can be determined that the order information to be corrected is located above the first text box, and thus the target direction for extracting the order information to be corrected can be determined, and extraction is performed according to the target direction.

[0118] For another example, when the order information to be corrected is address information and the key information is the keyword "address" indicating the address information, since the keyword "address" is usually located at the very front of the address information, it can be determined that the order information to be corrected is located below the first text box, and thus the target direction for extracting the order information to be corrected can be determined, and the extraction is performed according to the target direction.

[0119] In the disclosed embodiment, by determining a target direction according to the format features of the order to be processed, and obtaining the order information to be corrected from the merged text box according to the target direction, the efficiency of information processing can be improved.

[0120] In some embodiments, the target direction includes a first target direction and a second target direction, the first target direction is used to indicate the direction of traversing the merged text box in the process of locating the area where the order information to be corrected is located, and the second target direction is used to indicate the direction of reading the order information to be corrected from the area where the order information to be corrected is located.

[0121] In one example, taking the first text box as the starting position, traverse the merged text boxes according to the first target direction until the merged text box where the key information is located is found; taking the key information as the starting position, traverse the merged text boxes according to the second target direction until the merged text box where the key information is located is found, and obtain the content traversed according to the second target direction. The key information may include keywords indicating the order information to be corrected, at least one element of the order information to be corrected, partial content of the order information to be corrected, etc. Taking the order information to be corrected as an address as an example, keywords indicating address information include "address", "address", and keywords representing addresses in other languages.

[0122] See also Figure 3A In the exemplary merged text box shown, the key information is the postal code 10110. The first text box containing "postal code 10110" is taken as the starting position, that is, starting from the merged text box 301, the merged text boxes are traversed upward until the merged text box 302 where the key information "Address" is found. Then, taking the key information "Address" as the starting position, the merged text boxes are traversed downward until the merged text box 301 where the key information "postal code 10110" is found, and the content traversed downward is obtained as the order information to be corrected. It should be noted that for "address" such as the English interpretation, there is no limitation on the uppercase or lowercase forms of some or all of the letters in the word, and it can be adjusted according to the actual situation. This means that in the actual recognition and other processing processes, the same processing method can be used for ADDRESS, Address, address, etc., that is, they are all recognized as "address".

[0123] In one example, the method further includes: obtaining the distance between adjacent merged text boxes. The adjacent merged text boxes include two merged text boxes adjacent to each other in the vertical direction. The multiple merged text boxes obtained from the text recognition result include multiple pairs of adjacent merged text boxes. Figure 3B As shown, the merged text boxes 311 - 314 include adjacent merged text boxes 311 - 312 , adjacent merged text boxes 312 - 313 , and adjacent merged text boxes 313 - 314 .

[0124] Taking the first text box as the starting position, traverse the merged text boxes according to the first target direction until an adjacent merged text box whose distance meets the first set condition is found. Wherein, traversing includes obtaining the text content in the merged text box, and also includes obtaining the distance between the merged text box and its adjacent merged text boxes, wherein the adjacent merged text boxes are traversed between the merged text boxes. Next, taking the first traversed merged text box among the adjacent merged text boxes whose distance meets the first set condition as the starting position, traverse the merged text boxes according to the second target direction until the merged text box where the key information is located is found, and obtain the content traversed according to the second target direction. Wherein, the distance between adjacent merged text boxes meets the first set condition includes: the distance between the adjacent merged text boxes is greater than the first inter-frame distance threshold.

[0125] See also Figure 3BIn the exemplary merged text box shown, the key information is the postal code 10400, and the first text box containing the postal code is used as the starting position, that is, the first text box containing "10400" is used as the starting position, that is, starting from the merged text box 311, the merged text box is traversed upward. Taking the traversal to the merged text box 312 as an example, it includes obtaining the content in the merged text box 312 and obtaining the distance between the merged text box 312 and the merged text box 311. Among them, the distance between the two text boxes can be the pixel distance between the center points of the two text boxes in the vertical direction, and the pixel distance between the corresponding positions of the two text boxes can also be used as the distance between the two text boxes. For example, when the two text boxes are left-aligned, the corner points of the two text boxes located in the upper left corner or the lower left corner can be used as the two vertices for determining the distance, and the pixel distance between the two vertices is used as the distance between the two text boxes. Of course, other methods similar to the above content can also be used to determine the distance between the two text boxes. The specific implementation process is not limited in this application, and may include but is not limited to the above-mentioned examples. When the distance between the merged text box 312 and the merged text box 311 does not satisfy the first set condition, that is, the distance between the merged text box 312 and the merged text box 311 is less than or equal to the first inter-frame distance threshold, the upward traversal continues. When it is detected that the distance between the merged text box 314 and the merged text box 313 satisfies the first set condition, that is, the distance between the merged text box 314 and the merged text box 313 is greater than the first inter-frame distance threshold, the upward traversal is stopped. Next, taking the merged text box 313 as the starting position, that is, taking the merged text box 313 that is first traversed between the merged text box 314 and the merged text box 313 as the starting position, traverse the merged text boxes downward until the merged text box 311 where the key information postal code "10400" is located is found, and the content traversed downward is obtained as the order information to be corrected.

[0126] In the embodiment of the present disclosure, the relationship between the directions pointed by the first target direction and the second target direction is not limited, that is, the first target direction and the second target direction can be at a certain angle, for example, the first target direction and the second target direction can be opposite (i.e., 180°) or the same (i.e., 0°).

[0127] In one example, when the key information is located at the beginning of the order information to be corrected, the first target direction may indicate to traverse the merged text box downwards, and the merged text box is traversed downwards until the key information is found, or an adjacent merged text box whose distance satisfies the first set condition is found. In the case where the key information is located at the beginning of the order information to be corrected, the first target direction is the same as the second target direction, and the traversed area is traversed again according to the second target direction to obtain the traversed content as the order information to be corrected.

[0128] In some embodiments, the adjacent merged text boxes are used as target adjacent merged text boxes, and the first inter-frame distance threshold corresponding to the target adjacent merged text boxes is determined according to at least one of the following: the height of the merged text box first traversed in the target adjacent merged text box; the distance between the merged text boxes included in the traversed adjacent merged text boxes and the height of the merged text box first traversed. The target adjacent merged text boxes are two adjacent merged text boxes for which the first inter-frame distance threshold is to be determined. In the embodiments of the present disclosure, the first inter-frame distance threshold corresponding to each pair of adjacent merged text boxes may be different.

[0129] In an example, the first inter-frame distance threshold is determined according to the height of the merged text frame that is first traversed among the target adjacent merged text frames.

[0130] by Figure 3B Taking the first inter-frame distance threshold corresponding to the adjacent merged text boxes 311 and 312 in the example as an example, since each merged text box is traversed from bottom to top in the process of locating the area where the order information to be corrected is located, the adjacent merged text boxes 311 and 312 are the first adjacent merged text boxes traversed in this example, and the first inter-frame distance threshold corresponding to the two can be determined according to the height of the merged text box 311. For example, the first inter-frame distance threshold is set to 0.65*mean_height1 (the height of the merged text box 311).

[0131] In one example, the first inter-frame distance threshold can be determined based on the distance between merged text frames included in the traversed adjacent merged text frames and the height of the merged text frame traversed first, wherein the merged text frame traversed first is the merged text frame traversed first in the process of locating the area where the order information to be corrected is located.

[0132] by Figure 3BFor example, the first inter-frame distance threshold corresponding to the adjacent merged text boxes 312 and 313 in the example can be determined according to the distance between the traversed adjacent merged text boxes 311 and 312 and the height of the merged text box 311 that was traversed first. For example, the first inter-frame distance threshold threshold is set to mean1_distance+standard1_deviation, where mean1_distance represents the distance between the adjacent merged text boxes 311 and 312, standard1_deviation represents the disturbance value corresponding to the merged text boxes 311 and 312, standard1_deviation=0.25*height1, and height1 is, for example, the height of the merged text box 311.

[0133] When more than one pair of adjacent text boxes have been traversed, Figure 3B Taking the first inter-frame distance threshold corresponding to the adjacent text boxes 313 and 314 in as an example, the first inter-frame distance threshold corresponding to the target adjacent text boxes 313 and 314 can be determined according to the distance between the traversed adjacent merged text boxes 311 and 312, the distance between the adjacent merged text boxes 312 and 313, and the height of the merged text box 311 traversed first.

[0134] In one example, the first inter-frame distance threshold corresponding to the target adjacent merged text box may be determined in the following manner: obtaining an updated inter-frame distance of the target adjacent merged text box, the updated inter-frame distance being obtained by weighted summing the distances between merged text boxes included in a reference adjacent merged text box and the updated inter-frame distances between merged text boxes included in the reference adjacent merged text box, wherein the reference adjacent text box is an adjacent merged text box closest to the target merged text box; obtaining an updated perturbation value of the target adjacent merged text box, the updated perturbation value being obtained by weighted summing the perturbation value of the adjacent merged text box traversed first and the absolute value of the distance difference, wherein the distance difference is the difference between the updated inter-frame distance of the target adjacent merged text box and the distance between merged text boxes included in the reference adjacent merged text box, and the perturbation value is determined according to the height of the merged text box traversed first; and determining the first inter-frame distance threshold of the target adjacent merged text box according to the updated inter-frame distance and the updated perturbation value.

[0135] Still Figure 3B Taking the first inter-frame distance threshold corresponding to the adjacent text frames 313 and 314 in the example as an example, firstly obtain the update inter-frame distance corresponding to the adjacent text frames 313 and 314.

[0136] new_mean=0.6*mean_distance+0.4*mean2_distance;wherein, mean_distance is the updated inter-frame distance between the merged text frames included in the reference adjacent merged text frames 312 and 313. In this example, except for the first traversed adjacent merged text frame, the updated inter-frame distance corresponding to each adjacent merged text frame is obtained in the same manner. The updated inter-frame distance corresponding to the first traversed adjacent merged text frame is the distance between the included merged text frames. Next, obtain the updated disturbance value new_deviation=0.6*standard1_deviation+0.4*abs(mean2_distance-new_mean), where standard1_deviation is as described above, indicating the disturbance value corresponding to the merged text frames 311 and 312, which is, for example, the height of the merged text frame 311, and the meanings of mean2_distance and new_mean are as described above. Finally, the first inter-frame distance threshold corresponding to the target adjacent merged text frames 313 and 314 is determined according to the updated inter-frame distance and the updated disturbance value obtained above.

[0137] Those skilled in the art should understand that the values ​​of the above parameters are only used for illustration and are not intended to be limiting. The values ​​of the parameters and the weighting coefficients can be determined according to actual needs.

[0138] for Figure 3B The multiple merged text boxes shown, by applying the method for determining the first inter-frame distance threshold described above, when traversing upward from the merged text box 311, it is detected that the distance between the merged text box 314 and the merged text box 313 is greater than the corresponding first inter-frame distance threshold, so the traversal is stopped, and then the merged text box 313 that is first traversed between the merged text boxes 314 and 313 is used as the starting position, and each merged text box is traversed downward until the merged text box 311 where the key information is located is found, and the content obtained by traversing downward is obtained.

[0139] In the embodiment of the present disclosure, by setting a disturbance value for the distance threshold and updating the current distance threshold based on the distance between the traversed adjacent merged text boxes and the first traversed merged text box, the fault tolerance of the information extraction method proposed in the embodiment of the present disclosure is improved, thereby being able to more effectively extract the order information to be corrected.

[0140] In some embodiments, after extracting the order information to be corrected, the subject name corresponding to the order information to be corrected can also be determined from a merged text box outside the area where the order information to be corrected is located according to the target direction and based on the positional relationship with the area where the order information to be corrected is located.

[0141] In the files of various formats, the text box closest to the extracted target area is the text box of the subject name corresponding to the order information to be corrected. Figure 3B Taking the partial screenshot of the hotel order shown in the figure as an example, it can be seen that the text box above the extracted address information is the main body of the address information - the name of the hotel. The same is true for business cards, shopping orders and other documents. The text box closest to the area where the address information, identity information, etc. are located is the text box where the main body of the information is located.

[0142] In an example, the subject name corresponding to the order information to be corrected may be determined by the following method.

[0143] First, determine the merged text box that is closest to the area where the order information to be corrected is located in the first target direction; take the merged text box as the starting position, traverse the merged text boxes in the first target direction until an adjacent merged text box whose distance meets the second set condition is found; take the merged text box that is first traversed among the adjacent merged text boxes whose distance meets the second set condition as the starting position, traverse the merged text boxes outside the area where the order information to be corrected is located in the second target direction, and obtain the content traversed in the second target direction.

[0144] by Figure 3CTaking the merged text box shown as an example, the content contained in the merged text boxes 321 to 322 is the order information to be corrected extracted according to the method for correcting order information described in any embodiment of the present disclosure, and the area where the merged text boxes 321 to 322 are located can be determined as the area where the order information to be corrected is located. In each merged text box determined according to the text recognition result, except for merged text boxes 321 to 322, the merged text box closest to the area where the order information to be corrected is located in the first target direction (the direction of search traversal, upward in this example) is 323 (there is text in a non-target language between merged text box 322 and merged text box 323, as shown in the gray part, which is ignored). Take merged text box 323 as the starting position and traverse the merged text boxes upward. Since the distance between the adjacent merged text box above the merged text box 323 and the merged text box 323 exceeds the second inter-frame threshold, that is, the second set condition is met (when there is no other merged text box above the merged text box 323, it is also considered that the second set condition is met), the merged text box 323 is used as the starting position, and the merged text boxes outside the area where the order information to be corrected is located are traversed downward, which is the merged text box 323 in this example, so that the content "XXXXXX Hotel" in the merged text box can be determined as the name of the subject of the order information to be corrected, that is, "XXXXXX Hotel" is determined as the name of the subject of the order information to be corrected.

[0145] In some embodiments, when traversing the merged text boxes in the first target direction with the merged text box as the starting position, the merged text boxes that are not above the target area are ignored, that is, the merged text boxes that have no horizontal intersection with the merged text box where the order information to be corrected is located are ignored.

[0146] In one example, when the traversed merged text box contains “)” but not “(”, the distance condition between adjacent merged text boxes can be ignored, and the merged text boxes are traversed in the first target direction until “(” is found, and then it is determined whether to stop traversal based on the distance condition between adjacent merged text boxes. In this example, the second inter-box distance threshold can be set to 0.4*mean_height (the average height of adjacent merged text boxes).

[0147] In one example, when the currently traversed merged text box contains a complete bracket "()" or does not contain a bracket, the second inter-box distance threshold can be set to 0.6*mean_height (average height of adjacent merged text boxes). Those skilled in the art should understand that the above coefficient settings are all examples, and the present disclosure does not limit this.

[0148] The information extraction method proposed in any embodiment of the present disclosure can be applied to images or electronic documents of various formats, including at least one of the following: images or electronic documents (e.g., PDF documents) of hotel orders, flight itineraries, passports, ID cards, etc. By applying the information extraction method to the above-mentioned images or electronic documents of various formats, the corresponding type of order information to be corrected contained in the images or electronic documents can be extracted, including at least one of the following: address information, itinerary information, identity information, etc.

[0149] Figure 4 An order information correction device provided for at least one embodiment of the present disclosure includes: an acquisition unit 401, used to obtain the order information to be corrected according to the text recognition result of the order; a determination unit 402, used to determine the target search information from the text recognition result; a matching unit 403, used to obtain the order reference information matching the target search information through a preset search method; and a correction unit 404, used to correct the order information to be corrected using the order reference information to obtain the target order information.

[0150] In some embodiments, the target search information includes at least one of the following: the target search information includes partial content of the order information to be corrected; the partial content includes at least one of a subject name and at least one element.

[0151] In some embodiments, the matching unit is specifically used for at least one of the following: accessing a setting database to obtain order reference information matching the target search information from the setting database; obtaining order reference information matching the target search information through the Internet.

[0152] In some embodiments, the setting database includes reference unit information of multiple levels, and the reference unit information of the lowest level among the multiple levels corresponds to multiple reference subject names.

[0153] In some embodiments, the setting database stores first reference information corresponding to a reference subject name; the determination unit is specifically used to: obtain the unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; the obtaining of order reference information matching the target search information from the setting database includes: determining target unit information matching the unit information of the lowest level in the setting database that matches the unit information of the lowest level in the order information to be corrected; determining a target subject name that meets preset conditions among multiple reference subject names corresponding to the target subject information; and obtaining order reference information matching the target search information according to the first reference information corresponding to the target subject name.

[0154] In some embodiments, the setting database stores second reference information corresponding to a reference subject name; the matching unit is specifically used to: obtain the unit information of the lowest level in the order information to be corrected according to the hierarchical division in the setting database; determine the target unit information in the reference unit information of the lowest level in the setting database that matches the unit information of the lowest level in the order information to be corrected; determine the target subject name that meets preset conditions among multiple reference subject names corresponding to the target subject information; obtain the order reference information that matches the target search information according to the reference unit information of each level corresponding to the target subject name and the second reference information corresponding to the target subject name.

[0155] In some embodiments, the matching unit is used to determine the target subject name that meets the preset conditions among the multiple reference subject names corresponding to the target unit information, and is specifically used to: match the subject name corresponding to the order information to be corrected with the multiple reference subject names corresponding to the target unit information; and determine the reference subject name with the highest matching score that exceeds a first set threshold as the target subject name.

[0156] In some embodiments, the matching unit is specifically used to: search the Internet based on part of the content of the order information to be corrected to obtain at least one reference information that matches the target search information; match the reference information corresponding to the target search information with the order information to be corrected; and obtain the order reference information with the highest matching score that exceeds a second set threshold.

[0157] In some embodiments, the device further comprises an adding unit for adding the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected to the information corresponding to the reference unit information at the lowest level in the setting database.

[0158] In some embodiments, the device further comprises an updating unit for updating information corresponding to the lowest level reference unit information in the setting database according to the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected.

[0159] In some embodiments, the order information to be corrected includes at least address information, and at least one element included in the order information to be corrected includes at least one of the following: administrative district, postal code, and the reference unit information of multiple levels included in the setting database includes reference administrative district information or postal code information.

[0160] In some embodiments, the acquisition unit is specifically used to: acquire a text recognition result of the object to be processed, the text recognition result includes multiple text boxes; determine a first text box containing key information from the multiple text boxes, the key information includes partial content of the order information to be corrected, the partial content includes at least one element in the order information to be corrected, at least one of the keywords indicating the order information to be corrected; according to the first text box, merge at least part of the multiple text boxes to obtain a merged text box; acquire the order information to be corrected from the merged text box.

[0161] According to one aspect of the present disclosure, an electronic device is provided, the device comprising a memory and a processor, the memory being used to store computer instructions executable on the processor, the processor being used to implement the method for correcting order information described in any embodiment of the present disclosure when executing the computer instructions.

[0162] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for correcting order information described in any embodiment of the present disclosure is implemented.

[0163] The method, apparatus, device and storage medium for correcting order information of one or more embodiments of the present invention obtain the order information to be corrected based on the text recognition result of the order, determine the target search information from the text recognition result, obtain the order reference information matching the target search information through a preset search method, and use the order reference information to correct the order information to obtain the target order information, so that accurate target order information can be quickly obtained from the text recognition result of the order.

[0164] Figure 5 An electronic device provided for at least one embodiment of the present disclosure includes a memory and a processor, wherein the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the method for correcting order information described in any embodiment of the present disclosure when executing the computer instructions.

[0165] At least one embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for correcting order information described in any embodiment of the present disclosure is implemented.

[0166] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the data processing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0168] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0169] The embodiments of the subject matter and functional operations described in this specification may be implemented in the following: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules in computer program instructions encoded on a tangible non-temporary program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information and transmit it to a suitable receiver device for execution by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

[0170] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits), and the apparatus can also be implemented as special purpose logic circuits.

[0171] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to this large-capacity storage device to receive data from it or to transmit data to it, or both. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0172] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuitry.

[0173] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.

[0174] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.

[0175] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.

[0176] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for correcting order information, characterized in that , the method comprises: Obtaining order information to be corrected according to a text recognition result of the order, wherein the order information to be corrected is address information; Determining target search information from the text recognition result, the target search information includes part of the order information to be corrected, the part including the name of the subject to which the address information belongs and the administrative district included in the address information, or the name of the subject to which the address information belongs and the postal code corresponding to the administrative district included in the address information; Acquiring order reference information matching the target search information by a preset search method, wherein the order reference information refers to address information corresponding to the target search information, including: accessing a setting database to acquire order reference information matching the target search information from the setting database, wherein the setting database includes reference unit information of multiple levels, and the reference unit information of the lowest level among the multiple levels corresponds to multiple reference subject names; The order information to be corrected is corrected using the order reference information to obtain target order information.

2. The method according to claim 1, characterized in that The step of obtaining order reference information matching the target search information by a preset search method further includes: Acquire order reference information matching the target search information through the Internet.

3. The method according to claim 1, characterized in that The setting database stores first reference information corresponding to the reference subject name, where the first reference information is complete information corresponding to the reference subject name; Determining target search information from the text recognition result includes: According to the hierarchical division in the setting database, obtaining the unit information of the lowest level in the order information to be corrected; The acquiring order reference information matching the target search information from the setting database includes: Determine target unit information in the lowest level reference unit information of the setting database that matches the lowest level unit information in the order information to be corrected; Determine a target subject name that meets a preset condition among a plurality of reference subject names corresponding to the target unit information; According to the first reference information corresponding to the target entity name, order reference information matching the target search information is obtained.

4. The method according to claim 1, characterized in that The setting database stores second reference information corresponding to the reference subject name, where the second reference information is other reference information other than the reference unit information of each level; Determining target search information from the text recognition result includes: According to the hierarchical division in the setting database, obtaining the unit information of the lowest level in the order information to be corrected; The acquiring order reference information matching the target search information from the setting database includes: Determine target unit information in the lowest level reference unit information of the setting database that matches the lowest level unit information in the order information to be corrected; Determine a target subject name that meets a preset condition among a plurality of reference subject names corresponding to the target unit information; According to the reference unit information of each level corresponding to the target subject name and the second reference information corresponding to the target subject name, order reference information matching the target search information is obtained.

5. The method according to claim 3 or 4, characterized in that: The determining of the target subject name that meets the preset conditions among the multiple reference subject names corresponding to the target unit information includes: Matching the subject name corresponding to the order information to be corrected with a plurality of reference subject names corresponding to the target unit information respectively; The reference subject name with the highest matching score and exceeding the first set threshold is determined as the target subject name.

6. The method according to claim 2, characterized in that The step of obtaining order reference information matching the target search information through the Internet includes: Searching the Internet based on part of the order information to be corrected to obtain at least one reference information matching the target search information; Matching the reference information corresponding to the target search information with the order information to be corrected; The order reference information having the highest matching score and exceeding a second set threshold is obtained.

7. The method according to claim 6, characterized in that The method further comprises: The order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected are added to the information corresponding to the reference unit information at the lowest level in the setting database.

8. The method according to claim 7, characterized in that The method further comprises: According to the order reference information obtained from the Internet and the subject name corresponding to the order information to be corrected, the information corresponding to the lowest level reference unit information in the setting database is updated.

9. The method according to claim 1, characterized in that: The multiple levels of reference unit information included in the setting database include reference administrative district information and / or postal code information.

10. The method according to claim 9, characterized in that The step of obtaining the order information to be corrected according to the text recognition result of the order includes: Obtaining a text recognition result of the order, wherein the text recognition result includes a plurality of text boxes; Determine a first text box containing key information from the multiple text boxes, wherein the key information includes a portion of the order information to be corrected, and the portion of the content includes at least one element in the order information to be corrected and at least one of keywords indicating the order information to be corrected; According to the first text box, merging at least part of the multiple text boxes to obtain a merged text box; The order information to be corrected is obtained from the merged text box.

11. A device for correcting order information, characterized in that: The device comprises: An acquisition unit, used for acquiring order information to be corrected according to a text recognition result of the order, wherein the order information to be corrected is address information; a determination unit, configured to determine target search information from the text recognition result, wherein the target search information includes part of the content of the order information to be corrected, wherein the part includes the name of the subject to which the address information belongs and the administrative district included in the address information, or the name of the subject to which the address information belongs and the postal code corresponding to the administrative district included in the address information; a matching unit, configured to obtain order reference information matching the target search information by a preset search method, wherein the order reference information refers to address information corresponding to the target search information, and is specifically configured to: access a setting database to obtain order reference information matching the target search information from the setting database, wherein the setting database includes reference unit information of multiple levels, and the reference unit information of the lowest level among the multiple levels corresponds to multiple reference subject names; A correction unit is used to correct the order information to be corrected by using the order reference information to obtain target order information.

12. An electronic device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the method according to any one of claims 1 to 10 when executing the computer instructions.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Search method and device, readable storage medium and electronic device

    CN110442702A

  • Text information processing method and device, electronic equipment and readable storage medium

    CN110674396A