CN110019829A - Data attribute determines method, apparatus - Google Patents
Data attribute determines method, apparatus Download PDFInfo
- Publication number
- CN110019829A CN110019829A CN201710848242.XA CN201710848242A CN110019829A CN 110019829 A CN110019829 A CN 110019829A CN 201710848242 A CN201710848242 A CN 201710848242A CN 110019829 A CN110019829 A CN 110019829A
- Authority
- CN
- China
- Prior art keywords
- attribute
- data
- column data
- column
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/374—Thesaurus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种数据属性确定方法及装置,其中,该方法包括:对格式化的原始数据进行拆分获取多个列数据;若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;根据所述候选属性集合确定所述列数据的各单元内容的属性;对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。该方法通过分门别类地查找列数据的候选属性集合,以及通过统计各个单元内容的属性确定列数据的属性,实现了尽可能地减少数据属性识别过程中的运算量,提升了数据属性的识别效率和准确率。
The invention discloses a data attribute determination method and device, wherein the method includes: splitting formatted original data to obtain multiple column data; if the column data does not include column header content, The data type of the data determines the candidate attribute set corresponding to the column data; the attribute of each unit content of the column data is determined according to the candidate attribute set; the attribute of each unit content of the column data is counted to obtain the attribute of each attribute. Confidence, according to which the attribute of the column data is determined. The method searches for the candidate attribute set of the column data by category, and determines the attribute of the column data by counting the attributes of the content of each unit, so as to reduce the calculation amount in the process of data attribute identification as much as possible, and improve the identification efficiency of the data attribute. Accuracy.
Description
技术领域technical field
本发明涉及数据挖掘技术领域,尤其涉及一种数据属性确定方法、装置。The invention relates to the technical field of data mining, in particular to a method and device for determining data attributes.
背景技术Background technique
在关系图谱相关的大数据分析中,对结构化的原始数据进行按项拆分和识别,以便把数据映射到实体-属性,便于实体建模和分析。In the big data analysis related to the relational graph, the structured raw data is divided and identified by item, so as to map the data to the entity-attribute, which is convenient for entity modeling and analysis.
典型的应用场景是:对于一个结构化完好的excel输入表格,通过依据表格的文件名、表头、每列内容,可以把整个表格内容对应的各列属性猜测出来,并对应到E-R(entityrelationship model,实体联系模式)图的相关模型属性。这样可以实现原始输入信息到图谱模型的关系映射,便于后续图谱挖掘等更深操作。然而,如何提高数据属性的识别率一直是亟待解决的技术问题。A typical application scenario is: for a well-structured excel input table, the attributes of each column corresponding to the content of the entire table can be guessed based on the file name, header, and content of each column of the table, and corresponding to the E-R (entityrelationship model) , Entity Relationship Pattern) diagram related model properties. In this way, the relationship mapping of the original input information to the graph model can be realized, which is convenient for further operations such as subsequent graph mining. However, how to improve the recognition rate of data attributes has always been an urgent technical problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明的目的旨在至少在一定程度上解决上述的技术问题之一。The purpose of the present invention is to solve one of the above-mentioned technical problems at least to a certain extent.
为此,本发明的第一个目的在于提出一种数据属性确定方法,通过分门别类地查找列数据的候选属性集合,以及通过统计各个单元内容的属性确定列数据的属性,实现了尽可能地减少数据属性识别过程中的运算量,提升了数据属性的识别效率和准确率。Therefore, the first purpose of the present invention is to propose a data attribute determination method, which can reduce the number of column data as much as possible by searching for the candidate attribute set of the column data by category, and determining the attribute of the column data by counting the attributes of the content of each unit. The amount of computation in the data attribute identification process improves the identification efficiency and accuracy of data attributes.
本发明的第二个目的在于提出一种数据属性确定装置。The second object of the present invention is to provide a data attribute determination device.
本发明的第三个目的在于提出一种计算机设备。The third object of the present invention is to propose a computer device.
本发明的第四个目的在于提出一种计算机可读存储介质。A fourth object of the present invention is to provide a computer-readable storage medium.
为了实现上述目的,本发明第一方面实施例的数据属性确定方法,包括:对格式化的原始数据进行拆分获取多个列数据;In order to achieve the above object, the method for determining a data attribute according to the embodiment of the first aspect of the present invention includes: splitting the formatted original data to obtain multiple column data;
若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;If the column data does not include column header content, determining a candidate attribute set corresponding to the column data according to the data type of the column data;
根据所述候选属性集合确定所述列数据的各单元内容的属性;Determine the attribute of each unit content of the column data according to the candidate attribute set;
对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。The attribute of each unit content of the column data is statistically obtained to obtain the confidence level of each attribute, and the attribute of the column data is determined according to the confidence level.
如上所述的方法,所述根据所述列数据的数据类型确定所述列数据对应的候选属性集合,包括:In the above method, the determining the candidate attribute set corresponding to the column data according to the data type of the column data includes:
在所述数据类型为数字字母类型时,获取与所述列数据对应的候选正则表达式集合,将候选正则表达式集合确定为所述列数据对应的候选属性集合,其中,所述候选正则表达式集合包括多个正则表达式,所述正则表达式关联数据属性;When the data type is a alphanumeric type, obtain a candidate regular expression set corresponding to the column data, and determine the candidate regular expression set as a candidate attribute set corresponding to the column data, wherein the candidate regular expression set The formula set includes a plurality of regular expressions, and the regular expressions are associated with data attributes;
所述根据所述候选属性集合确定所述列数据的各单元内容的属性,包括:The determining the attribute of each unit content of the column data according to the candidate attribute set includes:
将所述单元内容与所述候选正则表达式集合中的各个正则表达式进行逐一匹配;Matching the unit content with each regular expression in the candidate regular expression set one by one;
在所述正则表达式与所述单元内容匹配时,将所述正则表达式关联的数据属性确定为单元内容对应的属性。When the regular expression matches the unit content, the data attribute associated with the regular expression is determined as the attribute corresponding to the unit content.
如上所述的方法,所述根据所述列数据的数据类型确定所述列数据对应的候选属性集合,包括:In the above method, the determining the candidate attribute set corresponding to the column data according to the data type of the column data includes:
在所述数据类型为非数字字母类型时,获取与所述列数据对应的候选哈希词典集合,将所述候选哈希词典集合确定为所述列数据对应的候选属性集合,其中,所述候选哈希词典集合包括多个哈希词典,所述哈希词典关联数据属性;When the data type is a non-alphabet type, obtain a candidate hash dictionary set corresponding to the column data, and determine the candidate hash dictionary set as a candidate attribute set corresponding to the column data, wherein the The set of candidate hash dictionaries includes a plurality of hash dictionaries, the hash dictionaries are associated with data attributes;
所述根据所述候选属性集合确定所述列数据的各单元内容的属性,包括:The determining the attribute of each unit content of the column data according to the candidate attribute set includes:
将单元内容输入到所述候选哈希词典集合中的各个哈希词典进行逐一查询;Input the unit content into each hash dictionary in the candidate hash dictionary set to query one by one;
当在所述哈希词典中查询到所述单元内容时,将所述哈希词典关联的数据属性确定为单元内容对应的属性。When the unit content is queried in the hash dictionary, the data attribute associated with the hash dictionary is determined as the attribute corresponding to the unit content.
如上所述的方法,所述对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性,包括:In the method as described above, the attribute of each unit content of the column data is statistically obtained to obtain the confidence of each attribute, and the attribute of the column data is determined according to the confidence, including:
对所述列数据的各单元内容的关联于哈希词典的属性进行统计获取各个关联于哈希词典的属性的置信度;Counting the attributes associated with the hash dictionary of each unit content of the column data to obtain the confidence level of each attribute associated with the hash dictionary;
根据关联于哈希词典的置信度确定关联于哈希词典的列数据的属性;determine attributes of column data associated with the hash dictionary according to the confidence associated with the hash dictionary;
在所述根据关联于哈希词典的置信度确定关联于哈希词典的列数据的属性之后,还包括:After the attribute of the column data associated with the hash dictionary is determined according to the confidence level associated with the hash dictionary, the method further includes:
在所述非数字字母类型为短文本且关联于哈希词典的列数据的属性的置信度低于设定阈值时,确定关联于Trie树的列数据的属性;When the non-numeric letter type is short text and the confidence level of the attribute associated with the column data of the hash dictionary is lower than the set threshold, determine the attribute of the column data associated with the Trie tree;
将关联于哈希词典的列数据的属性与关联于Trie树的列数据的属性进行比较,将置信度大的列数据的属性确定为列数据的目标属性。The attribute of the column data associated with the hash dictionary is compared with the attribute of the column data associated with the Trie tree, and the attribute of the column data with high confidence is determined as the target attribute of the column data.
如上所述的方法,还包括:The method as described above, further comprising:
在确定所述列数据包括列头内容时,根据所述列头内容查询预设属性映射词典获取与所述列头内容匹配的属性,将所述与所述列头内容匹配的属性确定为列数据的属性。When it is determined that the column data includes column header content, query a preset attribute mapping dictionary according to the column header content to obtain attributes matching the column header content, and determine the attribute matching the column header content as a column properties of the data.
为了实现上述目的,本发明第二方面实施例的数据属性确定装置,包括:拆分模块,用于对格式化的原始数据进行拆分获取多个列数据;In order to achieve the above object, the data attribute determination device according to the embodiment of the second aspect of the present invention includes: a splitting module, configured to split the formatted original data to obtain multiple column data;
第一确定模块,用于若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;a first determining module, configured to determine a candidate attribute set corresponding to the column data according to the data type of the column data if the column data does not include column header content;
第二确定模块,用于根据所述候选属性集合确定所述列数据的各单元内容的属性;a second determining module, configured to determine the attribute of each unit content of the column data according to the candidate attribute set;
第三确定模块,用于对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。The third determining module is configured to perform statistics on the attributes of the contents of each unit of the column data to obtain the confidence of each attribute, and determine the attribute of the column data according to the confidence.
为了实现上述目的,本发明第三方面实施例的计算机设备,包括:处理器和存储器;In order to achieve the above object, the computer device according to the embodiment of the third aspect of the present invention includes: a processor and a memory;
其中,所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于实现第一方面所述的数据属性确定方法。Wherein, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the data attribute determination method described in the first aspect.
为了实现上述目的,本发明第四方面实施例的计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现第一方面所述的数据属性确定方法。In order to achieve the above object, the computer-readable storage medium of the embodiment of the fourth aspect of the present invention stores a computer program thereon, and when the computer program is executed by a processor, implements the data attribute determination method described in the first aspect.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be set forth, in part, from the following description, and in part will be apparent from the following description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中,The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:
图1是本发明一实施例的数据属性确定方法的流程图;1 is a flowchart of a method for determining a data attribute according to an embodiment of the present invention;
图2是本发明又一实施例的数据属性确定方法的流程图;2 is a flowchart of a method for determining a data attribute according to another embodiment of the present invention;
图3是本发明另一实施例的数据属性确定方法的流程图;3 is a flowchart of a method for determining a data attribute according to another embodiment of the present invention;
图4是本发明再一实施例的数据属性确定方法的流程图;4 is a flowchart of a method for determining a data attribute according to yet another embodiment of the present invention;
图5是本发明一实施例的数据属性确定方法的流程图;5 is a flowchart of a method for determining a data attribute according to an embodiment of the present invention;
图6是本发明一实施例的数据属性确定装置的结构示意图;6 is a schematic structural diagram of a data attribute determination device according to an embodiment of the present invention;
图7是本发明一实施例的计算机设备的结构示意图。FIG. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, and are intended to explain the present invention and should not be construed as limiting the present invention.
下面参考附图描述本发明实施例的数据属性确定方法及装置。The following describes the data attribute determination method and apparatus according to the embodiments of the present invention with reference to the accompanying drawings.
图1是本发明一实施例的数据属性确定方法的流程图。本实施例的数据属性确定方法由数据属性确定装置执行,该装置可以集成在服务器中。FIG. 1 is a flowchart of a method for determining a data attribute according to an embodiment of the present invention. The data attribute determination method of this embodiment is executed by a data attribute determination apparatus, and the apparatus may be integrated in a server.
如图1所示,本实施例的数据属性确定方法,包括:As shown in FIG. 1, the data attribute determination method of this embodiment includes:
步骤S101、对格式化的原始数据进行拆分获取多个列数据。Step S101 , splitting the formatted original data to obtain multiple column data.
具体地,格式化的原始数据蕴藏海量的有价值的信息宝库,对格式化的原始数据进行数据挖掘能够帮助用户更为科学的决策。本实施例中的格式化的原始数据可以是各类报表,诸如客户名单、产品清单、物品清单、订单、发货单等数据的报表,报表的形式可以是PDF、Word、Excel和Power Point等。Specifically, the formatted raw data contains a massive treasure trove of valuable information, and data mining on the formatted raw data can help users make more scientific decisions. The formatted raw data in this embodiment can be various reports, such as reports of data such as customer lists, product lists, item lists, orders, invoices, etc. The forms of reports can be PDF, Word, Excel, Power Point, etc. .
以表1为例,表1的文件名为物流管理报表,表1共有3列数据,各列数据的列头内容分别为:运单号、发件公司、收件公司。一般来说,列头内容即为对应列数据的属性,即表1中的运单号所在列的属性为运单号,表1中的发件公司所在列的属性为发件公司,以此类推。Taking Table 1 as an example, the file name of Table 1 is Logistics Management Report, and Table 1 has 3 columns of data, and the header contents of each column of data are: waybill number, sending company, and receiving company. Generally speaking, the content of the column header is the attribute of the corresponding column data, that is, the attribute of the column where the waybill number in Table 1 is located is the waybill number, and the attribute of the column where the sending company in Table 1 is located is the sending company. analogy.
当集成了数据属性确定装置的服务器采集到大量的诸如表1所示的物流管理报表,首先,识别物流管理报表的结构形式,确定物流管理报表的列数;接着,按列拆分,即得到3列数据,分别为运单号、发件公司、收件公司;再接着,根据列内容或是列数据中的各个单元内容挖掘各列数据的属性。When the server integrated with the data attribute determination device collects a large number of logistics management reports such as those shown in Table 1, first, identify the structural form of the logistics management report, and determine the number of columns in the logistics management report; then, split it by column to get 3 columns of data, which are the waybill number, the sending company, and the receiving company; and then, according to the content of the column or the content of each unit in the column data, the attributes of each column of data are mined.
表1Table 1
步骤S102、若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合。Step S102: If the column data does not include column header content, determine a candidate attribute set corresponding to the column data according to the data type of the column data.
举例来说,服务器在采集到诸如表1所示的列数据即包括列头内容,又包括单元内容时,由于列头内容表征列数据的属性,这时服务器会优先识别列头内容来挖掘列数据的属性。然而,并不是采集到的格式化的原始数据都包括列头,这时,服务器根据各列数据的各个单元内容来挖掘列数据的属性。For example, when the server collects column data such as those shown in Table 1, which includes both the column header content and the unit content, because the column header content represents the attributes of the column data, the server will preferentially identify the column header content to mine the column header content. properties of the data. However, not all the collected and formatted raw data includes column headers. In this case, the server mines the attributes of the column data according to the content of each unit of the column data.
具体地,列数据的属性的数据类型可以分成数字字母类型和非数字字母类型。数字字母类型的属性对应的单元内容可以是由数字、26个英文字母、下划线、空格、制表符、换页符等组成的内容,诸如运单号、邮政编码、身份证、MAC地址等属性对应的单元内容。非数字字母类型可以是枚举类型、短文本类型。枚举类型的属性有民族、性别等;短文本类型的属性有公司、学校等。Specifically, the data types of the attributes of the column data can be classified into numeric letter types and non-numeric letter types. The content of the unit corresponding to the attribute of the digital letter type can be the content composed of numbers, 26 English letters, underscores, spaces, tabs, form feeds, etc., such as the waybill number, zip code, ID card, MAC address and other attributes corresponding unit content. Non-alphanumeric types can be enumeration types, short text types. Attributes of enumeration type include ethnicity, gender, etc.; attributes of short text type include company, school, etc.
举例来说,当服务器采集到表1中的运单号对应的列数据时,首先,服务器会对3个单元内容进行识别、分类、聚类等操作,猜测关联于运单号的列数据的属性可能为运单号、邮政编码、身份证等数据字母类型属性,这时服务器调取预先存储的运单号属性识别模型、邮政编码的属性识别模型、身份证属性识别模型。如果服务器针对不同的物流公司建立了不同运单号属性识别模型,此时服务器会调取出所有运单号属性识别模型。所有运单号属性识别模型、邮政编码的属性识别模型、身份证属性识别模型即组成本实施例中的列数据对应的候选属性集合(即关联于运单号的列数据对应的候选属性集合)For example, when the server collects the column data corresponding to the waybill number in Table 1, first, the server will identify, classify, and cluster the contents of the three units, and guess the column data associated with the waybill number. The attributes may be data letter type attributes such as waybill number, zip code, ID card, etc. At this time, the server calls the pre-stored waybill number attribute recognition model, zip code attribute recognition model, and ID card attribute recognition model. If the server has established different waybill number attribute identification models for different logistics companies, the server will retrieve all waybill number attribute identification models at this time. All waybill number attribute recognition models, zip code attribute recognition models, and ID card attribute recognition models constitute the candidate attribute set corresponding to the column data in this embodiment (ie, the candidate attribute set corresponding to the column data associated with the waybill number)
举例来说,当服务器采集到表1中的发件公司对应的列数据时,首先,服务器会对3个单元内容进行识别、分类、聚类等操作,猜测关联于发件公司的列数据的属性可能为发件公司、收件公司、中转公司等非数据字母类型属性,这时服务器调取预先存储的发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型,如果服务器针对不同的发件公司、收件公司、中转公司分别建立了相应的属性识别模型,这时服务器会调取出所有发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型。所有发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型即组成本实施例中的列数据对应的候选属性集合(即关联于发件公司的列数据对应的候选属性集合)。For example, when the server collects the column data corresponding to the sending company in Table 1, first, the server will identify, classify and cluster the contents of the three units, and guess the column data related to the sending company. The attributes may be non-data letter type attributes such as sending company, receiving company, and transit company. At this time, the server calls the pre-stored sending company attribute identification model, receiving company attribute identification model, and transit company attribute identification model. If the server Corresponding attribute identification models are established for different sending companies, receiving companies, and transit companies. At this time, the server will retrieve all sending company attribute identification models, receiving company attribute identification models, and transit company attribute identification models. All the attribute identification models of the sending company, the attribute identification model of the receiving company, and the attribute identification model of the transit company constitute the candidate attribute set corresponding to the column data in this embodiment (that is, the candidate attribute set corresponding to the column data associated with the sending company) .
需要指出的是,诸如运单号属性识别模型、邮政编码的属性识别模型、身份证属性识别模型、发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型等示例性的属性识别模型,由数据挖掘开发公司根据实际需求建立。举例来说,数据挖掘开发公司通过采集海量的历史格式化的原始数据,通过机器学习等分析方法建立相应的属性识别模型,或者是,数据挖掘开发公司通过统计分析海量的历史格式化的原始数据,基于预设算法建立相应的属性识别模型。举例来说,属性识别模型可以是基于属性建立的哈希词典、基于属性建立的Trie树、基于属性建立的正则表达式等识别模型。It should be pointed out that, such as the attribute identification model of the waybill number, the attribute identification model of the postal code, the identification model of the ID card attribute, the attribute identification model of the sending company, the attribute identification model of the receiving company, the attribute identification model of the transit company and other exemplary attributes The identification model is established by the data mining development company according to the actual needs. For example, a data mining development company collects massive amounts of historically formatted raw data and establishes a corresponding attribute recognition model through analysis methods such as machine learning, or a data mining development company statistically analyzes massive amounts of historically formatted raw data. , and establish the corresponding attribute recognition model based on the preset algorithm. For example, the attribute identification model may be an identification model such as a hash dictionary established based on attributes, a Trie tree established based on attributes, and a regular expression established based on attributes.
本实施例在确定列数据不包括列头内容时,通过先确定列数据的数据类型进行分门别类地查找列数据的候选属性集合,尽可能地减少数据属性识别过程中的运算量,提升数据属性的识别效率和准确率。In this embodiment, when it is determined that the column data does not include the column header content, by first determining the data type of the column data, the candidate attribute sets of the column data are searched by categories, so as to reduce the amount of computation in the data attribute identification process as much as possible, and improve the data attributes. Recognition efficiency and accuracy.
步骤S103、根据所述候选属性集合确定所述列数据的各单元内容的属性。Step S103: Determine the attribute of each unit content of the column data according to the candidate attribute set.
步骤S104、对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。Step S104: Statistically obtain the confidence of each attribute by performing statistics on the attributes of each unit content of the column data, and determine the attribute of the column data according to the confidence.
举例来说,当服务器对表1中的发件公司对应的5个单元内容中的属性进行识别时,将各单元内容输入到候选属性集合进行逐一匹配。其中,候选属性集合包括:发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型。For example, when the server identifies the attributes in the five units of content corresponding to the sending company in Table 1, the content of each unit is input into the candidate attribute set for matching one by one. Wherein, the candidate attribute set includes: a sender company attribute identification model, a recipient company attribute identification model, and a transit company attribute identification model.
具体的,将江西公司依次输入到发件公司属性识别模型、收件公司属性识别模型、中转公司属性识别模型进行逐一匹配时,发现江西公司输入到收件公司属性模型进行匹配,匹配成功,则确定江西公司对应的单元内容的属性为收件公司。以此类推,确定北京公司对应的单元内容的属性为发件公司;确定海南公司对应的单元内容的属性为发件公司;确定湖南公司对应的单元内容的属性为发件公司;确定上海公司对应的单元内容的属性为发件公司。Specifically, when the Jiangxi company is input into the attribute identification model of the sending company, the attribute identification model of the receiving company, and the attribute identification model of the transit company for matching one by one, it is found that the Jiangxi company is input into the attribute model of the receiving company for matching, and the matching is successful, then Determine the attribute of the unit content corresponding to Jiangxi Company as the recipient company. By analogy, determine the attribute of the unit content corresponding to the Beijing company as the sending company; determine the attribute of the unit content corresponding to the Hainan company as the sending company; determine the attribute of the unit content corresponding to the Hunan company as the sending company; determine the corresponding attribute of the Shanghai company The property of the unit content is the sender company.
具体的,经过统计,关联于发件公司的列数据的属性存在两种,分别为发件公司、收件公司;其中,四个单元内容的属性识别为发件公司,一个单元内容的属性识别为收件公司。经过计算,列数据的属性为发件公司的概率为80%,Specifically, after statistics, there are two attributes of the column data associated with the sending company, namely the sending company and the receiving company; among them, the attributes of the four unit contents are identified as the sending company, and the attribute of one unit content is identified as the sending company. for the receiving company. After calculation, the probability that the attribute of the column data is the sending company is 80%,
列数据的属性为收件公司的概率为20%。本实施例中属性的置信度可以理解为属性的概率,比如,列数据的属性为发件公司的概率为80%即为列数据的属性为发件公司的置信度为80%,列数据的属性为收件公司的概率为20%即为列数据的属性为收件公司的置信度为20%。There is a 20% probability that the attribute of the column data is the recipient company. The confidence of the attribute in this embodiment can be understood as the probability of the attribute. For example, the probability that the attribute of the column data is the sending company is 80%, that is, the confidence of the attribute of the column data is the sending company is 80%. The probability that the attribute is the receiving company is 20%, that is, the confidence level of the attribute of the column data is the receiving company is 20%.
其中,根据置信度确定所述列数据的属性的具体实现方式为:Wherein, the specific implementation manner of determining the attribute of the column data according to the confidence is as follows:
第一种实现方式,对同一列数据对应的各个置信度进行比较,选取置信度最大对应的属性确定为列数据的属性。In the first implementation manner, each confidence level corresponding to the same column of data is compared, and the attribute corresponding to the highest confidence level is selected to be determined as the attribute of the column data.
第二种实现方式,确定同一列数据对应的各个置信度是否满足设定条件,将符合条件的置信度对应的属性确定为列数据的属性。其中,设定条件可以是将置信度与设定阈值进行大小比较,也可以是确定置信度是否在设定范围内,但并不以此为限。需要指出的是,可能会出现多个符合条件的置信度,相应地,所确定的列数据的属性可能会有多个。In the second implementation manner, it is determined whether each confidence level corresponding to the same column of data satisfies the set condition, and the attribute corresponding to the confidence level that meets the condition is determined as the attribute of the column data. The setting condition may be to compare the confidence level with the set threshold, or it may be to determine whether the confidence level is within the set range, but it is not limited thereto. It should be pointed out that there may be multiple confidence levels that meet the conditions, and accordingly, there may be multiple attributes of the determined column data.
第三种实现方式,将同一列数据对应的各个置信度均呈现给用户,由用户根据置信度自主选择列数据的属性。In a third implementation manner, each confidence level corresponding to the same column of data is presented to the user, and the user independently selects the attributes of the column data according to the confidence level.
本实施例提供的数据属性确定方法,包括:对格式化的原始数据进行拆分获取多个列数据;若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;根据所述候选属性集合确定所述列数据的各单元内容的属性;对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。该方法通过分门别类地查找列数据的候选属性集合,以及通过统计各个单元内容的属性确定列数据的属性,实现了尽可能地减少数据属性识别过程中的运算量,提升了数据属性的识别效率和准确率。The method for determining a data attribute provided by this embodiment includes: splitting the formatted original data to obtain multiple column data; if the column data does not include column header content, determining the column data according to the data type of the column data A set of candidate attributes corresponding to the column data; determine the attributes of the content of each unit of the column data according to the set of candidate attributes; perform statistics on the attributes of the content of each unit of the column data to obtain the confidence level of each attribute, according to the confidence The degree determines the properties of the column data. The method searches for the candidate attribute set of the column data by category, and determines the attribute of the column data by counting the attributes of the content of each unit, so as to reduce the calculation amount in the process of data attribute identification as much as possible, and improve the identification efficiency of the data attribute. Accuracy.
图2是本发明又一实施例的数据属性确定方法的流程图。在上述实施例的基础上,当列数据具有列头内容时,利用列头内容可以简单高效地确定更为准确的列数据的属性,也加快了列数据的属性的识别效率。FIG. 2 is a flowchart of a method for determining a data attribute according to another embodiment of the present invention. On the basis of the above embodiment, when the column data has column header content, more accurate attributes of the column data can be determined simply and efficiently by using the column header content, which also speeds up the identification efficiency of the attributes of the column data.
如图2所示,本实施例的数据属性确定方法,包括:As shown in Figure 2, the data attribute determination method of this embodiment includes:
步骤S201、对格式化的原始数据进行拆分获取多个列数据,执行步骤S202或步骤S205;Step S201, splitting the formatted original data to obtain multiple column data, and performing step S202 or step S205;
步骤S202、若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合,执行步骤S203;Step S202, if the column data does not include column header content, determine a candidate attribute set corresponding to the column data according to the data type of the column data, and perform step S203;
步骤S203、根据所述候选属性集合确定所述列数据的各单元内容的属性,执行步骤S204。Step S203: Determine the attribute of each unit content of the column data according to the candidate attribute set, and execute step S204.
步骤S204、对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。Step S204: Statistically obtain the confidence level of each attribute by performing statistics on the attributes of each unit content of the column data, and determine the attribute of the column data according to the confidence level.
本实施例中的步骤S201、S202、S203、S204的实现方式分别与上述实施例中的S101、S102、S103、S104的实现方式相同,在此不再赘述。The implementation manners of steps S201 , S202 , S203 , and S204 in this embodiment are respectively the same as the implementation manners of S101 , S102 , S103 , and S104 in the above-mentioned embodiment, and are not repeated here.
步骤S205、在确定所述列数据包括列头内容时,根据所述列头内容查询预设属性映射词典获取与所述列头内容匹配的属性,将所述与所述列头内容匹配的属性确定为列数据的属性。Step S205, when it is determined that the column data includes column header content, query a preset attribute mapping dictionary according to the column header content to obtain attributes that match the column header content, and assign the attributes that match the column header content to the column header content. Attributes identified as column data.
举例来说,用户设计报表时,列头内容所表征的即为列数据的属性,诸如表1所示的列数据包括运单号、发件公司、收件公司等列头内容。For example, when a user designs a report, the column header content represents the attributes of the column data. For example, the column data shown in Table 1 includes the column header content such as the waybill number, the sending company, and the receiving company.
具体的,预设属性映射词典事先存储在服务器中,预设属性映射词典由数据挖掘开发公司根据各行各业的特点进行设计,并不断更新。预设属性映射词典中包含的属性是经过专业人员认证的属性,权威性高。本实施例通过将列内容输入到预设属性映射词典中,将在预设属性映射词典查到属性确定为列数据的属性,方法简单高效,所确定的列数据属性更为精准。Specifically, the preset attribute mapping dictionary is stored in the server in advance, and the preset attribute mapping dictionary is designed by a data mining development company according to the characteristics of various industries, and is continuously updated. The attributes contained in the preset attribute mapping dictionary are professionally certified attributes with high authority. In this embodiment, by inputting the column content into the preset attribute mapping dictionary, the attribute found in the preset attribute mapping dictionary is determined as the attribute of the column data, the method is simple and efficient, and the determined attribute of the column data is more accurate.
本实施例提供的数据属性确定方法,在确定所述列数据包括列头内容时,根据所述列头内容查询预设属性映射词典获取与所述列头内容匹配的属性,将所述与所述列头内容匹配的属性确定为列数据的属性,方法简单高效,所确定的列数据属性更为精准。In the data attribute determination method provided in this embodiment, when it is determined that the column data includes column header content, a preset attribute mapping dictionary is queried according to the column header content to obtain attributes matching the column header content, and the The attribute matching the content of the column header is determined as the attribute of the column data, the method is simple and efficient, and the determined attribute of the column data is more accurate.
图3是本发明另一实施例的数据属性确定方法的流程图。在上述实施例的基础上,在所述数据类型为数字字母类型时,通过将单元内容与正则表达式进行逻辑判断,确定单元内容的属性,进而确定列数据的属性。FIG. 3 is a flowchart of a method for determining a data attribute according to another embodiment of the present invention. On the basis of the above-mentioned embodiment, when the data type is a digital letter type, the attribute of the cell content is determined by logically judging the cell content and the regular expression, and then the attribute of the column data is determined.
如图3所示,本实施例的数据属性确定方法,包括:As shown in FIG. 3 , the data attribute determination method of this embodiment includes:
步骤S301、对格式化的原始数据进行拆分获取多个列数据,执行步骤S302;Step S301, splitting the formatted original data to obtain multiple column data, and performing step S302;
步骤S302、若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合,执行步骤S303;Step S302, if the column data does not include the column header content, determine a candidate attribute set corresponding to the column data according to the data type of the column data, and perform step S303;
步骤S303、在所述数据类型为数字字母类型时,获取与所述列数据对应的候选正则表达式集合,将候选正则表达式集合确定为所述列数据对应的候选属性集合,执行步骤S304。Step S303 , when the data type is a alphanumeric type, obtain a candidate regular expression set corresponding to the column data, determine the candidate regular expression set as a candidate attribute set corresponding to the column data, and perform step S304 .
其中,所述候选正则表达式集合包括多个正则表达式,所述正则表达式关联数据属性。Wherein, the candidate regular expression set includes multiple regular expressions, and the regular expressions are associated with data attributes.
具体地,正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。正则表达式灵活性、逻辑性和功能性非常强;正则表达式用于字符串处理、表单验证等场合,实用高效。Specifically, a regular expression is a logical formula for operating on strings, which is to use some pre-defined specific characters and combinations of these specific characters to form a "rule string", which is used to Express a kind of filtering logic on strings. Regular expressions are very flexible, logical and functional; regular expressions are practical and efficient for string processing, form validation and other occasions.
举例来说,服务器预先存储了各种正则表达式,一种正则表达式关联一种属性。比如,预存了运单号正则表达式、邮政编码正则表达式、身份证正则表达式。For example, the server pre-stores various regular expressions, and a regular expression is associated with an attribute. For example, regular expressions for waybill numbers, regular expressions for postal codes, and regular expressions for ID cards are pre-stored.
当服务器采集到表1中的运单号对应的列数据时,首先,服务器会对5个单元内容进行识别、分类、聚类等操作,猜测关联于运单号对应的列数据可能为运单号、邮政编码、身份证等数据字母类型属性。这时服务器调取预先存储的运单号正则表达式、邮政编码正则表达式、身份证正则表达式,即本实施例中的候选正则表达式集合包括运单号正则表达式、邮政编码正则表达式、身份证正则表达式。When the server collects the column data corresponding to the waybill number in Table 1, first, the server will identify, classify and cluster the contents of the five units, guessing that the column data associated with the waybill number may be the waybill Number, postal code, ID card and other data letter type attributes. At this time, the server retrieves the pre-stored regular expression of the waybill number, regular expression of the postal code, and regular expression of the ID card, that is, the set of candidate regular expressions in this embodiment includes the regular expression of the waybill number, the regular expression of the postal code formula, ID regular expression.
步骤S304、将所述单元内容与所述候选正则表达式集合中的各个正则表达式进行逐一匹配,执行步骤S305。Step S304: Match the content of the unit with each regular expression in the candidate regular expression set one by one, and execute step S305.
步骤S305、在所述正则表达式与所述单元内容匹配时,将所述正则表达式关联的数据属性确定为单元内容对应的属性,执行步骤S306。Step S305 , when the regular expression matches the content of the unit, determine the data attribute associated with the regular expression as the attribute corresponding to the content of the unit, and execute step S306 .
步骤S306、对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。Step S306: Statistically obtain the confidence of each attribute by performing statistics on the attributes of each unit content of the column data, and determine the attribute of the column data according to the confidence.
举例来说,当服务器对表1中的运单号对应的5个单元内容中的属性进行识别时,将各单元内容输入到候选正则表达式集合进行逐一匹配。For example, when the server identifies the attributes in the contents of the five units corresponding to the waybill number in Table 1, the contents of each unit are input into the candidate regular expression set for matching one by one.
具体的,经过统计,关联于运单号的列数据的属性存在三种,分别为运单号、邮政编码、身份证;其中,3个单元内容的属性识别为运单号,1个单元内容的属性识别为邮政编码,1个单元内容的属性识别为身份证。Specifically, after statistics, there are three attributes of the column data associated with the waybill number, namely the waybill number, the postal code, and the ID card; among them, the attributes of the three unit contents are identified as the waybill number, and the content of one unit is identified as the waybill number. The attribute of 1 is identified as zip code, and the attribute of 1 unit content is identified as ID card.
经过计算,列数据的属性为运单号的概率(概率可以理解为置信度)为60%,列数据的属性为邮政编码的概率(概率可以理解为置信度)为20%;列数据的属性为身份证的概率(概率可以理解为置信度)为20%。After calculation, the probability that the attribute of the column data is the waybill number (probability can be understood as confidence) is 60%, and the probability that the attribute of the column data is the zip code (probability can be understood as the confidence) is 20%; the attribute of the column data The probability of being an ID card (probability can be understood as confidence) is 20%.
举例来说,对同一列数据对应的各个置信度进行比较,选取置信度最大对应的属性确定为列数据的属性。那么,上述举例中置信度为60%为最大置信度,这时,所确定列数据的属性为运单号。For example, each confidence level corresponding to the same column of data is compared, and the attribute corresponding to the highest confidence level is selected to be determined as the attribute of the column data. Then, in the above example, the confidence level is 60%, which is the maximum confidence level. At this time, the attribute of the determined column data is the waybill number.
本实施例的数据属性确定方法,在确定列数据的数据类型为数字字母类型时,先获取与所述列数据对应的候选正则表达式集合,接着,将所述单元内容与所述候选正则表达式集合中的各个正则表达式进行逐一匹配以确定为单元内容对应的属性,最后,对所述列数据的各单元内容的属性进行统计确定列数据的属性。该方法利用正则表达式来确定数字字母类型的列数据的属性,实用高效。由于正则表达式灵活性、逻辑性和功能性非常强,根据新增的属性编辑不同的正则表达式,具有很好的扩充性。In the data attribute determination method of this embodiment, when it is determined that the data type of the column data is a numeric and letter type, a set of candidate regular expressions corresponding to the column data is obtained first, and then the content of the unit is compared with the candidate regular expressions. Each regular expression in the formula set is matched one by one to determine the attribute corresponding to the content of the unit, and finally, the attribute of the content of each unit of the column data is statistically determined to determine the attribute of the column data. The method utilizes regular expressions to determine the attributes of the column data of the numeric and alphabetic type, which is practical and efficient. Because regular expressions are very flexible, logical and functional, editing different regular expressions according to the newly added properties has good extensibility.
图4是本发明再一实施例的数据属性确定方法的流程图。在上述实施例的基础上,在所述数据类型为非数字字母类型时,通过将单元内容与哈希词典进行逻辑判断,确定单元内容的属性,进而确定列数据的属性。FIG. 4 is a flowchart of a method for determining a data attribute according to still another embodiment of the present invention. On the basis of the above embodiment, when the data type is a non-alphanumeric type, the attribute of the unit content is determined by logically judging the content of the unit and the hash dictionary, and then the attribute of the column data is determined.
如图4所示,本实施例的数据属性确定方法,包括:As shown in FIG. 4 , the data attribute determination method of this embodiment includes:
步骤S401、对格式化的原始数据进行拆分获取多个列数据,执行步骤S402;Step S401, splitting the formatted original data to obtain multiple column data, and performing step S402;
步骤S402、若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合,执行步骤S403;Step S402, if the column data does not include the column header content, determine a candidate attribute set corresponding to the column data according to the data type of the column data, and perform step S403;
步骤S403、在所述数据类型为非数字字母类型时,获取与所述列数据对应的候选哈希词典集合,将所述候选哈希词典集合确定为所述列数据对应的候选属性集合,其中,所述候选哈希词典集合包括多个哈希词典,所述哈希词典关联数据属性,执行步骤S404。Step S403, when the data type is a non-alphanumeric type, obtain a candidate hash dictionary set corresponding to the column data, and determine the candidate hash dictionary set as a candidate attribute set corresponding to the column data, wherein , the candidate hash dictionary set includes a plurality of hash dictionaries, the hash dictionaries are associated with data attributes, and step S404 is executed.
在此简要介绍哈希表:散列表(Hash table,也叫哈希表)是根据关键字(Keyvalue)而直接访问在内存存储位置的数据结构,即哈希表通过计算一个关于键值的函数,将所需查询的数据映射到表中一个位置来访问记录,加快了查找速度。其中,映射函数称做散列函数,存放记录的数组称做散列表,关键字和函数法则理论上可以任意确定。Here is a brief introduction to the hash table: Hash table (also called hash table) is a data structure that directly accesses the memory storage location according to the key (Keyvalue), that is, the hash table calculates a function about the key value. , which maps the data to be queried to a location in the table to access records, speeding up the lookup. Among them, the mapping function is called a hash function, the array storing the records is called a hash table, and the keywords and function rules can theoretically be arbitrarily determined.
为了加快数据属性的查询速度,本实施例中的哈希词典可以建立根据行业的不同建立相应的首字母散列表。以表1为例,需要建立的哈希词典为发件公司哈希词典、收件公司哈希词典;在发件公司哈希词典中,分别建立了对应江西公司的首字母散列表、对应北京公司的首字母散列表、对应海南公司的首字母散列表、对应湖南公司的首字母散列表、对应上海公司的首字母散列表。当需要确定各个单元内容的属性时,只需将首字母在哈希词典中进行快速搜索。比如,确定单元内容为江西公司的属性时,将首字母j输入到发件公司哈希词典中,若在哈希词典中查询到江西公司,则确定单元内容为江西公司的发件公司。In order to speed up the query speed of data attributes, the hash dictionary in this embodiment can establish a corresponding initial hash table according to different industries. Taking Table 1 as an example, the hash dictionary that needs to be established is the hash dictionary of the sending company and the hash dictionary of the receiving company; in the hash dictionary of the sending company, the first letter hash table corresponding to Jiangxi company and the corresponding Beijing company are established respectively. The initial hash table of the company, the initial hash table corresponding to the Hainan company, the initial hash table corresponding to the Hunan company, and the initial hash table corresponding to the Shanghai company. When it is necessary to determine the properties of individual cell contents, simply perform a quick search of the first letter in the hash dictionary. For example, when it is determined that the content of the unit is the attribute of Jiangxi Company, the first letter j is input into the hash dictionary of the sending company. If Jiangxi Company is queried in the hash dictionary, it is determined that the content of the unit is the sending company of Jiangxi Company.
步骤S404、将单元内容输入到所述候选哈希词典集合中的各个哈希词典进行逐一查询,执行步骤S405;Step S404, input the unit content into each hash dictionary in the candidate hash dictionary set to query one by one, and perform step S405;
步骤S405、当在所述哈希词典中查询到所述单元内容时,将所述哈希词典关联的数据属性确定为单元内容对应的属性,执行步骤S406。Step S405 , when the unit content is queried in the hash dictionary, determine the data attribute associated with the hash dictionary as the attribute corresponding to the unit content, and execute step S406 .
步骤S406、对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。Step S406: Statistically obtain the confidence level of each attribute by performing statistics on the attributes of each unit content of the column data, and determine the attribute of the column data according to the confidence level.
举例来说,当服务器对表1中的发件公司对应的5个单元内容中的属性进行识别时,将各单元内容输入到候选哈希词典集合进行逐一查询。For example, when the server identifies the attributes in the five units of contents corresponding to the sending company in Table 1, the server inputs the contents of each unit into the candidate hash dictionary set to query one by one.
具体的,经过统计,关联于发件公司的列数据的属性存在二种,分别为发件公司、收件公司;其中,4个单元内容的属性识别为发件公司,1个单元内容的属性识别为收件公司。Specifically, after statistics, there are two attributes of the column data associated with the sending company, namely the sending company and the receiving company; among them, the attributes of the 4 unit contents are identified as the sending company, and the attributes of 1 unit content are identified as the sending company. Identify as the recipient company.
经过计算,列数据的属性为发件公司的概率(概率可以理解为置信度)为80%,列数据的属性为收件公司的概率(概率可以理解为置信度)为20%。After calculation, the probability that the attribute of the column data is the sending company (probability can be understood as confidence) is 80%, and the probability that the attribute of the column data is the receiving company (probability can be understood as confidence) is 20%.
举例来说,对同一列数据对应的各个置信度进行比较,选取置信度最大对应的属性确定为列数据的属性。那么,上述举例中置信度为80%为最大置信度,这时,所确定列数据的属性为发件公司。For example, each confidence level corresponding to the same column of data is compared, and the attribute corresponding to the highest confidence level is selected to be determined as the attribute of the column data. Then, in the above example, the confidence level is 80%, which is the maximum confidence level. At this time, the attribute of the determined column data is the sending company.
本实施例的数据属性确定方法,在所述数据类型为非数字字母类型时,获取与所述列数据对应的候选哈希词典集合;接着,将单元内容输入到所述候选哈希词典集合中的各个哈希词典进行逐一查询;当在所述哈希词典中查询到所述单元内容时,将所述哈希词典关联的数据属性确定为单元内容对应的属性;最后,对所述列数据的各单元内容的属性进行统计确定列数据的属性。该方法利用哈希词典快速查询非数字字母类型的列数据的属性;建立哈希词典时,其中的哈希表中的关键字和函数法则理论上可以任意确定,根据新增的属性编辑不同的哈希表,具有很好的扩充性。In the data attribute determination method of this embodiment, when the data type is a non-alphanumeric type, a set of candidate hash dictionaries corresponding to the column data is obtained; then, the unit content is input into the set of candidate hash dictionaries Each hash dictionary is queried one by one; when the unit content is queried in the hash dictionary, the data attribute associated with the hash dictionary is determined as the attribute corresponding to the unit content; finally, the column data The attributes of each cell content are statistically determined to determine the attributes of the column data. This method uses the hash dictionary to quickly query the attributes of non-alphabetical column data; when building a hash dictionary, the keywords and function rules in the hash table can theoretically be arbitrarily determined, and different attributes can be edited according to the new attributes. Hash table, with good scalability.
图5是本发明一实施例的数据属性确定方法的流程图。在上述实施例的基础上,对于诸如公司、学校等短文本的属性,由于各公司的名称、各学校的名称不断地更新变化,在哈希词典中可能不包括刚出现的公司名称、学校名称等,这时可能会出现选出置信度不高的列数据属性。针对上述情形,本实施例在利用哈希词典来确定列数据的属性之后,还通过Trie树来进一步确定列数据的属性,选出置信度较高的列数据属性作为列数据的目标属性。FIG. 5 is a flowchart of a method for determining a data attribute according to an embodiment of the present invention. On the basis of the above embodiment, for attributes of short text such as company and school, since the names of companies and schools are constantly updated and changed, the hash dictionary may not include the names of companies and schools that have just appeared. etc. At this time, column data attributes with low confidence may be selected. In view of the above situation, in this embodiment, after using the hash dictionary to determine the attributes of the column data, the Trie tree is used to further determine the attributes of the column data, and the column data attributes with higher confidence are selected as the target attributes of the column data.
如图5所示,本实施例的数据属性确定方法,包括:As shown in Figure 5, the data attribute determination method of this embodiment includes:
步骤S501、对格式化的原始数据进行拆分获取多个列数据,执行步骤S502;Step S501, splitting the formatted original data to obtain multiple column data, and performing step S502;
步骤S502、若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合,执行步骤S503;Step S502, if the column data does not include the column header content, then determine a candidate attribute set corresponding to the column data according to the data type of the column data, and perform step S503;
步骤S503、在所述数据类型为非数字字母类型时,获取与所述列数据对应的候选哈希词典集合,将所述候选哈希词典集合确定为所述列数据对应的候选属性集合,其中,所述候选哈希词典集合包括多个哈希词典,所述哈希词典关联数据属性,执行步骤S504。Step S503, when the data type is a non-alphanumeric type, obtain a candidate hash dictionary set corresponding to the column data, and determine the candidate hash dictionary set as a candidate attribute set corresponding to the column data, wherein , the candidate hash dictionary set includes a plurality of hash dictionaries, the hash dictionaries are associated with data attributes, and step S504 is executed.
步骤S504、将单元内容输入到所述候选哈希词典集合中的各个哈希词典进行逐一查询,执行步骤S505;Step S504, input the unit content into each hash dictionary in the candidate hash dictionary set to query one by one, and perform step S505;
步骤S505、当在所述哈希词典中查询到所述单元内容时,将所述哈希词典关联的数据属性确定为单元内容对应的属性,执行步骤S506。Step S505 , when the unit content is queried in the hash dictionary, determine the data attribute associated with the hash dictionary as the attribute corresponding to the unit content, and execute step S506 .
步骤S506、对所述列数据的各单元内容的关联于哈希词典的属性进行统计获取各个关联于哈希词典的属性的置信度;根据关联于哈希词典的置信度确定关联于哈希词典的列数据的属性,执行步骤S507。Step S506: Statistically obtain the confidence level of each attribute related to the hash dictionary by performing statistics on the attributes related to the hash dictionary of each unit content of the column data; determine the attribute related to the hash dictionary according to the confidence level related to the hash dictionary attribute of the column data, execute step S507.
步骤S507、所述非数字字母类型为短文本且关联于哈希词典的列数据的属性的置信度低于设定阈值时,确定关联于Trie树的列数据的属性,执行步骤S508。Step S507: When the non-alphabet type is short text and the confidence level of the attribute of the column data associated with the hash dictionary is lower than the set threshold, determine the attribute of the column data associated with the Trie tree, and execute step S508.
具体地,本实施例中的非数字字母类型可以是枚举类型,也可以是短文本类型。诸如民族、性别等为枚举类型的属性,列数据的属性为性别为例,列数据的单元内容要么为女,要么对男。枚举类型的属性通过哈希词典就可以明确确定。Specifically, the non-numeric letter type in this embodiment may be an enumeration type or a short text type. Attributes such as ethnicity, gender, etc. are enumerated types, and the attribute of column data is gender, for example, the unit content of column data is either female or male. The properties of an enumeration type can be explicitly determined through a hash dictionary.
而对于诸如公司、学校等短文本的属性,由于各公司的名称、各学校的名称不断地更新变化,在哈希词典中可能不包括刚出现的公司名称、学校名称等,这时可能会出现选出置信度不高的列数据属性。For attributes of short text such as company and school, because the names of companies and schools are constantly updated and changed, the hash dictionary may not include the names of companies and schools that have just appeared. Select column data attributes with low confidence.
针对上述情形,本实施例在利用哈希词典来确定列数据的属性之后,还通过Trie树来进一步确定列数据的属性,选出置信度较高的列数据属性作为列数据的目标属性。In view of the above situation, in this embodiment, after using the hash dictionary to determine the attributes of the column data, the Trie tree is used to further determine the attributes of the column data, and the column data attributes with higher confidence are selected as the target attributes of the column data.
Trie树,又称单词查找树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来减少查询时间,最大限度地减少无谓的字符串比较,查询效率比哈希树高。Trie tree, also known as word search tree, is a tree structure and a variant of hash tree. The typical application is to count, sort and save a large number of strings (but not limited to strings), so it is often used for text word frequency statistics by search engine systems. Its advantages are: use the common prefix of strings to reduce query time, minimize unnecessary string comparisons, and query efficiency is higher than hash trees.
在本实施例中,确定关联于Trie树的列数据的属性的具体实现方式为:In this embodiment, the specific implementation manner of determining the attributes of the column data associated with the Trie tree is:
S1、获取与所述列数据对应的候选Trie树集合,将所述候选Trie树集合确定为所述列数据对应的候选属性集合,其中,所述候选Trie树集合包括多个Trie树,所述Trie树关联数据属性。S1. Obtain a candidate Trie tree set corresponding to the column data, and determine the candidate Trie tree set as a candidate attribute set corresponding to the column data, wherein the candidate Trie tree set includes multiple Trie trees, and the Trie tree associated data attributes.
以表1为例,需要建立的Trie树为发件公司Trie树、收件公司Trie树;在发件公司Trie树中,根据大数据挖掘的诸如江西公司、北京公司、海南公司、湖南公司、上海公司等等众多发件公司建立Trie树。Taking Table 1 as an example, the Trie tree to be established is the sending company Trie tree and the receiving company Trie tree; in the sending company Trie tree, according to big data mining, such as Jiangxi company, Beijing company, Hainan company, Hunan company, Shanghai company and many other sending companies have established Trie trees.
S2、将单元内容输入到所述候选Trie树集合中的各个Trie树进行逐一查询。S2. Input the unit content into each Trie tree in the candidate Trie tree set to query one by one.
S3、当在所述Trie树中查询到所述单元内容时,将所述Trie树关联的数据属性确定为单元内容对应的属性。S3. When the unit content is queried in the Trie tree, determine the data attribute associated with the Trie tree as the attribute corresponding to the unit content.
步骤S508、将关联于哈希词典的列数据的属性与关联于Trie树的列数据的属性进行比较,将置信度大的列数据的属性确定为列数据的目标属性。Step S508: Compare the attribute of the column data associated with the hash dictionary with the attribute of the column data associated with the Trie tree, and determine the attribute of the column data with a high confidence level as the target attribute of the column data.
举例来说,对发件公司所在列的属性确定,若根据哈希词典确定的列数据属性为收件公司,对应的置信度为40%(设定阈值为50%);根据Trie树确定的列数据属性为发件公司,对应的置信度为30%,这时,根据哈希词典确定的列数据属性确定为列数据的目标属性(属性为收件公司)。若根据哈希词典确定的列数据属性为收件公司,对应的置信度为40%(设定阈值为50%);根据Trie树确定的列数据属性为发件公司,对应的置信度为50%,这时,根据Trie树确定的列数据属性确定为列数据的目标属性(属性为发件公司)。For example, to determine the attribute of the column where the sending company is located, if the column data attribute determined according to the hash dictionary is the receiving company, the corresponding confidence level is 40% (the set threshold is 50%); The column data attribute is the sending company, and the corresponding confidence level is 30%. At this time, the column data attribute determined according to the hash dictionary is determined as the target attribute of the column data (the attribute is the receiving company). If the column data attribute determined according to the hash dictionary is the receiving company, the corresponding confidence level is 40% (the set threshold is 50%); the column data attribute determined according to the Trie tree is the sending company, and the corresponding confidence level is 50 %, at this time, the column data attribute determined according to the Trie tree is determined as the target attribute of the column data (the attribute is the sending company).
本实施例的数据属性确定方法,非数字字母类型为短文本且关联于哈希词典的列数据的属性的置信度低于设定阈值时,确定关联于Trie树的列数据的属性,将关联于哈希词典的列数据的属性与关联于Trie树的列数据的属性进行比较,将置信度大的列数据的属性确定为列数据的目标属性。针对利用前期利用哈希词表选出的列数据属性不高的情形,还通过Trie树来进一步确定列数据的属性,选出置信度较高的列数据属性作为列数据的目标属性,提升数据属性的识别准确度。In the data attribute determination method of this embodiment, when the non-numeric letter type is short text and the confidence level of the attribute of the column data associated with the hash dictionary is lower than the set threshold, the attribute of the column data associated with the Trie tree is determined, and the association is The attribute of the column data in the hash dictionary is compared with the attribute of the column data associated with the Trie tree, and the attribute of the column data with a high degree of confidence is determined as the target attribute of the column data. In view of the situation that the attributes of the column data selected by using the hash vocabulary table in the early stage are not high, the attributes of the column data are further determined through the Trie tree, and the column data attributes with higher confidence are selected as the target attributes of the column data to improve the data. The recognition accuracy of the attribute.
图6是本发明一实施例的数据属性确定装置的结构示意图。如图6所示,本实施例提供的数据属性确定装置,包括:FIG. 6 is a schematic structural diagram of an apparatus for determining a data attribute according to an embodiment of the present invention. As shown in FIG. 6 , the data attribute determination device provided in this embodiment includes:
拆分模块01,用于对格式化的原始数据进行拆分获取多个列数据;The splitting module 01 is used to split the formatted original data to obtain multiple column data;
第一确定模块02,用于若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;A first determination module 02, configured to determine a candidate attribute set corresponding to the column data according to the data type of the column data if the column data does not include column header content;
第二确定模块03,用于根据所述候选属性集合确定所述列数据的各单元内容的属性;A second determining module 03, configured to determine the attribute of each unit content of the column data according to the candidate attribute set;
第三确定模块04,用于对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。The third determination module 04 is configured to perform statistics on the attributes of the contents of each unit of the column data to obtain the confidence level of each attribute, and determine the attribute of the column data according to the confidence level.
进一步地,所述第一确定模块包括第一单元;第二确定模块包括第二单元;Further, the first determination module includes a first unit; the second determination module includes a second unit;
所述第一单元,用于在所述数据类型为数字字母类型时,获取与所述列数据对应的候选正则表达式集合,将候选正则表达式集合确定为所述列数据对应的候选属性集合,其中,所述候选正则表达式集合包括多个正则表达式,所述正则表达式关联数据属性;The first unit is configured to obtain a candidate regular expression set corresponding to the column data when the data type is a digital letter type, and determine the candidate regular expression set as a candidate attribute set corresponding to the column data , wherein the set of candidate regular expressions includes multiple regular expressions, and the regular expressions are associated with data attributes;
所述第二单元,用于将所述单元内容与所述候选正则表达式集合中的各个正则表达式进行逐一匹配;在所述正则表达式与所述单元内容匹配时,将所述正则表达式关联的数据属性确定为单元内容对应的属性。The second unit is configured to match the content of the unit with each regular expression in the candidate regular expression set one by one; when the regular expression matches the content of the unit, match the regular expression The data attribute associated with the formula is determined as the attribute corresponding to the content of the unit.
进一步地,所述第一确定模块还包括第三单元;所述第二确定模块还包括第四单元;Further, the first determination module further includes a third unit; the second determination module further includes a fourth unit;
所述第三单元,用于在所述数据类型为非数字字母类型时,获取与所述列数据对应的候选哈希词典集合,将所述候选哈希词典集合确定为所述列数据对应的候选属性集合,其中,所述候选哈希词典集合包括多个哈希词典,所述哈希词典关联数据属性;The third unit is configured to obtain a set of candidate hash dictionaries corresponding to the column data when the data type is a non-alphanumeric type, and determine the set of candidate hash dictionaries as the set of candidate hash dictionaries corresponding to the column data. A set of candidate attributes, wherein the set of candidate hash dictionaries includes a plurality of hash dictionaries, and the hash dictionaries are associated with data attributes;
所述第四单元,用于将单元内容输入到所述候选哈希词典集合中的各个哈希词典进行逐一查询;当在所述哈希词典中查询到所述单元内容时,将所述哈希词典关联的数据属性确定为单元内容对应的属性。The fourth unit is used to input the unit content into each hash dictionary in the candidate hash dictionary set to query one by one; when the unit content is queried in the hash dictionary, the hash dictionary is queried. The data attribute associated with the Greek dictionary is determined as the attribute corresponding to the unit content.
进一步地,所述第三确定模块,还用于对所述列数据的各单元内容的关联于哈希词典的属性进行统计获取各个关联于哈希词典的属性的置信度;Further, the third determination module is further configured to perform statistics on the attributes associated with the hash dictionary of the content of each unit of the column data to obtain the confidence level of each attribute associated with the hash dictionary;
根据关联于哈希词典的置信度确定关联于哈希词典的列数据的属性;determine attributes of column data associated with the hash dictionary according to the confidence associated with the hash dictionary;
在所述根据关联于哈希词典的置信度确定关联于哈希词典的列数据的属性之后,还包括:After the attribute of the column data associated with the hash dictionary is determined according to the confidence level associated with the hash dictionary, the method further includes:
在所述非数字字母类型为短文本且关联于哈希词典的列数据的属性的置信度低于设定阈值时,确定关联于Trie树的列数据的属性;When the non-numeric letter type is short text and the confidence level of the attribute associated with the column data of the hash dictionary is lower than the set threshold, determine the attribute of the column data associated with the Trie tree;
将关联于哈希词典的列数据的属性与关联于Trie树的列数据的属性进行比较,将置信度大的列数据的属性确定为列数据的目标属性。The attribute of the column data associated with the hash dictionary is compared with the attribute of the column data associated with the Trie tree, and the attribute of the column data with high confidence is determined as the target attribute of the column data.
进一步地,第一确定模块,还用于在确定所述列数据包括列头内容时,根据所述列头内容查询预设属性映射词典获取与所述列头内容匹配的属性,将所述与所述列头内容匹配的属性确定为列数据的属性。Further, the first determination module is further configured to, when determining that the column data includes column header content, query a preset attribute mapping dictionary according to the column header content to obtain attributes that match the column header content, and compare the The attribute matched by the content of the column header is determined as the attribute of the column data.
关于本实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本实施例提供的数据属性确定装置,包括:对格式化的原始数据进行拆分获取多个列数据;若所述列数据不包括列头内容,则根据所述列数据的数据类型确定所述列数据对应的候选属性集合;根据所述候选属性集合确定所述列数据的各单元内容的属性;对所述列数据的各单元内容的属性进行统计获取各个属性的置信度,根据所述置信度确定所述列数据的属性。该装置通过分门别类地查找列数据的候选属性集合,以及通过统计各个单元内容的属性确定列数据的属性,实现了尽可能地减少数据属性识别过程中的运算量,提升了数据属性的识别效率和准确率。The apparatus for determining data attributes provided in this embodiment includes: splitting the formatted original data to obtain multiple column data; if the column data does not include column header content, determining the data attribute according to the data type of the column data A set of candidate attributes corresponding to the column data; determine the attributes of the content of each unit of the column data according to the set of candidate attributes; perform statistics on the attributes of the content of each unit of the column data to obtain the confidence level of each attribute, according to the confidence The degree determines the properties of the column data. The device searches for the candidate attribute set of the column data by category, and determines the attribute of the column data by counting the attributes of the contents of each unit, so as to reduce the calculation amount in the process of data attribute identification as much as possible, and improve the identification efficiency of the data attribute. Accuracy.
为达上述目的,本发明实施例还提出了一种计算机设备。To achieve the above objective, the embodiment of the present invention further provides a computer device.
图7是本发明一实施例的计算机设备的结构示意图。FIG. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
如图7所示,该计算机设备包括:存储器11、处理器12及存储在存储器11上并可在处理器12上运行的计算机程序。As shown in FIG. 7 , the computer device includes: a memory 11 , a processor 12 and a computer program stored on the memory 11 and executed on the processor 12 .
处理器12执行所述程序时实现图1至图5任一所示的实施例中提供的数据属性确定方法。When the processor 12 executes the program, the data attribute determination method provided in any of the embodiments shown in FIG. 1 to FIG. 5 is implemented.
进一步地,计算机设备还包括:Further, the computer equipment also includes:
通信接口13,用于存储器11和处理器12之间的通信。The communication interface 13 is used for communication between the memory 11 and the processor 12 .
存储器11,用于存放可在处理器12上运行的计算机程序。The memory 11 is used to store computer programs that can be executed on the processor 12 .
存储器11可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatilememory),例如至少一个磁盘存储器。The memory 11 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
处理器12,用于执行所述程序时实现图1至图5所示的实施例中提供的数据属性确定方法。The processor 12 is configured to implement the data attribute determination method provided in the embodiments shown in FIG. 1 to FIG. 5 when executing the program.
如果存储器11、处理器12和通信接口13独立实现,则通信接口13、存储器11和处理器12可以通过总线相互连接并完成相互间的通信。所述总线可以是工业标准体系结构(Industry Standard Architecture,简称ISA)总线、外部设备互连(PeripheralComponent Interconnect,简称PCI)总线或扩展工业标准体系结构(Extended IndustryStandard Architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅以一条粗线表示,但并不表示仅有一根总线或一种类型的总线。If the memory 11, the processor 12, and the communication interface 13 are independently implemented, the communication interface 13, the memory 11, and the processor 12 can be connected to each other through a bus and complete communication with each other. The bus may be an Industry Standard Architecture (ISA for short) bus, a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For convenience of representation, only one thick line is shown in FIG. 7, but it does not mean that there is only one bus or one type of bus.
可选地,在具体实现时,如果存储器11、处理器12及通信接口13,集成在一块芯片上实现,则存储器11、处理器12及通信接口13可以通过内部接口完成相互间的通信。Optionally, in specific implementation, if the memory 11, the processor 12 and the communication interface 13 are integrated on a chip, the memory 11, the processor 12 and the communication interface 13 can communicate with each other through the internal interface.
处理器12可以是一个中央处理器(Central Processing Unit,简称CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。The processor 12 may be a central processing unit (Central Processing Unit, CPU for short), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), or one or more integrated circuits configured to implement embodiments of the present invention .
为达上述目的,本申请实施例还提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如实现图1至图5任一所示的实施例中提供的数据属性确定方法。In order to achieve the above purpose, the embodiment of the present application also proposes a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it is implemented as in any of the embodiments shown in FIG. 1 to FIG. 5 . Provided data attribute determination method.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise expressly and specifically defined.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of the process , and the scope of the preferred embodiments of the invention includes alternative implementations in which the functions may be performed out of the order shown or discussed, including performing the functions substantially concurrently or in the reverse order depending upon the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present invention belong.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in flowcharts or otherwise described herein, for example, may be considered an ordered listing of executable instructions for implementing the logical functions, may be embodied in any computer-readable medium, For use with, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions from an instruction execution system, apparatus, or apparatus) or equipment. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or apparatus. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections with one or more wiring (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), Read Only Memory (ROM), Erasable Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, followed by editing, interpretation, or other suitable medium as necessary process to obtain the program electronically and then store it in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented by any one of the following techniques known in the art, or a combination thereof: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those skilled in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium. When executed, one or a combination of the steps of the method embodiment is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications, substitutions and variations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710848242.XA CN110019829B (en) | 2017-09-19 | 2017-09-19 | Data attribute determination method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710848242.XA CN110019829B (en) | 2017-09-19 | 2017-09-19 | Data attribute determination method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110019829A true CN110019829A (en) | 2019-07-16 |
| CN110019829B CN110019829B (en) | 2021-05-07 |
Family
ID=67186310
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710848242.XA Expired - Fee Related CN110019829B (en) | 2017-09-19 | 2017-09-19 | Data attribute determination method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110019829B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110503378A (en) * | 2019-08-27 | 2019-11-26 | 云汉芯城(上海)互联网科技股份有限公司 | A BOM standardization method, system, electronic equipment and storage medium |
| CN110609928A (en) * | 2019-08-28 | 2019-12-24 | 宁波市智慧城市规划标准发展研究院 | Name Feature Recognition System Based on Government Affairs Data |
| CN114840714A (en) * | 2021-02-01 | 2022-08-02 | 中国移动通信有限公司研究院 | Data processing method and device and electronic equipment |
Citations (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101464905A (en) * | 2009-01-08 | 2009-06-24 | 中国科学院计算技术研究所 | Web page information extraction system and method |
| CN101702167A (en) * | 2009-11-03 | 2010-05-05 | 上海第二工业大学 | Method for extracting attribution and comment word with template based on internet |
| US20100131540A1 (en) * | 2008-11-25 | 2010-05-27 | Yu Xu | System, method, and computer-readable medium for optimizing processing of distinct and aggregation queries on skewed data in a database system |
| CN102419744A (en) * | 2010-10-20 | 2012-04-18 | 微软公司 | Semantic analysis of information |
| CN102637180A (en) * | 2011-02-14 | 2012-08-15 | 汉王科技股份有限公司 | Character post processing method and device based on regular expression |
| CN103399854A (en) * | 2013-06-28 | 2013-11-20 | 中国中医科学院中医临床基础医学研究所 | Data positioning identifying and storing method and system |
| CN103617290A (en) * | 2013-12-13 | 2014-03-05 | 江苏名通信息科技有限公司 | Chinese machine-reading system |
| CN104636466A (en) * | 2015-02-11 | 2015-05-20 | 中国科学院计算技术研究所 | Entity attribute extraction method and system oriented to open web page |
| CN104794222A (en) * | 2015-04-29 | 2015-07-22 | 北京交通大学 | Network table semantic recovery method |
| CN105138637A (en) * | 2015-08-24 | 2015-12-09 | 浪潮软件股份有限公司 | Data processing method and device |
| KR101582050B1 (en) * | 2014-10-24 | 2015-12-31 | 이화여자대학교 산학협력단 | Apparatus and method for searching name using bloom filter pre-searching |
| CN105573971A (en) * | 2014-10-10 | 2016-05-11 | 富士通株式会社 | Table reconstruction apparatus and method |
| CN106484675A (en) * | 2016-09-29 | 2017-03-08 | 北京理工大学 | Fusion distributed semantic and the character relation abstracting method of sentence justice feature |
| WO2017044409A1 (en) * | 2015-09-07 | 2017-03-16 | Voicebox Technologies Corporation | System and method of annotating utterances based on tags assigned by unmanaged crowds |
| CN106649557A (en) * | 2016-11-09 | 2017-05-10 | 北京大学(天津滨海)新代信息技术研究院 | Semantic association mining method for defect report and mail list |
| CN107092675A (en) * | 2017-04-12 | 2017-08-25 | 新疆大学 | A kind of Uighur semanteme string abstracting method based on statistics and shallow-layer language analysis |
-
2017
- 2017-09-19 CN CN201710848242.XA patent/CN110019829B/en not_active Expired - Fee Related
Patent Citations (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100131540A1 (en) * | 2008-11-25 | 2010-05-27 | Yu Xu | System, method, and computer-readable medium for optimizing processing of distinct and aggregation queries on skewed data in a database system |
| CN101464905A (en) * | 2009-01-08 | 2009-06-24 | 中国科学院计算技术研究所 | Web page information extraction system and method |
| CN101702167A (en) * | 2009-11-03 | 2010-05-05 | 上海第二工业大学 | Method for extracting attribution and comment word with template based on internet |
| CN102419744A (en) * | 2010-10-20 | 2012-04-18 | 微软公司 | Semantic analysis of information |
| CN102637180A (en) * | 2011-02-14 | 2012-08-15 | 汉王科技股份有限公司 | Character post processing method and device based on regular expression |
| CN103399854A (en) * | 2013-06-28 | 2013-11-20 | 中国中医科学院中医临床基础医学研究所 | Data positioning identifying and storing method and system |
| CN103617290A (en) * | 2013-12-13 | 2014-03-05 | 江苏名通信息科技有限公司 | Chinese machine-reading system |
| CN105573971A (en) * | 2014-10-10 | 2016-05-11 | 富士通株式会社 | Table reconstruction apparatus and method |
| KR101582050B1 (en) * | 2014-10-24 | 2015-12-31 | 이화여자대학교 산학협력단 | Apparatus and method for searching name using bloom filter pre-searching |
| CN104636466A (en) * | 2015-02-11 | 2015-05-20 | 中国科学院计算技术研究所 | Entity attribute extraction method and system oriented to open web page |
| CN104794222A (en) * | 2015-04-29 | 2015-07-22 | 北京交通大学 | Network table semantic recovery method |
| CN105138637A (en) * | 2015-08-24 | 2015-12-09 | 浪潮软件股份有限公司 | Data processing method and device |
| WO2017044409A1 (en) * | 2015-09-07 | 2017-03-16 | Voicebox Technologies Corporation | System and method of annotating utterances based on tags assigned by unmanaged crowds |
| CN106484675A (en) * | 2016-09-29 | 2017-03-08 | 北京理工大学 | Fusion distributed semantic and the character relation abstracting method of sentence justice feature |
| CN106649557A (en) * | 2016-11-09 | 2017-05-10 | 北京大学(天津滨海)新代信息技术研究院 | Semantic association mining method for defect report and mail list |
| CN107092675A (en) * | 2017-04-12 | 2017-08-25 | 新疆大学 | A kind of Uighur semanteme string abstracting method based on statistics and shallow-layer language analysis |
Non-Patent Citations (3)
| Title |
|---|
| HONGMEI CHEN等: "Finding associations-between-groups in multimode networks", 《2014 INTERNATIONAL CONFERENCE ON BEHAVIORAL, ECONOMIC, AND SOCIO-CULTURAL COMPUTING (BESC2014)》 * |
| MOHAMMAD SHAFKAT AMIN等: "Ontology guided autonomous label assignment in wrapper induced tables with missing column names", 《2009 IEEE INTERNATIONAL CONFERENCE ON INFORMATION REUSE & INTEGRATION》 * |
| 任向冉: "网络表格的实体列发现与标识", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110503378A (en) * | 2019-08-27 | 2019-11-26 | 云汉芯城(上海)互联网科技股份有限公司 | A BOM standardization method, system, electronic equipment and storage medium |
| CN110609928A (en) * | 2019-08-28 | 2019-12-24 | 宁波市智慧城市规划标准发展研究院 | Name Feature Recognition System Based on Government Affairs Data |
| CN114840714A (en) * | 2021-02-01 | 2022-08-02 | 中国移动通信有限公司研究院 | Data processing method and device and electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110019829B (en) | 2021-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109416705B (en) | Utilizing information available in a corpus for data parsing and prediction | |
| US9626440B2 (en) | Tenantization of search result ranking | |
| US20190362267A1 (en) | Method of and system for generating a prediction model and determining an accuracy of a prediction model | |
| US20180181646A1 (en) | System and method for determining identity relationships among enterprise data entities | |
| US20120259615A1 (en) | Text prediction | |
| CN105589894B (en) | Document index establishing method and device and document retrieval method and device | |
| WO2017091985A1 (en) | Method and device for recognizing stop word | |
| CN110569289B (en) | Column data processing method, equipment and medium based on big data | |
| JP7019137B2 (en) | Similar image search system | |
| CN116738988B (en) | Text detection methods, computer equipment, and storage media | |
| CN112800213A (en) | Medical text information display method and device and electronic equipment | |
| US20190087453A1 (en) | Data search system, data search method, and program product | |
| CN106708834A (en) | Object searching method, device and server | |
| US7756798B2 (en) | Extensible mechanism for detecting duplicate search items | |
| CN110019829B (en) | Data attribute determination method and device | |
| CN100452042C (en) | Method of Fuzzy Matching of Number Strings | |
| CN114781505A (en) | Standard data element matching method and device, storage medium and electronic device | |
| CN118690208A (en) | Method, device, equipment and medium for extracting attribute values across data structures | |
| CN115129871A (en) | Text category determination method and device, computer equipment and storage medium | |
| CN114153944A (en) | Method, device, equipment and medium for identifying expression | |
| CN113051919B (en) | Method and device for identifying named entity | |
| JP2009098952A (en) | Information retrieval system | |
| CN114579580B (en) | Methods for storing data, methods and apparatus for retrieving data | |
| CN113779212B (en) | Intelligent response system, starting method, device and storage medium | |
| CN118467669B (en) | Index construction method, field search method, device, equipment and medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20190903 Address after: 100192 Dongsheng Science Park, Zhongguancun, 66 Xixiaokou Road, Haidian District, Beijing Applicant after: Green Bay Network Technology Co.,Ltd. Address before: 100089 Beijing Haidian District Xixiaokou Road 66 Zhongguancun Dongsheng Science Park B-6 Building B 5 floors Applicant before: XIAOCAO SHUYU (BEIJING) TECHNOLOGY CO.,LTD. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210507 |