Method, system, terminal and storage medium for automatically organizing airline refund and change rules

By automatically identifying and generating airline refund and change rules, the error problem caused by manual entry is solved, and high-accurate refund and change rules are implemented and concise and clear rule tables are achieved, which improves work efficiency.

CN112733513BActive Publication Date: 2025-08-22TONGCHENG NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110037555.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-12
Publication Date
2025-08-22
Estimated Expiration
2041-01-12

AI Technical Summary

Technical Problem

In the prior art, the entry process of airline refund and change rules relies on manual operations, which can easily lead to errors, resulting in inaccurate calculation of customer refund and change procedures and bring losses to the company.

Method used

Automatic methods are used to identify tables and cells in airline cancellation and change rules text, and automatically generate cancellation and change rules tables by establishing text coordinate systems, image processing and assigning cancellation and change tags, reducing manual entry steps and improving accuracy.

Benefits of technology

It realizes the automatic identification and generation of airline withdrawal and change rules, improves the entry accuracy, reduces manual errors, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112733513B_ABST
    Figure CN112733513B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system, terminal and storage medium for automatically organizing airline refund and change rules, which belongs to the field of information technology, wherein the method includes establishing a text coordinate system; obtaining text coordinate information of each character in the text to be processed; converting the text to be processed into an image file and obtaining the image processing result; obtaining table coordinate information in the image file; establishing a text frame, each text frame including a number of cells and corresponding sub-information segments; assigning a refund and change label to each cell of the text frame according to a preset allocation mark model; reading a historical refund and change rule table; according to the refund and change label, filling the sub-information segment into the historical refund and change rule table to obtain the current refund and change rule table; and feeding back the current refund and change rule table to the administrator terminal. The present application has the effect of improving the accuracy of entering airline refund and change rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and more particularly to a method, system, terminal, and storage medium for automatically organizing airline refund and change rules. Background Art

[0002] With the rapid development of the internet, users are increasingly demanding online flight booking. Users can now access and review their orders and itinerary information online on their mobile phones. If their itinerary changes, users can check the airline's refund and change policies online, learn about refund and change fees in real time, and then make the necessary adjustments.

[0003] Currently, most online travel OTA platforms collect information about airline refund and change policies manually, based on official documents issued by airlines. Upon receiving the documents from airlines, OTA staff first read the entire document and then manually edit the relevant table information into an Excel spreadsheet. They then supplement and edit the extended information, and then manually enter or import it into the refund and change policy information system. This allows users to view the current refund information in real time when accessing the refund and change policy information page on their mobile phones.

[0004] The above-mentioned related technologies have the following defects: when staff manually enter the refund and change rules information, it is easy for personal omissions to cause errors in the refund and change rules entry, resulting in incorrect calculation of the customer's refund and change fees, thereby causing large losses to the company. Summary of the Invention

[0005] In order to improve the accuracy of entering airline refund and change rules, this application provides a method for automatically organizing airline refund and change rules.

[0006] In the first aspect, this application provides a method for automatically organizing airline refund and change rules, using the following technical solutions:

[0007] A method for automatically organizing airline refund and change rules, comprising:

[0008] Establish a text coordinate system based on the text to be processed;

[0009] According to the established text coordinate system, the text coordinate information of each character in the text to be processed is obtained;

[0010] Converting the text to be processed into an image file and obtaining an image processing result;

[0011] According to the image processing result, obtaining table coordinate information in the image file, the table coordinate information including outline coordinate information of each table and corresponding cell coordinate information;

[0012] Establishing a text frame according to the table coordinate information and the text coordinate information, wherein each text frame includes a plurality of cells and corresponding sub-information segments;

[0013] According to a preset allocation tag model, a cancellation label is allocated to each cell of the text frame, wherein the cancellation label includes a main label and a sub-label;

[0014] Read the historical refund and change rules table, which includes several main tags and sub-tags;

[0015] According to the refund and change tag, the sub-information segment is filled into the historical refund and change rule table to obtain the current refund and change rule table;

[0016] Feedback the current cancellation and change rule form to the administrator terminal.

[0017] By adopting the above technical solution, based on the text to be processed issued by the airline, the table in the text and the corresponding sub-information segment of each cell in the table are automatically identified, and a refund and change label is assigned to the sub-information segment in the cell. Based on the refund and change label, the current refund and change rule table can be automatically generated without manual entry, thereby improving the accuracy of refund and change rule entry.

[0018] Optionally, each of the sub-tags corresponds to a secondary tag, and the secondary tag may contain multiple sub-tags of the same type but with different conditions. The allocation of the cancellation / revision tag to each cell in the text frame according to the preset allocation tag model specifically includes:

[0019] Obtaining title information of each text frame, and assigning a main tag to each text frame according to the title information;

[0020] Performing conditional title screening on the sub-information segments in the text frame according to a preset analysis model, and obtaining conditional title screening results;

[0021] Filter the results according to the condition title and obtain the cancellation and change condition cell;

[0022] According to the preset allocation principle, a sub-label is assigned to each of the cancellation and change condition cells;

[0023] According to the refund and change condition cell, obtain the refund and change information cell;

[0024] According to the cancellation and change condition cell, vertical cells are obtained according to the preset vertical acquisition principle;

[0025] Assign the sub-label corresponding to the current cancellation and change condition cell to the vertical cell;

[0026] According to the preset horizontal acquisition principle, horizontal cells are obtained;

[0027] Assign the sub-label corresponding to the current cancellation and change condition cell to the horizontal cell.

[0028] By adopting the above method, cells are divided into refund and change condition cells and refund and change information cells, and at least one refund and change label is assigned to each cell according to the distinction result, thereby improving the accuracy of refund and change rule entry.

[0029] Optionally, the table coordinate information further includes page number information. After obtaining the table coordinate information in the image file according to the image processing result, the following steps are further included:

[0030] According to the page number information, determining whether there are two tables on two consecutive pages;

[0031] If the answer is yes, determining whether the minimum vertical coordinate difference between the two tables on consecutive pages is a preset merging value based on the outline coordinate information;

[0032] If the answer is yes, the two tables on consecutive pages are merged into a new table;

[0033] According to the outline coordinate information, table coordinate information of the new table is obtained.

[0034] By adopting the above technical solution, the refund and change condition cells are first screened out, and sub-labels are assigned to the refund and change condition cells. Then, the corresponding refund and change information cells are obtained according to the refund and change condition cells. According to the vertical acquisition principle and the horizontal acquisition principle, sub-labels are assigned to the refund and change information cells, thereby improving the accuracy of assigning refund and change labels and thus improving the accuracy of entering refund and change rules.

[0035] Optionally, after obtaining the table coordinate information in the image file according to the image processing result, the method further includes:

[0036] According to the page number information, determining whether there are two tables on two consecutive pages;

[0037] If the answer is yes, then determining the minimum vertical coordinate difference between the two tables on consecutive pages based on the outline coordinate information;

[0038] Determining whether the minimum vertical coordinate difference is a preset combined value;

[0039] If the answer is yes, the two tables on consecutive pages are merged into a new table;

[0040] According to the outline coordinate information, table coordinate information of the new table is obtained.

[0041] By adopting the above technical solution, the table is calibrated to avoid the possibility that one table is identified as two tables by the system due to the page layout, thereby reducing the occurrence of incomplete data collection.

[0042] Optionally, after assigning a cancellation label to each cell in the text frame according to a preset label assignment model, the method further includes:

[0043] Obtain all the cancellation and change information cells;

[0044] Determine whether there are two or more cancellation and change information cells with the same main label and sub-label;

[0045] If the judgment is yes, the cell with the same main label and sub-label will be marked as an abnormal cell;

[0046] Obtaining the text frame corresponding to the abnormal cell, and marking the obtained text frame as an abnormal text frame;

[0047] Determine whether the abnormal text frame contains two or more abnormal cells;

[0048] If the answer is yes, the main labels and sub-labels corresponding to all cells in the abnormal text box are cleared.

[0049] By adopting the above technical solution, the main label and sub-label carried by the refund and change information cell are verified, thereby improving the accuracy of the current refund and change rule table.

[0050] Optionally, after clearing the main labels and sublabels corresponding to all cells in the abnormal text box, the method further includes:

[0051] Performing text segmentation processing on the text to be processed and obtaining a segmentation processing result, wherein the segmentation processing result includes a plurality of feature samples;

[0052] Read the main label and sub-label corresponding to the cancellation and change information cell, and mark the obtained main label and sub-label as samples to be processed;

[0053] According to the sample to be processed and the word segmentation processing result, a feature sample whose similarity with the sample to be processed exceeds a preset threshold is obtained, and the obtained sample is marked as a comparison sample;

[0054] Obtain the distribution density of the comparison samples;

[0055] Determining a characteristic block according to the distribution density;

[0056] Acquire feature block coordinate information of the feature block;

[0057] Get the cell coordinate information of the current refund and change information cell;

[0058] Determining whether the cancellation / change information cell is an abnormal cell based on the characteristic block coordinate information and the coordinate information of the current cancellation / change information cell;

[0059] If the judgment is yes, the main label and sub-label of the abnormal cell are cleared.

[0060] By adopting the above technical solution, the refund and change information cell is subjected to a secondary inspection, and the main label and sub-label carried by the refund and change information cell are used as samples to be processed. The text to be processed is segmented to obtain a number of feature samples, and a comparison sample whose similarity with the sample to be processed exceeds a preset threshold is obtained. According to the distribution density of the comparison sample and the distance between the feature block and the refund and change information cell, it is judged whether the main label and sub-label corresponding to the refund and change information cell are accurate, thereby further improving the accuracy of the refund and change rule entry.

[0061] Optionally, the method is based on a database containing several template statement libraries, and the text segmentation processing is performed on the text to be processed, and obtaining the segmentation processing result specifically includes:

[0062] Divide the text to be processed into several sentence segments according to the preset division rules;

[0063] Performing text segmentation processing on each of the sentence segments using a first segmentation model, and obtaining a first sentence segment processing result, wherein the first sentence segment processing result includes a plurality of phrases into which the sentence segment is divided and a part of speech corresponding to each phrase;

[0064] Judging whether the processing result of the first sentence segment is reasonable based on the part of speech corresponding to the phrase of the sentence segment;

[0065] If the judgment is yes, mark the first statement segment processing result as the template statement segment processing result;

[0066] If the judgment is no, the second word segmentation model is used to perform text word segmentation processing on the current sentence, and the second sentence segment processing result is obtained;

[0067] Obtaining the template statement segment processing result according to the first statement segment processing result and the second statement segment processing result;

[0068] Integrate all template sentence processing results and output word segmentation processing results;

[0069] The sentence segments and corresponding template sentence processing results are stored in a database.

[0070] By adopting the above technical solution, the rationality of the processing result of the first sentence segment is tested. If there is a possibility of unreasonableness, the second word segmentation model is used to perform secondary text segmentation processing on the sentence segment. By comparison, a more reasonable template sentence segment processing result is obtained, which provides a more accurate feature sample for the main label and sub-label of the proofreading rejection information cell. At the same time, the template sentence segment processing result is stored in the database as a learning template to continuously improve the accuracy of text segmentation processing.

