[go: up one dir, main page]

CN107451243B - 基于属性的复杂查询方法 - Google Patents

基于属性的复杂查询方法 Download PDF

Info

Publication number
CN107451243B
CN107451243B CN201710624034.1A CN201710624034A CN107451243B CN 107451243 B CN107451243 B CN 107451243B CN 201710624034 A CN201710624034 A CN 201710624034A CN 107451243 B CN107451243 B CN 107451243B
Authority
CN
China
Prior art keywords
attribute
fabric
searched
color
value
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.)
Active
Application number
CN201710624034.1A
Other languages
English (en)
Other versions
CN107451243A (zh
Inventor
朱新滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dishang Group Co ltd
Shandong Dishang Professional Tooling Group Co ltd
Weihai Textile Group Import And Export Co ltd
Original Assignee
Shandong Dishang Professional Tooling Group Co ltd
Weihai Textile Group Import And Export Co ltd
Dishang Group Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Dishang Professional Tooling Group Co ltd, Weihai Textile Group Import And Export Co ltd, Dishang Group Co ltd filed Critical Shandong Dishang Professional Tooling Group Co ltd
Priority to CN201710624034.1A priority Critical patent/CN107451243B/zh
Publication of CN107451243A publication Critical patent/CN107451243A/zh
Application granted granted Critical
Publication of CN107451243B publication Critical patent/CN107451243B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/244Grouping and aggregation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及海量数据查询管理技术领域,具体的说是一种特别适用于面料数据管理,能够有效提高面料管理效率的基于属性的复杂查询方法,其特征在首先建立数据存储数据库,其中每个属性对应一个整数类型的字段;将属性值保存为2的n次幂,查询时利用按位与操作,具体内容为:查询时,将要查找的属性值求和,利用SQL的&运算,获得检索值,通过检索值在存储数据库中进行查询,获得具有待查找属性的面料,本发明可以大幅度提高查询效率并降低脚本复杂度,提高面料数据管理效率,进而提高设计生产效率。

Description

基于属性的复杂查询方法
技术领域:
本发明涉及海量数据查询管理技术领域,具体的说是一种特别适用于面料数据管理,能够有效提高面料管理效率的基于属性的复杂查询方法。
背景技术:
我们经常需要把某些实体信息保存到计算机系统中,一个实体可能有多重类别的属性,比如对于一种服装面料来讲,除了单一值的属性,比如名称,价格等,它还可能包含多值属性,比如季节属性,面料花型属性,手感属性等。每种属性对应多个选项,比如一种面料同时可以应用于春季和夏季,那么它的季节属性就是两个值:春季和夏季。当我们有非常多的面料数据的时候,比如上百万种面料,这些属性如何保存并能够快速查找到符合特定属性的面料就成为一个复杂的问题。
目前常用的有两种存储方式,一种是把属性以文本的形式保存到数据库中,另外一种是针对每种属性建立一个数据表,然后建立一个对应关系表,以保存实体和属性值之间的对应关系。第一种方式保存方便,但是没法精确查询,也难以进行数据汇总分析。第二种方式保存略微复杂,可以精确查询和分析,但是所需存储空间大,同时由于查询的时候需要对多个表进行链接,性能非常差,查询分析速度极慢,不适用于大数据量的保存和分析。
发明内容:
本发明针对现有技术中存在的缺点和不足,提出了一种特别适用于面料数据管理,能够有效提高面料管理效率的基于属性的复杂查询方法。
本发明可以通过以下措施达到:
一种基于属性的复杂查询方法,其特征在于包括以下步骤:
步骤1:建立数据存储数据库,其中每个属性对应一个整数类型的字段;
步骤2:将属性值保存为2的n次幂,查询时利用按位与操作,具体内容为:查询时,将要查找的属性的属性值求和,利用SQL的&运算,获得检索值,通过检索值在存储数据库中进行查询,获得具有待查找属性的面料。
本发明所述属性包括季节:春夏秋冬,性别:男女;颜色:红黄蓝绿紫黑,场景:正装、运动、休闲、礼服;每个属性分别赋以二进制属性值,属性值可以采用8位整数或32位整数或64位整数来表示。
本发明可以大幅度提高查询效率并降低脚本复杂度,提高面料数据管理效率,进而提高设计生产效率。
具体实施方式:
下面结合实施例对本发明作进一步的说明。
本发明提出了一种基于属性的复杂查询方法,其特征在于包括以下步骤:
步骤1:建立数据存储数据库,其中每个属性对应一个整数类型的字段;
步骤2:将属性值保存为2的n次幂,查询时利用按位与操作,具体内容为:查询时,将要查找的属性的属性值求和,利用SQL的&运算,获得检索值,通过检索值在存储数据库中进行查询,获得具有待查找属性的面料。
本发明所述属性包括季节:春夏秋冬,性别:男女;颜色:红黄蓝绿紫黑,场景:正装、运动、休闲、礼服;每个属性分别赋以二进制属性值,属性值可以采用8位整数或32位整数或64位整数来表示。
实施例:
某面料有红(1),黄(2),绿(4)三种颜色,那么Color=1+2+4=7如果要查找颜色包含红(1)和绿(4)的,先将二者求和得5,然后利用SQL的&运算,5&7=5表示要查找的颜色都包含于此种面料的颜色属性值中,用这种方式可以大幅度提高查询效率并降低脚本复杂度。经粗略测试,在当前数据环境下(800万条数据),执行下列查询,耗时1秒以内。
本发明与现有技术相比,可以大幅度提高查询效率并降低脚本复杂度,提高面料数据管理效率,进而提高设计生产效率。

Claims (1)

1.一种面料管理用基于属性的复杂查询方法,其特征在于,由以下步骤组成:
步骤1:建立数据存储数据库,其中每个属性对应一个整数类型的字段;所述属性包括季节:春夏秋冬,性别:男女;颜色:红黄蓝绿紫黑,场景:正装、运动、休闲、礼服;每个属性分别赋以二进制属性值,属性值采用8位整数或32位整数或64位整数来表示;
步骤2:将属性值保存为2的n次幂,查询时利用按位与操作,具体内容为:查询时,将要查找的属性值求和,获得检索值,利用SQL的&运算,通过检索值在存储数据库中进行查询,获得具有待查找属性的面料;其中,若某面料有红“1”,黄“2”,绿“4”三种颜色,那么Color=1+2+4=7,如果要查找颜色包含红“1”和绿“4”的,先将二者求和得5,然后利用SQL的&运算,5&7=5表示要查找的颜色都包含于此种面料的颜色属性值中。
CN201710624034.1A 2017-07-27 2017-07-27 基于属性的复杂查询方法 Active CN107451243B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710624034.1A CN107451243B (zh) 2017-07-27 2017-07-27 基于属性的复杂查询方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710624034.1A CN107451243B (zh) 2017-07-27 2017-07-27 基于属性的复杂查询方法

Publications (2)

Publication Number Publication Date
CN107451243A CN107451243A (zh) 2017-12-08
CN107451243B true CN107451243B (zh) 2024-04-12

Family

ID=60489614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710624034.1A Active CN107451243B (zh) 2017-07-27 2017-07-27 基于属性的复杂查询方法

Country Status (1)

Country Link
CN (1) CN107451243B (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697234B (zh) * 2018-12-04 2021-08-06 百度在线网络技术(北京)有限公司 实体的多属性信息查询方法、装置、服务器和介质
CN110955711A (zh) * 2019-11-26 2020-04-03 南京甄视智能科技有限公司 可动态扩展的检索方法与装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402853A (zh) * 1999-12-02 2003-03-12 三菱电机株式会社 图像检索系统及图像检索方法
CN1595399A (zh) * 2003-09-08 2005-03-16 北京语言大学语言信息处理研究所 汉语文本中词及词属性自动索引和检索的方法
CN103049473A (zh) * 2012-10-15 2013-04-17 新浪技术(中国)有限公司 一种数据查询方法及装置
CN106599040A (zh) * 2016-11-07 2017-04-26 中国科学院软件研究所 一种面向云存储的分层索引方法与检索方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402853A (zh) * 1999-12-02 2003-03-12 三菱电机株式会社 图像检索系统及图像检索方法
CN1595399A (zh) * 2003-09-08 2005-03-16 北京语言大学语言信息处理研究所 汉语文本中词及词属性自动索引和检索的方法
CN103049473A (zh) * 2012-10-15 2013-04-17 新浪技术(中国)有限公司 一种数据查询方法及装置
CN106599040A (zh) * 2016-11-07 2017-04-26 中国科学院软件研究所 一种面向云存储的分层索引方法与检索方法

Also Published As

Publication number Publication date
CN107451243A (zh) 2017-12-08

Similar Documents

Publication Publication Date Title
US11693833B2 (en) Computer-implemented method for storing unlimited amount of data as a mind map in relational database systems
US10049466B2 (en) Color name generation from images and color palettes
US8577134B2 (en) Method and system of facilitating search by color
US11361475B2 (en) Method and apparatus for generating file color scheme
US10120880B2 (en) Automatic image-based recommendations using a color palette
CN103593343B (zh) 一种电子商务平台中的信息检索方法和装置
CN102663092B (zh) 一种基于服装组图的风格元素挖掘和推荐方法
CN105426499A (zh) 一种数据可视化实现方法
CN107451243B (zh) 基于属性的复杂查询方法
CA2484009A1 (en) Managing expressions in a database system
CA2369912A1 (en) Computerized information search and indexing method, software and device
CN106156284A (zh) 基于随机多视角哈希的大规模近重复视频检索方法
CN104731789A (zh) 一种聚类簇获取方法及装置
CN106250431A (zh) 一种基于分类服装的颜色特征提取方法及服装检索系统
CN103839270A (zh) 一种图像匹配方法及装置
CN104794130B (zh) 一种表间关联查询方法和装置
CN102929999A (zh) 对比数据异同的方法及装置
Yelizaveta et al. Analysis and retrieval of paintings using artistic color concepts
US10430857B1 (en) Color name based search
CN106933919A (zh) 数据表的连接方法及装置
CN106933907A (zh) 数据表扩展指标的处理方法及装置
CN111143638B (zh) 应用于群体间数据关系分析的可视化布局方法、系统、存储介质及计算机设备
CN105740365A (zh) 一种数据仓库快速查询方法和装置
CN106127674A (zh) 基于lbp的图像白平衡方法
CN102831216B (zh) 一种保持物体几何形状信息的图像检索系统及方法

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

Effective date of registration: 20240219

Address after: 264200 no.186a-1, Wenhua West Road, Weihai City, Shandong Province

Applicant after: DISHANG GROUP CO.,LTD.

Country or region after: China

Applicant after: WEIHAI TEXTILE GROUP IMPORT AND EXPORT Co.,Ltd.

Applicant after: Shandong Dishang professional tooling Group Co.,Ltd.

Address before: 264200 Wenhua West Road North, Shanda Road West, Weihai City, Shandong Province

Applicant before: DISHANG GROUP CO.,LTD.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant