A method and apparatus for identifying information type
By generating an information type recognition model, the problem of operational anomalies caused by incorrect information type selection was solved, and accurate identification of information types and normal execution of operations were achieved.
Patent Information
- Application Number
- CN202210298064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-03-24
AI Technical Summary
When creating a document, the customer may select the wrong information type, which may cause subsequent operations to fail. For example, in a freight claims system, if the wrong lead type is selected for the lead value, the merchant will be unable to make a claim.
By collecting multiple information values for each information type, an information type recognition model is generated. This model is then used to identify the target information value and set its type, thus avoiding the need for users to make their own selections.
Accurately identify the information type to avoid subsequent operational anomalies caused by incorrect selection and ensure smooth operation.
Smart Images

Figure CN116861278B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of logistics, in particular to an information type identification method and device. BACKGROUND
[0002] When creating various documents, the customer may need to select the information type corresponding to the information when inputting the information. If the customer is not clear about the information classification details, the selection of the information type will be wrong, which will cause the subsequent operation to be unable to be normally executed. For example, in the claim system for freight, the customer needs to input the clue value (the clue value generally refers to the waybill number) and select the clue type (generally refers to the waybill type corresponding to the waybill number) corresponding to the clue value when creating a claim form. After the claim system receives the claim form, the merchant query will be performed by using the clue value and the clue type. When the clue type corresponding to the clue value is selected incorrectly, the merchant query will also be incorrect, so that the claim cannot be performed. SUMMARY
[0003] Therefore, the present application provides an information type identification method and device, which can accurately identify the information type and solve the problem that the subsequent operation cannot be normally executed due to the incorrect selection of the information type.
[0004] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme:
[0005] An information type identification method, comprising:
[0006] collecting a plurality of information values of each information type participating in information type identification;
[0007] generating an information type identification model according to the information values of each information type participating in information type identification;
[0008] performing information type identification on a target information value by using the information type identification model, and setting the identified information type as the information type of the target information value.
[0009] An information type identification device, comprising:
[0010] a collection unit, configured to collect a plurality of information values of each information type participating in information type identification;
[0011] a generation unit, configured to generate an information type identification model according to the information values of each information type participating in information type identification;
[0012] an identification unit, configured to perform information type identification on a target information value by using the information type identification model, and set the identified information type as the information type of the target information value.
[0013] An electronic device comprises at least one processor and a memory connected to the at least one processor through a bus; the memory stores one or more computer programs executable by the at least one processor; the at least one processor implements the steps in the above information type identification method when executing the one or more computer programs.
[0014] A computer readable storage medium stores one or more computer programs, which are executed by a processor to implement the steps in the above information type identification method.
[0015] From the above technical solutions, in the present application, a plurality of information values of each information type participating in information type identification are collected, an information type identification model is generated according to the collected information values, the information type identification model is used to identify the information type of a target information value, and the identified information type is set as the information type of the target information value. The present application can accurately identify the information type, and can solve the problem that subsequent operations cannot be normally executed due to the error of information type selection. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 is a flow chart of the information type identification method of the first embodiment of the present application;
[0018] Figure 2 is a flow chart of the information type identification method of the second embodiment of the present application;
[0019] Figure 3 is a flow chart of the information type identification method of the third embodiment of the present application;
[0020] Figure 4 is a flow chart of the information type identification method of the fourth embodiment of the present application;
[0021] Figure 5 is a structural schematic diagram of the information type identification device of the embodiment of the present application;
[0022] Figure 6 is a structural schematic diagram of the electronic device of the embodiment of the present application. DETAILED DESCRIPTION
[0023] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0024] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0025] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.
[0026] Referring to Figure 1 , Figure 1 is a flow chart of an information type identification method according to an embodiment of the present application, as Figure 1 shown, the method mainly includes the following steps:
[0027] Step 101, collecting a plurality of information values of each information type participating in information type identification;
[0028] Step 102, generating an information type identification model according to the information values of each information type participating in information type identification;
[0029] Step 103, using the information type identification model to perform information type identification on a target information value, and setting the identified information type as the information type of the target information value.
[0030] From Figure 1 the method, it can be seen that in the embodiment, by collecting a plurality of information values of each information type participating in information type identification, generating training of an information type identification model according to the collected information values, and using the information type identification model to perform accurate information type identification on a target information value, the problem that subsequent operations cannot be normally performed due to incorrect information type selection can be solved.
[0031] Referring to Figure 2 , Figure 2 is a flowchart of an information type identification method according to an embodiment of the present application, as shown in Figure 2 , the method mainly includes the following steps:
[0032] Step 201, collect multiple information values of each information type participating in information type identification;
[0033] In the embodiment of the present application, the information type participating in information type identification can be part or all of the information types corresponding to a certain item of information belonging to a certain service.
[0034] Step 2021, extract the feature information of each information value of each information type participating in information type identification, and add the feature information of the information value to the data set after labeling the information type;
[0035] Step 2022, train the feature information labeled with the information type in the data set to obtain an information type identification model;
[0036] In the embodiment, the feature information labeled with the information type in the data set can be divided into a training sample set and a test sample set. The feature information labeled with the information type in the training sample set is used as a training sample, and the feature information labeled with the information type in the test sample set is used as a test sample. The information type identification model is obtained by training the training sample in the training sample set and verifying the test sample in the test sample set.
[0037] In the claim settlement system for freight, the information value can be a clue value (the clue value can be represented by a waybill number) input by the user in the created claim settlement form, and the information type can be a clue type (the clue type can be represented by a waybill type) corresponding to the clue value input by the user in the created claim settlement form. The generation process of the corresponding information type identification model is as follows: S1, collect multiple clue values of each clue type participating in clue type identification; S2, extract the feature information of each clue value of each clue type participating in clue type identification, and add the feature information of the clue value to the data set after labeling the clue type; S3, train the feature information labeled with the information type in the data set to obtain an information type identification model suitable for clue values.
[0038] The above steps 2021 to 2022 are specific refinements of step 102 shown in Figure 1 .
[0039] Step 203, use the information type identification model to identify the information type of the target information value, and set the identified information type as the information type of the target information value.
[0040] In this embodiment, when the user inputs an information value (such as a clue value) in a created bill (such as a claim bill), if the type of the information value still needs to be input or selected, the information type recognition model can be used to perform information type recognition on the input information value, and then the recognized information type is set as the information type of the information value, so that the user does not need to select the information type of the information value by himself / herself, which can avoid the situation that the subsequent operation cannot be normally performed due to the selection of the wrong information type.
[0041] From Figure 2 As can be seen from the method shown in the figure, in this embodiment, by collecting a plurality of information values of each information type participating in information type recognition, extracting feature information of each information value of each information type participating in information type recognition, and training the information type recognition model after labeling the information values with the corresponding information types, the training of the information type recognition model is generated, and the information type recognition model is used to accurately recognize the target information value, which can solve the problem that the subsequent operation cannot be normally performed due to the selection of the wrong information type.
[0042] Referring to Figure 3 , Figure 3 is the information type recognition method flowchart of the third embodiment of the present application, as shown in the figure, the method mainly includes the following steps: Figure 3
[0043] Step 301, collecting a plurality of information values of each information type participating in information type recognition;
[0044] In actual application, the characteristics of some information values of some information types are obvious and easy to distinguish, and the characteristics of some information values of some information types are not obvious and easy to confuse, for example, in a claim system, there are multiple shipping order types, the shipping order numbers of some shipping order types are relatively obvious and easy to identify their shipping order types, and the shipping order numbers of some shipping order types are relatively similar and easy to confuse.
[0045] In this embodiment, only the information values of the information types that are easy to confuse can be recognized, and for this purpose, a plurality of information values of each shipping order type participating in information type recognition can be collected first, the feature information of these information values is extracted, and the training of the information type recognition model is generated by using the feature information of these information values.
[0046] In this embodiment, the feature information includes the length of the information value and the symbol features of the specified position range in the information value.
[0047] Step 3021a, for each information value of each information type, the following steps 3021b to 3021c are performed to determine the feature information of the information value, and the feature information of the information value is labeled with the information type and added to the data set:
[0048] Step 3021b, determining the length of the information value;
[0049] In this embodiment, the information value is usually a string, and the length of the string representing the information value is the length of the information value.
[0050] Step 3021c, extracting a substring in the information value corresponding to each specified position range, and determining the symbol feature of the specified position range according to the substring of the specified position range;
[0051] In this embodiment, one or more position ranges in the information value can be pre-set as the specified position range according to the character distribution characteristics of the information values of different information types. For example, the first character, the second character, the third character, the fourth character, and the fifth to the last character of the information value can be set as five specified position ranges.
[0052] The above steps 3021a to 3021c are Figure 2 specific refinements of the step 2021 shown.
[0053] Step 3022, training the feature information with the information type labeled in the data set to obtain an information type recognition model;
[0054] In this embodiment, the feature information with the information type labeled in the data set can be divided into a training sample set and a test sample set. The feature information with the information type labeled in the training sample set is used as a training sample, and the feature information with the information type labeled in the test sample set is used as a test sample. By training the training samples in the training sample set and verifying the test samples in the test sample set, an information type recognition model can be obtained.
[0055] In this embodiment, the feature information with the information type labeled in the data set is trained to obtain an information type recognition model, which can specifically include:
[0056] The feature information with the information type labeled in the data set is trained by using a classification and regression tree (CART) algorithm to obtain an information type recognition model.
[0057] The above steps 3021a to 3022 are Figure 1 specific refinements of the step 102 shown.
[0058] Step 303, performing information type recognition on a target information value by using the information type recognition model, and setting the recognized information type as the information type of the target information value.
[0059] In the claim settlement system for freight, when the claim settlement user inputs the clue value in the created claim settlement sheet, the clue type of the clue value in the claim settlement sheet can be identified by using the information type identification model suitable for the clue value, and then the identified clue type is set as the clue type of the clue value in the claim settlement sheet, so that the claim settlement user does not need to select the clue type of the clue value by himself / herself, and the situation that the subsequent claim settlement cannot be normally performed due to the selection of the wrong clue type by the claim settlement user can be avoided.
[0060] From Figure 3 As can be seen from the method shown in the embodiment, by collecting a plurality of information values of each information type participating in information type identification, extracting the length of each information value of the information type and the symbol feature of the specified position range as the feature information of the information value, labeling the feature information of the information value with the information type to participate in the training of the information type identification model, and using the information type identification model to accurately identify the information type of the target information value, the problem that the subsequent operation cannot be normally performed due to the selection of the wrong information type can be solved.
[0061] Referring to Figure 4 , Figure 4 is a flow chart of the information type identification method of the fourth embodiment of the present application, as shown in the figure, the method mainly includes the following steps: Figure 4
[0062] Step 401, collect a plurality of information values of each information type participating in information type identification;
[0063] In the embodiment, only the information values of the information types that are easy to confuse can be identified, for this purpose, a plurality of information values of each information type participating in information type identification can be collected first, and the feature information of the information values is extracted, and the feature information of each information value labeled with the information type is used as a training sample to participate in the training of the information type identification model.
[0064] In the embodiment, the feature information includes the length of the information value and the symbol feature of the specified position range in the information value.
[0065] In the embodiment, one or more position ranges in the information value can be pre-set as the specified position range according to the character distribution characteristics of the information values of different information types. The specified position range includes a first type of specified position range and a second type of specified position range; the symbol feature of the first type of specified position range includes the ASCII code of each character in the substring of the first type of specified position range; and the symbol feature of the second type of specified position range includes whether the substring of the second type of specified position range includes a character of a specified character type.
[0066] Step 4021a, for each information value of each information type, the following steps 4021b-4021c_3 are performed to determine the feature information of the information value, and the feature information of the information value is marked after the information type is added to the data set:
[0067] Step 4021b, determine the length of the information value;
[0068] In this embodiment, the information value is usually a string, and the length of the string representing the information value is the length of the information value.
[0069] Step 4021c_1, extract the substring corresponding to each specified position range in the information value, when the specified position range is the first type of specified position range, perform step 4021c_2, when the specified position range is the second type of specified position range, perform step 4021c_3;
[0070] In this embodiment, the category of each specified position range in the information value can be pre-configured, for example, the 1st character, the 2nd character, the 3rd character, the 4th character, and the 5th to the last character of the information value can be used as five specified position ranges, wherein the first four specified position ranges (i.e. the 1st character, the 2nd character, the 3rd character, and the 4th character) are the first type of specified position range, and the fifth specified position range (i.e. the 5th to the last character) is the second type of specified position range. In this way, when performing symbol feature extraction of each specified position range in the information value, the category of the specified position range can be determined to determine how to perform corresponding symbol feature extraction.
[0071] Step 4021c_2, determine the ASCII code of each character in the substring of the specified position range as the symbol feature of the specified position range;
[0072] Step 4021c_3, determine whether the substring of the specified position range includes a character of a specified type, and determine the result as the symbol feature of the specified position range;
[0073] In this embodiment, one or more position ranges in the information value can be pre-configured as specified position ranges according to the character distribution characteristics of the information values of different information types. For example, the 1st character, the 2nd character, the 3rd character, the 4th character, and the 5th to the last character of the information value can be used as five specified position ranges.
[0074] The above steps 4021c_1-4021c_3 are Figure 3 The specific refinement of the step 3021c shown in the figure.
[0075] The above steps 4021a-4021c_3 are Figure 2Specific refinement of the step 2021 shown.
[0076] The step 4022 is training the feature information with the information type annotated in the data set to obtain an information type recognition model.
[0077] In this embodiment, the feature information with the information type annotated in the data set can be divided into a training sample set and a test sample set. The feature information with the information type annotated in the training sample set is used as a training sample, and the feature information with the information type annotated in the test sample set is used as a test sample. The training sample set is trained, and the test sample set is verified, so as to obtain the information type recognition model.
[0078] In this embodiment, the feature information with the information type annotated in the data set is trained to obtain the information type recognition model, which can specifically include:
[0079] The feature information with the information type annotated in the data set is trained by using a classification and regression tree (CART) algorithm to obtain the information type recognition model.
[0080] In this embodiment, in the process of training the training sample by using the classification and regression tree (CART) algorithm, the decision tree pruning can be realized by parameter adjustment to avoid overfitting. The information type recognition model finally obtained by training is a decision tree.
[0081] In the claim settlement system for freight, the information type recognition model (decision tree) suitable for the clue value can be obtained by the following operation process: 50,000 information values of two information types that are easy to confuse are exported from the claim settlement system, feature extraction is performed on the information values to form a feature data set, the feature data set is divided into a training set sample and a test set sample, the ratio of the training set sample to the test set sample is 4:1, a total of 80,000 training set samples and 20,000 test set samples are included, the training set sample is used for training the decision tree, and the test set sample is used for verifying and adjusting the parameters of the decision tree, and finally the decision tree is obtained.
[0082] The above steps 4021a to 4022 are Figure 1 Specific refinement of the step 102 shown.
[0083] The step 403 is using the information type recognition model to recognize the information type of the target information value, and setting the recognized information type as the information type of the target information value.
[0084] In the embodiment, after the user inputs an information value in the created bill, the information type recognition model is used to recognize the information value in the bill, and the recognized information type is set as the information type of the information value in the bill, so that the user does not need to select the information type of the information value by himself / herself, and the situation that the subsequent operation cannot be normally performed due to the selection of the wrong information type by the user can be avoided.
[0085] From Figure 4 As can be seen from the method shown in the embodiment, the length of each information value of each information type participating in information type recognition is extracted, and the symbol feature of each position range in the information value is extracted according to the category of the position range, the length of the information value and the symbol feature of each position range are taken as the feature information of the information value, the feature information of the information value is labeled to the information type to participate in the training of the information type recognition model, the information type recognition model is used to accurately recognize the target information value, and the problem that the subsequent operation cannot be normally performed due to the selection of the wrong information type can be solved.
[0086] The information type recognition method of the embodiment is described in detail above, and the embodiment also provides an information type recognition device, which is described in detail below in combination with Figure 5 :
[0087] Referring to Figure 5 , Figure 5 is a structural schematic diagram of the information type recognition device of the embodiment, as Figure 5 shown, the device includes:
[0088] The collection unit 501 is configured to collect a plurality of information values of each information type participating in information type recognition.
[0089] The generation unit 502 is configured to generate an information type recognition model according to the information values of each information type participating in information type recognition.
[0090] The recognition unit 503 is configured to use the information type recognition model to recognize the information type of a target information value, and set the recognized information type as the information type of the target information value.
[0091] Figure 5 In the device shown,
[0092] The generation unit 502 generates an information type recognition model according to the information values of each information type participating in information type recognition, and includes:
[0093] The feature information of each information value of each information type participating in information type recognition is extracted, and the feature information of the information value is labeled to the information type and added to a data set.
[0094] The feature information of the data set labeled with information types is trained to obtain an information type recognition model.
[0095] Figure 5 In the apparatus,
[0096] The feature information includes information value length, symbol features of a specified position range in the information value;
[0097] The generating unit 502 extracts feature information of each information value of each information type participating in information type recognition, including:
[0098] determining the length of the information value;
[0099] extracting a substring corresponding to each specified position range in the information value, and determining symbol features of the specified position range according to the substring of the specified position range.
[0100] Figure 5 In the apparatus,
[0101] The specified position range includes a first type of specified position range and a second type of specified position range;
[0102] The symbol features of the first type of specified position range include ASCII codes of each character in the substring of the first type of specified position range;
[0103] The symbol features of the second type of specified position range include whether the substring of the second type of specified position range includes characters of a specified character type;
[0104] The apparatus further includes a configuration unit 504 configured to pre-configure the category of each specified position range in the information value;
[0105] The generating unit 502 determines the symbol features of the specified position range according to the substring of the specified position range, including:
[0106] When the specified position range is the first type of specified position range, the ASCII codes of each character in the substring of the specified position range are determined as the symbol features of the specified position range;
[0107] When the specified position range is the second type of specified position range, it is determined whether the substring of the specified position range includes characters of a specified type, and the determination result is determined as the symbol features of the specified position range.
[0108] Figure 5 In the apparatus,
[0109] The generation unit 502 trains the feature information labeled with information types in the dataset to obtain an information type recognition model, including:
[0110] The CART (Classification and Regression Tree) algorithm was used to train the information type identification model on the labeled feature information.
[0111] This invention also provides an electronic device, such as... Figure 6 As shown, the electronic device includes: at least one processor 601, and a memory 602 connected to the at least one processor 601 via a bus; the memory 602 stores one or more computer programs executable by the at least one processor 601; when the at least one processor 601 executes the one or more computer programs, it implements... Figures 1-4 The steps in the information type identification method shown in any flowchart.
[0112] This invention provides a computer-readable storage medium that stores one or more computer programs, which are implemented when executed by a processor. Figures 1-4 The steps in the information type identification method shown in any flowchart.
[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An information type identifying method characterized by comprising: The method comprises: collecting a plurality of information values of each information type participating in information type identification; generating an information type identification model according to the information values of each information type participating in information type identification; performing information type identification on a target information value by using the information type identification model, and setting an identified information type as an information type of the target information value; generating an information type identification model according to the information values of each information type participating in information type identification comprises: extracting feature information of each information value of each information type participating in information type identification, and adding the feature information of the information value to a data set after labeling the information type; training the feature information labeled with the information type in the data set to obtain the information type identification model; the feature information comprises information value length and symbol features of a specified position range in the information value; extracting feature information of each information value of each information type participating in information type identification comprises: determining the length of the information value; extracting a substring corresponding to each specified position range in the information value, and determining symbol features of the specified position range according to the substring of the specified position range; the specified position range comprises a first type of specified position range and a second type of specified position range; the symbol features of the first type of specified position range comprise ASCII codes of each character in the substring of the first type of specified position range; the symbol features of the second type of specified position range comprise whether the substring of the second type of specified position range comprises a character of a specified character type; a category of each specified position range in the information value is preconfigured.
2. The method of claim 1, wherein determining symbol features of the specified position range according to the substring of the specified position range comprises: when the specified position range is the first type of specified position range, determining the ASCII codes of each character in the substring of the specified position range as the symbol features of the specified position range; when the specified position range is the second type of specified position range, determining whether the substring of the specified position range comprises a character of a specified type as the symbol features of the specified position range.
3. The method of claim 1, wherein training the feature information labeled with the information type in the data set to obtain the information type identification model comprises: training the feature information labeled with the information type by using a classification and regression tree (CART) algorithm to obtain the information type identification model.
4. An information type identifying apparatus characterized by comprising: The device comprises: a collection unit configured to collect a plurality of information values of each information type participating in information type identification; a generation unit configured to generate an information type identification model according to the information values of each information type participating in information type identification; an identification unit configured to perform information type identification on a target information value by using the information type identification model, and set an identified information type as an information type of the target information value; the generation unit generates an information type identification model according to the information values of each information type participating in information type identification, and comprises: The feature information of each information value of each information type participating in the information type identification is extracted, and the feature information of the information value is labeled with the information type and then added to the data set; The feature information labeled with the information type in the data set is trained to obtain an information type identification model; The feature information includes information value length and symbol features of a specified position range in the information value; The feature information of each information value of each information type participating in the information type identification is extracted, and the feature information of the information value is labeled with the information type and then added to the data set; The length of the information value is determined; A substring corresponding to each specified position range in the information value is extracted, and symbol features of the specified position range are determined according to the substring of the specified position range; The specified position range includes a first type of specified position range and a second type of specified position range; The symbol features of the first type of specified position range include ASCII codes of each character in the substring of the first type of specified position range; The symbol features of the second type of specified position range include whether the substring of the second type of specified position range includes a character of a specified character type; The device further includes a configuration unit configured to pre-configure the type of each specified position range in the information value.
5. The device of claim 4, wherein The device further includes a configuration unit configured to pre-configure the type of each specified position range in the information value. The symbol features of the specified position range are determined according to the substring of the specified position range, including: When the specified position range is the first type of specified position range, the ASCII codes of each character in the substring of the specified position range are determined as the symbol features of the specified position range; When the specified position range is the second type of specified position range, it is determined whether the substring of the specified position range includes a character of a specified type, and the determination result is determined as the symbol features of the specified position range.
6. The device of claim 4, wherein The feature information labeled with the information type in the data set is trained to obtain an information type identification model, including: The feature information labeled with the information type is trained by using a classification and regression tree (CART) algorithm to obtain an information type identification model.
7. An electronic device, comprising: At least one processor, and a memory connected to the at least one processor through a bus; The memory stores one or more computer programs that can be executed by the at least one processor; and when the at least one processor executes the one or more computer programs, the steps in the method of any of claims 1-3 are implemented.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more computer programs, and when the one or more computer programs are executed by a processor, the steps in the method of any of claims 1-3 are implemented.
Citation Information
Patent Citations
Risk control classification identification method and system for processing user complaint information
CN109872162A