[0071] Optionally, filling the sub-information segment into a historical refund and change rule table according to the refund and change tag to generate a current refund and change rule table specifically includes:

[0072] According to the assigned refund and change label, the refund and change information cell is filled into the historical refund and change rule table to generate a preliminary refund and change rule table;

[0073] Regularize the sub-information segments in the preliminary refund and change rules table and obtain the regularization results;

[0074] Generate the current refund and change rules table based on the regular processing results.

[0075] By adopting the above technical solution, the sub-information segments in the preliminary refund and change rules table are regularized, thereby obtaining more concise refund and change information, which is convenient for users to review.

[0076] Secondly, this application provides a system for automatically organizing airline refund and change rules, using the following technical solutions:

[0077] A system for automatically organizing airline refund and change rules, including:

[0078] Establishing a module for establishing a text coordinate system based on the text to be processed;

[0079] The text module is used to obtain the text coordinate information of each character in the text to be processed according to the established text coordinate system;

[0080] An image module, configured to obtain table coordinate information in the image file according to the image processing result, wherein the table coordinate information includes outline coordinate information of each table and corresponding cell coordinate information and page number information;

[0081] A table module, configured to obtain table coordinate information in the image file according to the image processing result, wherein the table coordinate information includes outline coordinate information of each table and corresponding cell coordinate information and page number information;

[0082] A generating module, configured to establish a text frame according to the table coordinate information and the text coordinate information, wherein each text frame includes a plurality of cells and corresponding sub-information segments;

[0083] An allocation module, configured to allocate a cancellation / change label to each cell of a text frame according to a preset allocation labeling model, wherein the cancellation / change label includes a main label and a sub-label;

[0084] A reading module is used to read a historical refund and change rule table, wherein the historical refund and change rule table includes a plurality of main tags and sub-tags;

[0085] A filling module is used to fill the sub-information segment into the historical refund and change rule table according to the refund and change tag to obtain the current refund and change rule table;

[0086] The feedback module is used to feed back the current refund and change rule form to the administrator terminal.

[0087] By adopting the above technical solution, the text to be processed is automatically scanned, so that the tables in the text to be processed are filtered out, and a text frame is established based on this. Refund and change labels are assigned to the cells in the text frame, and the current refund and change rule table is generated according to the refund and change labels of the refund and change cells. Manual entry is unnecessary, thereby improving the accuracy of refund and change rule entry.

[0088] In a third aspect, the present application provides a technical solution that adopts the following:

[0089] An intelligent terminal comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the method according to the first aspect.

[0090] By adopting the above technical solution, administrators can obtain the latest refund and change rule information based on the feedback of the current refund and change rule form, without having to manually organize and enter information. While improving work efficiency, it can also avoid the occurrence of information entry errors caused by manual entry.

[0091] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0092] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute the method according to the first aspect.

[0093] By adopting the above technical solution, when the computer-readable storage medium is installed in any computer, any computer can execute a welding parameter automatic adjustment method provided in this application.

[0094] In summary, this application includes at least one of the following beneficial technical effects:

[0095] 1. Automatically generate the current refund and change rules form based on the text to be processed, eliminating the need for manual entry and improving the accuracy of refund and change entry rules;

[0096] 2. Regularize the sub-information segments within the refund and change information cells and clean up the text to make the generated current refund and change rules table more concise and clear, making it easier for users to read the refund and change rules. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] Figure 1 It is a flowchart of a method for automatically organizing airline refund and change rules in an embodiment of the present application.

[0098] Figure 2 This is a flowchart of an embodiment of the present application for assigning a cancellation label to each cell in a text frame.

[0099] Figure 3 This is an example diagram of assigning a cancellation label to each cell in a text frame in an embodiment of the present application.

[0100] Figure 4 It is a flowchart of calibrating the refund and change information cell according to an embodiment of the present application.

[0101] Figure 5 This is an example diagram of generating a preliminary refund and change rule table in an embodiment of the present application.

[0102] Figure 6 It is a schematic diagram of the flow chart of text segmentation processing for the text to be processed in an embodiment of the present application.

[0103] Figure 7 This is a structural block diagram of a system for automatically organizing airline refund and change rules in an embodiment of the present application.

[0104] Explanation of the accompanying drawings: 1. Establishment module; 2. Text module; 3. Image module; 4. Table module; 5. Generation module; 6. Allocation module; 7. Reading module; 8. Filling module; 9. Feedback module. DETAILED DESCRIPTION

[0105] The following is combined with Figure 1-7 This application is described in further detail.

[0106] The present application embodiment discloses a method for automatically organizing airline refund and change rules. Figure 1 , the methods for automatically organizing airline refund and change rules include:

[0107] S100: Establishing a text coordinate system according to the text to be processed.

[0108] Among them, the text to be processed is specifically the red-headed document issued by the airline, which contains text information and several table information. By sorting out the red-headed documents, the refund and change rules of the relevant airline can be obtained.

[0109] Specifically, a text coordinate system can be established based on the text to be processed, with the last line of the text to be processed as the horizontal coordinate and the first column of the text as the vertical coordinate. The established coordinate system uses a byte width as the horizontal coordinate unit and a byte height as the vertical coordinate unit. Each character in the text to be processed corresponds to a coordinate value. For example, in the text to be processed, the fourth character in the fifth-to-last line corresponds to the coordinates [4, 5].

[0110] S200: Acquire text coordinate information of each character in the text to be processed according to the established text coordinate system.

[0111] S300: Convert the text to be processed into an image file and obtain an image processing result.

[0112] Among them, S300 specifically includes:

[0113] S301: Convert the file to be processed into an image file.

