CN114443922A - IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device - Google Patents

IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device Download PDF

Info

Publication number
CN114443922A
CN114443922A CN202011217110.5A CN202011217110A CN114443922A CN 114443922 A CN114443922 A CN 114443922A CN 202011217110 A CN202011217110 A CN 202011217110A CN 114443922 A CN114443922 A CN 114443922A
Authority
CN
China
Prior art keywords
sensor data
data packet
character string
iot
stage
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.)
Pending
Application number
CN202011217110.5A
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.)
Dilina Shanghai Big Data Service Co ltd
Shanghai Broadband Technology and Application Engineering Research Center
Original Assignee
Dilina Shanghai Big Data Service Co ltd
Shanghai Broadband Technology and Application Engineering Research Center
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 Dilina Shanghai Big Data Service Co ltd, Shanghai Broadband Technology and Application Engineering Research Center filed Critical Dilina Shanghai Big Data Service Co ltd
Priority to CN202011217110.5A priority Critical patent/CN114443922A/en
Publication of CN114443922A publication Critical patent/CN114443922A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Landscapes

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

Abstract

The invention provides a sensor data grouping retrieval method, a system and a device facing IoT data perception, wherein the method comprises the following steps: acquiring a first-stage number and a second-stage number of a sensor, wherein the second-stage number is a subordinate number of the first-stage number, and substituting the first-stage number and the second-stage number into a preset formula to calculate and obtain a character string number; establishing a corresponding relation table of the character string numbers and the sensor data; and acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number. The invention discloses a sensor data grouping retrieval method, a system and a device facing IoT data perception, which are used for providing a sensor data retrieval method with good compatibility and quick retrieval for various programming languages and memory databases.

Description

IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device
Technical Field
The invention relates to the technical field of sensor oriented to IoT (Internet of things) Internet of things perception, in particular to a sensor data packet retrieval method, system and device oriented to IoT data perception.
Background
In the project scenario facing IoT (Internet of Things, abbreviated as IoT) Internet of Things perception, a large amount of data collected from thousands of sensors is usually processed, and the sensors are uniquely numbered and matched to corresponding sensor data, which is a very universal requirement.
Assuming that there is some item facing IoT internet of things perception, there are multiple construction areas a, B, C … …. Several sensors are deployed in each area. Since the areas a, B, and C … … are constructed independently, the numbers of the sensors are planned independently, and there are cases where the numbers of the sensors deployed in a and the sensors deployed in B are duplicated, as shown in the following table:
Figure BDA0002760768790000011
when all the sensor data of all the areas need to be searched, a sensor data table Tables of area number → sensor data is needed to support unique positioning of the sensor data according to (area number, sensor number), for example, as shown in the following table:
Figure BDA0002760768790000012
to support fast retrieval, the above-mentioned data Tables are typically placed in memory.
There are two main solutions in the industry today:
one is to use nested maps, maps of the outer layer implement region-to-sensor correspondence, maps of the inner layer implement sensor-to-data correspondence, maps (integer, Map); wherein, the first integer is the area number, the second integer is the sensor number, and the value is the sensor data.
The other method is to adopt the serial number of the character string, splice the serial number of the area and the serial number of the sensor into a serial number, the serial number of the area is: 1, sensor number: 1, obtaining character string codes: "1-1".
In the first scheme described above, the nested Map retrieval scheme has 2 disadvantages:
each time one sensor data is retrieved, two query operations need to be performed: and inquiring the Map of the outer layer for the first time to obtain the Map of the inner layer according to the area number, and inquiring the corresponding sensor data from the Map of the inner layer obtained in the previous step for the second time according to the sensor number. The time overhead of the two-time retrieval is large, and the programming scene of quick retrieval is not facilitated.
The nested data structure makes integration with common cache database difficult, taking the popular redis memory database in the industry as an example, redis supports the structure of Map of single layer, but does not support the nested Map structure. Nested data structures do not have good compatibility.
In the second scheme, the way of splicing the character string codes can solve the problem of compatibility, but the scheme takes one character string as the unique key value for checking, the time overhead of the computer when matching the character string is much larger than that of a matching integer, as the item size increases, the area and the sensor number gradually increase, the character string codes also gradually increase from the initial "1-1" to a length like "3122- > 93765", and the matching overhead of the character string at the length can increase by orders of magnitude, which is very unfavorable for the programming scene of quick retrieval.
It is therefore desirable to be able to address the problem of how to facilitate rapid retrieval of sensor data.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a method, a system, and an apparatus for IoT data aware-oriented sensor data packet retrieval, which are used to solve the problem of how to facilitate fast retrieval of sensor data in the prior art.
To achieve the above and other related objects, the present invention provides an IoT data perception-oriented sensor data packet retrieval method, including the following steps: acquiring a first-stage number and a second-stage number of a sensor, wherein the second-stage number is a subordinate number of the first-stage number, and substituting the first-stage number and the second-stage number into a preset formula to calculate and obtain a character string number; establishing a corresponding relation table of the character string numbers and the sensor data; and acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number.
In an embodiment of the invention, the first level number is a region number.
In an embodiment of the present invention, the predetermined formula is: the character string number is the first-level number × the second-level number threshold + the second-level number.
In an embodiment of the invention, the second-level number threshold is 100000, and the maximum value of the first-level number is 10000.
To achieve the above object, the present invention further provides an IoT data perception-oriented sensor data packet retrieval system, including: the device comprises an acquisition module, an establishing module and an acquisition module; the acquisition module is used for acquiring a first-stage serial number and a second-stage serial number of the sensor, wherein the second-stage serial number is a subordinate serial number of the first-stage serial number, and the first-stage serial number and the second-stage serial number are substituted into a preset formula to calculate and acquire a character string serial number; the establishing module is used for establishing a corresponding relation table of the character string numbers and the sensor data; the acquisition module is used for acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number.
In an embodiment of the invention, the first level number is a region number.
In an embodiment of the present invention, the predetermined formula is: the character string number is the first-level number × the second-level number threshold + the second-level number.
In an embodiment of the invention, the second-level number threshold is 100000, and the maximum value of the first-level number is 10000.
To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements any of the above IoT data awareness-oriented sensor data packet retrieval methods.
In order to achieve the above object, the present invention further provides an IoT data sensing-oriented sensor data packet retrieval apparatus, including: a processor and a memory; the memory is used for storing a computer program; the processor is connected to the memory and configured to execute the computer program stored in the memory, so as to enable the IoT data awareness-oriented sensor data packet retrieval device to execute any of the above IoT data awareness-oriented sensor data packet retrieval methods.
As described above, the IoT data sensing-oriented sensor data packet retrieval method, system, and apparatus of the present invention have the following beneficial effects: the sensor data retrieval method is used for providing a sensor data retrieval method which is good in compatibility and rapid in retrieval for various programming languages and memory databases.
Drawings
Fig. 1 is a flowchart of an IoT data aware-oriented sensor data packet retrieval method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an IoT data awareness-oriented sensor data packet retrieval system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an IoT data sensing-oriented sensor data packet retrieving device in an embodiment of the present invention.
Description of the element reference numerals
21 acquisition module
22 building block
23 acquisition module
31 processor
32 memory
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, so that the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, the type, quantity and proportion of the components in actual implementation can be changed freely, and the layout of the components can be more complicated.
The sensor data grouping retrieval method, system and device facing IoT data perception are used for providing a sensor data retrieval method which is good in compatibility and rapid in retrieval for various programming languages and memory databases.
As shown in fig. 1, in an embodiment, the IoT data sensing-oriented sensor data packet retrieval method of the present invention includes the following steps:
and S11, acquiring a first-stage serial number and a second-stage serial number of the sensor, wherein the second-stage serial number is a subordinate serial number of the first-stage serial number, and substituting the first-stage serial number and the second-stage serial number into a preset formula to calculate and obtain a character string serial number.
Specifically, the first-level number is a region number. That is, the sensors are divided according to the areas where the sensors are located, and different numbers are set for each area. The second-level number is a subordinate number of the first-level number, that is, in each area, a different second-level number is set for each sensor,
specifically, the first-level number is a category number. That is, the sensors are classified according to their types, and different numbers are set for each type.
Specifically, the preset formula is as follows:
the character string number is the first-level number × the second-level number threshold + the second-level number.
For example: setting the first-level number as the Area number as AreaID(ii) a Setting the number of the second level as the number of the Sensor in the area as the SensorID(ii) a In an IoT data perception oriented project scene, the number of sensors in an Area and an Area is limited, and the upper limit of the number of the areas is defined as AreamaxAnd the upper limit of the number of sensors in the region is SensormaxHere, an assumption of extremely high latitude is given:
Areamax=10000
Sensormax=100000
namely, the threshold value of the second-level number is 100000, and the maximum value of the first-level number is 10000. This prevents the overflow of data due to an excessively large value and the calculation of a wrong mixed code.
The preset formula is defined as follows: definition generation of hybrid coding MixIDThe formula of (1) is:
MixID=(AreaID x Sensormax)+SensorID
all sensors thus have a globally unique mixed code.
For example, the first level number is the area number, and the second level number is the number of sensors in the area as shown in the following table:
Figure BDA0002760768790000051
and step S12, establishing a corresponding relation table of the character string numbers and the sensor data.
Specifically, the correspondence table of the character string numbers and the sensor data is established according to the following table.
The following table can be calculated according to a preset formula:
hybrid codingMix ID Sensor data
100001 23.5
100002 22.9
100003 25.0
200001 1.0349
200002 0.9823
200003 1.1287
300001 392.2
300002 346.3
300003 974.1
This can be described by a common key-value pair, MixIDIs a key and the sensor data is a value. Can be directly put into a Map data structure of a programming language or a popular memory database redis.
And step S13, acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number.
Specifically, according to a previously defined preset formula, the corresponding sensor data in the correspondence table can be found based on the character string number and the correspondence table. The method is realized by using common Map, has no nested data structure, and is suitable for various programming languages and memory databases (such as redis). The hybrid encoding of the sensor data table remains a numeric type, and compared to the string encoding scheme mentioned in the background, the method does not incur the overhead of additional string matching.
As shown in fig. 2, in an embodiment, the IoT data aware-oriented sensor data packet retrieval system of the present invention includes: an obtaining module 21, an establishing module 22 and an obtaining module 23; the obtaining module 21 is configured to obtain a first-level number and a second-level number of the sensor, where the second-level number is a subordinate number of the first-level number, and substitute the first-level number and the second-level number into a preset formula to obtain a string number; the establishing module 22 is configured to establish a corresponding relationship table between the character string numbers and the sensor data; the obtaining module 23 is configured to obtain sensor data of a corresponding sensor according to the correspondence table and the character string number.
In an embodiment of the invention, the first level number is a region number.
In an embodiment of the present invention, the predetermined formula is: the character string number is the first-level number × the second-level number threshold + the second-level number.
In an embodiment of the invention, the second-level number threshold is 100000, and the maximum value of the first-level number is 10000.
It should be noted that the structures and principles of the obtaining module 21, the establishing module 22, and the obtaining module 23 correspond to the steps in the IoT data sensing-oriented sensor data grouping retrieval method one to one, and therefore are not described herein again.
It should be noted that the division of the modules of the above system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the x module may be a processing element that is set up separately, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the x module may be called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Specific Integrated circuits (ASICs), or one or more Microprocessors (MPUs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In an embodiment of the present invention, the present invention further includes a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any of the IoT data awareness-oriented sensor data packet retrieval methods described above.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
As shown in fig. 3, in an embodiment, the IoT data perception-oriented sensor data packet retrieving device of the present invention includes: a processor 31 and a memory 32; the memory 32 is for storing a computer program; the processor 31 is connected to the memory 32, and is configured to execute the computer program stored in the memory 32, so as to cause the IoT data awareness-oriented sensor data packet retrieving apparatus to execute any of the IoT data awareness-oriented sensor data packet retrieving methods.
Specifically, the memory 32 includes: various media that can store program codes, such as ROM, RAM, magnetic disk, U-disk, memory card, or optical disk.
Preferably, the Processor 31 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
In summary, the IoT data-aware-oriented sensor data grouping retrieval method, system, and apparatus of the present invention are used to provide a sensor data retrieval method with good compatibility and fast retrieval for various programming languages and memory databases. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. An IoT data perception-oriented sensor data packet retrieval method is characterized by comprising the following steps:
acquiring a first-stage number and a second-stage number of a sensor, wherein the second-stage number is a subordinate number of the first-stage number, and substituting the first-stage number and the second-stage number into a preset formula to calculate and obtain a character string number;
establishing a corresponding relation table of the character string numbers and the sensor data;
and acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number.
2. The IoT data awareness-oriented sensor data packet retrieval method of claim 1, wherein the first level number is a zone number.
3. The IoT data awareness-oriented sensor data packet retrieval method of claim 1, wherein the predetermined formula is:
the character string number is the first-level number × the second-level number threshold + the second-level number.
4. The IoT data awareness-oriented sensor data packet retrieval method of claim 1, wherein the second-level number threshold is 100000 and the first-level number maximum is 10000.
5. An IoT data-aware-oriented sensor data packet retrieval system, comprising: the device comprises an acquisition module, an establishing module and an acquisition module;
the acquisition module is used for acquiring a first-stage serial number and a second-stage serial number of the sensor, wherein the second-stage serial number is a subordinate serial number of the first-stage serial number, and the first-stage serial number and the second-stage serial number are substituted into a preset formula to calculate and acquire a character string serial number;
the establishing module is used for establishing a corresponding relation table of the character string numbers and the sensor data;
the acquisition module is used for acquiring sensor data of the corresponding sensor according to the corresponding relation table and the character string number.
6. The IoT data awareness-oriented sensor data packet retrieval system in accordance with claim 5, wherein the first level number is a zone number.
7. The IoT data awareness-oriented sensor data packet retrieval system in accordance with claim 5, wherein the predetermined formula is:
the character string number is the first-level number × the second-level number threshold + the second-level number.
8. The IoT data awareness-oriented sensor data packet retrieval system in accordance with claim 5, wherein the second tier number threshold is 100000 and the first tier number maximum is 10000.
9. A computer-readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the IoT data awareness-oriented sensor data packet retrieval method recited in any of claims 1-4.
10. An IoT data aware-oriented sensor data packet retrieval device, comprising: a processor and a memory;
the memory is used for storing a computer program;
the processor is connected to the memory and configured to execute the computer program stored in the memory to cause the IoT data awareness-oriented sensor data packet retrieval device to perform the IoT data awareness-oriented sensor data packet retrieval method recited in any one of claims 1-4.
CN202011217110.5A 2020-11-04 2020-11-04 IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device Pending CN114443922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011217110.5A CN114443922A (en) 2020-11-04 2020-11-04 IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011217110.5A CN114443922A (en) 2020-11-04 2020-11-04 IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device

Publications (1)

Publication Number Publication Date
CN114443922A true CN114443922A (en) 2022-05-06

Family

ID=81361696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011217110.5A Pending CN114443922A (en) 2020-11-04 2020-11-04 IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device

Country Status (1)

Country Link
CN (1) CN114443922A (en)

Similar Documents

Publication Publication Date Title
US7080091B2 (en) Inverted index system and method for numeric attributes
CN112214472B (en) Meteorological lattice data storage and query method, device and storage medium
US8583655B2 (en) Using an inverted index to produce an answer to a query
US20160103858A1 (en) Data management system comprising a trie data structure, integrated circuits and methods therefor
CN108304409B (en) Carry-based data frequency estimation method of Sketch data structure
EP3289484A1 (en) Method and database computer system for performing a database query using a bitmap index
US6513043B1 (en) System and method for storing, retrieving, and analyzing characterization data
CN114491172B (en) Rapid retrieval method, device and equipment for tree structure nodes and storage medium
CN113918605A (en) Data query method, device, equipment and computer storage medium
CN109766337B (en) Tree structure data storage method, electronic device, storage medium and system
CN112434027A (en) Indexing method and device for multi-dimensional data, computer equipment and storage medium
JP5731015B2 (en) Database system and database management method
CN111858607A (en) Data processing method and device, electronic equipment and computer readable medium
CN108241709B (en) Data integration method, device and system
CN109885570A (en) A kind of multi-Dimensional Range querying method of secondary index combination hash table
CN110019341B (en) Data query method and device
CN110232063B (en) Hierarchical data query method, hierarchical data query device, computer equipment and storage medium
CN114443922A (en) IoT (Internet of things) data perception-oriented sensor data packet retrieval method, system and device
CN116049180A (en) Tenant data processing method and device for Paas platform
CN114595215A (en) Data processing method and device, electronic equipment and storage medium
CN114238334A (en) Heterogeneous data encoding method and device, heterogeneous data decoding method and device, computer equipment and storage medium
CN117540056B (en) Method, device, computer equipment and storage medium for data query
CN110888870A (en) Data storage table query method, partition server and electronic equipment
CN112000695B (en) Path query method, path query device, electronic equipment and computer readable storage medium
CN117829044B (en) EDA constraint detection system

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