A data processing method, apparatus, electronic device, and storage medium
By determining similarity and difference components from a standard database, the structural data of the text to be identified is optimized, solving the problems of incomplete and inaccurate extraction in existing technologies, and achieving efficient and accurate structural data extraction.
Patent Information
- Application Number
- CN202210242849.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-03-11
AI Technical Summary
Existing technologies struggle to extract structural data efficiently and accurately from text.
The first text that meets the target condition in terms of similarity to the text to be identified is determined from a standard database. The difference part is identified, and the structural data of the text to be identified is optimized based on the difference part and the structural data of the first text.
It ensures the integrity and accuracy of the structural data of the text to be identified and improves the efficiency of data extraction.
Smart Images

Figure CN114579641B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and in particular to a data processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Currently, in some scenarios, it is necessary to extract structural data from text; however, how to extract complete and accurate structural data has become a problem. Summary of the Invention
[0003] This application provides the following technical solution:
[0004] This application provides a data processing method, including:
[0005] Obtain the text to be recognized;
[0006] A first text whose similarity to the text to be identified meets the target condition is determined from a standard database. The standard database includes at least one text and structural data corresponding to the text. The first text belongs to the at least one text. The structural data is attribute features extracted from the text and used to characterize at least one attribute of the object described by the text.
[0007] Determine the structural data corresponding to the first text;
[0008] Determine the differences between the text to be identified and the first text;
[0009] Based on the difference portion and the structural data corresponding to the first text, the structural data of the text to be identified is obtained.
[0010] The step of determining the first text from the standard database whose similarity to the text to be identified meets the target condition includes:
[0011] Determine the similarity between the text in the standard database and the text to be identified;
[0012] Determine the maximum similarity from the similarity between the text to be identified and the at least one text;
[0013] The text corresponding to the maximum similarity among the at least one text is determined as the first text.
[0014] The step of determining the difference between the text to be identified and the first text includes:
[0015] Extract at least one first attribute feature of a first attribute from the text to be identified, and save the first attribute feature of the at least one first attribute to a first hash mapping table;
[0016] Extract at least one second attribute feature from the first text, and save the at least one second attribute feature to a second hash mapping table;
[0017] Traverse the first key object in the first hash map table. If the first key object does not exist in the second hash map table, determine the first attribute feature corresponding to the first key object as the difference part. The first key object is obtained based on the first attribute feature.
[0018] The step of obtaining the structural data of the text to be identified based on the difference portion and the structural data corresponding to the first text includes:
[0019] Extract attribute features related to the extraction task from the difference portion, wherein the attribute features related to the extraction task are derived from the text to be identified;
[0020] Based on the attribute features related to the extraction task and the structural data corresponding to the first text, the structural data of the text to be identified is obtained.
[0021] The step of obtaining the structural data of the text to be identified based on the attribute features related to the extraction task and the structural data corresponding to the first text includes:
[0022] The target attribute features in the structured data corresponding to the first text are determined, and the target attribute features correspond to the attributes to which the attribute features related to the extraction task belong;
[0023] The target attribute features are replaced with the attribute features related to the extraction task to obtain the structural data of the text to be identified.
[0024] The text to be identified is related to the descriptive information of the hardware components of the electronic device.
[0025] This application also provides a data processing apparatus, comprising:
[0026] The first acquisition module is used to acquire the text to be recognized;
[0027] The first determining module is used to determine from a standard database a first text whose similarity to the text to be identified meets the target condition. The standard database includes at least one text and structural data corresponding to the text. The first text belongs to the at least one text. The structural data is attribute features extracted from the text and used to characterize at least one attribute of the object described by the text.
[0028] The second determining module is used to determine the structural data corresponding to the first text;
[0029] The third determining module is used to determine the difference between the text to be identified and the first text;
[0030] The second obtaining module is used to obtain the structural data of the text to be identified based on the difference portion and the structural data corresponding to the first text.
[0031] A third aspect of this application provides an electronic device, comprising:
[0032] Memory and processor;
[0033] The memory is used to store at least one set of instructions;
[0034] The processor is configured to call and execute the instruction set in the memory, and execute the data processing method as described in any of the preceding descriptions by executing the instruction set.
[0035] A fourth aspect of this application provides a storage medium storing a computer program that implements the data processing method as described in any one of the above claims, the computer program being executed by a processor to implement the data processing method as described in any one of the above claims.
[0036] In this application, by obtaining the text to be identified, a first text whose similarity to the text to be identified meets the target condition is determined from a standard database, and the structural data corresponding to the first text is determined. When the similarity between the text to be identified and the first text meets the target condition, the structural data corresponding to the first text can be used as candidate structural data of the text to be identified. Based on this, the difference between the text to be identified and the first text is determined. Based on the difference and the structural data corresponding to the first text, at least the candidate structural data of the text to be identified can be optimized to obtain the structural data of the text to be identified, ensuring that the complete and accurate structural data of the text to be identified is obtained. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a data processing method provided in the first embodiment of this application;
[0039] Figure 2 This is a flowchart illustrating a data processing method provided in the second embodiment of this application;
[0040] Figure 3This is a flowchart illustrating a data processing method provided in the third embodiment of this application;
[0041] Figure 4 This is a flowchart illustrating a data processing method provided in the fourth embodiment of this application;
[0042] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application;
[0043] Figure 6 This is a schematic diagram of the structure of a data processing device provided in this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] To address the aforementioned problems, this application provides a data processing method, which will be described below.
[0046] Reference Figure 1 This is a flowchart illustrating a data processing method provided in the first embodiment of this application. The data processing method provided in this application can be applied to electronic devices. This application does not limit the product type of the electronic device, such as... Figure 1 As shown, the method may include, but is not limited to, the following steps:
[0047] Step S101: Obtain the text to be recognized.
[0048] In this embodiment, the text to be identified can be related to the description information of the electronic device.
[0049] The descriptive information of an electronic device can include, but is not limited to, the descriptive information of the hardware components of the electronic device, such as the descriptive information of the motherboard of the electronic device.
[0050] ODIN INTEL FRU BDPLANAR FRU LBL UHD GRAPHICS PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, N-TPM, N-ABS.
[0051] The description information of an electronic device can also include, but is not limited to, the description information of the electronic device's software.
[0052] Of course, the text to be recognized can also be, but is not limited to, text that is different from the descriptive information of electronic devices, such as article titles, webpage titles, etc.
[0053] Step S102: Determine the first text from the standard database whose similarity to the text to be identified meets the target condition.
[0054] Specifically, the standard database includes at least one text and its corresponding structural data. For example, as shown in Table 1, the standard database includes multiple texts and their corresponding structural data. PartNumber represents the text number, Decscription corresponds to the text, and DPK, DIS / UMA, CPU Serle, CPU Code, CPU Combine, Platform, DRAM, VRAM, GPU Full Name, Integrated, AMT, vPro, and their attribute features belong to the structural data corresponding to the text.
[0055] Table 1
[0056]
[0057]
[0058] Structural data consists of attribute features extracted from text, used to characterize at least one attribute of the object described by the text. For example, in a standard database, PartNumber: 00XG0mn corresponds to the text ODIN INTEL FRU BDPLANAR FRULBL. UHD GRAPHICS, The structural data for I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, Y-TPM, FTPM 2.0, and N-ABS can be found in Table 2. As shown in Table 2, the structural data characterizes the attribute features of various attributes of the first motherboard of the electronic device, such as the attribute feature NOK of the first motherboard DPK, the attribute feature UMA of the first motherboard DIS / UM, and the attribute feature Intel of the first motherboard CPU Brand.
[0059] Table 2
[0060]
[0061] The specific implementation methods for extracting structural data from text are not limited in this application.
[0062] It is understandable that the first text belongs to at least one text.
[0063] In this embodiment, the first text determined from the standard database that satisfies the target condition in terms of similarity to the text to be identified may include, but is not limited to:
[0064] S1021. Determine the similarity between the text in the standard database and the text to be identified.
[0065] The specific implementation method for determining the similarity between text in the standard database and the text to be identified is not limited in this application. Specifically, the similarity between the two can be determined by determining the edit distance between the text in the standard database and the text to be identified; or, by determining the Jaccard similarity coefficient between the text in the standard database and the text to be identified; or, by determining the cosine value between the text in the standard database and the text to be identified.
[0066] Determining the similarity between text in a standard database and the text to be identified by determining the cosine value can include:
[0067] S10211. Based on the text in the standard database, determine the first vector, whereby the first vector represents the text in the standard database.
[0068] In this embodiment, the first vector may contain at least one first word vector.
[0069] S10212. Based on the text to be identified, determine the second vector, which represents the text to be identified.
[0070] In this embodiment, the second vector may include at least one second word vector.
[0071] S10213. Calculate the cosine value between the first vector and the second vector, and use the cosine value between the first vector and the second vector as the similarity between the text in the standard database and the text to be identified.
[0072] This step can be performed using the following cosine value calculation formula to calculate the cosine value between the first and second vectors:
[0073]
[0074] Where cosθ represents the cosine value between the first and second vectors, A i Let B represent the i-th first word vector, and n represent the number of first word vectors included in the first vector or the number of second word vectors included in the second vector. i Let A represent the i-th second word vector, and let B represent the first vector and B the second vector.
[0075] S1022. Determine the maximum similarity from the similarity between the text to be identified and at least one other text.
[0076] S1023. Determine the text with the highest similarity among at least one text as the first text.
[0077] For example, the text to be recognized is ODIN INTEL FRU BDPLANAR FRU LBL UHDGRAPHICS, I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, N-TPM, N-ABS. Determine the similarity between the text in the standard database shown in Table 1 and the text to be identified. From the similarity between the text to be identified and at least one other text, determine the maximum similarity. The text in the standard database is: ODIN INTEL FRU BDPLANARFRULBL. UHD GRAPHICS The maximum similarity between the I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, Y-TPM, FTPM 2.0, N-ABS and the text to be identified is the maximum similarity score. The text corresponding to the maximum similarity score is then assigned to ODIN INTEL FRU BDPLANAR FRU LBL. UHD GRAPHICS I5-10310UPROCESSOR, HDD, DOCKABLE, NOK, N-AMT, Y-TPM, FTPM 2.0, N-ABS are identified as the first text.
[0078] This embodiment also provides another implementation method for determining a first text from a standard database whose similarity to the text to be identified meets the target conditions, which may specifically include:
[0079] S1024. Determine the similarity between the text in the standard database and the text to be identified.
[0080] S1025. Determine the similarity between the text to be identified and at least one text that is greater than a set threshold.
[0081] S1026. Determine the maximum similarity from the similarities that are greater than the set threshold.
[0082] S1027. Determine the text with the highest similarity among at least one text as the first text.
[0083] Step S103: Determine the structural data corresponding to the first text.
[0084] Determine the structural data corresponding to the first text, which may include, but is not limited to:
[0085] S1031. Obtain the structural data corresponding to the first text from the standard database.
[0086] Of course, determining the structural data corresponding to the first text may include, but is not limited to:
[0087] S1032. Extract structural data from the first text and use the extracted structural data as the structural data corresponding to the first text.
[0088] Step S104: Determine the differences between the text to be identified and the first text.
[0089] It is understandable that if the similarity between the text to be identified and the first text meets the target condition, the differences between the text to be identified and the first text can be determined.
[0090] Step S105: Based on the difference part and the structural data corresponding to the first text, obtain the structural data of the text to be identified.
[0091] Based on the similarity between the text to be identified and the first text meeting the target condition, candidate structural data of the text to be identified can be determined based on the structural data corresponding to the first text. For example, if the first text is ODIN INTEL FRUBDPLANAR FRU LBL UHD GRAPHICS The I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, Y-TPM, FTPM 2.0, and N-ABS can obtain the structural data corresponding to the first text from the standard database and use the structural data corresponding to the first text as candidate structural data for the text to be identified. The structural data corresponding to the first text can be found in Table 2.
[0092] Furthermore, based on the differences and the structural data corresponding to the first text, the candidate structural data of the text to be identified can be optimized to obtain the structural data of the text to be identified.
[0093] In this embodiment, by obtaining the text to be identified, a first text whose similarity to the text to be identified meets the target condition is determined from a standard database, and the structural data corresponding to the first text is determined. When the similarity between the text to be identified and the first text meets the target condition, the structural data corresponding to the first text can be used as candidate structural data of the text to be identified. Based on this, the difference between the text to be identified and the first text is determined. Based on the difference and the structural data corresponding to the first text, at least the candidate structural data of the text to be identified can be optimized to obtain the structural data of the text to be identified, ensuring that the complete and accurate structural data of the text to be identified is obtained.
[0094] As another optional embodiment of this application, refer to Figure 2 This is a flowchart illustrating a data processing method provided in the second embodiment of this application. This embodiment mainly refines the data processing method described in the first embodiment above. Figure 2 As shown, the method may include, but is not limited to, the following steps:
[0095] Step S201: Obtain the text to be recognized.
[0096] Step S202: Determine the first text from the standard database whose similarity to the text to be identified meets the target condition.
[0097] The standard database includes at least one text and the corresponding structural data of the text. The first text belongs to at least one text, and the structural data is attribute features extracted from the text to characterize at least one attribute of the object described by the text.
[0098] Step S203: Determine the structural data corresponding to the first text.
[0099] For a detailed description of steps S201-S203, please refer to the relevant description of steps S101-S103 in Embodiment 1, which will not be repeated here.
[0100] Step S204: Extract at least one first attribute feature from the text to be identified, and save the first attribute feature of at least one first attribute to the first hash mapping table.
[0101] Saving at least one first attribute feature to a first hash map table can be understood as saving the first attribute feature of at least one first attribute as a first key object to the first hash map table. In this embodiment, the first value object corresponding to the first key object in the first hash map table may, but is not limited to, being empty.
[0102] Step S205: Extract at least one second attribute feature from the first text and save the second attribute feature of at least one second attribute to the second hash mapping table.
[0103] Saving at least one second attribute feature to a second hash map can be understood as saving the second attribute feature of at least one second attribute as a second key object to the second hash map. In this embodiment, the second value object corresponding to the second key object in the second hash map may, but is not limited to, being empty.
[0104] Step S206: Traverse the first key object in the first hash map table. If the first key object does not exist in the second hash map table, determine the first attribute feature corresponding to the first key object as the difference part, and obtain the first key object based on the first attribute feature.
[0105] Specifically, iterate through the first key object in the first hash map, and search for the second key object that is the same as the first key object in the second hash map. If there is no second key object that is the same as the first key object in the second hash map, it is determined that there is no first key object in the second hash map. If there is no first key object in the second hash map, the first attribute feature corresponding to the first key object is determined to be the difference part.
[0106] Steps S204-S206 are a specific implementation of step S104 in implementation method 1.
[0107] Step S207: Based on the difference part and the structural data corresponding to the first text, obtain the structural data of the text to be identified.
[0108] For a detailed description of step S207, please refer to the relevant description of step S105 in Embodiment 1, which will not be repeated here.
[0109] In this embodiment, by obtaining the text to be identified, a first text whose similarity to the text to be identified meets the target condition is determined from a standard database, and the structural data corresponding to the first text is determined. When the similarity between the text to be identified and the first text meets the target condition, the structural data corresponding to the first text can be used as candidate structural data of the text to be identified. Based on this, the difference between the text to be identified and the first text is determined. Based on the difference and the structural data corresponding to the first text, at least the candidate structural data of the text to be identified can be optimized to obtain the structural data of the text to be identified, ensuring that the complete and accurate structural data of the text to be identified is obtained.
[0110] Furthermore, by extracting at least one first attribute feature from the text to be identified and storing the first attribute feature in a first hash map, and extracting at least one second attribute feature from the first text and storing the second attribute feature in a second hash map, the efficiency of storing the first and second attribute features can be guaranteed. On this basis, traversing the first key object in the first hash map and searching for the second key object that is the same as the first key object in the second hash map can reduce the search time, ensure the efficiency of determining the difference part, and thus ensure the efficiency of obtaining the structural data of the text to be identified.
[0111] As another optional embodiment of this application, refer to Figure 3This is a flowchart illustrating a data processing method provided in the third embodiment of this application. This embodiment mainly refines the data processing method described in the first embodiment above. Figure 3 As shown, the method may include, but is not limited to, the following steps:
[0112] Step S301: Obtain the text to be recognized.
[0113] Step S302: Determine the first text from the standard database whose similarity to the text to be identified meets the target condition.
[0114] The standard database includes at least one text and the corresponding structural data of the text. The first text belongs to at least one text, and the structural data is attribute features extracted from the text to characterize at least one attribute of the object described by the text.
[0115] Step S303: Determine the structural data corresponding to the first text.
[0116] Step S304: Determine the differences between the text to be identified and the first text.
[0117] For a detailed description of steps S301-S304, please refer to the relevant description of steps S101-S104 in Embodiment 1, which will not be repeated here.
[0118] Step S305: Extract attribute features related to the extraction task from the difference portion. The attribute features related to the extraction task come from the text to be identified.
[0119] This step may include, but is not limited to:
[0120] Extract task-related attribute features from the portion of the text to be identified within the difference. These task-related attribute features are derived from the text to be identified.
[0121] An extraction task may include, but is not limited to, information about the attribute features to be extracted.
[0122] The extraction of attribute features relevant to the extraction task from the portion of the differing text that belongs to the text to be identified may include, but is not limited to:
[0123] Regular expressions are used to match attribute features related to the extraction task from the parts of the text to be identified in the difference section. The regular expressions are obtained based on the extraction task.
[0124] Alternatively, the part of the text to be recognized in the difference section can be input into the named entity recognition model to obtain the attribute features related to the extraction task determined by the named entity recognition model. The named entity recognition model is based on the extraction task.
[0125] Alternatively, attribute features that match the dictionary can be extracted from the parts of the text to be identified that are different from the dictionary, which is obtained based on the extraction task.
[0126] Step S306: Based on the attribute features related to the extraction task and the structural data corresponding to the first text, obtain the structural data of the text to be identified.
[0127] In this embodiment, based on the structural data corresponding to the first text, candidate structural data of the text to be identified can be determined, and based on the attribute features related to the extraction task from the text to be identified and the structural data corresponding to the first text, the candidate structural data of the text to be identified can be optimized to obtain the structural data of the text to be identified.
[0128] In this embodiment, by obtaining the text to be identified, a first text whose similarity to the text to be identified meets the target condition is determined from a standard database, and the structural data corresponding to the first text is determined. When the similarity between the text to be identified and the first text meets the target condition, the structural data corresponding to the first text can be used as candidate structural data of the text to be identified. Based on this, the difference between the text to be identified and the first text is determined, and attribute features related to the extraction task are extracted from the difference. The attribute features related to the extraction task come from the text to be identified, which can reduce the extraction workload and improve the extraction efficiency. Furthermore, based on the attribute features related to the extraction task and the structural data corresponding to the first text, at least the candidate structural data of the text to be identified can be optimized, and the structural data of the text to be identified can be obtained, ensuring that the complete and accurate structural data of the text to be identified is obtained and the efficiency of obtaining the structural data is improved.
[0129] As another optional embodiment of this application, refer to Figure 4 This is a flowchart illustrating a data processing method provided in the fourth embodiment of this application. This embodiment mainly refines the data processing method described in the third embodiment above. Figure 4 As shown, the method may include, but is not limited to, the following steps:
[0130] Step S401: Obtain the text to be recognized.
[0131] Step S402: Determine the first text from the standard database whose similarity to the text to be identified meets the target condition.
[0132] The standard database includes at least one text and the corresponding structural data of the text. The first text belongs to at least one text, and the structural data is attribute features extracted from the text to characterize at least one attribute of the object described by the text.
[0133] Step S403: Determine the structural data corresponding to the first text.
[0134] Step S404: Determine the differences between the text to be identified and the first text.
[0135] Step S405: Extract attribute features related to the extraction task from the difference portion. The attribute features related to the extraction task come from the text to be identified.
[0136] For a detailed description of steps S401-S405, please refer to the relevant description of steps S301-S305 in the third embodiment, which will not be repeated here.
[0137] Step S406: Determine the target attribute features in the structural data corresponding to the first text. The target attribute features correspond to the attributes to which the attribute features related to the extraction task belong.
[0138] Specifically, based on the correspondence between attributes and their attribute features, attribute features corresponding to the attributes to which the attribute features related to the extraction task belong are determined from the structural data corresponding to the first text, and the determined attribute features are identified as target attribute features. For example, if the first text is ODIN INTEL FRU BDPLANAR FRU LBL UHDGRAPHICS, The structure data corresponding to the first text, I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, Y-TPM, FTPM 2.0, N-ABS, is shown in Table 2. The text to be recognized is ODIN INTEL FRU BDPLANAR FRULBL. UHD GRAPHICS I5-10310U PROCESSOR, HDD, DOCKABLE, NOK, N-AMT, N-TPM, N-ABS, The difference between the first text and the text to be identified is N-TPM and Y-TPM, FTPM 2.0, extract the attribute features N-TPM related to the extraction task from the difference part, determine the attribute features FTPM corresponding to the attribute TPM to which N-TPM belongs in the structural data corresponding to the first text, and determine FTPM as the target attribute feature.
[0139] Step S407: Replace the target attribute features with attribute features related to the extraction task to obtain the structural data of the text to be identified.
[0140] In the example corresponding to step S406, the target attribute feature FTPM in the structural data corresponding to the first text shown in Table 2 is replaced with the attribute feature N-TPM related to the extraction task to obtain the structural data of the text to be identified, as shown in Table 3.
[0141] Table 3
[0142]
[0143] Steps S406-S407 are a specific implementation of step S306 in the third embodiment.
[0144] In this embodiment, by obtaining the text to be identified, a first text whose similarity to the text to be identified meets the target condition is determined from a standard database, and the structural data corresponding to the first text is determined. When the similarity between the text to be identified and the first text meets the target condition, the structural data corresponding to the first text can be used as candidate structural data of the text to be identified. Based on this, the difference between the text to be identified and the first text is determined, and attribute features related to the extraction task are extracted from the difference. The attribute features related to the extraction task come from the text to be identified, which can reduce the extraction workload and improve the extraction efficiency. Then, the target attribute features in the structural data corresponding to the first text are determined, and the target attribute features are replaced with attribute features related to the extraction task to obtain the structural data of the text to be identified. This ensures the completeness and accuracy of the structural data of the text to be identified, and also ensures the efficiency of obtaining the structural data of the text to be identified.
[0145] Corresponding to the above-described embodiment of a data processing method provided in this application, this application also provides an embodiment of an electronic device that applies the data processing method.
[0146] like Figure 5 The diagram shown is a structural schematic of an electronic device according to embodiment 1 of this application. The electronic device may include the following structure:
[0147] Memory 10 and processor 20.
[0148] Memory 10 is used to store at least one set of instructions;
[0149] The processor 20 is used to call and execute an instruction set in memory, and execute a data processing method as described in any one of the first to fourth embodiments by executing the instruction set.
[0150] Corresponding to the above-described embodiment of a data processing method provided in this application, this application also provides an embodiment of a data processing apparatus.
[0151] In this embodiment, such as Figure 6 As shown, the data processing device may include: a first obtaining module 100, a first determining module 200, a second determining module 300, a third determining module 400, and a second obtaining module 500.
[0152] The first acquisition module 100 is used to acquire the text to be recognized.
[0153] In this embodiment, the text to be identified may be, but is not limited to, descriptive information about the hardware components of the electronic device.
[0154] The first determining module 200 is used to determine a first text from a standard database whose similarity to the text to be identified meets the target condition. The standard database includes at least one text and structural data corresponding to the text. The first text belongs to at least one text. The structural data is attribute features extracted from the text and used to characterize at least one attribute of the object described by the text.
[0155] The second determining module 300 is used to determine the structural data corresponding to the first text;
[0156] The third determining module 400 is used to determine the difference between the text to be identified and the first text;
[0157] The second acquisition module 500 is used to obtain the structural data of the text to be identified based on the structural data corresponding to the difference part and the first text.
[0158] In this embodiment, the first determining module 200 can be specifically used for:
[0159] Determine the similarity between text in the standard database and the text to be identified;
[0160] Determine the maximum similarity among the similarities between the text to be identified and at least one other text;
[0161] The text with the highest similarity among at least one text is identified as the first text.
[0162] In this embodiment, the third determining module 400 can be specifically used for:
[0163] Extract at least one first attribute feature from the text to be identified, and save the first attribute feature of at least one first attribute to a first hash mapping table;
[0164] Extract at least one second attribute feature of a second attribute from the first text, and save the at least one second attribute feature of the second attribute to a second hash mapping table;
[0165] Traverse the first key object in the first hash map. If the first key object does not exist in the second hash map, determine the first attribute feature corresponding to the first key object as the difference part, and obtain the first key object based on the first attribute feature.
[0166] In this embodiment, the second obtaining module 500 can be specifically used for:
[0167] Extract the attribute features related to the extraction task from the difference part. The attribute features related to the extraction task come from the text to be identified.
[0168] Based on the attribute features related to the extraction task and the structural data corresponding to the first text, the structural data of the text to be identified is obtained.
[0169] In this embodiment, the second obtaining module 500 can be specifically used for:
[0170] The target attribute features in the structured data corresponding to the first text are determined, and the target attribute features correspond to the attributes to which the attribute features related to the extraction task belong;
[0171] The target attribute features are replaced with attribute features related to the extraction task to obtain the structural data of the text to be identified.
[0172] Corresponding to the control method embodiment provided in this application above, this application also provides an embodiment of a storage medium.
[0173] In this embodiment, the storage medium stores a computer program that implements the data processing method described in any of the foregoing embodiments. The computer program is executed by a processor to implement the data processing method described in any of the foregoing embodiments.
[0174] It should be noted that each embodiment focuses on describing the differences from other embodiments, and the same or similar parts between the embodiments can be referred to accordingly. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0175] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0176] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0177] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0178] The above provides a detailed description of a data processing method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method, comprising: Obtain the text to be recognized; A first text whose similarity to the text to be identified meets the target condition is determined from a standard database. The standard database includes at least one text and structural data corresponding to the text. The first text belongs to the at least one text. The structural data is attribute features extracted from the text and used to characterize at least one attribute of the object described by the text. Determine the structural data corresponding to the first text; Determine the differences between the text to be identified and the first text; Based on the difference portion and the structural data corresponding to the first text, the structural data of the text to be identified is obtained.
2. The method according to claim 1, wherein determining the first text from the standard database whose similarity to the text to be identified satisfies the target condition includes: Determine the similarity between the text in the standard database and the text to be identified; Determine the maximum similarity from the similarity between the text to be identified and the at least one text; The text corresponding to the maximum similarity among the at least one text is determined as the first text.
3. The method according to claim 1, wherein determining the difference between the text to be identified and the first text comprises: Extract at least one first attribute feature of a first attribute from the text to be identified, and save the first attribute feature of the at least one first attribute to a first hash mapping table; Extract at least one second attribute feature from the first text, and save the at least one second attribute feature to a second hash mapping table; Traverse the first key object in the first hash map table. If the first key object does not exist in the second hash map table, determine the first attribute feature corresponding to the first key object as the difference part. The first key object is obtained based on the first attribute feature.
4. The method according to any one of claims 1-3, wherein obtaining the structural data of the text to be identified based on the difference portion and the structural data corresponding to the first text comprises: Extract attribute features related to the extraction task from the difference portion, wherein the attribute features related to the extraction task are derived from the text to be identified; Based on the attribute features related to the extraction task and the structural data corresponding to the first text, the structural data of the text to be identified is obtained.
5. The method according to claim 4, wherein obtaining the structural data of the text to be identified based on the attribute features related to the extraction task and the structural data corresponding to the first text includes: The target attribute features in the structured data corresponding to the first text are determined, and the target attribute features correspond to the attributes to which the attribute features related to the extraction task belong; The target attribute features are replaced with the attribute features related to the extraction task to obtain the structural data of the text to be identified.
6. The method according to claim 1, wherein the text to be identified is related to the descriptive information of the hardware components of the electronic device.
7. A data processing apparatus, comprising: The first acquisition module is used to acquire the text to be recognized; The first determining module is used to determine from a standard database a first text whose similarity to the text to be identified meets the target condition. The standard database includes at least one text and structural data corresponding to the text. The first text belongs to the at least one text. The structural data is attribute features extracted from the text and used to characterize at least one attribute of the object described by the text. The second determining module is used to determine the structural data corresponding to the first text; The third determining module is used to determine the difference between the text to be identified and the first text; The second obtaining module is used to obtain the structural data of the text to be identified based on the difference portion and the structural data corresponding to the first text.
8. An electronic device, comprising: Memory and processor; The memory is used to store at least one set of instructions; The processor is configured to call and execute the instruction set in the memory, and execute the data processing method as described in any one of claims 1-6 by executing the instruction set.
9. A storage medium storing a computer program that implements the data processing method as described in any one of claims 1-6, wherein the computer program is executed by a processor to implement the data processing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Data monitoring method and apparatus, computer device and storage medium
CN108874644A