[0114] In the example, the text to be processed is initially in the PDF file format, and the file to be processed is converted into the PDF image format through conventional conversion means to obtain an image file.

[0115] S302: Perform binarization processing on the image file.

[0116] In this example, since many algorithms require binary data as input, the image file is binarized to obtain a binarized result, which facilitates subsequent processing of the image file. Specifically, the binarization of the image file includes dilation and erosion of the image file and contour extraction.

[0117] S303: Obtain table coordinate information according to the binarization processing result.

[0118] Specifically, based on the contour lines obtained in S302, the vertical lines, horizontal lines and the intersection points between the vertical lines and horizontal lines in the image file can be determined. Based on the vertical lines, horizontal lines and the intersection points in the image file, the table in the image file can be determined. Based on the text coordinate system established in S100, the table coordinate information can be determined.

[0119] In this example, each table is composed of several cells, and the cells can be determined based on the intersections. Therefore, the table coordinate information obtained specifically includes the outline coordinate information, cell coordinate information, and page number information corresponding to each table. Specifically, the outline coordinate information includes the coordinate values ​​of the two diagonally opposite corners of the table; the cell coordinate information includes the coordinate values ​​of the two diagonally opposite corners corresponding to each cell; based on the outline coordinate information and the cell coordinate information, the location and range of the table can be determined. For example, if the outline coordinate information obtained is specifically {[2,50]∪[25,42]}, the relative range of the current table relative to the text coordinate system can be determined based on the outline coordinate information.

[0120] Furthermore, since the file to be processed is in PDF image format, when generating a table, it is possible that the table is split into two tables due to page layout reasons, which may affect the subsequent data processing. Therefore, after generating the table coordinate information, it is possible to determine whether there are two tables with the same horizontal coordinate range and distributed on two consecutive pages based on the page number information of each table. If so, the minimum vertical coordinate difference between the two tables is obtained, and it is determined whether the obtained minimum vertical coordinate difference is a preset merge value. If so, the two tables are merged to generate new table coordinate information, where the merge value is specifically the sum of the upper and lower page margins between the two pages.

[0121] For example, the contour coordinates of Table A are {[2,50]∪[25,42]}, and the page number is P32. The contour coordinates of Table B are {[2,38]∪[25,30]}, and the page number is P33. It can be seen that the horizontal coordinate range of Table A and Table B is 23 unit values, and the vertical coordinate difference between the two tables is 4 unit values. It is known that the preset merge value is 4, so Table A and Table B are merged to generate a new table, and the corresponding contour coordinates are {[2,50]∪[25,30]}.

[0122] S400: Establishing a text frame according to the table coordinate information and the text coordinate information.

[0123] Specifically, the text information within the table selection range can be filtered out based on the outline coordinate information and the text coordinate information. The text information corresponding to each table can be divided into several sub-information segments according to the cells, and each sub-information segment corresponds to a cell one by one, thereby establishing a text frame.

[0124] S500: assigning a cancellation label to each cell in the text frame.

[0125] Among them, the refund and change label specifically includes a main label and sub-labels.

[0126] Combine Figure 2 , S500 specifically includes:

[0127] S501: Obtain title information of each text frame.

[0128] Specifically, the title information can be expanded one unit in the positive and negative directions of the Y-axis of the text coordinate system based on the outline coordinate information corresponding to the text frame and the vertical coordinate range of the table outline coordinate information, and the text marked with "《》" within the range can be obtained, and the text information within the "《》" can be marked as title information.

[0129] For example, combining Figure 3 , the contour coordinates corresponding to Table A are {[2,51]∪[16,41]}, then the text marked with “《》” in the range of {[2,52]∪[16,40]} is obtained and marked as title information.

[0130] S502: Assign a main tag to the text frame according to the title information.

[0131] In this example, the database contains several refund and change tags, which include main tags and sub-tags. Each main tag corresponds to each airline, such as China United Airlines main tag, China United Airlines main tag, and China Eastern Airlines main tag. Based on the title information, keywords in the title information can be read, and a main tag can be assigned to each text frame based on the read keywords. Each cell in the text frame is assigned the same main tag. Figure 3 , the title information that can be obtained is "China United Airlines Domestic Freight Rate Applicable Conditions Table", and the keyword "China United Airlines" is extracted according to the title information, and the "China United Airlines Main Label" is assigned to the current text frame.

[0132] S503: Label each cell in the text frame according to a preset rule.

[0133] Specifically, based on the text coordinate axis, each cell in the text frame is numbered from left to right and from top to bottom. For example, the numbering result of Table A is as shown in the attached figure. Figure 3 shown.

[0134] S504: Perform conditional title screening for the sub-information segments in the text frame according to a preset analysis model.

[0135] Specifically, conditional title keywords are preset in the database, and whether a sub-information segment is a conditional title can be determined based on the text information of each sub-information segment, thereby performing conditional title screening and obtaining conditional title screening results.

[0136] S505: Filter the results according to the condition title and determine the cancellation and change condition cell.

[0137] Among them, the cells corresponding to the sub-information segments determined to be conditional titles are marked as refund and change conditional cells. Specifically, the keywords in each sub-information segment can be read to determine whether it contains conditional title information. If it is determined that there is relevant conditional title information, the corresponding cells are marked as refund and change conditional cells. For example, cells (3), (6), (7), (8), (9), (12), (13), and (16) can be obtained as refund and change conditional cells.

[0138] S506: Assign a sublabel to the cancellation / change condition cell.

[0139] Specifically, a corresponding sub-label may be assigned to each refund and change condition cell according to the keyword information in each refund and change condition cell.

