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

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

Info

Publication number
CN107451243A
CN107451243A CN201710624034.1A CN201710624034A CN107451243A CN 107451243 A CN107451243 A CN 107451243A CN 201710624034 A CN201710624034 A CN 201710624034A CN 107451243 A CN107451243 A CN 107451243A
Authority
CN
China
Prior art keywords
attribute
fabric
property value
method based
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.)
Granted
Application number
CN201710624034.1A
Other languages
English (en)
Other versions
CN107451243B (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
Duchamp 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 Duchamp Group Co Ltd filed Critical Duchamp 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 (2)

1.一种基于属性的复杂查询方法,其特征在于包括以下步骤:
步骤1:建立数据存储数据库,其中每个属性对应一个整数类型的字段;
步骤2:将属性值保存为2的n次幂,查询时利用按位与操作,具体内容为:查询时,将要查找的属性的属性值求和,利用SQL的&运算,获得检索值,通过检索值在存储数据库中进行查询,获得具有待查找属性的面料。
2.根据权利要求1所述的一种基于属性的复杂查询方法,其特征在于所述属性包括季节:春夏秋冬,性别:男女;颜色:红黄蓝绿紫黑,场景:正装、运动、休闲、礼服;每个属性分别赋以二进制属性值,属性值可以采用8位整数或32位整数或64位整数来表示。
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 true CN107451243A (zh) 2017-12-08
CN107451243B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697234A (zh) * 2018-12-04 2019-04-30 百度在线网络技术(北京)有限公司 实体的多属性信息存储、查询方法、装置、服务器和介质
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 中国科学院软件研究所 一种面向云存储的分层索引方法与检索方法

Cited By (3)

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

Also Published As

Publication number Publication date
CN107451243B (zh) 2024-04-12

Similar Documents

Publication Publication Date Title
US10049466B2 (en) Color name generation from images and color palettes
CN101216830B (zh) 根据颜色搜索商品的方法和***
US8577134B2 (en) Method and system of facilitating search by color
US10120880B2 (en) Automatic image-based recommendations using a color palette
US10255295B2 (en) Automatic color validation of image metadata
US9348844B2 (en) System and method for normalization and codification of colors for dynamic analysis
CN104424230B (zh) 一种网络商品推荐方法及装置
CN102662974B (zh) 一种基于邻接节点树的网络图索引方法
US20160005188A1 (en) Color name generation from images and color palettes
CN105404627B (zh) 一种用于确定搜索结果的方法与设备
CN106250431B (zh) 一种基于分类服装的颜色特征提取方法及服装检索***
CN105718555A (zh) 一种基于层次化语义描述的图像检索方法
CN103412937A (zh) 一种基于手持终端的搜索购物方法
CN102819582A (zh) 一种海量图片快速检索方法
TW201405465A (zh) 推薦服裝產品的方法以及裝置
CN105022752A (zh) 图像检索方法与装置
CN103413278B (zh) 一种商品图片背景噪声的过滤方法
CN106250523A (zh) 一种分布式列存储***索引的方法
CN107451243A (zh) 基于属性的复杂查询方法
Yelizaveta et al. Analysis and retrieval of paintings using artistic color concepts
CN106557489B (zh) 一种基于移动终端的服饰搜索方法
Salmi et al. Content based image retrieval based on cell color coherence vector (Cell-CCV)
Kekre et al. Image classification using block truncation coding with assorted color spaces
CN103942698A (zh) 一种产品信息对比方法及装置
CN104391952A (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
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

GR01 Patent grant
GR01 Patent grant