WO2022073298A1 - 数据查询方法、装置、介质以及数据处理系统 - Google Patents
数据查询方法、装置、介质以及数据处理系统 Download PDFInfo
- Publication number
- WO2022073298A1 WO2022073298A1 PCT/CN2020/136165 CN2020136165W WO2022073298A1 WO 2022073298 A1 WO2022073298 A1 WO 2022073298A1 CN 2020136165 W CN2020136165 W CN 2020136165W WO 2022073298 A1 WO2022073298 A1 WO 2022073298A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- key
- time
- value
- data
- value pair
- 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.)
- Ceased
Links
Images
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/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60L—PROPULSION OF ELECTRICALLY-PROPELLED VEHICLES; SUPPLYING ELECTRIC POWER FOR AUXILIARY EQUIPMENT OF ELECTRICALLY-PROPELLED VEHICLES; ELECTRODYNAMIC BRAKE SYSTEMS FOR VEHICLES IN GENERAL; MAGNETIC SUSPENSION OR LEVITATION FOR VEHICLES; MONITORING OPERATING VARIABLES OF ELECTRICALLY-PROPELLED VEHICLES; ELECTRIC SAFETY DEVICES FOR ELECTRICALLY-PROPELLED VEHICLES
- B60L58/00—Methods or circuit arrangements for monitoring or controlling batteries or fuel cells, specially adapted for electric vehicles
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Definitions
- the present invention relates to the technical field of data processing, in particular to a data query method, device, medium and data processing system.
- Electric vehicles and other new energy vehicles that use electric energy as driving energy are usually equipped with a battery management system (BMS) for monitoring battery status.
- BMS battery management system
- the operating data can determine the current operating state of the battery, and then determine whether the battery is abnormal or faulty.
- the data collection cycle of the battery management system is usually at the level of seconds, milliseconds or even microseconds.
- the conventional data query method is mainly to store the data one by one according to the data collection time of the battery management system. It can only be queried one by one according to the data collection time.
- the present invention is proposed to provide a data query method, device, medium and data processing system that solves or at least partially solves the technical problem of how to quickly and accurately search for data from massive data.
- a data query method includes:
- the data query request includes the object identifier, attribute type and time information of the object to be queried;
- the key-value pair includes a keyword and a corresponding key value
- the keyword includes an object identifier, an attribute type and an hourly time
- the key value includes the attribute type corresponding to the corresponding keyword
- the collection time includes The attribute value of the hourly time and the non-hourly time in the collection time corresponding to each attribute value.
- the step of "querying the key-value pair stored in the preset key-value pair database and outputting the query result according to the data query request" specifically includes:
- the key-value pair is queried according to the keyword to be queried and a query result is output.
- the step of "querying the key-value pair according to the keyword to be queried and outputting the query result" specifically includes:
- time period does not completely fall within the time range, obtain the overlapping time period between the time period and the time range, and obtain the time period that is not on the hour in the overlapping time period and the key value to be queried. For the respective non-hour time corresponding to each attribute value in the middle, obtain the corresponding attribute value and output the query result according to the obtained attribute value.
- the method further includes:
- the first key-value pair Using the object identifier and collection time in the current original object data of the object to be stored as the first key, and using all attribute types and corresponding attribute values in the current original object data as the first key value, form The first key-value pair;
- the object identifier, collection time and current attribute type in the first key-value pair are used as the second keyword and the attribute value corresponding to the current attribute type is used as the second key.
- the third key value is spliced, and the key-value pair of the object to be stored is formed by taking each type of third keyword as the final keyword and the splicing processing result corresponding to each type of third keyword as the final key value .
- the object to be queried and the object to be stored are power batteries.
- a data query device in a second aspect, includes:
- a data receiving module configured to receive a data query request; the data query request includes the object identifier, attribute type and time information of the object to be queried;
- a data query module configured to query the key-value pair stored in the preset key-value pair database according to the data query request and output the query result;
- the key-value pair includes a keyword and a corresponding key value
- the keyword includes an object identifier, an attribute type and an hourly time
- the key value includes the attribute type corresponding to the corresponding keyword
- the collection time includes The attribute value of the hourly time and the non-hourly time in the collection time corresponding to each attribute value.
- the data query module includes a time analysis submodule, a first data query submodule, and a second data query submodule;
- the time analysis submodule is configured to analyze the hourly time information contained in the time information
- the first data query sub-module is configured to obtain the corresponding keyword to be queried according to the hourly time information and the object identifier and attribute type in the data query request;
- the second data query sub-module is configured to query the key-value pair according to the keyword to be queried and output a query result.
- the second data query submodule is configured to perform the following operations:
- time period does not completely fall within the time range, obtain the overlapping time period between the time period and the time range, and obtain the time period that is not on the hour in the overlapping time period and the key value to be queried. For the respective non-hour time corresponding to each attribute value in the middle, obtain the corresponding attribute value and output the query result according to the obtained attribute value.
- the device further includes a data storage module, and the data storage module includes a data acquisition sub-module and a data storage sub-module;
- the data acquisition submodule is configured to acquire original object data of the object to be stored, the original object data including object identification, acquisition time, one or more attribute types and corresponding attribute values;
- the data storage sub-module is configured to use the object identifier in the original object data, the attribute type, and the hourly time in the collection time as the key, and use the attribute value corresponding to the attribute type and the attribute value in the collection time as the key.
- a key value pair of the object to be stored is formed and the key value pair is stored in the preset key value pair database.
- the data storage submodule is configured to perform the following operations:
- the first key-value pair Using the object identifier and collection time in the current original object data of the object to be stored as the first key, and using all attribute types and corresponding attribute values in the current original object data as the first key value, form The first key-value pair;
- the object identifier, collection time and current attribute type in the first key-value pair are used as the second keyword and the attribute value corresponding to the current attribute type is used as the second key.
- the third key value is spliced, and the key-value pair of the object to be stored is formed by taking each type of third keyword as the final keyword and the splicing processing result corresponding to each type of third keyword as the final key value .
- the object to be queried and the object to be stored are power batteries.
- a data processing system includes a data acquisition device, a query interaction device, and the data query device according to any one of the above technical solutions;
- the data collection device is configured to collect raw object data of the stored object and send the raw object data to the data query device;
- the query interaction device is configured to receive a data query request and send the data query request to the data query device;
- the data query device is configured to store the original object data sent by the data acquisition device into a preset key-value pair database in the form of key-value pairs, and to retrieve data from the preset key-value pair database according to a data query request sent by the query interaction device. querying the corresponding data in the key-value pair database and sending the query result to the query interaction device for output display;
- the original object data includes object identification, collection time, one or more attribute types and corresponding attribute values
- the data query request includes the object identification, attribute type and time information of the object to be queried.
- a computer-readable storage medium stores a plurality of program codes therein, and the program codes are adapted to be loaded and run by a processor to execute any one of the above technical solutions. Data query method.
- a control device comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to execute any of the above The data query method described in a technical solution.
- the object data of the object to be queried can be stored in the key-value pair database.
- a key-value pair formed in such a way that the attribute type in the keyword corresponds to the attribute type and the collection time includes the above-mentioned attribute value of the hourly time and the non-hourly time in the collection time corresponding to each attribute value is the key value.
- the key-value pair stored in the key-value pair database can be queried according to the object identifier, attribute type and time information of the object to be queried in the data query request, and the query result can be output.
- the embodiment of the present invention can quickly find the hourly time stored in the key-value pair and the non-hourly time stored in the key-value pair.
- the corresponding data greatly improves the efficiency of data query.
- FIG. 1 is a schematic flowchart of the main steps of a data query method according to an embodiment of the present invention
- FIG. 2 is a main structural block diagram of a data query system according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of an application scenario of the present invention.
- 11 data receiving module; 12: data query module; 21: electric vehicle; 22: data acquisition device; 23: data query device; 24: query interaction device; 25: key-value pair database.
- module and “processor” may include hardware, software or a combination of both.
- a module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program codes, or a combination of software and hardware.
- the processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor.
- the processor has data and/or signal processing functions.
- the processor may be implemented in software, hardware, or a combination of the two.
- Non-transitory computer-readable storage media include any suitable media that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and the like.
- a and/or B means all possible combinations of A and B, such as just A, just B, or A and B.
- the terms "at least one A or B” or “at least one of A and B” have a similar meaning to “A and/or B” and can include just A, only B, or A and B.
- the terms “a” and “the” in the singular may also include the plural.
- the key-value pair includes a key (Key) and a key value (Value).
- the key value refers to the data to be stored, and the key refers to the key value number.
- a key-value database refers to a database that stores data in the form of key-value pairs.
- Hourly time refers to a moment in time when the time is an integer. Specifically, the hourly time refers to the time when the numerical values corresponding to other time measurement units other than the hour (hour), such as minutes (minute) and seconds (second), are both zero.
- the non-hour time refers to the time value corresponding to other time measurement units other than the hour. For example: if the current time is 2020-05-21 20:05:00 000, then the hourly time in the current time can be 2020-05-21 20:00:00, and the non-hourly time in the current time is 05: 00 000.
- the data collection period of the battery management system is usually at the level of seconds, milliseconds or even microseconds.
- the conventional data query method is mainly to store the data one by one according to the data collection time of the battery management system. It can be queried one by one according to the data collection time. Therefore, this method is not suitable for quickly and accurately querying battery data for a long period of time from massive and complicated battery data.
- a key-value pair database can be used to store the object data of the object to be queried (object identifier, attribute type and corresponding attribute value, and the collection time of the attribute value), and the key-value pair stored in the key-value pair data Using the object identifier, attribute type and hourly time as the keywords, the attribute value corresponding to the attribute type in the keyword and the collection time including the above-mentioned hourly time and the non-integer value in the collection time corresponding to each attribute value.
- An example: a key-value pair is: battery_id+sample_ts+soc:offset1+value1+offset2+value2.
- battery_id+sample_ts+soc represents a keyword
- battery_id, sample_ts, and soc are the object ID, hourly time, and attribute type, respectively.
- offset1+value1+offset2+value2 indicates the key value
- offset1 and offset2 indicate non-hourly time
- value1 and value2 indicate the specific value of soc.
- value1 represents the soc value at the time of offset1
- value2 in “offset2+value2” represents the soc value at the time of offset2.
- the key-value pair stored in the key-value pair database can be queried according to the object identifier, attribute type and time information of the object to be queried in the data query request, and the query result can be output.
- the time information includes a time period of several hours, according to the hourly time and the attribute type stored in the keyword in the key-value pair, the attribute value of a certain attribute type that needs to be queried collected in these hours can be quickly found. , and users do not need to query one by one according to the collection time of attribute values, which greatly improves the efficiency of data query.
- FIG. 3 is a schematic diagram of an application scenario of the present invention.
- the data processing system according to an embodiment of the present invention is used to process the relevant data of the power battery in the electric vehicle.
- the data collection device 22 collects the power battery data output by the battery management system (Battery Management System, BMS) in the electric vehicle 12 in real time and sends the collected power battery data to the data query device 23 .
- BMS Battery Management System
- the data query device 23 stores the battery data of each power battery in the key-value pair database 25 in the form of a key-value pair, and the key-value pair takes the identification of the power battery, the attribute type of the power battery and the hourly time as the keys , a key-value pair formed in such a way that the attribute type in the keyword corresponds to the attribute type and the collection time includes the above-mentioned attribute value of the hourly time and the non-hourly time in the collection time corresponding to each attribute value as the key value.
- the query interaction device 24 After receiving the data query request, the query interaction device 24 sends the data query request to the data query device 23, and the data query device 23 will, according to the identification, attribute type and time information of the battery to be queried in the data query request, update the key-value pair database 25 Query the key-value pairs stored in and output the query results.
- a data query request including the identity of the power battery, the attribute type is SOC, and the time information is "May 21, 2020 12:00:00 to 20:00:00" can be sent to the query interaction device 24, and the data query device 23 according to After each item of information in the request is queried from the key-value pair database 25 to the corresponding key-value pair, the query result is sent to the query interaction device 24 for output, so that the user can view the query result.
- FIG. 1 is a schematic flowchart of main steps of a data query method according to an embodiment of the present invention.
- the data query method in the embodiment of the present invention mainly includes the following steps:
- Step S101 Receive a data query request.
- the data query request includes the object identifier, attribute type and time information of the object to be queried.
- the object identifier refers to unique identification information that can indicate which object the object to be queried is specifically.
- the attribute type refers to the type information of the attribute of the object to be queried. An example: if the object to be queried is a power battery, the attribute types of the power battery can include state of charge, current, voltage, temperature, etc.
- the time information refers to the collection time information of the object attribute to be queried, and the time information includes time information such as year, month, day, hour, minute, and second. In one embodiment, the time information in the data query request may include a certain period of time, or may be a certain instantaneous time. An example: the time information can be from 12:00:00 to 20:00:00 on May 21, 2020, or it can be 12:00:00 on May 21, 2020, which represents the instantaneous time of 12:00:00. ⁇ 12:00:00.
- Step S102 Query the key-value pair stored in the preset key-value pair database according to the data query request and output the query result.
- the preset key-value pair database refers to a database that stores data in the form of key-value pairs, and each key-value pair stored in the preset key-value pair database includes a keyword and a key value corresponding to the keyword.
- the keyword may include object identifier, property type and hourly time (for example, the data storage form of the keyword may be "object identifier + hourly time + property type")
- the key value may include the property type in the relevant keyword
- Corresponding attribute values whose collection time includes the hourly time and the non-hourly time in the collection time corresponding to each attribute value (for example, the data storage form of the key value can be "apart-hour time + attribute value”) .
- the attribute value stored in the key value may be the state of charge SOC of the power battery whose serial number is Battery_ID1 collected from 12:00:00 to 12:59:59 on May 21, 2020. If the specific collection time of a certain state of charge SOC is 12:05:00, the non-hour time stored in the key value may be 05:00. Finally, the key-value pair corresponding to the battery data can be obtained: Battery_ID1+2020-05-2112:00:00+SOC:05:00+value. Among them, Battery_ID1+2020-05-2112:00:00+SOC is the keyword, 05:00+value is the key value, and value is the specific value of the SOC.
- the time information in the data query request includes a certain period of time
- All attribute values do not need users to query one by one according to the collection time of each attribute value, which greatly improves the efficiency of data query.
- the time information in the data query is the instantaneous time
- all attribute values corresponding to the hourly time to which the instantaneous time belongs can also be quickly found according to the hourly time stored in the keyword in the key-value pair, and then according to each attribute value corresponding to the hourly time.
- the attribute value corresponding to the instantaneous time can be accurately found.
- the embodiment of the present invention can be based on the hourly time stored in the key-value pair and the non-hourly time stored in the key-value pair. , to quickly find the corresponding data, which greatly improves the efficiency of data query.
- the database after receiving the data query request, the database can be queried by the preset key value and the query result can be output according to the following steps:
- Step 11 Analyze the hourly time information included in the time information in the data query request.
- the hourly time information in this embodiment has the same meaning as the hourly time in the foregoing embodiments, and is not described in detail here for the sake of brevity of description.
- time information can be from 12:00:00 to 13:59:59 on May 21, 2020, it can be analyzed that the hourly time information in the time information includes 12:00 on May 21, 2020 :00 and 13:00:00.
- Step 12 Obtain the corresponding keyword to be queried according to the hourly time information analyzed in step 11 and the object identifier and attribute type in the data query request.
- the object identifier in the data query request is the power battery number Battery_ID1
- the attribute type is charge.
- the electrical state is SOC
- the data storage form of the keyword is "object identification + hourly time + attribute type”.
- Step 13 query the key-value pair in the preset key-value pair database according to the keyword to be queried, and output the query result.
- the key-value pair corresponding to the keyword to be queried can be accurately queried from the preset key-value pair database according to the keyword to be queried, and the query result can be output according to the queried key-value pair.
- the hourly time information included in the current time information can be quickly found according to the hourly time information and the hourly time stored in the key-value pair. All corresponding attribute values do not need the user to query one by one according to the collection time of each attribute value, which greatly improves the data query efficiency.
- the time information in the data query request is a time period including a certain duration
- Point time quickly find all attribute values corresponding to the hourly time information contained in the current time information.
- Point time quickly find all attribute values corresponding to the current hourly time information, and then accurately find the attribute value corresponding to the time information according to the non-hourly time corresponding to each attribute value.
- time information in the data query request is a time period including a certain duration and the duration of the time information Duration ⁇ N (hour), or when the time information in the data query request is an instantaneous time.
- Step 131 Acquire a corresponding key-value pair to be queried according to the keyword to be queried.
- the key-value pair corresponding to the keyword to be queried can be accurately queried from the preset key-value pair database according to the keyword to be queried, that is, the key-value pair to be queried.
- Step 132 Obtain the hourly time stored in the key-value pair to be queried, and determine whether the time period starting with the hourly time and ending at the next hourly time completely falls within the time range specified by the time information. If it falls completely, go to step 133; if not, go to step 134.
- Step 133 If it is judged in step 132 that the above-mentioned time period completely falls within the time range specified by the time information, it means that all the attribute values stored in the key-value pair to be queried belong to the attribute values corresponding to the time information, then the to-be-queried key-value pair can be All attribute values in the query key-value pair are output as query results.
- Step 134 If it is determined in step 132 that the above-mentioned time period does not completely fall within the time range specified by the time information, it indicates that a part of the attribute values stored in the key-value pair to be queried does not belong to the attribute value corresponding to the time information. At this time, the overlapping time period between the above-mentioned time period and the time range specified by the time information can be obtained, and the attribute value corresponding to the overlapping time period is the part of the attribute value corresponding to the time information. According to the off-hour time in the overlapping time period and the off-hour time corresponding to each attribute value in the key-value pair to be queried, the corresponding attribute value is obtained, and the query result is output according to the obtained attribute value.
- the hourly time stored in the obtained key-value pair to be queried is 12:00 :00, and it can be determined that the time period from 12:00:00 to 13:00:00 does not completely fall within the time range specified by the above time information.
- the overlapping time period between the above time period and the time range specified by the above time information is from 12:00:00 to 12:05:00.
- each attribute value in the key-value pair to be queried can correspond to each other.
- the part of the attribute value corresponding to the above-mentioned time information is obtained.
- the embodiment of the present invention can be based on the hourly time stored in the key-value pair and the non-hourly time stored in the key-value pair. time, and quickly find the corresponding data, which greatly improves the efficiency of data query.
- the data of the object to be stored may be stored in the preset key-value pair database in the form of key-value pairs according to the following steps, so that the data of the object to be stored can be stored in the preset key-value pair database according to the following steps
- the data query method described in the above steps S101 to S103 quickly searches the required data from the preset key-value pair database:
- Step 21 Obtain the original object data of the object to be stored.
- the original object data of the object to be stored may include object identification, collection time, one or more attribute types, and corresponding attribute values.
- the object identifier refers to unique identification information that can indicate which object the object to be stored is specifically.
- the attribute type refers to the type information of the attribute of the object to be stored, and the attribute value corresponding to a certain attribute type refers to the specific value corresponding to the attribute type.
- Step 22 Use the object identifier in the original object data, the attribute type, and the hourly time in the collection time as the key, and use the attribute value corresponding to the attribute type and the non-hourly time in the collection time as the key value, form the method to be Stores key-value pairs of objects and stores the key-value pairs to a preset key-value pair database.
- the original object data can be stored in a preset key-value pair database in a key-value pair storage mode according to the following steps:
- Step 221 Using the object identifier and collection time in the current original object data of the object to be stored as the first key, and using all attribute types and corresponding attribute values in the current original object data as the first key value, form the first key value. A key-value pair.
- the data storage form of the first key-value pair may be: "object identifier + collection time”: “attribute type: attribute value”.
- step 221 the first key-value pair corresponding to the current original object data can be obtained: battery_id+sample_ts: ⁇ soc: 90, current: 20 ⁇ .
- battery_id+sample_ts is the first keyword
- ⁇ soc: 90, current: 20 ⁇ is the first key value
- battery_id is the object identifier
- sample_ts is the collection time
- Step 222 For each attribute type in the first key-value pair, the object identifier, collection time and current attribute type in the first key-value pair are used as the second keyword and the attribute value corresponding to the current attribute type is used as the second key.
- the key-value method forms a second key-value pair.
- step 222 the above-mentioned first key-value pair can be converted into the following two second key-value pairs:
- battery_id+sample_ts+soc and “battery_id+sample_ts+current” are the second keywords, and "90" and "20" are the second key values.
- Step 223 Obtain the hourly time and the non-hourly time included in the collection time in the second key-value pair, take the object identifier, attribute type and hourly time in the second key-value pair as the third keyword and use the second key A third key-value pair is formed in such a way that the attribute value and the off-hour time in the value pair are the third key value.
- step 223 the second key-value pair can be converted into a third key-value pair as shown below:
- Step 224 Classify the third key-value pairs according to the third keywords, and obtain all third key-value pairs corresponding to each type of third keyword; classify all third key-value pairs corresponding to each type of third keyword Perform splicing processing on the third key value in the splicing process, and form the key value of the object to be stored by taking each type of third keyword as the final keyword and using the corresponding splicing processing result of each type of third keyword as the final key value right.
- Steps 221 to 223 can obtain the third key-value pair as shown below:
- the third key-value pair corresponding to the third keyword "battery_id+2020-05-21 20:00:00+soc" can be obtained, including:
- step 224 the three third key-value pairs can be converted into key-value pairs in the final form shown below:
- battery_id+2020-05-21 20:00:00+soc is the keyword
- 05:00 000+90+10:00 000+90+15:00 000+90 is the key value
- the original object data of the object to be stored can be stored in the preset key-value pair database in the form of key-value pairs, so that after receiving the data query request, according to the time in the data query request The information can quickly find the corresponding data, which greatly improves the efficiency of data query.
- the present invention also provides a data query device.
- FIG. 2 is a main structural block diagram of a data query apparatus according to an embodiment of the present invention.
- the data query device in the embodiment of the present invention mainly includes a data receiving module 11 and a data query module 12 .
- the data receiving module 11 and the data query module 12 may be combined into one module.
- the data receiving module 11 may be configured to receive a data query request; the data query request includes the object identifier, attribute type and time information of the object to be queried.
- the data query module 12 may be configured to query the key-value pair stored in the preset key-value pair database according to the data query request and output the query result.
- the key-value pair may include keywords and corresponding key values
- the keywords may include object identifiers, attribute types, and the hourly time
- the key-values may include the attribute type in the keyword corresponding to the hourly time and the collection time including the hourly time.
- the object to be queried is a power battery.
- the data query module 12 may include a time analysis submodule, a first data query submodule, and a second data query submodule.
- the time analysis submodule may be configured to analyze the hourly time information contained in the time information.
- the first data query submodule may be configured to obtain the corresponding keyword to be queried according to the hourly time information and the object identifier and attribute type in the data query request.
- the second data query sub-module may be configured to query the key-value pair according to the keyword to be queried and output the query result.
- the second data query sub-module may be configured to perform the following operations: obtain the corresponding key-value pair to be queried according to the keyword to be queried; obtain the hourly time stored in the key-value pair to be queried, and determine the Whether the time period whose hourly time is the start of time and the next hourly time is the end of time completely falls within the time range specified by the time information;
- the attribute value outputs the query result; if the time period does not completely fall within the time range, the overlapping time period between the time period and the time range is obtained, and each attribute value in the key-value pair to be queried is based on the non-hour time in the overlapping time period and the key-value pair to be queried.
- the corresponding attribute value is obtained and the query result is output according to the obtained attribute value.
- the data query apparatus may further include a data storage module, and the data storage module may include a data acquisition sub-module and a data storage sub-module.
- the data acquisition sub-module may be configured to acquire original object data of the object to be stored, where the original object data includes object identification, collection time, one or more attribute types, and corresponding attribute values.
- the data storage sub-module can be configured to use the object identifier in the original object data, the attribute type, and the hourly time in the collection time as the key, and the attribute value corresponding to the attribute type and the non-hourly time in the collection time as the key value method, form a key-value pair of the object to be stored and store the key-value pair in a preset key-value pair database.
- the object to be stored is a power battery. In an implementation manner, for the description of the specific implementation function, reference may be made to the descriptions in steps 21 to 22 .
- the data storage sub-module may be configured to perform the following operations: take the object identifier and collection time in the current original object data of the object to be stored as the first keyword and use all attribute types in the current original object data as the first key And the corresponding attribute value is the first key value to form the first key value pair. For each attribute type in the first key-value pair, the object identifier, collection time, and current attribute type in the first key-value pair are used as the second key, and the attribute value corresponding to the current attribute type is used as the second key value. way to form a second key-value pair.
- Obtain the hourly time and non-hourly time included in the collection time in the second key-value pair take the object ID, attribute type, and hourly time in the second key-value pair as the third keyword, and use the second key-value pair in the
- the attribute value and the non-hour time are the third key value to form the third key value pair.
- the third key value is spliced, and the key-value pair of the object to be stored is formed by taking each type of third keyword as the final keyword and the splicing processing result corresponding to each type of third keyword as the final key value.
- the above-mentioned data query device is used to execute the data query method embodiment shown in FIG. 1, and the technical principles, the technical problems solved and the technical effects produced are similar.
- Those skilled in the art can clearly understand that in order to describe For the convenience and simplicity of the data query device, reference may be made to the content described in the embodiment of the data query method for the specific working process and related description of the data query device, which will not be repeated here.
- the present invention also provides a data processing system.
- the data processing system may include a data acquisition device, a query interaction device, and the data query device described in the foregoing device embodiments.
- the data collection device may be configured to collect raw object data of the stored object and send the raw object data to the data query device; the raw object data may include object identification, collection time, one or more attribute types, and the corresponding property value.
- the query interaction device may be configured to receive the data query request and send the data query request to the data query device; the data query request may include the object identifier, attribute type and time information of the object to be queried.
- the data query device may be configured to store the original object data sent by the data acquisition device in the form of key-value pairs into a preset key-value pair database, and to retrieve data from the preset key-value pair database according to a data query request sent by the query interaction device. Query the corresponding data and send the query result to the query interaction device for output display.
- the query interaction device may include a query request entry module, so that the user can enter a data query request through the module.
- the query interaction device may further include a query result display module, and the module may be configured to receive the query result sent by the data query device and display and output it, so that the user can view the query result intuitively.
- the storage method of the original object data and the data query method are the same as the methods used by the data query apparatus in the foregoing apparatus embodiments, and are not repeated here for the sake of brevity.
- the part related to the embodiment of the present invention is shown, and the specific technical details are not disclosed, please refer to the device part of the embodiment of the present invention.
- the computer program includes computer program code
- the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal , telecommunication signals, and software distribution media.
- the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.
- the present invention also provides a computer-readable storage medium.
- the computer-readable storage medium can store a program for executing the data query method of the above method embodiment, and the program can be loaded and run by a processor to implement the above data query method .
- the computer-readable storage medium may be a storage device device formed by various electronic devices.
- the storage is a non-transitory computer-readable storage medium.
- the present invention also provides a control device.
- the control device may include a processor and a storage device, the storage device may be configured to store a program for executing the data query method of the above method embodiment, and the processor may be configured to execute
- the program in the storage device includes, but is not limited to, a program for executing the data query method of the above method embodiments.
- the control device may be a control device device formed including various electronic devices.
- each module is only for describing the functional units of the system of the present invention
- the physical device corresponding to these modules may be the processor itself, or a part of software in the processor, a part of hardware, or Part of the combination of software and hardware. Therefore, the numbers of the various modules in the figures are merely schematic.
- each module in the system can be divided or merged adaptively. Such splitting or merging of specific modules will not cause the technical solutions to deviate from the principles of the present invention, and therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Sustainable Development (AREA)
- Sustainable Energy (AREA)
- Power Engineering (AREA)
- Transportation (AREA)
- Mechanical Engineering (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明涉及数据处理技术领域,具体提供了一种数据查询方法、装置、介质以及数据处理系统,旨在解决快速且精准地从海量数据中查找数据的技术问题。为此目的,根据本发明实施例的方法,利用键值对数据库存储对象数据并且键值对数据库中存储的键值对是以对象标识、属性类型和整点时间为关键字,以采集时间中包含该整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间为键值。在接收到数据查询请求后,根据数据查询请求中的对象标识、属性类型与时间信息对键值对数据库进行键值对查询,无论该时间信息是包含一定时长的时段还是瞬时时间,都能够根据键值对中的整点时间与非整点时间,快速查找到相应的数据,极大地提到了数据查询效率。
Description
本发明涉及数据处理技术领域,具体涉及一种数据查询方法、装置、介质以及数据处理系统。
电动汽车等以电能作为驱动能源的新能源车通常会设置有用于监控电池状态的电池管理系统(Battery Management System,BMS),电池管理系统能够实时采集电池的运行数据,通过分析一段时间内电池的运行数据可以确定当前电池的运行状态,进而判断出电池是否发生异常或故障等。然而,电池管理系统的数据采集周期通常是秒、毫秒甚至是微秒级别,目前常规的数据查询方法主要是按照电池管理系统的数据采集时间逐一存储,如果要查询某段时间内的运行数据也只能按照数据采集时间逐一查询。当需要分析较长时间如12小时内电池的运行数据时,如果仍按照上述数据查询方法查询相应的运行数据则需要耗费较长时间、查询效率较低,不利于对电池运行状态的快速分析。
发明内容
为了克服上述缺陷,提出了本发明,以提供解决或至少部分地解决如何快速且精准地从海量数据中查找数据的技术问题的一种数据查询方法、装置、介质以及数据处理系统。
第一方面,提供一种数据查询方法,所述数据查询方法包括:
接收数据查询请求;所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息;
根据所述数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果;
其中,所述键值对包括关键字以及相应的键值,所述关键字包括对象标识、属性类型和整点时间,所述键值包括相应关键字中的属性类型对应的且采集时间中包含所述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间。
在上述数据查询方法的一个技术方案中,“根据所述数据查询请求对 预设键值对数据库中存储的键值对进行查询并输出查询结果”的步骤具体包括:
分析所述时间信息中包含的整点时间信息;
根据所述整点时间信息以及所述数据查询请求中的对象标识和属性类型,获取相应的待查询关键字;
根据所述待查询关键字对所述键值对进行查询并输出查询结果。
在上述数据查询方法的一个技术方案中,“根据所述待查询关键字对所述键值对进行查询并输出查询结果”的步骤具体包括:
根据所述待查询关键字获取相应的待查询键值对;
获取所述待查询键值对中存储的整点时间,判断以所述整点时间为时间起点且以下一个整点时间为时间终点的时间段是否完全落入所述时间信息指定的时间范围内;
若所述时间段完全落入所述时间范围内,则根据所述待查询键值对中的所有属性值输出查询结果;
若所述时间段未完全落入所述时间范围内,则获取所述时间段与所述时间范围的重叠时间段,根据所述重叠时间段中的非整点时间以及所述待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。
在上述数据查询方法的一个技术方案中,所述方法还包括:
获取待存储对象的原始对象数据,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值;
以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对并且将所述键值对存储至所述预设键值对数据库。
在上述数据查询方法的一个技术方案中,“以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对”的步骤具体包括:
以所述待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以所述当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对;
对于所述第一键值对中的每个属性类型,以所述第一键值对中的对象 标识、采集时间以及当前属性类型为第二关键字并且以所述当前属性类型对应的属性值为第二键值的方式,形成第二键值对;
获取所述第二键值对中采集时间包含的整点时间和非整点时间,以所述第二键值对中的对象标识、属性类型和所述整点时间为第三关键字并且以所述第二键值对中的属性值和所述非整点时间为第三键值的方式,形成第三键值对;
根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成所述待存储对象的键值对。
在上述数据查询方法的一个技术方案中,所述待查询对象和所述待存储对象是动力电池。
第二方面,提供一种数据查询装置,所述数据查询装置包括:
数据接收模块,其被配置成接收数据查询请求;所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息;
数据查询模块,其被配置成根据所述数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果;
其中,所述键值对包括关键字以及相应的键值,所述关键字包括对象标识、属性类型和整点时间,所述键值包括相应关键字中的属性类型对应的且采集时间中包含所述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间。
在上述数据查询装置的一个技术方案中,所述数据查询模块包括时间分析子模块、第一数据查询子模块和第二数据查询子模块;
所述时间分析子模块被配置成分析所述时间信息中包含的整点时间信息;
所述第一数据查询子模块被配置成根据所述整点时间信息以及所述数据查询请求中的对象标识和属性类型,获取相应的待查询关键字;
所述第二数据查询子模块被配置成根据所述待查询关键字对所述键值对进行查询并输出查询结果。
在上述数据查询装置的一个技术方案中,还包括:
所述第二数据查询子模块被配置成执行以下操作:
根据所述待查询关键字获取相应的待查询键值对;
获取所述待查询键值对中存储的整点时间,判断以所述整点时间为时 间起点且以下一个整点时间为时间终点的时间段是否完全落入所述时间信息指定的时间范围内;
若所述时间段完全落入所述时间范围内,则根据所述待查询键值对中的所有属性值输出查询结果;
若所述时间段未完全落入所述时间范围内,则获取所述时间段与所述时间范围的重叠时间段,根据所述重叠时间段中的非整点时间以及所述待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。
在上述数据查询装置的一个技术方案中,所述装置还包括数据存储模块,所述数据存储模块包括数据获取子模块和数据存储子模块;
所述数据获取子模块被配置成获取待存储对象的原始对象数据,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值;
所述数据存储子模块被配置成以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对并且将所述键值对存储至所述预设键值对数据库。
在上述数据查询装置的一个技术方案中,还包括:
所述数据存储子模块被配置成执行以下操作:
以所述待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以所述当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对;
对于所述第一键值对中的每个属性类型,以所述第一键值对中的对象标识、采集时间以及当前属性类型为第二关键字并且以所述当前属性类型对应的属性值为第二键值的方式,形成第二键值对;
获取所述第二键值对中采集时间包含的整点时间和非整点时间,以所述第二键值对中的对象标识、属性类型和所述整点时间为第三关键字并且以所述第二键值对中的属性值和所述非整点时间为第三键值的方式,形成第三键值对;
根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成所述待存储对象的键值对。
在上述数据查询装置的一个技术方案中,所述待查询对象和所述待存 储对象是动力电池。
第三方面,提供一种数据处理系统,所述数据处理系统包括数据采集装置、查询交互装置以及上述任一项技术方案所述的数据查询装置;
所述数据采集装置被配置成采集被存储对象的原始对象数据并且将所述原始对象数据发送至所述数据查询装置;
所述查询交互装置被配置成接收数据查询请求并且将所述数据查询请求发送至所述数据查询装置;
所述数据查询装置被配置成将所述数据采集装置发送的原始对象数据以键值对的形式存储至预设键值对数据库中,以及根据查询交互装置发送的数据查询请求从所述预设键值对数据库中查询相应的数据并且将查询结果发送至所述查询交互装置进行输出显示;
其中,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值,所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息。
第四方面,提供一种计算机可读存储介质,该计算机可读存储介质其中存储有多条程序代码,所述程序代码适于由处理器加载并运行以执行上述任一项技术方案所述的数据查询方法。
第五方面,提供一种控制装置,该控制装置包括处理器和存储装置,所述存储装置适于存储多条程序代码,所述程序代码适于由所述处理器加载并运行以执行上述任一项技术方案所述的数据查询方法。
本发明上述一个或多个技术方案,至少具有如下一种或多种有益效果:
在实施本发明的技术方案中,可以利用键值对数据库存储待查询对象的对象数据,在键值对数据中存储的键值对是以对象标识、属性类型和整点时间为关键字,以关键字中的属性类型对应的且采集时间中包含上述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间为键值的方式形成的键值对。在接收到数据查询请求后,可以根据数据查询请求中待查询对象的对象标识、属性类型以及时间信息,对键值对数据库中存储的键值对进行查询并输出查询结果。无论数据查询请求中的时间信息是包含一定时长的时段还是瞬时时间,本发明实施例都能够根据键值对中关键字存储的整点时间以及键值中存储的非整点时间,快速查找到相应的数据,极大地提到了数据查询效率。
下面参照附图来描述本发明的具体实施方式,附图中:
图1是根据本发明的一个实施例的数据查询方法的主要步骤流程示意图;
图2是根据本发明的一个实施例的数据查询系统的主要结构框图;
图3是本发明的一个应用场景示意图。
附图标记列表:
11:数据接收模块;12:数据查询模块;21:电动汽车;22:数据采集装置;23:数据查询装置;24:查询交互装置;25:键值对数据库。
下面参照附图来描述本发明的一些实施方式。本领域技术人员应当理解的是,这些实施方式仅仅用于解释本发明的技术原理,并非旨在限制本发明的保护范围。
在本发明的描述中,“模块”、“处理器”可以包括硬件、软件或者两者的组合。一个模块可以包括硬件电路,各种合适的感应器,通信端口,存储器,也可以包括软件部分,比如程序代码,也可以是软件和硬件的组合。处理器可以是中央处理器、微处理器、图像处理器、数字信号处理器或者其他任何合适的处理器。处理器具有数据和/或信号处理功能。处理器可以以软件方式实现、硬件方式实现或者二者结合方式实现。非暂时性的计算机可读存储介质包括任何合适的可存储程序代码的介质,比如磁碟、硬盘、光碟、闪存、只读存储器、随机存取存储器等等。术语“A和/或B”表示所有可能的A与B的组合,比如只是A、只是B或者A和B。术语“至少一个A或B”或者“A和B中的至少一个”含义与“A和/或B”类似,可以包括只是A、只是B或者A和B。单数形式的术语“一个”、“这个”也可以包含复数形式。
这里先解释本发明涉及到的一些术语
键值对包括一个关键字(Key)和一个键值(Value),键值指的是要存放的数据,关键字指的是键值的编号。键值对数据库指的是以键值对的形式存储数据的数据库。
整点时间指的是时间为整数的某一时刻。具体而言,整点时间指的是除了小时(hour)以外的其他时间计量单位比如分(minute)和秒(second)对应的数值都是零的时刻。而非整点时间则指的是除了小时(hour)以外的其他时间计量单 位对应的时间数值。例如:如果当前时间是2020-05-21 20:05:00 000,那么当前时间中的整点时间可以是2020-05-21 20:00:00,当前时间中的非整点时间是05:00 000。
电池管理系统的数据采集周期通常是秒、毫秒甚至是微秒级别,而目前常规的数据查询方法主要是按照电池管理系统的数据采集时间逐一存储,如果要查询某段时间内的运行数据也只能按照数据采集时间逐一查询。因而,这种方法并不适应于从海量繁杂的电池数据中快速精准地查询较长时间内的电池数据。
在本发明实施例中,可以利用键值对数据库存储待查询对象的对象数据(对象标识、属性类型以及相应的属性值、属性值的采集时间),在键值对数据中存储的键值对是以对象标识、属性类型和整点时间为关键字,以关键字中的属性类型对应的且采集时间中包含上述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间为键值的方式形成的键值对。一个例子:某个键值对是:battery_id+sample_ts+soc:offset1+value1+offset2+value2。其中,“battery_id+sample_ts+soc”表示关键字,battery_id、sample_ts和soc分别是对象标识、整点时间和属性类型。“offset1+value1+offset2+value2”表示键值,offset1和offset2表示非整点时间,value1和value2表示soc的具体数值。“offset1+value1”中value1的表示在offset1时刻的soc值,“offset2+value2”中的value2表示在offset2时刻的soc值。
在接收到数据查询请求后,可以根据数据查询请求中待查询对象的对象标识、属性类型以及时间信息,对键值对数据库中存储的键值对进行查询并输出查询结果。当时间信息是包含若干小时的时间段时,根据键值对中关键字存储的整点时间和属性类型,能够快速查找到在这几个小时采集到的需要查询的某种属性类型的属性值,无需用户按照属性值的采集时间逐一查询,极大地提高了数据查询效率。
参阅附图3,图3是本发明的一个应用场景的示意图。如图3所示,使用根据本发明一个实施例的数据处理系统来处理电动汽车中动力电池的相关数据。在该应用场景中,数据采集装置22实时采集电动汽车12中电池管理系统(Battery Management System,BMS)输出的动力电池数据并且将采集到的动力电池数据发送至数据查询装置23。数据查询装置23将每个动力电池的电池数据以键值对的形式存储至键值对数据库25中,该键值对是以动力电池的标识、动力电池的属性类型和整点时间为关键字,以关键字中的属性类型对应的且采集时间中包含上述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间为键值的方式形成的键值对。查询交互装置24接收到数据查询请求后将该数据查询请求发送至数据查询装 置23,数据查询装置23会根据数据查询请求中待查询电池的标识、属性类型以及时间信息,对键值对数据库25中存储的键值对进行查询并输出查询结果。一个例子:如果要查询在2020年5月21日12:00:00~20:00:00这8个小时内电动汽车1上安装的动力电池的荷电状态(State of Charge,SOC),则可以向查询交互装置24发送包含动力电池的标识、属性类型是SOC和时间信息是“2020年5月21日12:00:00~20:00:00”的数据查询请求,数据查询装置23根据请求中的各项信息从键值对数据库25查询到相应的键值对后,将查询结果发送查询交互装置24进行输出,以便用户查看查询结果。
参阅附图1,图1是根据本发明的一个实施例的数据查询方法的主要步骤流程示意图。如图1所示,本发明实施例中的数据查询方法主要包括以下步骤:
步骤S101:接收数据查询请求。
在本实施例中,数据查询请求包括待查询对象的对象标识、属性类型以及时间信息。对象标识指的是能够表示待查询对象具体是哪一个对象的唯一标识信息。属性类型指的是待查询对象的属性的类型信息。一个例子:如果待查询对象是动力电池,动力电池的属性类型可以包括荷电状态、电流、电压和温度等。时间信息指的是待查询的对象属性的采集时间信息,该时间信息包括年月日以及时分秒等时刻信息。一个实施方式中,数据查询请求中的时间信息可以包含一定时长的时段,也可以是某个瞬时时间。一个例子:时间信息可以是2020年5月21日12:00:00~20:00:00,也可以是表示12:00:00这一瞬时时间的2020年5月21日12:00:00~12:00:00。
步骤S102:根据数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果。
预设键值对数据库指的是以键值对的形式存储数据的数据库,该预设键值对数据库中存储的每个键值对均包括一个关键字以及该关键字对应的键值。其中,关键字可以包括对象标识、属性类型和整点时间(例如:关键字的数据存储形式可以是“对象标识+整点时间+属性类型”),键值可以包括相关关键字中的属性类型对应的且采集时间中包含整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间(例如:键值的数据存储形式可以是“非整点时间+属性值”)。
一个例子:如果关键字中的对象标识是动力电池编号Battery_ID1、属性类型是荷电状态SOC、整点时间是2020年5月21日12:00:00。那么,键值中存储的属性值可以是2020年5月21日12:00:00~12:59:59采集到的编号是Battery_ID1的动力电池的荷电状态SOC。如果某个荷电状态SOC的具体采集时间是12:05:00, 那么键值中存储的非整点时间可以是05:00。最终,可以得到该电池数据对应的键值对是:Battery_ID1+2020-05-2112:00:00+SOC:05:00+value。其中,Battery_ID1+2020-05-2112:00:00+SOC是关键字,05:00+value是键值,value是SOC的具体数值。
在本发明实施例中,当数据查询请求中的时间信息是包含一定时长的时段时能够根据键值对中关键字存储的整点时间,快速查找到当前时间信息所包含的整点时间对应的所有属性值,无需用户按照每个属性值的采集时间逐一查询,极大地提高了数据查询效率。当数据查询中的时间信息是瞬时时间时,也可以根据键值对中关键字存储的整点时间快速查找到该瞬时时间所属整点时间对应的所有属性值,进而根据每个属性值各自对应的非整点时间就可以准确查找到该瞬时时间对应的属性值。由此可知,无论数据查询请求中的时间信息是包含一定时长的时段还是瞬时时间,本发明实施例都能够根据键值对中关键字存储的整点时间以及键值中存储的非整点时间,快速查找到相应的数据,极大地提到了数据查询效率。
在一个实施方式中,在接收到数据查询请求后,可以按照如下步骤对预设键值对数据库进行查询以及输出查询结果:
步骤11:分析数据查询请求中的时间信息包含的整点时间信息。本实施方式中的整点时间信息与前述实施例中的整点时间的含义相同,为了描述简洁,在此不再具体描述。
一个例子:如果时间信息可以是2020年5月21日12:00:00~13:59:59,那么可以分析出该时间信息中的整点时间信息包括2020年5月21日的12:00:00和13:00:00。
步骤12:根据步骤11分析出的整点时间信息以及数据查询请求中的对象标识和属性类型,获取相应的待查询关键字。
一个例子:如果步骤11分析出的整点时间信息包括2020年5月21日的12:00:00和13:00:00,数据查询请求中的对象标识是动力电池编号Battery_ID1、属性类型是荷电状态SOC,并且关键字的数据存储形式是“对象标识+整点时间+属性类型”。那么,根据上述数据可以获取到如下两个待查询关键字:
Battery_ID1+2020-05-2112:00:00+SOC
Battery_ID1+2020-05-2113:00:00+SOC
步骤13:根据待查询关键字对预设键值对数据库中的键值对进行查询并输出查询结果。
在获取到待查询关键字后,就可以根据待查询关键字精准地从预设键值对数据库中查询到待查询关键字对应的键值对,根据查询到的键值对进行查询结果输出。
在本实施方式中,通过分析时间信息中包含的整点时间信息,就可以根据该整点时间信息以及键值对中存储的整点时间,快速查找到当前时间信息所包含的整点时间信息对应的所有属性值,无需用户按照每个属性值的采集时间逐一查询,极大地提高了数据查询效率。此外,在本实施方式中,当数据查询请求中的时间信息是包含一定时长的时段时,该时间信息的时长Duration≤N(hour),其中N是该时间信息包含的整点时间的个数。当Duration=N(hour)(例如:时间信息是12:00:00~13:59:59,N=2)时,可以直接根据时间信息中的整点时间信息以及键值对中存储的整点时间,快速查找到当前时间信息所包含的整点时间信息对应的所有属性值。当Duration<N(hour)(例如:时间信息是12:00:00~12:05:00,N=1)时,可以先根据时间信息中的整点时间信息以及键值对中存储的整点时间,快速查找到当前整点时间信息对应的所有属性值,然后再根据每个属性值各自对应的非整点时间就可以准确查找到该时间信息对应的属性值。具体而言,在一个实施方式中,当数据查询请求中的时间信息是包含一定时长的时段并且该时间信息的时长Duration<N(hour),或者数据查询请求中的时间信息是瞬时时间时,都可以按照以下步骤对预设键值对数据库中的键值对进行查询并输出查询结果:
步骤131:根据待查询关键字获取相应的待查询键值对。
在获取到待查询关键字后,就可以根据待查询关键字精准地从预设键值对数据库中查询到待查询关键字对应的键值对,即待查询键值对。
步骤132:获取待查询键值对中存储的整点时间,判断以该整点时间为时间起点且以下一个整点时间为时间终点的时间段是否完全落入时间信息指定的时间范围内。如果完全落入,则转至步骤133;如果没有完全落入,则转至步骤134。
一个例子:如果数据查询请求中的时间信息是2020年5月21日的12:00:00~12:05:00,那么获取到的待查询键值对中存储的整点时间是12:00:00,则可以判断12:00:00~13:00:00这一时间段是否完全落入上述时间信息指定的12:00:00~12:05:00这一时间范围内。
步骤133:如果步骤132判断出上述时间段完全落入了时间信息指定的时间范围内,则表明待查询键值对中存储的所有属性值都属于该时间信息对应的属性值,则可以将待查询键值对中的所有属性值作为查询结果进行输出。
一个例子:如果数据查询请求中的时间信息是2020年5月21日的12:00:00~13:00:00,那么获取到的待查询键值对中存储的整点时间是12:00:00并且可以判断出12:00:00~13:00:00这一时间段完全落入上述时间信息指定的时间范围内。因此,可以将该待查询键值对中存储的所有属性值进行输出。
步骤134:如果步骤132判断出上述时间段没有完全落入时间信息指定的时间范围内,则表明待查询键值对中存储的属性值中有一部分不属于该时间信息对应的属性值。此时,可以获取上述时间段与时间信息指定的时间范围的重叠时间段,该重叠时间段对应的属性值就是属于该时间信息对应的那一部分属性值。根据重叠时间段中的非整点时间以及待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。
一个例子:如果数据查询请求中的时间信息是2020年5月21日的12:00:00~12:05:00,那么获取到的待查询键值对中存储的整点时间是12:00:00并且可以判断12:00:00~13:00:00这一时间段没有完全落入上述时间信息指定的时间范围内。上述时间段与上述时间信息指定的时间范围的重叠时间段是12:00:00~12:05:00,在获取到重叠时间段后,可以根据待查询键值对中每个属性值各自对应的非整点时间,获取非整点时间落入重叠时间段内的属性值,这些属性值就是属于上述时间信息对应的那一部分属性值。
根据上述描述可知,无论数据查询请求中的时间信息是包含一定时长的时段还是瞬时时间,本发明实施例都能够根据键值对中关键字存储的整点时间以及键值中存储的非整点时间,快速查找到相应的数据,极大地提到了数据查询效率。
进一步,在本发明实施例中,当获取到待存储对象的原始对象数据之后,可以按照如下步骤将待存储对象的数据以键值对的形式存储至预设键值对数据库中,以便在根据上述步骤S101至步骤S103所述的数据查询方法从该预设键值对数据库中快速查找所需要的数据:
步骤21:获取待存储对象的原始对象数据。
在本实施例中待存储对象的原始对象数据可以包括对象标识、采集时间、一个或多个属性类型以及相应的属性值。对象标识指的是能够表示待存储对象具体是哪一个对象的唯一标识信息。属性类型指的是待存储对象的属性的类型信息,某个属性类型对应的属性值指的是该属性类型对应的具体数值。一个例子:如果待存储对象是动力电池,动力电池的属性类型可以包括荷电状态、电流、电压和温度等,相应的属性值可以是荷电状态的具体数值、电流值、电压值和温度值等。采集时间指的属性采集时间。
步骤22:以原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以属性类型对应的属性值以及采集时间中的非整点时间为键值的方式,形成待存储对象的键值对并且将键值对存储至预设键值对数据库。
一个实施方式中,可以按照如下步骤将原始对象数据以键值对的存储方式存储至预设键值对数据库中:
步骤221:以待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对。
在本实施方式中第一键值对的数据存储形式可以是:“对象标识+采集时间”:“属性类型:属性值”。
一个例子:如果原始对象数据是在某个时刻采集到的动力电池的荷电状态和电流,那么根据步骤221可以得到当前原始对象数据对应的第一键值对是:battery_id+sample_ts:{soc:90,current:20}。其中,“battery_id+sample_ts”是第一关键字,“{soc:90,current:20}”是第一键值,battery_id是对象标识,sample_ts是采集时间,soc是荷电状态且soc=90,current是电流且current=90。
步骤222:对于第一键值对中的每个属性类型,以第一键值对中的对象标识、采集时间以及当前属性类型为第二关键字并且以当前属性类型对应的属性值为第二键值的方式,形成第二键值对。
继续参阅步骤221中的例子,根据步骤222可以得到将上述第一键值对转换成如下两个第二键值对:
battery_id+sample_ts+soc:90
battery_id+sample_ts+current:20
其中,“battery_id+sample_ts+soc”和“battery_id+sample_ts+current”是第二关键字,“90”和“20”是第二键值。
步骤223:获取第二键值对中采集时间包含的整点时间和非整点时间,以第二键值对中的对象标识、属性类型和整点时间为第三关键字并且以第二键值对中的属性值和非整点时间为第三键值的方式,形成第三键值对。
继续参阅步骤222中的例子,假设采集时间sample_ts=2020-05-21 20:05:00 000,该采集时间中的整点时间是“2020-05-21 20:00:00”,非整点时间是“05:00 000”。根据步骤223可以将第二键值对转换为如下所示的第三键值对:
battery_id+2020-05-21 20:00:00+soc:05:00 000+90
battery_id+2020-05-21 20:00:00+current:05:00 000+20
步骤224:根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成待存储对象的键值对。
一个例子:如果原始对象数据是在2020年05月21日的20:05:00 000、20:10:00 000和20:15:00 000采集到的动力电池的荷电状态和电流,那么根据步骤221至步骤223可以得到如下所示的第三键值对:
battery_id+2020-05-21 20:00:00+soc:05:00 000+90
battery_id+2020-05-21 20:00:00+current:05:00 000+20
battery_id+2020-05-21 20:00:00+soc:10:00 000+90
battery_id+2020-05-21 20:00:00+current:10:00 000+20
battery_id+2020-05-21 20:00:00+soc:15:00 000+90
battery_id+2020-05-21 20:00:00+current:15:00 000+20
在根据第三关键字对上述第三键值对进行分类处理后,可以得到第三关键字“battery_id+2020-05-21 20:00:00+soc”对应的第三键值对包括:
battery_id+2020-05-21 20:00:00+soc:05:00 000+90
battery_id+2020-05-21 20:00:00+soc:10:00 000+90
battery_id+2020-05-21 20:00:00+soc:15:00 000+90
根据步骤224可以将这三个第三键值对转换成如下所示的最终形式的键值对:
battery_id+2020-05-21 20:00:00+soc:05:00 000+90+10:00 000+90+15:00 000+90。
其中,“battery_id+2020-05-21 20:00:00+soc”是关键字,“05:00 000+90+10:00 000+90+15:00 000+90”是键值。
通过上述步骤21至步骤22,可以将待存储对象的原始对象数据以键值对的形式存储至预设键值对数据库中,以便于在接收到数据查询请求后,根据数据查询请求中的时间信息可以快速查找到相应的数据,极大地提高数据查询效率。
需要指出的是,尽管上述实施例中将各个步骤按照特定的先后顺序进行了描述,但是本领域技术人员可以理解,为了实现本发明的效果,不同的步骤之间并非必须按照这样的顺序执行,其可以同时(并行)执行或以其他顺序执行,这些变化都在本发明的保护范围之内。
进一步,本发明还提供了一种数据查询装置。
参阅附图2,图2是根据本发明的一个实施例的数据查询装置的主要结构框图。如图2所示,本发明实施例中的数据查询装置主要包括数据接收模块11和数据查询模块12。在一些实施例中,数据接收模块11和数据查询模块12可以合并在一起成为一个模块。在一些实施例中,数据接收模块11可以被配置成接收数据查询请求;数据查询请求包括待查询对象的对象标识、属性类型以及时间信息。数据查询模块12可以被配置成根据数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果。其中,键值对可以包括关键字以及相应的键值,关键字可以包括对象标识、属性类型和整点时间,键值可以包括关键字中的属性类型对应的且采集时间中包含整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间。一个实施方式中,待查询对象是动力电池。一个实施方式中,具体实现功能的描述可以参见步骤S101至步骤S102所述。
在一个实施方式中,数据查询模块12可以包括时间分析子模块、第一数据查询子模块和第二数据查询子模块。时间分析子模块可以被配置成分析时间信息中包含的整点时间信息。第一数据查询子模块可以被配置成根据整点时间信息以及数据查询请求中的对象标识和属性类型,获取相应的待查询关键字。第二数据查询子模块可以被配置成根据待查询关键字对键值对进行查询并输出查询结果。一个实施方式中,具体实现功能的描述可以参见步骤S102所述。
在一个实施方式中,第二数据查询子模块可以被配置成执行以下操作:根据待查询关键字获取相应的待查询键值对;获取待查询键值对中存储的整点时间,判断以该整点时间为时间起点且以下一个整点时间为时间终点的时间段是否完全落入时间信息指定的时间范围内;若时间段完全落入时间范围内,则根据待查询键值对中的所有属性值输出查询结果;若时间段未完全落入时间范围内,则获取时间段与时间范围的重叠时间段,根据重叠时间段中的非整点时间以及待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。一个实施方式中,具体实现功能的描述可以参见步骤131至步骤134所述。
在一个实施方式中,数据查询装置还可以包括数据存储模块,数据存储模块可以包括数据获取子模块和数据存储子模块。数据获取子模块可以被配置成获取待存储对象的原始对象数据,原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值。数据存储子模块可以被配置成以原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以属性类型对应的属性值以及采集时间中的非整点时间为键值的方式,形成待存储对象的键值对并且 将键值对存储至预设键值对数据库。一个实施方式中,待存储对象是动力电池。一个实施方式中,具体实现功能的描述可以参见步骤21至步骤22所述。
在一个实施方式中,数据存储子模块可以被配置成执行以下操作:以待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对。对于第一键值对中的每个属性类型,以第一键值对中的对象标识、采集时间以及当前属性类型为第二关键字并且以当前属性类型对应的属性值为第二键值的方式,形成第二键值对。获取第二键值对中采集时间包含的整点时间和非整点时间,以第二键值对中的对象标识、属性类型和整点时间为第三关键字并且以第二键值对中的属性值和非整点时间为第三键值的方式,形成第三键值对。根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成待存储对象的键值对。一个实施方式中,具体实现功能的描述可以参见步骤221至步骤224所述。
上述数据查询装置以用于执行图1所示的数据查询方法实施例,两者的技术原理、所解决的技术问题及产生的技术效果相似,本技术领域技术人员可以清楚地了解到,为了描述的方便和简洁,数据查询装置的具体工作过程及有关说明,可以参考数据查询方法的实施例所描述的内容,此处不再赘述。
进一步,本发明还提供了一种数据处理系统。
在根据本发明的一个数据处理系统的实施例中,该数据处理系统可以包括数据采集装置、查询交互装置以及前述装置实施例所述的数据查询装置。在本实施例中,数据采集装置可以被配置成采集被存储对象的原始对象数据并且将原始对象数据发送至数据查询装置;原始对象数据可以包括对象标识、采集时间、一个或多个属性类型以及相应的属性值。查询交互装置可以被配置成接收数据查询请求并且将数据查询请求发送至数据查询装置;数据查询请求可以包括待查询对象的对象标识、属性类型以及时间信息。数据查询装置可以被配置成将数据采集装置发送的原始对象数据以键值对的形式存储至预设键值对数据库中,以及根据查询交互装置发送的数据查询请求从预设键值对数据库中查询相应的数据并将查询结果发送至查询交互装置进行输出显示。一个实施方式中,查询交互装置可以包括查询请求录入模块,以便用户通过该模块录入数据查询请求。进一步,查询交互装置还可以包括查询结果显示模块,该模块可以被配置成接收数据查询装置发送的查询结果并进 行显示输出,以便用户直观的查看到查询结果。在本实施例中,原始对象数据的存储方法以及数据查询方法均与前述装置实施例中数据查询装置所采用的方法相同,为了描述简洁,在此不再赘述。此外,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例装置部分。
本领域技术人员能够理解的是,本发明实现上述一实施例的方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器、随机存取存储器、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
进一步,本发明还提供了一种计算机可读存储介质。
在根据本发明的一个计算机可读存储介质的实施例中,计算机可读存储介质可以存储执行上述方法实施例的数据查询方法的程序,该程序可以由处理器加载并运行以实现上述数据查询方法。为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机可读存储介质可以是包括各种电子设备形成的存储装置设备,可选的,本发明实施例中存储是非暂时性的计算机可读存储介质。
进一步,本发明还提供了一种控制装置。
在根据本发明的一个控制装置实施例中,控制装置可以包括处理器和存储装置,存储装置可以被配置成存储执行上述方法实施例的数据查询方法的程序,处理器可以被配置成用于执行存储装置中的程序,该程序包括但不限于执行上述方法实施例的数据查询方法的程序。为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该控制装置可以是包括各种电子设备形成的控制装置设备。
进一步,应该理解的是,由于各个模块的设定仅仅是为了说明本发明的系统的功能单元,这些模块对应的物理器件可以是处理器本身,或者处理器中软 件的一部分,硬件的一部分,或者软件和硬件结合的一部分。因此,图中的各个模块的数量仅仅是示意性的。
本领域技术人员能够理解的是,可以对系统中的各个模块进行适应性地拆分或合并。对具体模块的这种拆分或合并并不会导致技术方案偏离本发明的原理,因此,拆分或合并之后的技术方案都将落入本发明的保护范围内。
至此,已经结合附图所示的一个实施方式描述了本发明的技术方案,但是,本领域技术人员容易理解的是,本发明的保护范围显然不局限于这些具体实施方式。在不偏离本发明的原理的前提下,本领域技术人员可以对相关技术特征作出等同的更改或替换,这些更改或替换之后的技术方案都将落入本发明的保护范围之内。
Claims (15)
- 一种数据查询方法,其特征在于,所述方法包括:接收数据查询请求;所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息;根据所述数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果;其中,所述键值对包括关键字以及相应的键值,所述关键字包括对象标识、属性类型和整点时间,所述键值包括相应关键字中的属性类型对应的且采集时间中包含所述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间。
- 根据权利要求1所述的数据查询方法,其特征在于,“根据所述数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果”的步骤具体包括:分析所述时间信息中包含的整点时间信息;根据所述整点时间信息以及所述数据查询请求中的对象标识和属性类型,获取相应的待查询关键字;根据所述待查询关键字对所述键值对进行查询并输出查询结果。
- 根据权利要求2所述的数据查询方法,其特征在于,“根据所述待查询关键字对所述键值对进行查询并输出查询结果”的步骤具体包括:根据所述待查询关键字获取相应的待查询键值对;获取所述待查询键值对中存储的整点时间,判断以所述整点时间为时间起点且以下一个整点时间为时间终点的时间段是否完全落入所述时间信息指定的时间范围内;若所述时间段完全落入所述时间范围内,则根据所述待查询键值对中的所有属性值输出查询结果;若所述时间段未完全落入所述时间范围内,则获取所述时间段与所述时间范围的重叠时间段,根据所述重叠时间段中的非整点时间以及所述待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。
- 根据权利要求1至3中任一项所述的数据查询方法,其特征在于,所述方法还包括:获取待存储对象的原始对象数据,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值;以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对并且将所述键值对存储至所述预设键值对数据库。
- 根据权利要求4所述的数据查询方法,其特征在于,“以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对”的步骤具体包括:以所述待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以所述当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对;对于所述第一键值对中的每个属性类型,以所述第一键值对中的对象标识、采集时间以及当前属性类型为第二关键字并且以所述当前属性类型对应的属性值为第二键值的方式,形成第二键值对;获取所述第二键值对中采集时间包含的整点时间和非整点时间,以所述第二键值对中的对象标识、属性类型和所述整点时间为第三关键字并且以所述第二键值对中的属性值和所述非整点时间为第三键值的方式,形成第三键值对;根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成所述待存储对象的键值对。
- 根据权利要求4所述的数据查询方法,其特征在于,所述待查询对象和所述待存储对象是动力电池。
- 一种数据查询装置,其特征在于,所述装置包括:数据接收模块,其被配置成接收数据查询请求;所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息;数据查询模块,其被配置成根据所述数据查询请求对预设键值对数据库中存储的键值对进行查询并输出查询结果;其中,所述键值对包括关键字以及相应的键值,所述关键字包括对象标识、属性类型和整点时间,所述键值包括相应关键字中的属性类型对应的且采集时间中包含所述整点时间的属性值以及每个属性值各自对应的采集时间中的非整点时间。
- 根据权利要求7所述的数据查询装置,其特征在于,所述数据查询模块包括时间分析子模块、第一数据查询子模块和第二数据查询子模块;所述时间分析子模块被配置成分析所述时间信息中包含的整点时间信息;所述第一数据查询子模块被配置成根据所述整点时间信息以及所述数据查询请求中的对象标识和属性类型,获取相应的待查询关键字;所述第二数据查询子模块被配置成根据所述待查询关键字对所述键值对进行查询并输出查询结果。
- 根据权利要求8所述的数据查询装置,其特征在于,还包括:所述第二数据查询子模块被配置成执行以下操作:根据所述待查询关键字获取相应的待查询键值对;获取所述待查询键值对中存储的整点时间,判断以所述整点时间为时间起点且以下一个整点时间为时间终点的时间段是否完全落入所述时间信息指定的时间范围内;若所述时间段完全落入所述时间范围内,则根据所述待查询键值对中的所有属性值输出查询结果;若所述时间段未完全落入所述时间范围内,则获取所述时间段与所述时间范围的重叠时间段,根据所述重叠时间段中的非整点时间以及所述待查询键值对中每个属性值各自对应的非整点时间,获取相应的属性值并且根据获取到的属性值输出查询结果。
- 根据权利要求7至9中任一项所述的数据查询装置,其特征在于,所述装置还包括数据存储模块,所述数据存储模块包括数据获取子模块和数据存储子模块;所述数据获取子模块被配置成获取待存储对象的原始对象数据,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值;所述数据存储子模块被配置成以所述原始对象数据中的对象标识、属性类型以及采集时间中的整点时间为关键字并且以所述属性类型对应的属性值以及所述采集时间中的非整点时间为键值的方式,形成所述待存储对象的键值对并且将所述键值对存储至所述预设键值对数据库。
- 根据权利要求10所述的数据查询装置,其特征在于,还包括:所述数据存储子模块被配置成执行以下操作:以所述待存储对象的当前原始对象数据中的对象标识和采集时间为第一关键字并且以所述当前原始对象数据中的所有属性类型以及相应的属性值为第一键值的方式,形成第一键值对;对于所述第一键值对中的每个属性类型,以所述第一键值对中的对象标识、采集时间以及当前属性类型为第二关键字并且以所述当前属性类型对应的属性值为第二键值的方式,形成第二键值对;获取所述第二键值对中采集时间包含的整点时间和非整点时间,以所述第二键值对中的对象标识、属性类型和所述整点时间为第三关键字并且以所述第二键值对中的属性值和所述非整点时间为第三键值的方式,形成第三键值对;根据第三关键字对第三键值对进行分类处理,得到每类第三关键字各自对应的所有第三键值对;将每类第三关键字各自对应的所有第三键值对中的第三键值进行拼接处理,以每类第三关键字为最终关键字并且以每类第三关键字各自对应的拼接处理结果为最终键值的方式,形成所述待存储对象的键值对。
- 根据权利要求10所述的数据查询装置,其特征在于,所述待查询对象和所述待存储对象是动力电池。
- 一种数据处理系统,其特征在于,所述系统包括数据采集装置、查询交互装置以及权利要求1至6中任一项所述的数据查询装置;所述数据采集装置被配置成采集被存储对象的原始对象数据并且将所述原始对象数据发送至所述数据查询装置;所述查询交互装置被配置成接收数据查询请求并且将所述数据查询请求发送至所述数据查询装置;所述数据查询装置被配置成将所述数据采集装置发送的原始对象数据以键值对的形式存储至预设键值对数据库中,以及根据查询交互装置发送的数据查询请求从所述预设键值对数据库中查询相应的数据并且将查询结果发送至所述查询交互装置进行输出显示;其中,所述原始对象数据包括对象标识、采集时间、一个或多个属性类型以及相应的属性值,所述数据查询请求包括待查询对象的对象标识、属性类型以及时间信息。
- 一种计算机可读存储介质,其中存储有多条程序代码,其特征在于,所述程序代码适于由处理器加载并运行以执行权利要求1至6中任一项所述的数据查询方法。
- 一种控制装置,包括处理器和存储装置,所述存储装置适于存储多条程序代码,其特征在于,所述程序代码适于由所述处理器加载并运行以执行权利要求1至6中任一项所述的数据查询方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011078972.4A CN112307051B (zh) | 2020-10-10 | 2020-10-10 | 数据查询方法、装置、介质以及数据处理系统 |
| CN202011078972.4 | 2020-10-10 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2022073298A1 true WO2022073298A1 (zh) | 2022-04-14 |
| WO2022073298A9 WO2022073298A9 (zh) | 2022-09-15 |
Family
ID=74489551
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/136165 Ceased WO2022073298A1 (zh) | 2020-10-10 | 2020-12-14 | 数据查询方法、装置、介质以及数据处理系统 |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN112307051B (zh) |
| TW (1) | TW202215266A (zh) |
| WO (1) | WO2022073298A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116449047A (zh) * | 2023-02-10 | 2023-07-18 | 中远海运科技股份有限公司 | 一种航速指数计算方法及系统 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7795104B2 (ja) * | 2022-07-13 | 2026-01-07 | 富士通株式会社 | エントリ作成方法およびエントリ作成プログラム |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577456A (zh) * | 2012-07-31 | 2014-02-12 | 国际商业机器公司 | 用于处理时序数据的方法和装置 |
| CN106648446A (zh) * | 2015-10-30 | 2017-05-10 | 阿里巴巴集团控股有限公司 | 一种用于时序数据的存储方法、装置及电子设备 |
| CN108256088A (zh) * | 2018-01-23 | 2018-07-06 | 清华大学 | 一种基于键值数据库的时序数据的存储方法及系统 |
| WO2018132104A1 (en) * | 2017-01-12 | 2018-07-19 | Innovationdock, Inc. | Devices and methods for implementing dynamic collaborative workflow systems |
| CN111581220A (zh) * | 2020-05-28 | 2020-08-25 | 泰康保险集团股份有限公司 | 用于时间序列数据的存储及检索方法、装置、设备及存储介质 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101710321A (zh) * | 2009-10-28 | 2010-05-19 | 金蝶软件(中国)有限公司 | 数据库日期查询方法及装置、数据库 |
| CN102663030B (zh) * | 2011-12-15 | 2013-12-04 | 清华大学 | 一种区间持久性top-k查询的双哈希表关联检索方法 |
| CN106202092B (zh) * | 2015-05-04 | 2020-03-06 | 阿里巴巴集团控股有限公司 | 数据处理的方法及系统 |
| CN108734876B (zh) * | 2017-04-13 | 2020-12-15 | 宁波轩悦行电动汽车服务有限公司 | 一种基于预估电量和等待时间的后台预约租车方法 |
| WO2020036984A1 (en) * | 2018-08-14 | 2020-02-20 | Batterycheck Llc | Power cell tracking and optimization system |
| US11068491B2 (en) * | 2018-11-28 | 2021-07-20 | The Toronto-Dominion Bank | Data storage using a bi-temporal index |
| CN110688362A (zh) * | 2019-08-27 | 2020-01-14 | 浙江浙大中控信息技术有限公司 | 基于时间戳的数据分段式存储方法 |
-
2020
- 2020-10-10 CN CN202011078972.4A patent/CN112307051B/zh active Active
- 2020-12-14 WO PCT/CN2020/136165 patent/WO2022073298A1/zh not_active Ceased
-
2021
- 2021-03-24 TW TW110110521A patent/TW202215266A/zh unknown
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577456A (zh) * | 2012-07-31 | 2014-02-12 | 国际商业机器公司 | 用于处理时序数据的方法和装置 |
| CN106648446A (zh) * | 2015-10-30 | 2017-05-10 | 阿里巴巴集团控股有限公司 | 一种用于时序数据的存储方法、装置及电子设备 |
| WO2018132104A1 (en) * | 2017-01-12 | 2018-07-19 | Innovationdock, Inc. | Devices and methods for implementing dynamic collaborative workflow systems |
| CN108256088A (zh) * | 2018-01-23 | 2018-07-06 | 清华大学 | 一种基于键值数据库的时序数据的存储方法及系统 |
| CN111581220A (zh) * | 2020-05-28 | 2020-08-25 | 泰康保险集团股份有限公司 | 用于时间序列数据的存储及检索方法、装置、设备及存储介质 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116449047A (zh) * | 2023-02-10 | 2023-07-18 | 中远海运科技股份有限公司 | 一种航速指数计算方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202215266A (zh) | 2022-04-16 |
| WO2022073298A9 (zh) | 2022-09-15 |
| CN112307051A (zh) | 2021-02-02 |
| CN112307051B (zh) | 2024-11-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023159638A1 (zh) | 电池故障检测系统、方法和设备 | |
| CN114139209B (zh) | 一种应用于业务用户大数据的信息防窃取方法及系统 | |
| WO2022073298A1 (zh) | 数据查询方法、装置、介质以及数据处理系统 | |
| US10133779B2 (en) | Query hint management for a database management system | |
| CN112744115A (zh) | 电动汽车的信息处理方法、装置及系统、处理器 | |
| CN114116253A (zh) | 一种消息队列的消息处理方法及系统 | |
| CN112232290A (zh) | 数据聚类方法、服务器、系统以及计算机可读存储介质 | |
| US20150074085A1 (en) | Associative search systems and methods | |
| CN120670398A (zh) | 日志的处理方法、装置、电子设备以及计算机程序产品 | |
| CN104158266A (zh) | 一种车载电池管理系统 | |
| CN110704094A (zh) | 代码统计方法以及装置 | |
| CN113868141A (zh) | 数据测试方法、装置、电子设备及存储介质 | |
| CN112463527A (zh) | 一种数据处理方法、装置、设备、系统及存储介质 | |
| CN114036179B (zh) | 慢查询操作的处理方法及装置 | |
| CN120703605A (zh) | 一种储能电池安全监测方法及系统 | |
| HK40043755A (zh) | 数据查询方法、装置、介质以及数据处理系统 | |
| CN116298923B (zh) | 电池容量评估方法、装置、电子设备及存储介质 | |
| CN112731160A (zh) | 电池滞回模型训练方法、估算电池soc的方法和装置 | |
| CN116955322B (zh) | 存储程序的性能对比方法及其装置、电子设备及存储介质 | |
| CN117874033A (zh) | 数据库分表方法、装置、电子设备及存储介质 | |
| CN114035073B (zh) | 一种电池的一致性评估方法、装置及设备 | |
| CN114742156A (zh) | 选择算法特征的方法、装置、电子设备和存储介质 | |
| CN111632384B (zh) | 游戏在线数检测方法、装置、设备及存储介质 | |
| CN117081666A (zh) | 故障预测方法、装置、电子设备、存储介质及程序产品 | |
| CN117708245A (zh) | 基于数据仓库的数据处理方法、装置、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20956613 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20956613 Country of ref document: EP Kind code of ref document: A1 |