[0140] The database includes several secondary tags, each secondary tag includes several sub-tags, and each sub-tag corresponds to a unique secondary tag.

[0141] In this example, the secondary tags include a class tag, a product name tag, a change tag, and a time period tag. Specifically, the class tag includes multiple subtags represented by codes, such as the W subtag and the Y subtag, which can be used to indicate the refund and change conditions corresponding to different classes of class. The product tag includes multiple subtags represented by product names, such as the Shuxin Fei subtag and the Dazhong You subtag, which can be used to indicate the refund and change conditions corresponding to different types of products. The change tag includes multiple subtags used to indicate refund and change situations, including a voluntary change subtag and a voluntary refund subtag. The time period tag includes multiple subtags representing different time periods, specifically the (>168) subtag, the (168-72) subtag, the (72-4) subtag, and the (<4) subtag, which can be used to indicate the refund and change conditions corresponding to different refund times for users, respectively corresponding to refund and change requests submitted more than 168 hours before departure, 168-72 hours before departure, 72-4 hours before departure, and 4 hours before departure.

[0142] Combine Figure 3 , when the keyword "W" is recognized, "W sub-label" is assigned to cell (8), indicating that the cell corresponds to the refund and change conditions corresponding to the class code W. Similarly, "P sub-label" is assigned to cell (12), "Y sub-label" is assigned to cell (16), "Shuxin Fei sub-label" is assigned to cell (9), "Massive Traveler Label" is assigned to cell (13), "Voluntary Change Sub-label" is assigned to cell (3), "(>168) sub-label" is assigned to cell (6), and "(168-72) sub-label" is assigned to cell (7).

[0143] S507: Obtain the cancellation and change information cell.

[0144] Specifically, the cancellation information cell is a cell that does not carry any sub-labels in the current text frame. Figure 3 The cells for refund and change information in Table A are specifically cell (10), cell (11), cell (14), cell (15), cell (17), and cell (18).

[0145] S508: According to the vertical acquisition principle, the vertical cell corresponding to the cancellation and change condition cell is acquired.

[0146] Specifically, the vertical cell is based on the current text frame. Within the horizontal coordinate range of the refund and change condition cell, the vertical coordinate is smaller than the refund and change information cell of the refund and change condition cell. The vertical cell is obtained.

[0147] Combine Figure 3 , the vertical cells corresponding to the refund and change condition cell (3) are specifically: cell (10), cell (11), cell (14), cell (15), cell (17), cell (18); the refund and change condition cell (8) has no corresponding vertical cell.

[0148] S509: assigning the sub-label corresponding to the current cancellation and change condition cell to the vertical cell.

[0149] S510: Acquire horizontal cells according to the horizontal acquisition principle.

[0150] Specifically, the horizontal cell is based on the current text frame. Within the vertical coordinate range of the refund and change condition cell, the refund and change information cell whose horizontal coordinate is greater than the refund and change condition cell is obtained.

[0151] Combine Figure 3 , the horizontal cells corresponding to the refund and change condition cell (12) are cells (14) and cells (15); the refund and change condition cell (6) has no corresponding horizontal cell.

[0152] S511: assigning the sub-label corresponding to the current cancellation and change condition cell to the horizontal cell.

[0153] For example, combining Figure 3In table A, taking cell (3) as the current refund and change condition cell, the corresponding vertical cells are obtained, specifically cell (10), cell (11), cell (14), cell (15), cell (17), and cell (18). In the above cells, the same secondary label as cell (3) is obtained, so the sub-label "voluntary change sub-label" corresponding to cell (3) is assigned to the above vertical cells, and cell (3) has no horizontal cells; taking cell (8) as the current refund and change condition cell, after judgment, cell (8) has no corresponding vertical cell, and the horizontal cells corresponding to cell (8) are obtained, specifically cell (10) and cell (11), and the sub-label "W sub-label" corresponding to cell (8) is assigned to the above horizontal cells. After calculation, it can be finally obtained that cell (10) specifically carries four sub-labels, namely "W sub-label", "voluntary change sub-label", "(>168) sub-label" and "comfortable flight sub-label", as well as "China United Airlines main label".

[0154] S600: Calibrate the refund and change information cell according to the refund and change label.

[0155] Combine Figure 4 , S600 specifically includes:

[0156] S601: Determine whether there are two or more cancellation and change information cells that carry exactly the same cancellation and change labels.

[0157] If the judgment is no, jump to S606;

[0158] If the answer is yes, jump to S602.

[0159] Among them, if the main labels and sub-labels carried by two or more refund and change information cells are exactly the same, it means that an error occurred when allocating the refund and change labels above, and further modification is required.

[0160] S602: Mark the refund and change information cells carrying the same refund and change label as abnormal cells.

[0161] S603: Obtain an abnormal text frame according to the abnormal cell.

[0162] Specifically, according to the cell coordinate information of the abnormal cell, the text frame corresponding to the abnormal cell can be obtained, and the obtained text frame can be marked as an abnormal text frame.

[0163] S604: Determine whether the abnormal text frame contains two or more abnormal cells.

[0164] If the judgment is yes, jump to S605;

[0165] If the judgment is negative, jump to S606.

[0166] S605: Clear the modification tags corresponding to all cells within the abnormal text frame.

[0167] Among them, if there are multiple abnormal cells within a text frame, it indicates that the sub-information segment within this text frame has no usability. Clearing the cell data within this abnormal text frame can prevent errors in entering modification information.

[0168] S606: Perform text word segmentation on the text to be processed and obtain the result of the word segmentation.

[0169] Specifically, use Chinese word segmentation to process the text to be processed. Text word segmentation specifically means splitting a sentence into several phrases according to the word nature. For example, the sentence "I am making a table" can be split into "I" (pronoun), "am" (adverb), "making" (verb), and "table" (noun).

