CN105279281A - Internet-of-things data access method - Google Patents

Internet-of-things data access method Download PDF

Info

Publication number
CN105279281A
CN105279281A CN201510787124.3A CN201510787124A CN105279281A CN 105279281 A CN105279281 A CN 105279281A CN 201510787124 A CN201510787124 A CN 201510787124A CN 105279281 A CN105279281 A CN 105279281A
Authority
CN
China
Prior art keywords
internet
module
access method
data access
query
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.)
Withdrawn
Application number
CN201510787124.3A
Other languages
Chinese (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.)
Tianze Information Industry Corp
Original Assignee
Tianze Information Industry Corp
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 Tianze Information Industry Corp filed Critical Tianze Information Industry Corp
Priority to CN201510787124.3A priority Critical patent/CN105279281A/en
Publication of CN105279281A publication Critical patent/CN105279281A/en
Withdrawn legal-status Critical Current

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/23Updating
    • G06F16/235Update request formulation
    • 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/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations

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)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An Internet-of-things data access method relates to a data access method, and particularly to an Internet-of-things data access method which supports high-frequency updating and complicated retrieval. A device according to the Internet-of-things data access method comprises the components of a data storing and importing module, namely an Importer module, a Mysql database, a Hbase database and a Query module; wherein the Importer module performs functions of analyzing all fields in data storage, extracting retrieved fields and presented fields, storing the retrieved fields in the Mysql database, and storing the presented fields into the Hbase database. The Query module performs morphology analysis and grammar analysis on a retrieved sentence, and furthermore reads related information from the Mysqul database and the Hbase database according to an analysis result. The Internet-of-things data access method comprises a storage operation, an updating operation and a querying operation. The Internet-of-things data access method can well settle problems in storage, retrieval and updating of current state information of an Internet-of-things terminal.

Description

A kind of Internet of Things data access method
Technical field
What a kind of Internet of Things of the present invention data access method related to is especially a kind of Internet of Things data access method supporting that high frequency upgrades and complexity is retrieved of a kind of data access method.
Background technology
Along with the flourish of technology of Internet of things and widespread use, the current state information of internet-of-things terminal has that field is many, individual fields upgrades frequent, the characteristic of querying condition complexity, and this is a very large challenge to the storage of internet-of-things terminal current state information.
Traditional method will support that complex query can adopt relevant database, that conventional is exactly the Relational DBMS Mysql increased income, it can support complicated inquiry, also the search efficiency of data can be improved by setting up index, but under Data Update ratio more frequently situation, the poor performance of Mysql, even if adopt memory table, because memory table is table lock, its performance still cannot improve.
Support that the renewal of high frequency can select the database Hbase of high-performance, high reliability, because Hbase is distributed database, read-write pressure can be distributed to each back end, so under read-write operation frequently situation, higher efficiency can be ensured, but owing to being Nosql database, so complicated inquiry cannot be supported.
Summary of the invention
The object of the invention is to provide a kind of Internet of Things data access method for above-mentioned weak point, high frequency can be supported to upgrade and the complicated Internet of Things data access retrieved.Based on the Internet of Things data access method with high frequency renewal and complicated retrieval characteristic of Mysql, Hbase, the method utilizes Mysql support complex query and Hbase to support that the characteristic of high-speed read-write can well solve the storage of the current state information of internet-of-things terminal, retrieval and a renewal difficult problem.
A kind of Internet of Things data access method takes following technical scheme to realize:
Two class fields are had in the current state information of internet-of-things terminal, one class is search field, these fields are often used for retrieving information as search condition, wherein Termination ID is fixed as search field, one class represents field, these fields are used for showing on interface substantially, also can be used for once in a while retrieving.
A kind of Internet of Things data access method comprises data and stores importing module and Importer module, Mysql database, Hbase database and inquiry Query module; Wherein Importer module is analyzed all fields when data store and is extracted search field and represent field, by search field stored in Mysql database, will represent field stored in Hbase; Inquiry Query module in charge carries out lexical analysis and grammatical analysis to query statement, and reads relevant information according in analysis result to Mysql and Hbase.
A kind of Internet of Things data access method comprises storage operation, renewal rewards theory and query manipulation;
Described storage operation comprises the steps:
1) Importer module reads data to be stored;
2) Importer module carries out field analysis to the data to be stored described in step 1), obtains search field and represents field;
3) Importer module is by step 2) described in search field be stored in Mysql database;
4) Importer module is by step 2) described in the field that represents be that line unit rowkey is stored into Hbase database with Termination ID, described Hbase database and non-relational distributed data base.
Described renewal rewards theory comprises the steps:
1) Importer module reads data to be updated;
2) Importer module analyzes search field and represents field from the data to be updated described in step 1);
3) search field is updated in Mysql database by Importer module;
4) Importer module will represent field and will be updated in Hbase database.
Described query manipulation, comprises the steps:
1), after Query module receives the inquiry request of user, lexical analysis is carried out to described inquiry request, and grammatical analysis;
2) Query module is inquired about in Mysql database according to the search condition analyzed in step 1); If Query Result is sky, terminate inquiry, and Query Result is set for empty.
3) Query module is with step 2) in the Termination ID that inquires be good in Hbase database for row and read data; If Query Result is sky, terminate inquiry, and Query Result is set for empty.
4) Query module carries out secondary filtration according to the search condition analyzed in step 1) to the data in Hbase database, and returns the data after filtration.
Inquiry request is particularly resolved into a series of word symbol according to word-building rule by lexical analysis by the lexical analysis described in step 1) and grammatical analysis, then, by syntax analyzer, described word symbol is built into parse tree, and do syntax check and grammatical analysis, finally obtain search condition and search field;
Described word symbol comprises key word, indications and operational symbol.
The invention has the beneficial effects as follows: the Internet of Things data access method of a kind of efficient retrieval based on Mysql, Hbase system of the present invention, can support that read-write upgrades database manipulation scene frequently efficiently on the one hand, the scene of complicated query manipulation can be supported on the one hand.
Accompanying drawing explanation
Below with reference to accompanying drawing, the invention will be further described:
Fig. 1 is the allomeric function schematic diagram of Internet of Things data access method of the present invention;
Fig. 2 is the storage operational flowchart of Internet of Things data access method of the present invention;
Fig. 3 is the accessing operation process flow diagram of Internet of Things data access method of the present invention;
Fig. 4 is the storage schematic diagram of Internet of Things data access method of the present invention.
Embodiment
With reference to accompanying drawing 1 ~ 3, a kind of Internet of Things data access method comprises data and stores importing module and Importer module, Mysql database, Hbase database and inquiry Query module; Wherein Importer module is analyzed all fields when data store and is extracted search field and represent field, by search field stored in Mysql database, will represent field stored in Hbase; Inquiry Query module in charge carries out lexical analysis and grammatical analysis to query statement, and reads relevant information according in analysis result to Mysql and Hbase.
A kind of Internet of Things data access method comprises storage operation, renewal rewards theory and query manipulation;
Described storage operation comprises the steps:
1) Importer module reads data to be stored;
2) Importer module carries out field analysis to the data to be stored described in step 1), obtains search field and represents field;
3) Importer module is by step 2) described in search field be stored in Mysql database;
4) Importer module is by step 2) described in the field that represents be that line unit rowkey is stored into Hbase database with Termination ID, described Hbase database and non-relational distributed data base.
Described renewal rewards theory comprises the steps:
1) Importer module reads data to be updated;
2) Importer module analyzes search field and represents field from the data to be updated described in step 1);
3) search field is updated in Mysql database by Importer module;
4) Importer module will represent field and will be updated in Hbase database.
1), after Query module receives the inquiry request of user, lexical analysis is carried out to described inquiry request, and grammatical analysis;
2) Query module is inquired about in Mysql database according to the search condition analyzed in step 1); If Query Result is sky, terminate inquiry, and Query Result is set for empty.
3) Query module is with step 2) in the Termination ID that inquires be good in Hbase database for row and read data; If Query Result is sky, terminate inquiry, and Query Result is set for empty.
4) Query module carries out secondary filtration according to the search condition analyzed in step 1) to the data in Hbase database, and returns the data after filtration.
Inquiry request is particularly resolved into a series of word symbol according to word-building rule by lexical analysis by the lexical analysis described in step 1) and grammatical analysis, then, by syntax analyzer, described word symbol is built into parse tree, and do syntax check and grammatical analysis, finally obtain search condition and search field;
Described word symbol comprises key word, indications and operational symbol.
For the storage schematic diagram of the Internet of Things data access method of Fig. 4, terminal current state information has 200 fields, and wherein TerminalID, f5, f193, f195, f197 are search field, and all the other are for representing field.Sql statement is select*fromcurrentInfowheref5=" adb " andf193=1andf2> ' dd '; Then query manipulation comprises the steps:
1) after Query module receives the inquiry request of user, after lexical analysis and grammatical analysis, obtain search field is f5 and f193, and needs to filter representing field f2;
2) in Query module to Mysql database, inquiry meets f5=" adb " terminal of andf193=1;
3) Query module is according to reading terminals information in the Termination ID set inquired in Mysql database to Hbase database.
Storage operation as shown in Figure 2, comprises the steps:
1) Importer module carries out field analysis to data record, obtains search field and represents field;
2) by search field stored in Mysql database;
3) take Termination ID as line unit, using representing field as Value stored in Hbase database;
3) if Mysql database and Hbase database all do not store successfully, then perform rolling back action, the data stored are deleted from above-mentioned database.
Query manipulation as shown in Figure 3, comprises the steps:
1) the Sql statement of user's input for retrieving;
2) lexical analyzer of Query module carries out lexical analysis to Sql statement;
The syntax analyzer of Query module carries out grammatical analysis and syntax check to the word of lexical analyzer analysis and symbol;
3) according to the result of grammatical analysis, the record reading coupling in search field to Mysql database is used;
Hbase reading demonstrating data is gathered according to the TerminalID that Mysql returns;
4) according to filtercondition, data are filtered, and return the data after filtration.

Claims (6)

1. an Internet of Things data access method, is characterized in that: comprise data and store importing module and Importer module, Mysql database, Hbase database and inquiry Query module; Wherein Importer module is analyzed all fields when data store and is extracted search field and represent field, by search field stored in Mysql database, will represent field stored in Hbase; Inquiry Query module in charge carries out lexical analysis and grammatical analysis to query statement, and reads relevant information according in analysis result to Mysql and Hbase.
2. Internet of Things data access method according to claim 1, is characterized in that: Internet of Things data access method comprises storage operation, renewal rewards theory and query manipulation.
3. Internet of Things data access method according to claim 2, is characterized in that, described storage operation comprises the steps:
1) Importer module reads data to be stored;
2) Importer module carries out field analysis to the data to be stored described in step 1), obtains search field and represents field;
3) Importer module is by step 2) described in search field be stored in Mysql database;
4) Importer module is by step 2) described in the field that represents be that line unit rowkey is stored into Hbase database with Termination ID, described Hbase database and non-relational distributed data base.
4. Internet of Things data access method according to claim 2, is characterized in that, described renewal rewards theory comprises the steps:
1) Importer module reads data to be updated;
2) Importer module analyzes search field and represents field from the data to be updated described in step 1);
3) search field is updated in Mysql database by Importer module;
4) Importer module will represent field and will be updated in Hbase database.
5. Internet of Things data access method according to claim 2, is characterized in that, described query manipulation, comprises the steps:
1), after Query module receives the inquiry request of user, lexical analysis is carried out to described inquiry request, and grammatical analysis;
2) Query module is inquired about in Mysql database according to the search condition analyzed in step 1); If Query Result is sky, terminate inquiry, and Query Result is set for empty;
3) Query module is with step 2) in the Termination ID that inquires be good in Hbase database for row and read data; If Query Result is sky, terminate inquiry, and Query Result is set for empty;
4) Query module carries out secondary filtration according to the search condition analyzed in step 1) to the data in Hbase database, and returns the data after filtration.
6. Internet of Things data access method according to claim 5, it is characterized in that, inquiry request is particularly resolved into a series of word symbol according to word-building rule by lexical analysis by the lexical analysis described in step 1) and grammatical analysis, then, by syntax analyzer, described word symbol is built into parse tree, and do syntax check and grammatical analysis, finally obtain search condition and search field;
Described word symbol comprises key word, indications and operational symbol.
CN201510787124.3A 2015-11-17 2015-11-17 Internet-of-things data access method Withdrawn CN105279281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510787124.3A CN105279281A (en) 2015-11-17 2015-11-17 Internet-of-things data access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510787124.3A CN105279281A (en) 2015-11-17 2015-11-17 Internet-of-things data access method

Publications (1)

Publication Number Publication Date
CN105279281A true CN105279281A (en) 2016-01-27

Family

ID=55148295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510787124.3A Withdrawn CN105279281A (en) 2015-11-17 2015-11-17 Internet-of-things data access method

Country Status (1)

Country Link
CN (1) CN105279281A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126553A (en) * 2016-06-16 2016-11-16 西安科技大市场有限公司 A kind of storage method based on the big data of scientific and technological resources
CN108241627A (en) * 2016-12-23 2018-07-03 北京神州泰岳软件股份有限公司 A kind of isomeric data storage querying method and system
CN109299114A (en) * 2018-11-21 2019-02-01 安徽云融信息技术有限公司 A kind of complex database and its efficient querying method
CN109408513A (en) * 2018-10-23 2019-03-01 杭州能链科技有限公司 Data processing method, system and storage medium
CN109739883A (en) * 2019-01-03 2019-05-10 广东南方数码科技股份有限公司 Promote the method, apparatus and electronic equipment of data query performance
CN113407609A (en) * 2021-06-29 2021-09-17 中国民生银行股份有限公司 External data using method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074375A1 (en) * 1999-08-12 2003-04-17 Nakamura Lee Evan Data acess system
CN102521416A (en) * 2011-12-28 2012-06-27 用友软件股份有限公司 Data correlation query method and data correlation query device
CN102799622A (en) * 2012-06-19 2012-11-28 北京大学 Distributed structured query language (SQL) query method based on MapReduce expansion framework
CN102982075A (en) * 2012-10-30 2013-03-20 北京京东世纪贸易有限公司 Heterogeneous data source access supporting system and method thereof
CN103761080A (en) * 2013-12-25 2014-04-30 中国农业大学 Structured query language (SQL) based MapReduce operation generating method and system
CN104142957A (en) * 2013-05-10 2014-11-12 上海联影医疗科技有限公司 Method and system for regional medical treatment-orientated data sharing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074375A1 (en) * 1999-08-12 2003-04-17 Nakamura Lee Evan Data acess system
CN102521416A (en) * 2011-12-28 2012-06-27 用友软件股份有限公司 Data correlation query method and data correlation query device
CN102799622A (en) * 2012-06-19 2012-11-28 北京大学 Distributed structured query language (SQL) query method based on MapReduce expansion framework
CN102982075A (en) * 2012-10-30 2013-03-20 北京京东世纪贸易有限公司 Heterogeneous data source access supporting system and method thereof
CN104142957A (en) * 2013-05-10 2014-11-12 上海联影医疗科技有限公司 Method and system for regional medical treatment-orientated data sharing
CN103761080A (en) * 2013-12-25 2014-04-30 中国农业大学 Structured query language (SQL) based MapReduce operation generating method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙志佳: ""基于Hadoop的在线购物原型系统的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126553A (en) * 2016-06-16 2016-11-16 西安科技大市场有限公司 A kind of storage method based on the big data of scientific and technological resources
CN106126553B (en) * 2016-06-16 2020-02-14 西安科技大市场有限公司 Storage method based on scientific and technological resource big data
CN108241627A (en) * 2016-12-23 2018-07-03 北京神州泰岳软件股份有限公司 A kind of isomeric data storage querying method and system
CN109408513A (en) * 2018-10-23 2019-03-01 杭州能链科技有限公司 Data processing method, system and storage medium
CN109299114A (en) * 2018-11-21 2019-02-01 安徽云融信息技术有限公司 A kind of complex database and its efficient querying method
CN109739883A (en) * 2019-01-03 2019-05-10 广东南方数码科技股份有限公司 Promote the method, apparatus and electronic equipment of data query performance
CN113407609A (en) * 2021-06-29 2021-09-17 中国民生银行股份有限公司 External data using method, device and equipment

Similar Documents

Publication Publication Date Title
CN105279281A (en) Internet-of-things data access method
CN109299102B (en) HBase secondary index system and method based on Elastcissearch
KR101083563B1 (en) Method and System for Managing Database
CN101727502A (en) Data query method, data query device and data query system
US20140046928A1 (en) Query plans with parameter markers in place of object identifiers
CN111930615B (en) Code quality evaluation method and device
CN110275920A (en) Data query method, apparatus, electronic equipment and computer readable storage medium
CN104765731A (en) Database query optimization method and equipment
CN104090922B (en) A kind of method and apparatus for clearing up private data
CN113626464B (en) Query supporting method and system based on ClickHouse database memory data
CN104346331A (en) Retrieval method and system for XML database
CN103744913A (en) Database retrieval method based on search engine technology
CN108319608A (en) The method, apparatus and system of access log storage inquiry
CN102999600A (en) Method and system for automatically generating embedded database
CN111291037A (en) Data storage and query method, device, equipment and computer storage medium
CN105095436A (en) Automatic modeling method for data of data sources
CN103810300A (en) Method and device for inquiring non-index coverage data
US6826563B1 (en) Supporting bitmap indexes on primary B+tree like structures
US20150278278A1 (en) Partition Filtering Using Smart Index In Memory
CN112783927B (en) Database query method and system
CN112612859A (en) DDL analysis method and device based on log analysis
CN104331460A (en) Hbase-based data read-write operation method and system
CN116186041A (en) Data lake index creation method and device, electronic equipment and computer storage medium
CN116049193A (en) Data storage method and device
CN115794861A (en) Offline data query multiplexing method based on feature abstract and application thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20160127