[0170] Among them, the result of the word segmentation includes several feature samples. The feature samples are specifically each phrase obtained from the processing and its corresponding word nature.

[0171] S607: Read the main tag and sub-tag corresponding to the modification information cell, and mark the obtained main tag and sub-tag as samples to be processed.

[0172] S608: Obtain the comparison sample.

[0173] Specifically, the comparison sample can be obtained based on the sample to be processed and the result of the word segmentation. Mark the feature samples whose similarity to the sample to be processed exceeds the preset threshold as comparison samples. For example, if the sample to be processed is specifically "China United Airlines + Resource Change + W + Comfortable Flight", then mark the feature samples carrying any of the above related words as comparison samples.

[0174] S609: Obtain the distribution density of the comparison sample.

[0175] Among them, the distribution density is the distribution density of the comparison sample per unit area.

[0176] S610: Determine the feature block according to the distribution density.

[0177] Among them, the feature block is the block where the comparison samples are most densely distributed per unit area, and mark this block as the feature block.

[0178] S611: Obtain the coordinate information of the feature block of the feature block.

[0179] S612: Obtain the coordinate information of the cell of the current modification information cell.

[0180] S613: Determine whether the cancellation / change information cell is an abnormal cell based on the characteristic block coordinate information and the cell coordinate information of the current cancellation / change information cell.

[0181] If the judgment is yes, jump to S614;

[0182] If the judgment is no, jump to S700.

[0183] Specifically, based on the feature block coordinate information and the cell coordinate information, the distance between the two blocks in the vertical coordinate direction is determined, thereby determining the vertical distance between the refund and change information cell and the relevant text information, and thus determining whether the two are closely related. If the vertical distance between the two exceeds the preset threshold, it means that the closeness is not high, and the sub-information segment in the refund and change information cell is not desirable, so the current refund and change information cell is marked as an abnormal cell.

[0184] S614: Clear the cancellation label of the abnormal cell.

[0185] After S614 is completed, the process jumps to S700.

[0186] In this example, after clearing the main label and sub-label of the abnormal cell, the sub-information segment corresponding to the abnormal cell cannot be used when the current refund and change rule table is produced later.

[0187] S700: Read the historical cancellation and change rules table.

[0188] Among them, the historical refund and change rules table is the refund and change rules table before the update. After the airline issues the new refund and change rules, it is necessary to modify the historical refund and change rules table according to the official document issued by the airline to obtain the latest historical refund and change rules table. Figure 5 The historical refund and change rules table consists of several refund and change information cells and refund and change condition cells. Each refund and change information cell corresponds to a main label and several sub-labels. The main label and sub-label carried by each refund and change information cell are not exactly the same.

[0189] S800: According to the refund and change tag, the sub-information segment is filled into the historical refund and change rule table to obtain a preliminary refund and change rule table.

[0190] Specifically, each sub-information segment corresponds to a cell, and each cell is paired with a main label and several sub-labels. According to the main label and sub-label carried by the refund information cell in the historical refund and change rule table, cells with exactly the same label are matched, and the matched cells are filled into the historical refund and change rule table to generate a preliminary refund and change rule table. Figure 3 and Figure 5, cell (10) in table A carries four sub-tags, namely "W sub-tag", "voluntary change sub-tag", "(>168) sub-tag" and "comfortable flight sub-tag", as well as the main tag of "China United Airlines main tag". The tags carried by cells in the historical refund and change rules table are specifically "W sub-tag", "voluntary change sub-tag", "(>168) sub-tag", "comfortable flight sub-tag" and "China United Airlines main tag". The sub-information segment corresponding to cell (10) in table A is filled into the corresponding cell of the historical refund and change rules table to update the historical refund and change rules table and obtain the preliminary refund and change rules table.

[0191] S900: Regularize the sub-information segments in the preliminary refund and change rules table.

[0192] Among them, regularization processing is to remove invalid and special characters from the sub-information segment, so as to extract valid refund and change rule data. After regularization processing, the refund and change rule table can be simplified to facilitate user reference.

[0193] S1000: Generate the current refund and change rules table.

[0194] Specifically, the current refund and change rule table is a preliminary refund and change rule table after the sub-information segments have been regularized.

[0195] S1100: Feedback the current cancellation and change rules table to the administrator terminal.

[0196] Furthermore, the cells corresponding to the abnormal cells can be highlighted in bright colors in the current refund and change rule cells to prompt the administrator to conduct a secondary inspection on the abnormal cells to ensure the accuracy of the current refund and change form.

[0197] Regarding S606, in the embodiment, the process of performing text segmentation processing on the text to be processed can be specifically as follows: Figure 6 As shown:

[0198] S061: Divide the text to be processed into several sentence segments according to preset division rules.

[0199] Specifically, "." can be used as the dividing standard, and each sentence with "." is a sentence segment.

[0200] S062: Perform text segmentation processing on each template sentence segment using the first segmentation model to obtain a first sentence segment processing result.

[0201] Among them, S061-S069 are based on a database, which carries a number of template sentence segments; the sentence segments in the to-be-processed text can be segmented according to the segmentation method of the template sentence segments.

[0202] Specifically, the first word segmentation model can perform text segmentation processing on a sentence segment, and the processing result can split a sentence segment into several phrases, each phrase carrying a corresponding part-of-speech tag.

[0203] S063: Determine whether the processing result of the first sentence segment is reasonable based on the part-of-speech composition in the sentence segment.

[0204] If the judgment is yes, jump to S064;

[0205] If the judgment is no, jump to S065.

[0206] Specifically, if a sentence consists of several phrases with different parts of speech, the validity of the first sentence segment processing result can be determined based on whether the parts of speech corresponding to the phrases making up the sentence segment are reasonable. For example, if a sentence segment is processed through word segmentation and the sentence segment processing result shows that the sentence segment consists of multiple phrases with the part of speech being adjectives, the first sentence segment processing result is considered unreasonable.

[0207] S064: Mark the first statement segment processing result as the template statement segment processing result.

[0208] Among them, after S064 is completed, jump to S069.

[0209] S065: Using the second word segmentation model, perform text segmentation processing on the current sentence segment and obtain the second sentence segment processing result.

[0210] Among them, if the sentence segment processing result of the first word segmentation model for the current sentence segment is unreasonable, the second word segmentation model is used to perform text segmentation processing on the current sentence segment. The first word segmentation model and the second word segmentation model respectively use different processing models, so after word segmentation processing on the same sentence segment, two different sentence segment processing results can be obtained.

[0211] S066: Determine whether the processing result of the first sentence segment is consistent with the processing result of the second sentence segment.

[0212] If the judgment is yes, jump to S064;

[0213] If the judgment is no, jump to S067.

[0214] Among them, if the processing result of the first sentence segment is completely consistent with the processing result of the second sentence segment, it indicates that the processing result of the first sentence segment is reasonable.

[0215] S067: Determine whether the number of parts of speech included in the first sentence segment processing result is greater than the number of parts of speech included in the second sentence segment processing result.

[0216] If the judgment is no, jump to S068;

[0217] If the judgment is yes, jump to S064.

[0218] Among them, if the number of parts of speech types included in the first sentence segment processing result is greater than the number of parts of speech types included in the second sentence segment processing result, it means that the first sentence segment processing result is more reasonable than the second sentence segment processing result, and the first sentence segment processing result is obtained as the template sentence segment processing result. For example, the sentence segment is specifically "Physics is really difficult". When processed with the first word segmentation model, the first sentence segment processing result obtained is specifically: "physics" (noun), "learn" (verb), "get up" (momentary verb), "real" (adverb), "difficult" (adjective); when processed with the second word segmentation model, the second sentence segment processing result obtained is specifically: "physics" (noun), "get up" (verb), "real" (adverb), "difficult" (adjective). Through comparison, the first sentence segment processing result carries phrases of five different parts of speech, and the second sentence segment processing result carries phrases of four different parts of speech, so the first sentence segment processing result is obtained as the template sentence segment processing result.

[0219] S068: Mark the second statement segment processing result as the template statement segment processing result.

[0220] S069: Storing the sentence segment and the corresponding template sentence segment processing results in the database.

[0221] Specifically, the most reasonable sentence segment processing result is stored in the database, and the template sentence segment processing result can be used as a training model to provide a template for the next word segmentation processing result, thereby improving the word segmentation accuracy, thereby further improving the accuracy of the current refund and change rule form.

[0222] S0610: Integrate all template statement segment processing results.

[0223] S0611: Output the word segmentation processing results based on the processing results of all template sentence segments.

[0224] Implementation principle: According to the text coordinate information and table coordinate information of the text to be processed, the text coordinate information can be matched with the table coordinate information, and the refund and change rule cell and the refund and change information cell can be obtained according to the keyword. A refund and change label is assigned to each cell, and the historical refund and change rule table is updated according to the refund and change label, so as to obtain the current refund and change rule table, and automatically generate the current refund and change rule table, effectively improving the accuracy of the airline's refund and change rule entry.

[0225] Based on the above method, the embodiment of the present application also discloses a system for automatically organizing airline refund and change rules. Figure 7The automatic arrangement system of airline refund and change rules includes: establishment module 1, text module 2, image module 3, table module 4, generation module 5, allocation module 6, reading module 7, filling module 8, and feedback module 9.

[0226] Establishing module 1, for establishing a text coordinate system according to the text to be processed.

[0227] The text module 2 is used to obtain the text coordinate information of each character in the text to be processed according to the established text coordinate system.

[0228] The image module 3 is used to obtain the table coordinate information in the image file according to the image processing result. The table coordinate information includes the outline coordinate information of each table and the corresponding cell coordinate information and page number information.

[0229] The table module 4 is used to obtain the table coordinate information in the image file according to the image processing result. The table coordinate information includes the outline coordinate information of each table and the corresponding cell coordinate information and page number information.

[0230] The generating module 5 is used to establish a text frame according to the table coordinate information and the text coordinate information. Each text frame includes a number of cells and corresponding sub-information segments.

[0231] The allocation module 6 is used to allocate a cancellation and change label to each cell of the text frame according to a preset allocation mark model, and the cancellation and change label includes a main label and a sub-label.

[0232] The reading module 7 is used to read the historical refund and change rule table, which includes several main tags and sub-tags.

[0233] The filling module 8 is used to fill the sub-information segment into the historical refund and change rule table according to the refund and change label to obtain the current refund and change rule table.

[0234] Feedback module 9 is used to feed back the current refund and change rules table to the administrator terminal.

[0235] An embodiment of the present application also discloses an intelligent terminal, which includes a memory and a processor. The memory stores a computer program that can be loaded by the processor and execute the method of automatically organizing airline refund and change rules as described above.

[0236] An embodiment of the present application also discloses a computer-readable storage medium storing a computer program that can be loaded by a processor and executed, for example, a method for automatically organizing airline refund and change rules. The computer-readable storage medium includes, for example, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0237] The above embodiments are intended only to illustrate the technical solutions of this application and are not intended to limit the scope of protection of this application. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on these embodiments, all other embodiments obtained by persons of ordinary skill in the art without inventive effort are also within the scope of protection to be protected by this application.

Claims

1. A method for automatically organizing airline refund and change rules, characterized by: include: Establish a text coordinate system based on the text to be processed; According to the established text coordinate system, the text coordinate information of each character in the text to be processed is obtained; Converting the text to be processed into an image file and obtaining an image processing result; According to the image processing result, obtaining table coordinate information in the image file, the table coordinate information including outline coordinate information and cell coordinate information of each table; Establishing a text frame according to the table coordinate information and the text coordinate information, wherein each text frame includes a plurality of cells and corresponding sub-information segments; According to a preset allocation tag model, a cancellation label is assigned to each cell of the text frame, wherein the cancellation label includes a main label and a sub-label; Read the historical refund and change rules table, which includes several main tags and sub-tags; According to the refund and change tag, the sub-information segment is filled into the historical refund and change rule table to obtain the current refund and change rule table; Feedback the current cancellation and change rules form to the administrator terminal; Each of the sub-tags corresponds to a secondary tag, and the secondary tag may contain multiple sub-tags of the same type but with different conditions. The method of assigning a refund and change tag to each cell in the text frame according to the preset allocation tag model specifically includes: obtaining the title information of each text frame, and assigning a main tag to each text frame according to the title information; performing conditional title screening on the sub-information segments in the text frame according to the preset analysis model, and obtaining the conditional title screening results; obtaining a refund and change condition cell according to the conditional title screening results; assigning a sub-tag to each refund and change condition cell according to the preset allocation principle; obtaining a refund and change information cell according to the refund and change condition cell; obtaining a vertical cell according to the refund and change condition cell according to the preset vertical acquisition principle; assigning the sub-tag corresponding to the current refund and change condition cell to the vertical cell; obtaining a horizontal cell according to the preset horizontal acquisition principle; assigning the sub-tag corresponding to the current refund and change condition cell to the horizontal cell; The table coordinate information also includes page number information. After obtaining the table coordinate information in the image file according to the image processing result, the method further includes: judging whether there are two tables on two consecutive pages according to the page number information; If the judgment is yes, then judging whether the minimum vertical coordinate difference between the two tables on the consecutive pages is a preset merging value according to the outline coordinate information; if the judgment is yes, merging the two tables on the consecutive pages into a new table; According to the outline coordinate information, table coordinate information of the new table is obtained.

2. The method for automatically organizing airline refund and change rules according to claim 1, characterized in that: After assigning a cancellation label to each cell in the text frame according to the preset assignment label model, it also includes: Obtain all the cancellation and change information cells; Determine whether there are two or more cancellation and change information cells with the same main label and sub-label; If the judgment is yes, the cell with the same main label and sub-label will be marked as an abnormal cell; Obtaining the text frame corresponding to the abnormal cell, and marking the obtained text frame as an abnormal text frame; Determine whether the abnormal text frame contains two or more abnormal cells; If the answer is yes, the main labels and sub-labels corresponding to all cells in the abnormal text box are cleared.

3. The method for automatically organizing airline refund and change rules according to claim 2, characterized in that: After clearing the main labels and sub-labels corresponding to all cells in the abnormal text box, the method further includes: Performing text segmentation processing on the text to be processed and obtaining a segmentation processing result, wherein the segmentation processing result includes a plurality of feature samples; Read the main label and sub-label corresponding to the cancellation and change information cell, and mark the obtained main label and sub-label as samples to be processed; According to the sample to be processed and the word segmentation processing result, a feature sample whose similarity with the sample to be processed exceeds a preset threshold is obtained, and the obtained sample is marked as a comparison sample; Obtain the distribution density of the comparison samples; Determining a characteristic block according to the distribution density; Acquire feature block coordinate information of the feature block; Get the cell coordinate information of the current refund and change information cell; Determining whether the cancellation / change information cell is an abnormal cell based on the characteristic block coordinate information and the coordinate information of the current cancellation / change information cell; If the judgment is yes, the main label and sub-label of the abnormal cell are cleared.

4. The method for automatically organizing airline refund and change rules according to claim 3 is characterized in that: The method is based on a database containing several template sentence libraries, and the text segmentation processing is performed on the text to be processed, and the segmentation processing results are obtained specifically including: Divide the text to be processed into several sentence segments according to the preset division rules; Performing text segmentation processing on each of the sentence segments using a first segmentation model, and obtaining a first sentence segment processing result, wherein the first sentence segment processing result includes a plurality of phrases into which the sentence segment is divided and a part of speech corresponding to each phrase; Judging whether the processing result of the first sentence segment is reasonable based on the part of speech corresponding to the phrase of the sentence segment; If the judgment is yes, mark the first statement segment processing result as the template statement segment processing result; If the judgment is no, the second word segmentation model is used to perform text word segmentation processing on the current sentence, and the second sentence segment processing result is obtained; Obtaining the template statement segment processing result according to the first statement segment processing result and the second statement segment processing result; Integrate all template sentence processing results and output word segmentation processing results; The sentence segments and corresponding template sentence processing results are stored in a database.

5. The method for automatically organizing airline refund and change rules according to claim 1, characterized in that: The step of filling the sub-information segment into the historical refund and change rule table to generate the current refund and change rule table according to the refund and change tag specifically includes: According to the assigned refund and change label, the refund and change information cell is filled into the historical refund and change rule table to generate a preliminary refund and change rule table; Regularize the sub-information segments in the preliminary refund and change rules table and obtain the regularization results; Generate the current refund and change rules table based on the regular processing results.

6. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that A computer program is stored which can be loaded by a processor and executes the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for structuring resume information

    CN110377560A