WO2020077563A1 - Data storage method and apparatus, and electronic device and computer readable storage medium - Google Patents

Data storage method and apparatus, and electronic device and computer readable storage medium Download PDF

Info

Publication number
WO2020077563A1
WO2020077563A1 PCT/CN2018/110652 CN2018110652W WO2020077563A1 WO 2020077563 A1 WO2020077563 A1 WO 2020077563A1 CN 2018110652 W CN2018110652 W CN 2018110652W WO 2020077563 A1 WO2020077563 A1 WO 2020077563A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
stored
storage
condition
preset
Prior art date
Application number
PCT/CN2018/110652
Other languages
French (fr)
Chinese (zh)
Inventor
郭昌飞
白涛
尚俊宏
Original Assignee
北京比特大陆科技有限公司
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 北京比特大陆科技有限公司 filed Critical 北京比特大陆科技有限公司
Priority to PCT/CN2018/110652 priority Critical patent/WO2020077563A1/en
Priority to CN201880002365.4A priority patent/CN109564567B/en
Publication of WO2020077563A1 publication Critical patent/WO2020077563A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Definitions

  • Embodiments of the present invention relate to the field of data storage technology, and in particular, to a data storage method, device, electronic device, and computer-readable storage medium.
  • Embodiments of the present invention provide a data storage method, device, electronic device, and computer-readable storage medium.
  • an embodiment of the present invention provides a data storage method.
  • the data storage method includes:
  • Obtaining a data package to be stored wherein the data package to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • the data storage rule to be stored includes a sub-rule of the data source to be stored and a sub-rule of the data storage database ;
  • the determining the data storage rule to be stored according to the data source information and the data target database information of the data to be stored includes:
  • the sub-rule of the data storage database to be stored is determined according to the category of the target database of the data to be stored.
  • the storing the data to be stored according to the data storage rule to be stored include:
  • the data source sub-rule for storing data to be stored includes: One or more of the following rules: data quality meets preset quality conditions, storage time interval meets preset interval conditions; and / or,
  • the sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
  • the storing the data to be stored according to the data storage rule to be stored includes:
  • the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
  • the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
  • the data to be stored is stored in the target database.
  • the present disclosure is in the first
  • the method further includes:
  • the method before storing the data to be stored according to the data storage rule to be stored, the method further includes:
  • a data storage device is provided in an embodiment of the present invention.
  • the data storage device includes:
  • the obtaining module is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • the determining module is configured to determine the data storage rule to be stored based on the data source information of the data to be stored and the data target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data Storage data storage database sub-rules;
  • the storage module is configured to store the data to be stored according to the data storage rule to be stored.
  • the determination module includes:
  • the first determining submodule is configured to determine the data source category of the data to be stored according to the data source information of the data to be stored;
  • a second determining sub-module configured to determine the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
  • the third determining submodule is configured to determine the category of the data target database to be stored based on the data target database information to be stored;
  • the fourth determination submodule is configured to determine the sub-rule of the data storage database to be stored according to the category of the target database of the data to be stored.
  • the storage module includes:
  • a judgment sub-module configured to judge whether the data to be stored conforms to the data storage rule to be stored
  • the storage submodule is configured to store the data to be stored that meets the data storage rule to be stored in the target database.
  • the data source sub-rule for storing data to be stored includes: One or more of the following rules: data quality meets preset quality conditions, storage time interval meets preset interval conditions; and / or,
  • the sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
  • the storage module is configured to:
  • the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
  • the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
  • the data to be stored is stored in the target database.
  • the storage module is further configured to:
  • the attribute information of the data to be stored is acquired, and when the data to be stored When the attribute information of meets the video storage condition, request to obtain video data related to the data to be stored and store it.
  • the sixth implementation of the second aspect of the present disclosure further includes:
  • the preprocessing module is configured to preprocess the data to be stored.
  • an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions that support a data storage device to perform the data storage method in the first aspect described above.
  • the processor is configured to execute computer instructions stored in the memory.
  • the data storage device may further include a communication interface for the data storage device to communicate with other devices or communication networks.
  • an embodiment of the present invention provides a computer-readable storage medium for storing computer instructions used by a data storage device, which includes a computer involved in performing the data storage method in the first aspect described above as a data storage device instruction.
  • the above technical solution realizes the hierarchical storage of the data to be stored by separately setting the hierarchical storage rules of the data source and the hierarchical storage rules of the target database.
  • the technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
  • FIG. 1 shows a flowchart of a data storage method according to an embodiment of the present invention
  • FIG. 2 shows a flowchart of step S102 of the data storage method according to the embodiment shown in FIG. 1;
  • FIG. 3 shows a flowchart of step S103 of the data storage method according to the embodiment shown in FIG. 1;
  • step S103 of a data storage method shows a flowchart of step S103 of a data storage method according to another embodiment of the present invention.
  • FIG. 5 shows a flowchart of a data storage method according to another embodiment of the present invention.
  • FIG. 6 shows a structural block diagram of a data storage device according to an embodiment of the present invention.
  • FIG. 7 shows a structural block diagram of the determination module 602 of the data storage device according to the embodiment shown in FIG. 6;
  • FIG. 8 shows a structural block diagram of a storage module 603 of the data storage device according to the embodiment shown in FIG. 6;
  • FIG. 9 shows a structural block diagram of a data storage device according to another embodiment of the present invention.
  • FIG. 10 shows a structural block diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a computer system suitable for implementing a data storage method according to an embodiment of the present invention.
  • the technical solution provided by the embodiment of the present invention realizes the hierarchical storage of the data to be stored by separately setting the hierarchical storage rules of the data source and the hierarchical storage rules of the target database.
  • the technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
  • FIG. 1 shows a flowchart of a data storage method according to an embodiment of the present invention. As shown in FIG. 1, the data storage method includes the following steps S101-S103:
  • step S101 obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • a data storage rule to be stored is determined according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data to be stored Data storage database sub-rules;
  • step S103 the data to be stored is stored according to the data storage rule to be stored.
  • a data storage method which implements hierarchical storage of data to be stored by separately setting data source hierarchical storage rules and target database hierarchical storage rules.
  • the technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
  • the data packet to be stored may be a data packet of any form, any type, and any size.
  • the following uses the monitoring data as an example to explain and explain the present invention.
  • the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored.
  • the data source information of the data to be stored refers to the information of the data source to obtain the data to be stored.
  • the corresponding data source information refers to the collection Information of the camera of the video monitoring data.
  • the data source information of the data to be stored may include the level or category information of the data source, that is, the data source may be graded or classified according to preset rules in advance, and then the data Source level or category information is carried in the data source information and sent.
  • the cameras can be ranked or classified according to factors such as the purpose of their settings, geographic location, human traffic in the geographic location, frequency of historical events in the geographic location, and so on.
  • the cameras are divided into levels 1-4, of which level 1 indicates normal locations, level 2 indicates crowded locations, level 3 indicates locations where accidents occur frequently, and level 4 indicates key monitoring locations.
  • the target database information of the data to be stored refers to the information of the database storing the data to be stored.
  • the target database information of the data to be stored may be preset according to the attribute information of the data to be stored, and the target database The information is carried in the data source information and sent, wherein the attribute information of the data to be stored includes one or more of the following information: education level, religious belief, birthplace, historical crime information, whether it is involved in drugs, whether it is at large , Whether it involves independence or terrorism, etc.
  • the target database information of the data to be stored may include the level or category information of the target database, that is, the database used to store the data may be hierarchically or in accordance with preset rules Classification, for example, for a database that stores monitoring personnel, the database can be classified or classified according to the nature of the monitoring personnel.
  • the database can be divided into 1-5 levels, where level 1 represents the ordinary personnel database and level 2 represents the focus on personnel Database, level 3 means a database with criminal records, level 4 means a database of ordinary fugitives, and level 5 means a database of high-risk terrorists.
  • the step S102 is the step of determining the data storage rule to be stored based on the data source information of the data to be stored and the target database information of the data to be stored, It includes the following steps S201-S204:
  • step S201 the data source category of the data to be stored is determined according to the data source information of the data to be stored
  • step S202 the sub-rule of the data source of the data to be stored is determined according to the type of the data source of the data to be stored;
  • step S203 the category of the target database of the data to be stored is determined according to the target database information of the data to be stored;
  • step S204 the sub-rule of the data storage database to be stored is determined according to the category of the target database of the data to be stored.
  • different storage rules are determined according to the level or category information of the data source and target database. Specifically, the data source category of the data to be stored is determined according to the data source information of the data to be stored; then the sub-rule of the data source of the data to be stored is determined according to the data source category of the data to be stored; The data target database information to be stored determines the category of the data target database to be stored; and then determines the sub-rule of the data storage database to be stored according to the category of the data target database to be stored.
  • the step S103 that is, the step of storing the data to be stored according to the data storage rule to be stored, includes the following steps S301-S302:
  • step S301 determine whether the data to be stored conforms to the data storage rule to be stored
  • step S302 data to be stored that meets the data storage rule to be stored is stored in the target database.
  • the data to be stored and the determined storage rules are compared and judged one by one, and the data that meets the storage rules is stored in the target database in.
  • the sub-rules for storing data sources of data to be stored may include one or more of the following rules: data quality meets preset quality conditions, and storage time interval meets Preset interval conditions.
  • the preset quality condition is a requirement for data quality, such as whether a certain monitoring image is clear, whether the resolution of a certain monitoring image meets the resolution requirements, whether there are too many noise points in a certain monitoring image, a certain 1. Monitor the image for missing pixels and so on.
  • the preset interval condition is a requirement for the data storage interval, which is to improve the effectiveness of the data to be stored and avoid excessive repetition of information, for example, to determine whether the time interval between adjacent data to be stored is greater than A time interval threshold and so on.
  • the sub-rules of the data storage database to be stored may include one or more of the following rules: data similarity meets a preset similarity condition, and data size meets Preset size conditions, video storage conditions.
  • the preset similarity condition is a requirement for the similarity between the stored data and the target database data, and the data to be stored that meets the similarity condition is considered to be similar to the data in the target database. Data stored in the target database, otherwise it cannot be stored in the database.
  • the preset size condition refers to a requirement for the size of the data to be stored. If the data to be stored is too large, the key data in the data to be stored can be extracted for storage, and other unimportant ones are discarded. data.
  • the video storage condition refers to a requirement on whether to acquire and store video data related to the stored data. For example, if the data to be stored is a person who needs to be focused on, you can request to acquire and store and Video data of the preset time point and preset time length related to the person, so as to be further viewed later.
  • the specific sub-rules for the data source to be stored and the sub-rules for the database to be stored are related to the levels or categories of the data source and target database, that is, the levels or categories of the data source and target database are different.
  • the content or parameters of the data source sub-rules of the data storage to be stored and the sub-rules of the data storage database to be stored are also different, so as to truly achieve hierarchical storage of data.
  • the correspondence between the sub-rules of the data source of the data to be stored and the sub-rules of the database of the data to be stored and the levels or categories of the data source and the target database can be pre-stored in the memory or database to facilitate the content of specific rules Query and confirm.
  • those skilled in the art can set and adjust the specific content of the rules according to the needs of the actual application and the characteristics of the data to be stored, the data source and the database. The above are all exemplary descriptions and cannot be understood as Limitation of the invention.
  • the step S103 that is, the step of storing the data to be stored according to the data storage rule to be stored, includes the following steps S401-S405 :
  • step S401 it is determined whether the quality of the data to be stored meets the preset quality condition, and when the quality of the data to be stored does not satisfy the preset quality condition, the data to be stored is discarded;
  • step S402 when the quality of the data to be stored satisfies the preset quality condition, it is determined whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when When the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, a new database is created, and the data to be stored is stored in the newly created database;
  • step S403 when the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, And when the storage time interval of the data to be stored does not satisfy the preset interval condition, discard the data to be stored;
  • step S404 when the storage time interval of the data to be stored meets the preset interval condition, it is determined whether the data size of the data to be stored meets the preset size condition, and when the data to be stored When the data size does not satisfy the preset size condition, store part of the data to be stored in the target database;
  • step S405 when the data size of the data to be stored satisfies the preset size condition, the data to be stored is stored in the target database.
  • This embodiment takes monitoring data as an example, and describes in detail the steps for storing the data to be stored according to the data storage rule of the data to be stored. Specifically, first determine whether the quality of the data to be stored meets the preset quality condition, if the quality of the data to be stored does not meet the preset quality condition, it may be considered that the data to be stored has no stored value, To save storage resources, you can directly discard it; if the quality of the data to be stored meets the preset quality condition, continue to determine whether the similarity between the data to be stored and the target database meets the A preset similarity condition, if the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, it may be considered that there is no similarity to the data in the target database, or The target database does not store historical data of the monitoring object involved in the data to be stored, a new database may be created, and the data to be stored may be stored in the newly created database; if the data to be stored and the target The similarity between the databases meets the preset similarity
  • step S405 that is, when the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
  • the preset time point and preset time length can be set according to actual application needs, for example, the preset time point can be set as the generation time of the data to be stored, and the preset time length can be set as 2 minutes.
  • the step S103 that is, before the step of storing the data to be stored according to the data storage rule to be stored, further includes preprocessing the data to be stored Steps, as shown in FIG. 5, the method includes the following steps S501-S504:
  • step S501 a data package to be stored is obtained, wherein the data package to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • a data storage rule to be stored is determined according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data to be stored Data storage database sub-rules;
  • step S503 pre-process the data to be stored
  • step S504 the data to be stored is stored according to the data storage rule to be stored.
  • the preprocessing may include one or more of the following processes: deduplication processing, denoising processing, compression processing, and so on.
  • the data to be stored is also subjected to deduplication processing, denoising processing, and / or Pre-processing such as compression processing.
  • the following is an embodiment of the device of the present invention, which can be used to execute the method embodiment of the present invention.
  • FIG. 6 shows a structural block diagram of a data storage device according to an embodiment of the present invention.
  • the device may be implemented as part or all of an electronic device through software, hardware, or a combination of both.
  • the data storage device includes:
  • the obtaining module 601 is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • the determining module 602 is configured to determine a data storage rule to be stored based on the data source information of the data to be stored and the data target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule for data source to be stored and Sub-rules of the data storage database to be stored;
  • the storage module 603 is configured to store the data to be stored according to the data storage rule to be stored.
  • a data storage device which implements hierarchical storage of data to be stored by setting data source hierarchical storage rules and target database hierarchical storage rules, respectively.
  • the technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
  • the data packet to be stored may be a data packet of any form, any type, and any size.
  • the following uses the monitoring data as an example to explain and explain the present invention.
  • the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored.
  • the data source information of the data to be stored refers to the information of the data source to obtain the data to be stored.
  • the corresponding data source information refers to the collection Information of the camera of the video monitoring data.
  • the data source information of the data to be stored may include the level or category information of the data source, that is, the data source may be graded or classified according to preset rules in advance, and then the data Source level or category information is carried in the data source information and sent.
  • the cameras can be ranked or classified according to factors such as the purpose of their settings, geographic location, human traffic in the geographic location, frequency of historical events in the geographic location, and so on.
  • the cameras are divided into levels 1-4, of which level 1 indicates normal locations, level 2 indicates crowded locations, level 3 indicates locations where accidents occur frequently, and level 4 indicates key monitoring locations.
  • the target database information of the data to be stored refers to the information of the database storing the data to be stored.
  • the target database information of the data to be stored may be preset according to the attribute information of the data to be stored, and the target database The information is carried in the data source information and sent, wherein the attribute information of the data to be stored includes one or more of the following information: education level, religious belief, birthplace, historical crime information, whether it is involved in drugs, whether it is at large , Whether it involves independence or terrorism, etc.
  • the target database information of the data to be stored may include the level or category information of the target database, that is, the database used to store the data may be hierarchically or in accordance with preset rules Classification, for example, for a database that stores monitoring personnel, the database can be classified or classified according to the nature of the monitoring personnel.
  • the database can be divided into 1-5 levels, where level 1 represents the ordinary personnel database and level 2 represents the focus on personnel Database, level 3 means a database with criminal records, level 4 means a database of ordinary fugitives, and level 5 means a database of high-risk terrorists.
  • the determination module 602 includes:
  • the first determining submodule 701 is configured to determine the data source category of the data to be stored according to the data source information of the data to be stored;
  • the second determining sub-module 702 is configured to determine the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
  • the third determining submodule 703 is configured to determine the category of the data target database to be stored according to the data target database information to be stored;
  • the fourth determination sub-module 704 is configured to determine the sub-rule of the data storage database to be stored according to the category of the target database of the data to be stored.
  • the first determining submodule 701 determines the data source category of the data to be stored according to the data source information of the data to be stored; the second determining submodule 702 determines the data source category according to the data source category of the data to be stored Stored data storage data source sub-rules; third determination sub-module 703 determines the category of the data-to-be-stored data target database according to the data-to-be-stored data target database information; fourth determination sub-module 704 according to the type of the data-to-be-stored target database Determine the sub-rule of the data storage database to be stored.
  • the storage module 603 includes:
  • the judgment sub-module 801 is configured to judge whether the data to be stored conforms to the data storage rule to be stored
  • the storage submodule 802 is configured to store the data to be stored that meets the data storage rule to be stored in the target database.
  • the judgment sub-module 801 compares and judges the data to be stored with the determined storage rule one by one, and the storage sub-module 802 will conform to the storage
  • the rule data is stored in the target database.
  • the sub-rules for storing data sources of data to be stored may include one or more of the following rules: data quality meets preset quality conditions, and storage time interval meets Preset interval conditions.
  • the preset quality condition is a requirement for data quality, such as whether a certain monitoring image is clear, whether the resolution of a certain monitoring image meets the resolution requirements, whether there are too many noise points in a certain monitoring image, a certain 1. Monitor the image for missing pixels and so on.
  • the preset interval condition is a requirement for the data storage interval, which is to improve the effectiveness of the data to be stored and avoid excessive repetition of information, for example, to determine whether the time interval between adjacent data to be stored is greater than A time interval threshold and so on.
  • the sub-rules of the data storage database to be stored may include one or more of the following rules: data similarity meets a preset similarity condition, and data size meets Preset size conditions, video storage conditions.
  • the preset similarity condition is a requirement for the similarity between the stored data and the target database data, and the data to be stored that meets the similarity condition is considered to be similar to the data in the target database. Data stored in the target database, otherwise it cannot be stored in the database.
  • the preset size condition refers to a requirement for the size of the data to be stored. If the data to be stored is too large, the key data in the data to be stored can be extracted for storage, and other unimportant ones are discarded. data.
  • the video storage condition refers to a requirement on whether to acquire and store video data related to the stored data. For example, if the data to be stored is a person who needs to be focused on, you can request to acquire and store and Video data of the preset time point and preset time length related to the person, so as to be further viewed later.
  • the specific sub-rules for the data source to be stored and the sub-rules for the database to be stored are related to the levels or categories of the data source and target database, that is, the levels or categories of the data source and target database are different.
  • the content or parameters of the data source sub-rules of the data storage to be stored and the sub-rules of the data storage database to be stored are also different, so as to truly achieve hierarchical storage of data.
  • the correspondence between the sub-rules of the data source of the data to be stored and the sub-rules of the database of the data to be stored and the levels or categories of the data source and the target database can be pre-stored in the memory or database to facilitate the content of specific rules Query and confirm.
  • those skilled in the art can set and adjust the specific content of the rules according to the needs of the actual application and the characteristics of the data to be stored, the data source and the database. The above are all exemplary descriptions and cannot be understood as Limitation of the invention.
  • the storage module 603 is configured to:
  • the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
  • the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
  • the data to be stored is stored in the target database.
  • This embodiment takes monitoring data as an example to describe the operation flow of the storage module 603 in detail. Specifically, first determine whether the quality of the data to be stored meets the preset quality condition, if the quality of the data to be stored does not meet the preset quality condition, it may be considered that the data to be stored has no stored value, To save storage resources, you can directly discard it; if the quality of the data to be stored meets the preset quality condition, continue to determine whether the similarity between the data to be stored and the target database meets the A preset similarity condition, if the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, it may be considered that there is no similarity to the data in the target database, or The target database does not store historical data of the monitoring object involved in the data to be stored, a new database may be created, and the data to be stored may be stored in the newly created database; if the data to be stored and the target The similarity between the databases meets the preset similarity condition, and the data to be stored is considered to be similar to
  • the storage module is further configured to: when the data size of the data to be stored meets the preset size condition, store the data to be stored in the target After the database, the attribute information of the data to be stored is obtained, and when the attribute information of the data to be stored meets the video storage condition, the video data related to the data to be stored is requested to be obtained and stored.
  • the preset time point and preset time length can be set according to actual application needs, for example, the preset time point can be set as the generation time of the data to be stored, and the preset time length can be set as 2 minutes.
  • the device further includes a part for preprocessing the data to be stored, that is, as shown in FIG. 9, the device includes:
  • the obtaining module 901 is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
  • the determining module 902 is configured to determine a data storage rule to be stored based on the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and Sub-rules of the data storage database to be stored;
  • the preprocessing module 903 is configured to preprocess the data to be stored
  • the storage module 904 is configured to store the data to be stored according to the data storage rule to be stored.
  • the preprocessing may include one or more of the following processes: deduplication processing, denoising processing, compression processing, and so on.
  • the data to be stored is also subjected to deduplication processing, denoising processing, and / or Pre-processing such as compression processing.
  • an amusement park with 100 channels of surveillance video deployed requires real-time face analysis of the 100 channels of video. Assuming that only one person is captured by each camera at the same time, then the storage solution according to the prior art In a year, tens of billions of data will be generated and stored. Even after tracking and deduplication, it will generate billions of data, with a total data size of 1000T. If the hierarchical storage technology solution proposed by the present invention is adopted, it is assumed that the following settings are made: the same person passes the same camera within 10 minutes and only calculates the frequency and does not store the data; when the data to be stored involves fugitives and criminals, video acquisition and Storage; implement key monitoring on 10 of them.
  • 100-channel video will only produce about 50T of data a year, that is, the amount of processed data is compressed by 20 times. It can be seen that the technical solution of the present invention can achieve effective storage of data, improve data quality, greatly improve the utilization rate of storage resources, and save storage resources.
  • FIG. 10 shows a structural block diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device 1000 includes a memory 1001 and a processor 1002;
  • the memory 1001 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1002 to implement any of the above method steps.
  • FIG. 11 is a schematic structural diagram of a computer system suitable for implementing a data storage method according to an embodiment of the present invention.
  • the computer system 1100 includes a central processing unit (CPU) 1101 that can be loaded into a random access memory (RAM) 1103 according to a program stored in a read-only memory (ROM) 1102 or from a storage section 1108 Instead, various processes in the above-described embodiment are executed.
  • RAM random access memory
  • ROM read-only memory
  • various programs and data necessary for the operation of the system 1100 are also stored.
  • the CPU 1101, ROM 1102, and RAM 1103 are connected to each other through a bus 1104.
  • An input / output (I / O) interface 1105 is also connected to the bus 1104.
  • the following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc .; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 1108 including a hard disk, etc. ; And a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet.
  • the driver 1110 is also connected to the I / O interface 1105 as necessary.
  • a removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as necessary, so that the computer program read out therefrom is installed into the storage portion 1108 as needed.
  • the method described above may be implemented as a computer software program.
  • embodiments of the present invention include a computer program product that includes a computer program tangibly contained on a readable medium thereof, the computer program containing program code for performing the data storage method.
  • the computer program may be downloaded and installed from the network through the communication section 1109, and / or installed from the removable medium 1111.
  • each block in the road map or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of the code contains one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession can actually be executed in parallel, and sometimes they can also be executed in reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
  • the units or modules described in the embodiments of the present invention may be implemented in software or hardware.
  • the described units or modules may also be provided in the processor, and the names of these units or modules in some cases do not constitute a limitation on the units or modules themselves.
  • an embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the device described in the foregoing embodiments; or may exist alone , A computer-readable storage medium that is not installed in the device.
  • the computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in the embodiments of the present invention.

Abstract

A data storage method and apparatus, and an electronic device and a computer readable storage medium. The method comprises: obtaining a data packet to be stored (S101), wherein said data packet comprises data to be stored, and data source information and target database information of said data; determining a storage rule for said data according to said data source information and target database information (S102), wherein the storage rule for said data comprises a storage data source sub-rule for said data and a storage database sub-rule for said data; and storing said data according to said storage rule (S103). The method can achieve effective storage of data and improve data quality, thereby increasing the utilization rate of storage resources and saving storage resources.

Description

数据存储方法、装置、电子设备及计算机可读存储介质Data storage method, device, electronic equipment and computer readable storage medium 技术领域Technical field
本发明实施例涉及数据存储技术领域,具体涉及一种数据存储方法、装置、电子设备及计算机可读存储介质。Embodiments of the present invention relate to the field of data storage technology, and in particular, to a data storage method, device, electronic device, and computer-readable storage medium.
背景技术Background technique
随着数据技术的发展以及社会的进步,大众对于安防系统的要求越来越高,随之需要存储的监控数据的数据量也越来越大,如何从中区分出有效数据,如何对于有效数据进行有效的存储,以提高存储资源的利用率,节约存储资源是业界亟需解决的问题。With the development of data technology and the progress of society, the public has higher and higher requirements for security systems, and the amount of monitoring data that needs to be stored is also increasing. How to distinguish effective data from it and how to carry out effective data Effective storage to improve the utilization rate of storage resources and save storage resources are urgent problems to be solved in the industry.
发明内容Summary of the invention
本发明实施例提供一种数据存储方法、装置、电子设备及计算机可读存储介质。Embodiments of the present invention provide a data storage method, device, electronic device, and computer-readable storage medium.
第一方面,本发明实施例中提供了一种数据存储方法。In a first aspect, an embodiment of the present invention provides a data storage method.
具体的,所述数据存储方法,包括:Specifically, the data storage method includes:
获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;Obtaining a data package to be stored, wherein the data package to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;Determine the data storage rule to be stored according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of the data source to be stored and a sub-rule of the data storage database ;
根据所述待存储数据存储规则对于所述待存储数据进行存储。Storing the data to be stored according to the data storage rule to be stored.
结合第一方面,本发明实施例在第一方面的第一种实现方式中,所述根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,包括:With reference to the first aspect, in a first implementation manner of the first aspect of the embodiments of the present invention, the determining the data storage rule to be stored according to the data source information and the data target database information of the data to be stored includes:
根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;Determine the data source category of the data to be stored according to the data source information of the data to be stored;
根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;Determining the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;Determine the category of the target database of data to be stored according to the information of the target database of data to be stored;
根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。The sub-rule of the data storage database to be stored is determined according to the category of the target database of the data to be stored.
结合第一方面和第一方面的第一种实现方式,本发明实施例在第一方面的第二种实现方式中,所述根据所述待存储数据存储规则对于所述待存储数据进行存储,包括:With reference to the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect of the embodiments of the present invention, the storing the data to be stored according to the data storage rule to be stored, include:
判断所述待存储数据是否符合所述待存储数据存储规则;Determine whether the data to be stored conforms to the data storage rule to be stored;
将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。Storing the data to be stored in accordance with the data storage rule to be stored in the target database.
结合第一方面、第一方面的第一种实现方式和第一方面的第二种实现方式,本公开在第一方面的第三种实现方式中,所述待存储数据存储数据源子规则包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件;和/或,With reference to the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the present disclosure, the data source sub-rule for storing data to be stored includes: One or more of the following rules: data quality meets preset quality conditions, storage time interval meets preset interval conditions; and / or,
所述待存储数据存储数据库子规则包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。The sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式和第一方面的第三种实现方式,本公开在第一方面的第四种实现方式中,所述根据所述待存储数据存储规则对于所述待存储数据进行存储,包括:Combining the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in the fourth implementation manner of the first aspect, the present disclosure The storing the data to be stored according to the data storage rule to be stored includes:
判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;Judging whether the quality of the data to be stored meets the preset quality condition, and discarding the data to be stored when the quality of the data to be stored does not meet the preset quality condition;
当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;When the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述待存储数据;When the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述 待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;When the storage time interval of the data to be stored satisfies the preset interval condition, determine whether the data size of the data to be stored meets the preset size condition, and when the data size of the data to be stored does not satisfy the When the preset size condition is stated, part of the data to be stored is stored in the target database;
当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。When the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式、第一方面的第三种实现方式和第一方面的第四种实现方式,本公开在第一方面的第五种实现方式中,所述当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中之后,还包括:Combining the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, and the fourth implementation manner of the first aspect, the present disclosure is in the first In a fifth implementation manner of the aspect, after the data size of the data to be stored meets the preset size condition, after storing the data to be stored in the target database, the method further includes:
获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。Obtain the attribute information of the data to be stored, and when the attribute information of the data to be stored meets the video storage condition, request to obtain and store the video data related to the data to be stored.
结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式、第一方面的第三种实现方式、第一方面的第四种实现方式和第一方面的第五种实现方式,本公开在第一方面的第六种实现方式中,所述根据所述待存储数据存储规则对于所述待存储数据进行存储之前,还包括:Combining the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, the third implementation of the first aspect, the fourth implementation of the first aspect and the first aspect of the first aspect Five implementations. In a sixth implementation of the first aspect of the present disclosure, before storing the data to be stored according to the data storage rule to be stored, the method further includes:
对于所述待存储数据进行预处理。Pre-process the data to be stored.
第二方面,本发明实施例中提供了一种数据存储装置。In a second aspect, a data storage device is provided in an embodiment of the present invention.
具体的,所述数据存储装置,包括:Specifically, the data storage device includes:
获取模块,被配置为获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;The obtaining module is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
确定模块,被配置为根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;The determining module is configured to determine the data storage rule to be stored based on the data source information of the data to be stored and the data target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data Storage data storage database sub-rules;
存储模块,被配置为根据所述待存储数据存储规则对于所述待存储数据进行存储。The storage module is configured to store the data to be stored according to the data storage rule to be stored.
结合第二方面,本发明实施例在第二方面的第一种实现方式中,所述确定模块包括:With reference to the second aspect, in a first implementation manner of the second aspect of the embodiments of the present invention, the determination module includes:
第一确定子模块,被配置为根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;The first determining submodule is configured to determine the data source category of the data to be stored according to the data source information of the data to be stored;
第二确定子模块,被配置为根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;A second determining sub-module configured to determine the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
第三确定子模块,被配置为根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;The third determining submodule is configured to determine the category of the data target database to be stored based on the data target database information to be stored;
第四确定子模块,被配置为根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。The fourth determination submodule is configured to determine the sub-rule of the data storage database to be stored according to the category of the target database of the data to be stored.
结合第二方面和第二方面的第一种实现方式,本发明实施例在第二方面的第二种实现方式中,所述存储模块包括:With reference to the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect of the embodiments of the present invention, the storage module includes:
判断子模块,被配置为判断所述待存储数据是否符合所述待存储数据存储规则;A judgment sub-module configured to judge whether the data to be stored conforms to the data storage rule to be stored;
存储子模块,被配置为将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。The storage submodule is configured to store the data to be stored that meets the data storage rule to be stored in the target database.
结合第二方面、第二方面的第一种实现方式和第二方面的第二种实现方式,本公开在第二方面的第三种实现方式中,所述待存储数据存储数据源子规则包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件;和/或,With reference to the second aspect, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a third implementation manner of the second aspect of the present disclosure, the data source sub-rule for storing data to be stored includes: One or more of the following rules: data quality meets preset quality conditions, storage time interval meets preset interval conditions; and / or,
所述待存储数据存储数据库子规则包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。The sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式和第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,所述存储模块被配置为:Combining the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, and the third implementation manner of the second aspect, in the fourth implementation manner of the second aspect, the disclosure The storage module is configured to:
判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;Judging whether the quality of the data to be stored meets the preset quality condition, and discarding the data to be stored when the quality of the data to be stored does not meet the preset quality condition;
当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;When the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述 待存储数据;When the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;When the storage time interval of the data to be stored satisfies the preset interval condition, determine whether the data size of the data to be stored meets the preset size condition, and when the data size of the data to be stored does not satisfy the When the preset size condition is stated, part of the data to be stored is stored in the target database;
当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。When the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式、第二方面的第三种实现方式和第二方面的第四种实现方式,本公开在第二方面的第五种实现方式中,所述存储模块还被配置为:Combining the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, and the fourth implementation manner of the second aspect, the present disclosure is in the second In a fifth implementation manner of the aspect, the storage module is further configured to:
当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中之后,获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。When the data size of the data to be stored meets the preset size condition, after the data to be stored is stored in the target database, the attribute information of the data to be stored is acquired, and when the data to be stored When the attribute information of meets the video storage condition, request to obtain video data related to the data to be stored and store it.
结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式、第二方面的第三种实现方式、第二方面的第四种实现方式和第二方面的第五种实现方式,本公开在第二方面的第六种实现方式中,还包括:Combining the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect and the second aspect Five implementations. The sixth implementation of the second aspect of the present disclosure further includes:
预处理模块,被配置为对于所述待存储数据进行预处理。The preprocessing module is configured to preprocess the data to be stored.
第三方面,本发明实施例提供了一种电子设备,包括存储器和处理器,所述存储器用于存储一条或多条支持数据存储装置执行上述第一方面中数据存储方法的计算机指令,所述处理器被配置为用于执行所述存储器中存储的计算机指令。所述数据存储装置还可以包括通信接口,用于数据存储装置与其他设备或通信网络通信。In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions that support a data storage device to perform the data storage method in the first aspect described above. The processor is configured to execute computer instructions stored in the memory. The data storage device may further include a communication interface for the data storage device to communicate with other devices or communication networks.
第四方面,本发明实施例提供了一种计算机可读存储介质,用于存储数据存储装置所用的计算机指令,其包含用于执行上述第一方面中数据存储方法为数据存储装置所涉及的计算机指令。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer instructions used by a data storage device, which includes a computer involved in performing the data storage method in the first aspect described above as a data storage device instruction.
本发明实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
上述技术方案通过分别设定数据源分级存储规则和目标数据库分级存储规则,来实现对于待存储数据的分级存储。该技术方案能够实现数据的有效存储,提高数据质量,提高存储资源的利用率,节约存储资源。The above technical solution realizes the hierarchical storage of the data to be stored by separately setting the hierarchical storage rules of the data source and the hierarchical storage rules of the target database. The technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the embodiments of the present invention.
附图说明BRIEF DESCRIPTION
结合附图,通过以下非限制性实施方式的详细描述,本发明实施例的其它特征、目的和优点将变得更加明显。在附图中:With reference to the drawings, through the following detailed description of the non-limiting embodiments, other features, objects, and advantages of the embodiments of the present invention will become more apparent. In the drawings:
图1示出根据本发明一实施方式的数据存储方法的流程图;1 shows a flowchart of a data storage method according to an embodiment of the present invention;
图2示出根据图1所示实施方式的数据存储方法的步骤S102的流程图;FIG. 2 shows a flowchart of step S102 of the data storage method according to the embodiment shown in FIG. 1;
图3示出根据图1所示实施方式的数据存储方法的步骤S103的流程图;FIG. 3 shows a flowchart of step S103 of the data storage method according to the embodiment shown in FIG. 1;
图4示出根据本发明另一实施方式的数据存储方法的步骤S103的流程图;4 shows a flowchart of step S103 of a data storage method according to another embodiment of the present invention;
图5示出根据本发明另一实施方式的数据存储方法的流程图;5 shows a flowchart of a data storage method according to another embodiment of the present invention;
图6示出根据本发明一实施方式的数据存储装置的结构框图;6 shows a structural block diagram of a data storage device according to an embodiment of the present invention;
图7示出根据图6所示实施方式的数据存储装置的确定模块602的结构框图;7 shows a structural block diagram of the determination module 602 of the data storage device according to the embodiment shown in FIG. 6;
图8示出根据图6所示实施方式的数据存储装置的存储模块603的结构框图;8 shows a structural block diagram of a storage module 603 of the data storage device according to the embodiment shown in FIG. 6;
图9示出根据本发明另一实施方式的数据存储装置的结构框图;9 shows a structural block diagram of a data storage device according to another embodiment of the present invention;
图10示出根据本发明一实施方式的电子设备的结构框图;10 shows a structural block diagram of an electronic device according to an embodiment of the present invention;
图11是适于用来实现根据本发明一实施方式的数据存储方法的计算机系统的结构示意图。11 is a schematic structural diagram of a computer system suitable for implementing a data storage method according to an embodiment of the present invention.
具体实施方式detailed description
下文中,将参考附图详细描述本发明实施例的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。Hereinafter, exemplary embodiments of the embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for clarity, parts not related to the description of the exemplary embodiment are omitted in the drawings.
在本发明实施例中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或 其组合存在或被添加的可能性。In the embodiments of the present invention, it should be understood that terms such as "including" or "having" are intended to indicate the existence of features, numbers, steps, acts, components, parts, or combinations thereof disclosed in this specification, and are not intended to The possibility that one or more other features, numbers, steps, acts, components, parts, or combinations thereof exist or are added is excluded.
另外还需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明实施例。In addition, it should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. The embodiments of the present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
本发明实施例提供的技术方案通过分别设定数据源分级存储规则和目标数据库分级存储规则,来实现对于待存储数据的分级存储。该技术方案能够实现数据的有效存储,提高数据质量,提高存储资源的利用率,节约存储资源。The technical solution provided by the embodiment of the present invention realizes the hierarchical storage of the data to be stored by separately setting the hierarchical storage rules of the data source and the hierarchical storage rules of the target database. The technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
图1示出根据本发明一实施方式的数据存储方法的流程图,如图1所示,所述数据存储方法包括以下步骤S101-S103:FIG. 1 shows a flowchart of a data storage method according to an embodiment of the present invention. As shown in FIG. 1, the data storage method includes the following steps S101-S103:
在步骤S101中,获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;In step S101, obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
在步骤S102中,根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;In step S102, a data storage rule to be stored is determined according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data to be stored Data storage database sub-rules;
在步骤S103中,根据所述待存储数据存储规则对于所述待存储数据进行存储。In step S103, the data to be stored is stored according to the data storage rule to be stored.
上文提及,随着数据技术的发展以及社会的进步,大众对于安防系统的要求越来越高,随之需要存储的监控数据的数据量也越来越大,如何从中区分出有效数据,如何对于有效数据进行有效的存储,以提高存储资源的利用率,节约存储资源是业界亟需解决的问题。As mentioned above, with the development of data technology and social progress, the public has higher and higher requirements for security systems, and the amount of monitoring data that needs to be stored is also increasing. How to distinguish effective data from it, How to effectively store effective data to improve the utilization rate of storage resources and save storage resources is an urgent problem to be solved in the industry.
考虑到上述问题,在该实施方式中,提出一种数据存储方法,该方法通过分别设定数据源分级存储规则和目标数据库分级存储规则,来实现对于待存储数据的分级存储。该技术方案能够实现数据的有效存储,提高数据质量,提高存储资源的利用率,节约存储资源。In view of the above problems, in this embodiment, a data storage method is proposed, which implements hierarchical storage of data to be stored by separately setting data source hierarchical storage rules and target database hierarchical storage rules. The technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
其中,所述待存储数据包可以为任何形式、任何类型、任何大小的数据包,为了便于理解,下文中以监控数据为例对于本发明进行解释和说明。The data packet to be stored may be a data packet of any form, any type, and any size. For ease of understanding, the following uses the monitoring data as an example to explain and explain the present invention.
在本实施例的一个可选实现方式中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息。In an optional implementation manner of this embodiment, the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored.
其中,所述待存储数据的数据源信息指的是获取所述待存储数据的数据 源的信息,比如,若所述待存储数据为视频监控数据,则其对应的数据源信息指的就是采集所述视频监控数据的摄像机的信息。为了更加有效地实现待存储数据的分级存储,所述待存储数据的数据源信息可包括数据源的级别或类别信息,即事先可按照预设规则对于数据源进行分级或分类,然后再将数据源级别或类别信息携带在数据源信息中进行发送。比如对于采集视频监控数据的摄像机,可根据其设置目的、所在地理位置、所在地理位置的人流量、所在地理位置历史事件发生频次等等因素对于摄像机进行分级或分类,比如,可根据上述分级因素将摄像机分为1-4级,其中,1级表示普通位置,2级表示密集人流位置,3级表示事故高发位置,4级表示重点监控位置。The data source information of the data to be stored refers to the information of the data source to obtain the data to be stored. For example, if the data to be stored is video surveillance data, the corresponding data source information refers to the collection Information of the camera of the video monitoring data. In order to more effectively implement the hierarchical storage of the data to be stored, the data source information of the data to be stored may include the level or category information of the data source, that is, the data source may be graded or classified according to preset rules in advance, and then the data Source level or category information is carried in the data source information and sent. For example, for cameras that collect video surveillance data, the cameras can be ranked or classified according to factors such as the purpose of their settings, geographic location, human traffic in the geographic location, frequency of historical events in the geographic location, and so on. The cameras are divided into levels 1-4, of which level 1 indicates normal locations, level 2 indicates crowded locations, level 3 indicates locations where accidents occur frequently, and level 4 indicates key monitoring locations.
其中,所述待存储数据目标数据库信息指的是存储待存储数据的数据库的信息,所述待存储数据目标数据库信息可根据所述待存储数据的属性信息预先设定,并将所述目标数据库信息携带在数据源信息中进行发送,其中,所述待存储数据的属性信息包括以下信息中的一种或多种:受教育程度、宗教信仰、籍贯、历史犯罪信息、是否涉毒、是否在逃、是否涉独涉恐等等。为了更加有效地实现待存储数据的分级存储,所述待存储数据的目标数据库信息可包括所述目标数据库的级别或类别信息,即事先可按照预设规则对于用于存储数据的数据库进行分级或分类,比如对于存储监控人员的数据库,可根据监控人员的性质对于数据库进行分级或分类,比如,可将数据库分为1-5级,其中,1级表示普通人员数据库,2级表示重点关注人员数据库,3级表示有犯罪记录人员数据库,4级表示普通在逃人员数据库,5级表示高危涉恐人员数据库。Wherein, the target database information of the data to be stored refers to the information of the database storing the data to be stored. The target database information of the data to be stored may be preset according to the attribute information of the data to be stored, and the target database The information is carried in the data source information and sent, wherein the attribute information of the data to be stored includes one or more of the following information: education level, religious belief, birthplace, historical crime information, whether it is involved in drugs, whether it is at large , Whether it involves independence or terrorism, etc. In order to more effectively realize the hierarchical storage of the data to be stored, the target database information of the data to be stored may include the level or category information of the target database, that is, the database used to store the data may be hierarchically or in accordance with preset rules Classification, for example, for a database that stores monitoring personnel, the database can be classified or classified according to the nature of the monitoring personnel. For example, the database can be divided into 1-5 levels, where level 1 represents the ordinary personnel database and level 2 represents the focus on personnel Database, level 3 means a database with criminal records, level 4 means a database of ordinary fugitives, and level 5 means a database of high-risk terrorists.
基于所述数据源和目标数据库的级别或类别信息,后续在对所述待存储数据进行存储时,就可以根据数据源和目标数据库的级别或类别信息确定不同的存储规则,进而实现对于所述待存储数据的分级存储。Based on the level or category information of the data source and the target database, when storing the data to be stored later, different storage rules can be determined according to the level or category information of the data source and the target database, and then the Hierarchical storage of data to be stored.
在本实施例的一个可选实现方式中,如图2所示,所述步骤S102,即根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则的步骤,包括以下步骤S201-S204:In an optional implementation manner of this embodiment, as shown in FIG. 2, the step S102 is the step of determining the data storage rule to be stored based on the data source information of the data to be stored and the target database information of the data to be stored, It includes the following steps S201-S204:
在步骤S201中,根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;In step S201, the data source category of the data to be stored is determined according to the data source information of the data to be stored;
在步骤S202中,根据所述待存储数据的数据源类别确定所述待存储数据 存储数据源子规则;In step S202, the sub-rule of the data source of the data to be stored is determined according to the type of the data source of the data to be stored;
在步骤S203中,根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;In step S203, the category of the target database of the data to be stored is determined according to the target database information of the data to be stored;
在步骤S204中,根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。In step S204, the sub-rule of the data storage database to be stored is determined according to the category of the target database of the data to be stored.
为了实现数据的分级存储,真正实现有效数据的有效存储,提高存储资源的利用率,节约存储资源,在该实施方式中,根据数据源和目标数据库的级别或类别信息来确定不同的存储规则。具体地,根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;再根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;再根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。In order to achieve hierarchical storage of data, truly achieve effective storage of effective data, improve utilization of storage resources, and save storage resources, in this embodiment, different storage rules are determined according to the level or category information of the data source and target database. Specifically, the data source category of the data to be stored is determined according to the data source information of the data to be stored; then the sub-rule of the data source of the data to be stored is determined according to the data source category of the data to be stored; The data target database information to be stored determines the category of the data target database to be stored; and then determines the sub-rule of the data storage database to be stored according to the category of the data target database to be stored.
在本实施例的一个可选实现方式中,如图3所示,所述步骤S103,即根据所述待存储数据存储规则对于所述待存储数据进行存储的步骤,包括以下步骤S301-S302:In an optional implementation manner of this embodiment, as shown in FIG. 3, the step S103, that is, the step of storing the data to be stored according to the data storage rule to be stored, includes the following steps S301-S302:
在步骤S301中,判断所述待存储数据是否符合所述待存储数据存储规则;In step S301, determine whether the data to be stored conforms to the data storage rule to be stored;
在步骤S302中,将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。In step S302, data to be stored that meets the data storage rule to be stored is stored in the target database.
为了切实实现数据的分级存储,提高数据质量,在该实施方式中,将所述待存储数据与确定的存储规则一一进行比对和判断,并将符合所述存储规则的数据存储至目标数据库中。In order to effectively achieve hierarchical storage of data and improve data quality, in this embodiment, the data to be stored and the determined storage rules are compared and judged one by one, and the data that meets the storage rules is stored in the target database in.
在本实施例的一个可选实现方式中,对于监控数据,所述待存储数据存储数据源子规则可包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件。其中,所述预设质量条件是对数据质量提出的要求,比如某一监控图像是否清晰、某一监控图像的分辨率是否达到分辨率要求、某一监控图像是否存在过多的噪声点、某一监控图像是否存在像素缺失等等。其中,所述预设间隔条件是对数据的存储间隔提出的要求,该要求是为了提高待存储数据的有效性,避免出现过多重复信息,比如,判断相邻待存储数据的时间间隔是否大于一时间间隔阈值等等。In an optional implementation manner of this embodiment, for monitoring data, the sub-rules for storing data sources of data to be stored may include one or more of the following rules: data quality meets preset quality conditions, and storage time interval meets Preset interval conditions. Among them, the preset quality condition is a requirement for data quality, such as whether a certain monitoring image is clear, whether the resolution of a certain monitoring image meets the resolution requirements, whether there are too many noise points in a certain monitoring image, a certain 1. Monitor the image for missing pixels and so on. Wherein, the preset interval condition is a requirement for the data storage interval, which is to improve the effectiveness of the data to be stored and avoid excessive repetition of information, for example, to determine whether the time interval between adjacent data to be stored is greater than A time interval threshold and so on.
在本实施例的一个可选实现方式中,对于监控数据,所述待存储数据存储数据库子规则可包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。其中,所述预设相似度条件是对待存储数据与目标数据库数据之间的相似度提出的要求,符合相似度条件的待存储数据认为是与目标数据库中的数据具有相似性的数据,是可以存储至所述目标数据库中的数据,否则不能被存储至该数据库。其中,所述预设大小条件指的是对于待存储数据的大小提出的要求,若所述待存储数据过大,则可提取所述待存储数据中的重点数据进行存储,丢弃其他不重要的数据。其中,所述视频存储条件指的是对于是否需要获取和存储与所述被存储数据相关的视频数据提出的要求,比如如果待存储数据是需要被重点关注的人员,则可请求获取并存储与该人员相关的预设时间点和预设时间长度的视频数据,以便后续进行进一步的查看。In an optional implementation manner of this embodiment, for monitoring data, the sub-rules of the data storage database to be stored may include one or more of the following rules: data similarity meets a preset similarity condition, and data size meets Preset size conditions, video storage conditions. The preset similarity condition is a requirement for the similarity between the stored data and the target database data, and the data to be stored that meets the similarity condition is considered to be similar to the data in the target database. Data stored in the target database, otherwise it cannot be stored in the database. The preset size condition refers to a requirement for the size of the data to be stored. If the data to be stored is too large, the key data in the data to be stored can be extracted for storage, and other unimportant ones are discarded. data. Wherein, the video storage condition refers to a requirement on whether to acquire and store video data related to the stored data. For example, if the data to be stored is a person who needs to be focused on, you can request to acquire and store and Video data of the preset time point and preset time length related to the person, so as to be further viewed later.
需要说明的是,上述具体的待存储数据存储数据源子规则和待存储数据存储数据库子规则与数据源和目标数据库的级别或类别相关,即数据源和目标数据库的级别或类别不同,相应的待存储数据存储数据源子规则和待存储数据存储数据库子规则的内容或者参数也不尽相同,以真正实现数据的分级存储。其中,所述待存储数据存储数据源子规则和待存储数据存储数据库子规则与数据源和目标数据库的级别或类别之间的对应关系可预先存储在存储器或数据库中,以方便具体规则内容的查询和确定。在实际应用中,本领域技术人员可根据实际应用的需要以及待存储数据、数据源和数据库的特点对于规则的具体内容进行设置和实时调整,以上均为示例性说明,不能够被理解为是对本发明的限定。It should be noted that the specific sub-rules for the data source to be stored and the sub-rules for the database to be stored are related to the levels or categories of the data source and target database, that is, the levels or categories of the data source and target database are different. The content or parameters of the data source sub-rules of the data storage to be stored and the sub-rules of the data storage database to be stored are also different, so as to truly achieve hierarchical storage of data. Wherein, the correspondence between the sub-rules of the data source of the data to be stored and the sub-rules of the database of the data to be stored and the levels or categories of the data source and the target database can be pre-stored in the memory or database to facilitate the content of specific rules Query and confirm. In actual application, those skilled in the art can set and adjust the specific content of the rules according to the needs of the actual application and the characteristics of the data to be stored, the data source and the database. The above are all exemplary descriptions and cannot be understood as Limitation of the invention.
在本实施例的另一个可选实现方式中,如图4所示,所述步骤S103,即根据所述待存储数据存储规则对于所述待存储数据进行存储的步骤,包括以下步骤S401-S405:In another optional implementation manner of this embodiment, as shown in FIG. 4, the step S103, that is, the step of storing the data to be stored according to the data storage rule to be stored, includes the following steps S401-S405 :
在步骤S401中,判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;In step S401, it is determined whether the quality of the data to be stored meets the preset quality condition, and when the quality of the data to be stored does not satisfy the preset quality condition, the data to be stored is discarded;
在步骤S402中,当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度 条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;In step S402, when the quality of the data to be stored satisfies the preset quality condition, it is determined whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when When the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, a new database is created, and the data to be stored is stored in the newly created database;
在步骤S403中,当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述待存储数据;In step S403, when the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, And when the storage time interval of the data to be stored does not satisfy the preset interval condition, discard the data to be stored;
在步骤S404中,当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;In step S404, when the storage time interval of the data to be stored meets the preset interval condition, it is determined whether the data size of the data to be stored meets the preset size condition, and when the data to be stored When the data size does not satisfy the preset size condition, store part of the data to be stored in the target database;
在步骤S405中,当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。In step S405, when the data size of the data to be stored satisfies the preset size condition, the data to be stored is stored in the target database.
该实施方式以监控数据为例,对于根据待存储数据存储规则对待存储数据进行存储的步骤进行了详细的描述。具体地,首先判断所述待存储数据的质量是否满足所述预设质量条件,若所述待存储数据的质量不满足所述预设质量条件,可认为所述待存储数据没有存储的价值,为了节约存储资源,可直接对其采取丢弃处理;若所述待存储数据的质量满足所述预设质量条件,继续判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,若所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件,可认为与所述目标数据库中的数据并无相似性,或者说,所述目标数据库中并未存储有所述待存储数据涉及的监控对象的历史数据,可新建一个数据库,将所述待存储数据存入该新建数据库中;若所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件,认为所述待存储数据与所述目标数据库中的数据具有相似性,可将其存储至目标数据库中,然后继续判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,若所述待存储数据的存储时间间隔不满足所述预设间隔条件,可认为待存储数据间隔较短,重复信息过多,有效信息较少,因此可对其采取丢弃处理,或者为了数据统计的精确性,还可以同时为所述目标数据库的数据处理统计次数增加相应的数值;若所述待存储数据的存储时间间隔满足所述预设间隔条件,则继续判断所述待存储数据的数据大小是否满足所述预设大小条 件,若所述待存储数据的数据大小不满足所述预设大小条件,比如所述待存储数据过大,为了节省存储资源,可将所述待存储数据的部分数据存入所述目标数据库中,其他部分丢弃;若所述待存储数据的数据大小满足所述预设大小条件,则可将所述待存储数据存入所述目标数据库中。This embodiment takes monitoring data as an example, and describes in detail the steps for storing the data to be stored according to the data storage rule of the data to be stored. Specifically, first determine whether the quality of the data to be stored meets the preset quality condition, if the quality of the data to be stored does not meet the preset quality condition, it may be considered that the data to be stored has no stored value, To save storage resources, you can directly discard it; if the quality of the data to be stored meets the preset quality condition, continue to determine whether the similarity between the data to be stored and the target database meets the A preset similarity condition, if the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, it may be considered that there is no similarity to the data in the target database, or The target database does not store historical data of the monitoring object involved in the data to be stored, a new database may be created, and the data to be stored may be stored in the newly created database; if the data to be stored and the target The similarity between the databases meets the preset similarity condition, and the data to be stored is considered to be similar to the data in the target database , It can be stored in the target database, and then continue to determine whether the storage time interval of the data to be stored meets the preset interval condition, if the storage time interval of the data to be stored does not meet the preset interval condition, It can be considered that the data to be stored has a short interval, too much repeated information and less effective information, so it can be discarded, or for the accuracy of data statistics, the number of data processing statistics of the target database can also be increased by Value; if the storage time interval of the data to be stored meets the preset interval condition, continue to determine whether the data size of the data to be stored meets the preset size condition, if the data size of the data to be stored If the preset size condition is not met, for example, the data to be stored is too large, in order to save storage resources, part of the data to be stored may be stored in the target database, and other parts may be discarded; If the data size of the data meets the preset size condition, the data to be stored may be stored in the target data In.
需要说明的是,上述对于规则具体内容的判断顺序并不是固定的,本领域技术人员可根据实际应用的需要、待存储数据的特点以及规则的具体内容对于规则判断顺序进行调整,本发明对其不作具体限定。It should be noted that the above judgment order for the specific content of the rule is not fixed, and those skilled in the art can adjust the rule judgment order according to the needs of actual application, the characteristics of the data to be stored, and the specific content of the rule. No specific restrictions.
在本实施例的一个可选实现方式中,所述步骤S405,即当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中的步骤之后,还可以包括步骤:In an optional implementation manner of this embodiment, in step S405, that is, when the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database. After the steps, you can also include the steps:
获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。Obtain the attribute information of the data to be stored, and when the attribute information of the data to be stored meets the video storage condition, request to obtain and store the video data related to the data to be stored.
在该实施方式中,还根据所述待存储数据的属性信息来判断是否需要请求获取所述待存储数据相关的视频数据并对其进行存储,比如如果待存储数据是需要被重点关注的人员,则可请求获取并存储与该人员相关的预设时间点和预设时间长度的视频数据,以便后续进行进一步的查看。其中,所述预设时间点和预设时间长度可根据实际应用的需要进行设置,比如所述预设时间点可设置为所述待存储数据的生成时间,所述预设时间长度可设置为2分钟。In this embodiment, it is also judged according to the attribute information of the data to be stored whether to request to obtain the video data related to the data to be stored and store it, for example, if the data to be stored is a person who needs to be focused on, Then, you can request to obtain and store video data related to the person at a preset time point and a preset time length, so that you can view it later. Wherein, the preset time point and preset time length can be set according to actual application needs, for example, the preset time point can be set as the generation time of the data to be stored, and the preset time length can be set as 2 minutes.
在本实施例的一个可选实现方式中,所述步骤S103,即根据所述待存储数据存储规则对于所述待存储数据进行存储的步骤之前,还包括对于所述待存储数据进行预处理的步骤,即如图5所示,所述方法包括以下步骤S501-S504:In an optional implementation manner of this embodiment, the step S103, that is, before the step of storing the data to be stored according to the data storage rule to be stored, further includes preprocessing the data to be stored Steps, as shown in FIG. 5, the method includes the following steps S501-S504:
在步骤S501中,获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;In step S501, a data package to be stored is obtained, wherein the data package to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
在步骤S502中,根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;In step S502, a data storage rule to be stored is determined according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data to be stored Data storage database sub-rules;
在步骤S503中,对于所述待存储数据进行预处理;In step S503, pre-process the data to be stored;
在步骤S504中,根据所述待存储数据存储规则对于所述待存储数据进行存储。In step S504, the data to be stored is stored according to the data storage rule to be stored.
在本实施例的一个可选实现方式中,所述预处理可包括以下处理中的一种或多种:去重处理、去噪处理、压缩处理等等。In an optional implementation manner of this embodiment, the preprocessing may include one or more of the following processes: deduplication processing, denoising processing, compression processing, and so on.
在该实施方式中,为了进一步提高数据的有效性,提高数据质量,节省计算资源,在对于所述待存储数据进行存储之前还对所述待存储数据进行去重处理、去噪处理和/或压缩处理等预处理。In this embodiment, in order to further improve the validity of the data, improve the quality of the data, and save computing resources, before storing the data to be stored, the data to be stored is also subjected to deduplication processing, denoising processing, and / or Pre-processing such as compression processing.
下述为本发明装置实施例,可以用于执行本发明方法实施例。The following is an embodiment of the device of the present invention, which can be used to execute the method embodiment of the present invention.
图6示出根据本发明一实施方式的数据存储装置的结构框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图6所示,所述数据存储装置包括:6 shows a structural block diagram of a data storage device according to an embodiment of the present invention. The device may be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in FIG. 6, the data storage device includes:
获取模块601,被配置为获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;The obtaining module 601 is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
确定模块602,被配置为根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;The determining module 602 is configured to determine a data storage rule to be stored based on the data source information of the data to be stored and the data target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule for data source to be stored and Sub-rules of the data storage database to be stored;
存储模块603,被配置为根据所述待存储数据存储规则对于所述待存储数据进行存储。The storage module 603 is configured to store the data to be stored according to the data storage rule to be stored.
上文提及,随着数据技术的发展以及社会的进步,大众对于安防系统的要求越来越高,随之需要存储的监控数据的数据量也越来越大,如何从中区分出有效数据,如何对于有效数据进行有效的存储,以提高存储资源的利用率,节约存储资源是业界亟需解决的问题。As mentioned above, with the development of data technology and social progress, the public has higher and higher requirements for security systems, and the amount of monitoring data that needs to be stored is also increasing. How to distinguish effective data from it, How to effectively store effective data to improve the utilization rate of storage resources and save storage resources is an urgent problem to be solved in the industry.
考虑到上述问题,在该实施方式中,提出一种数据存储装置,该装置通过分别设定数据源分级存储规则和目标数据库分级存储规则,来实现对于待存储数据的分级存储。该技术方案能够实现数据的有效存储,提高数据质量,提高存储资源的利用率,节约存储资源。In consideration of the above problems, in this embodiment, a data storage device is proposed, which implements hierarchical storage of data to be stored by setting data source hierarchical storage rules and target database hierarchical storage rules, respectively. The technical solution can realize effective storage of data, improve data quality, improve utilization of storage resources, and save storage resources.
其中,所述待存储数据包可以为任何形式、任何类型、任何大小的数据包,为了便于理解,下文中以监控数据为例对于本发明进行解释和说明。The data packet to be stored may be a data packet of any form, any type, and any size. For ease of understanding, the following uses the monitoring data as an example to explain and explain the present invention.
在本实施例的一个可选实现方式中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息。In an optional implementation manner of this embodiment, the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored.
其中,所述待存储数据的数据源信息指的是获取所述待存储数据的数据源的信息,比如,若所述待存储数据为视频监控数据,则其对应的数据源信息指的就是采集所述视频监控数据的摄像机的信息。为了更加有效地实现待存储数据的分级存储,所述待存储数据的数据源信息可包括数据源的级别或类别信息,即事先可按照预设规则对于数据源进行分级或分类,然后再将数据源级别或类别信息携带在数据源信息中进行发送。比如对于采集视频监控数据的摄像机,可根据其设置目的、所在地理位置、所在地理位置的人流量、所在地理位置历史事件发生频次等等因素对于摄像机进行分级或分类,比如,可根据上述分级因素将摄像机分为1-4级,其中,1级表示普通位置,2级表示密集人流位置,3级表示事故高发位置,4级表示重点监控位置。The data source information of the data to be stored refers to the information of the data source to obtain the data to be stored. For example, if the data to be stored is video surveillance data, the corresponding data source information refers to the collection Information of the camera of the video monitoring data. In order to more effectively implement the hierarchical storage of the data to be stored, the data source information of the data to be stored may include the level or category information of the data source, that is, the data source may be graded or classified according to preset rules in advance, and then the data Source level or category information is carried in the data source information and sent. For example, for cameras that collect video surveillance data, the cameras can be ranked or classified according to factors such as the purpose of their settings, geographic location, human traffic in the geographic location, frequency of historical events in the geographic location, and so on. The cameras are divided into levels 1-4, of which level 1 indicates normal locations, level 2 indicates crowded locations, level 3 indicates locations where accidents occur frequently, and level 4 indicates key monitoring locations.
其中,所述待存储数据目标数据库信息指的是存储待存储数据的数据库的信息,所述待存储数据目标数据库信息可根据所述待存储数据的属性信息预先设定,并将所述目标数据库信息携带在数据源信息中进行发送,其中,所述待存储数据的属性信息包括以下信息中的一种或多种:受教育程度、宗教信仰、籍贯、历史犯罪信息、是否涉毒、是否在逃、是否涉独涉恐等等。为了更加有效地实现待存储数据的分级存储,所述待存储数据的目标数据库信息可包括所述目标数据库的级别或类别信息,即事先可按照预设规则对于用于存储数据的数据库进行分级或分类,比如对于存储监控人员的数据库,可根据监控人员的性质对于数据库进行分级或分类,比如,可将数据库分为1-5级,其中,1级表示普通人员数据库,2级表示重点关注人员数据库,3级表示有犯罪记录人员数据库,4级表示普通在逃人员数据库,5级表示高危涉恐人员数据库。Wherein, the target database information of the data to be stored refers to the information of the database storing the data to be stored. The target database information of the data to be stored may be preset according to the attribute information of the data to be stored, and the target database The information is carried in the data source information and sent, wherein the attribute information of the data to be stored includes one or more of the following information: education level, religious belief, birthplace, historical crime information, whether it is involved in drugs, whether it is at large , Whether it involves independence or terrorism, etc. In order to more effectively realize the hierarchical storage of the data to be stored, the target database information of the data to be stored may include the level or category information of the target database, that is, the database used to store the data may be hierarchically or in accordance with preset rules Classification, for example, for a database that stores monitoring personnel, the database can be classified or classified according to the nature of the monitoring personnel. For example, the database can be divided into 1-5 levels, where level 1 represents the ordinary personnel database and level 2 represents the focus on personnel Database, level 3 means a database with criminal records, level 4 means a database of ordinary fugitives, and level 5 means a database of high-risk terrorists.
基于所述数据源和目标数据库的级别或类别信息,后续在对所述待存储数据进行存储时,就可以根据数据源和目标数据库的级别或类别信息确定不同的存储规则,进而实现对于所述待存储数据的分级存储。Based on the level or category information of the data source and the target database, when storing the data to be stored later, different storage rules can be determined according to the level or category information of the data source and the target database, and then the Hierarchical storage of data to be stored.
在本实施例的一个可选实现方式中,如图7所示,所述确定模块602包括:In an optional implementation manner of this embodiment, as shown in FIG. 7, the determination module 602 includes:
第一确定子模块701,被配置为根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;The first determining submodule 701 is configured to determine the data source category of the data to be stored according to the data source information of the data to be stored;
第二确定子模块702,被配置为根据所述待存储数据的数据源类别确定 所述待存储数据存储数据源子规则;The second determining sub-module 702 is configured to determine the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
第三确定子模块703,被配置为根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;The third determining submodule 703 is configured to determine the category of the data target database to be stored according to the data target database information to be stored;
第四确定子模块704,被配置为根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。The fourth determination sub-module 704 is configured to determine the sub-rule of the data storage database to be stored according to the category of the target database of the data to be stored.
为了实现数据的分级存储,真正实现有效数据的有效存储,提高存储资源的利用率,节约存储资源,在该实施方式中,根据数据源和目标数据库的级别或类别信息来确定不同的存储规则。具体地,第一确定子模块701根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;第二确定子模块702根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;第三确定子模块703根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;第四确定子模块704根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。In order to achieve hierarchical storage of data, truly achieve effective storage of effective data, improve utilization of storage resources, and save storage resources, in this embodiment, different storage rules are determined according to the level or category information of the data source and target database. Specifically, the first determining submodule 701 determines the data source category of the data to be stored according to the data source information of the data to be stored; the second determining submodule 702 determines the data source category according to the data source category of the data to be stored Stored data storage data source sub-rules; third determination sub-module 703 determines the category of the data-to-be-stored data target database according to the data-to-be-stored data target database information; fourth determination sub-module 704 according to the type of the data-to-be-stored target database Determine the sub-rule of the data storage database to be stored.
在本实施例的一个可选实现方式中,如图8所示,所述存储模块603包括:In an optional implementation manner of this embodiment, as shown in FIG. 8, the storage module 603 includes:
判断子模块801,被配置为判断所述待存储数据是否符合所述待存储数据存储规则;The judgment sub-module 801 is configured to judge whether the data to be stored conforms to the data storage rule to be stored;
存储子模块802,被配置为将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。The storage submodule 802 is configured to store the data to be stored that meets the data storage rule to be stored in the target database.
为了切实实现数据的分级存储,提高数据质量,在该实施方式中,判断子模块801将所述待存储数据与确定的存储规则一一进行比对和判断,存储子模块802将符合所述存储规则的数据存储至目标数据库中。In order to effectively achieve hierarchical storage of data and improve data quality, in this embodiment, the judgment sub-module 801 compares and judges the data to be stored with the determined storage rule one by one, and the storage sub-module 802 will conform to the storage The rule data is stored in the target database.
在本实施例的一个可选实现方式中,对于监控数据,所述待存储数据存储数据源子规则可包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件。其中,所述预设质量条件是对数据质量提出的要求,比如某一监控图像是否清晰、某一监控图像的分辨率是否达到分辨率要求、某一监控图像是否存在过多的噪声点、某一监控图像是否存在像素缺失等等。其中,所述预设间隔条件是对数据的存储间隔提出的要求,该要求是为了提高待存储数据的有效性,避免出现过多重复信息,比如,判断相邻待存储数据的时间间隔是否大于一时间间隔阈值等等。In an optional implementation manner of this embodiment, for monitoring data, the sub-rules for storing data sources of data to be stored may include one or more of the following rules: data quality meets preset quality conditions, and storage time interval meets Preset interval conditions. Among them, the preset quality condition is a requirement for data quality, such as whether a certain monitoring image is clear, whether the resolution of a certain monitoring image meets the resolution requirements, whether there are too many noise points in a certain monitoring image, a certain 1. Monitor the image for missing pixels and so on. Wherein, the preset interval condition is a requirement for the data storage interval, which is to improve the effectiveness of the data to be stored and avoid excessive repetition of information, for example, to determine whether the time interval between adjacent data to be stored is greater than A time interval threshold and so on.
在本实施例的一个可选实现方式中,对于监控数据,所述待存储数据存储数据库子规则可包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。其中,所述预设相似度条件是对待存储数据与目标数据库数据之间的相似度提出的要求,符合相似度条件的待存储数据认为是与目标数据库中的数据具有相似性的数据,是可以存储至所述目标数据库中的数据,否则不能被存储至该数据库。其中,所述预设大小条件指的是对于待存储数据的大小提出的要求,若所述待存储数据过大,则可提取所述待存储数据中的重点数据进行存储,丢弃其他不重要的数据。其中,所述视频存储条件指的是对于是否需要获取和存储与所述被存储数据相关的视频数据提出的要求,比如如果待存储数据是需要被重点关注的人员,则可请求获取并存储与该人员相关的预设时间点和预设时间长度的视频数据,以便后续进行进一步的查看。In an optional implementation manner of this embodiment, for monitoring data, the sub-rules of the data storage database to be stored may include one or more of the following rules: data similarity meets a preset similarity condition, and data size meets Preset size conditions, video storage conditions. The preset similarity condition is a requirement for the similarity between the stored data and the target database data, and the data to be stored that meets the similarity condition is considered to be similar to the data in the target database. Data stored in the target database, otherwise it cannot be stored in the database. The preset size condition refers to a requirement for the size of the data to be stored. If the data to be stored is too large, the key data in the data to be stored can be extracted for storage, and other unimportant ones are discarded. data. Wherein, the video storage condition refers to a requirement on whether to acquire and store video data related to the stored data. For example, if the data to be stored is a person who needs to be focused on, you can request to acquire and store and Video data of the preset time point and preset time length related to the person, so as to be further viewed later.
需要说明的是,上述具体的待存储数据存储数据源子规则和待存储数据存储数据库子规则与数据源和目标数据库的级别或类别相关,即数据源和目标数据库的级别或类别不同,相应的待存储数据存储数据源子规则和待存储数据存储数据库子规则的内容或者参数也不尽相同,以真正实现数据的分级存储。其中,所述待存储数据存储数据源子规则和待存储数据存储数据库子规则与数据源和目标数据库的级别或类别之间的对应关系可预先存储在存储器或数据库中,以方便具体规则内容的查询和确定。在实际应用中,本领域技术人员可根据实际应用的需要以及待存储数据、数据源和数据库的特点对于规则的具体内容进行设置和实时调整,以上均为示例性说明,不能够被理解为是对本发明的限定。It should be noted that the specific sub-rules for the data source to be stored and the sub-rules for the database to be stored are related to the levels or categories of the data source and target database, that is, the levels or categories of the data source and target database are different. The content or parameters of the data source sub-rules of the data storage to be stored and the sub-rules of the data storage database to be stored are also different, so as to truly achieve hierarchical storage of data. Wherein, the correspondence between the sub-rules of the data source of the data to be stored and the sub-rules of the database of the data to be stored and the levels or categories of the data source and the target database can be pre-stored in the memory or database to facilitate the content of specific rules Query and confirm. In actual application, those skilled in the art can set and adjust the specific content of the rules according to the needs of the actual application and the characteristics of the data to be stored, the data source and the database. The above are all exemplary descriptions and cannot be understood as Limitation of the invention.
在本实施例的另一个可选实现方式中,所述存储模块603被配置为:In another optional implementation manner of this embodiment, the storage module 603 is configured to:
判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;Judging whether the quality of the data to be stored meets the preset quality condition, and discarding the data to be stored when the quality of the data to be stored does not meet the preset quality condition;
当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;When the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度 条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述待存储数据;When the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;When the storage time interval of the data to be stored satisfies the preset interval condition, determine whether the data size of the data to be stored meets the preset size condition, and when the data size of the data to be stored does not satisfy the When the preset size condition is stated, part of the data to be stored is stored in the target database;
当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。When the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
该实施方式以监控数据为例,对于存储模块603的操作流程进行了详细的描述。具体地,首先判断所述待存储数据的质量是否满足所述预设质量条件,若所述待存储数据的质量不满足所述预设质量条件,可认为所述待存储数据没有存储的价值,为了节约存储资源,可直接对其采取丢弃处理;若所述待存储数据的质量满足所述预设质量条件,继续判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,若所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件,可认为与所述目标数据库中的数据并无相似性,或者说,所述目标数据库中并未存储有所述待存储数据涉及的监控对象的历史数据,可新建一个数据库,将所述待存储数据存入该新建数据库中;若所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件,认为所述待存储数据与所述目标数据库中的数据具有相似性,可将其存储至目标数据库中,然后继续判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,若所述待存储数据的存储时间间隔不满足所述预设间隔条件,可认为待存储数据间隔较短,重复信息过多,有效信息较少,因此可对其采取丢弃处理,或者为了数据统计的精确性,还可以同时为所述目标数据库的数据处理统计次数增加相应的数值;若所述待存储数据的存储时间间隔满足所述预设间隔条件,则继续判断所述待存储数据的数据大小是否满足所述预设大小条件,若所述待存储数据的数据大小不满足所述预设大小条件,比如所述待存储数据过大,为了节省存储资源,可将所述待存储数据的部分数据存入所述目标数据库中,其他部分丢弃;若所述待存储数据的数据大小满足所述预设大小条件,则可将所述待存储数 据存入所述目标数据库中。This embodiment takes monitoring data as an example to describe the operation flow of the storage module 603 in detail. Specifically, first determine whether the quality of the data to be stored meets the preset quality condition, if the quality of the data to be stored does not meet the preset quality condition, it may be considered that the data to be stored has no stored value, To save storage resources, you can directly discard it; if the quality of the data to be stored meets the preset quality condition, continue to determine whether the similarity between the data to be stored and the target database meets the A preset similarity condition, if the similarity between the data to be stored and the target database does not satisfy the preset similarity condition, it may be considered that there is no similarity to the data in the target database, or The target database does not store historical data of the monitoring object involved in the data to be stored, a new database may be created, and the data to be stored may be stored in the newly created database; if the data to be stored and the target The similarity between the databases meets the preset similarity condition, and the data to be stored is considered to be similar to the data in the target database , It can be stored in the target database, and then continue to determine whether the storage time interval of the data to be stored meets the preset interval condition, if the storage time interval of the data to be stored does not meet the preset interval condition, It can be considered that the data to be stored has a short interval, too much duplicate information, and less effective information, so it can be discarded, or for the accuracy of data statistics, the number of data processing statistics of the target database can also be increased accordingly Value; if the storage time interval of the data to be stored meets the preset interval condition, continue to determine whether the data size of the data to be stored meets the preset size condition, if the data size of the data to be stored If the preset size condition is not met, for example, the data to be stored is too large, in order to save storage resources, part of the data to be stored may be stored in the target database, and other parts may be discarded; If the data size of the data meets the preset size condition, the data to be stored may be stored in the target data In.
需要说明的是,上述对于规则具体内容的判断顺序并不是固定的,本领域技术人员可根据实际应用的需要、待存储数据的特点以及规则的具体内容对于规则判断顺序进行调整,本发明对其不作具体限定。It should be noted that the above judgment order for the specific content of the rule is not fixed, and those skilled in the art can adjust the rule judgment order according to the needs of actual application, the characteristics of the data to be stored, and the specific content of the rule. No specific restrictions.
在本实施例的一个可选实现方式中,所述存储模块还被配置为:当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中之后,获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。In an optional implementation manner of this embodiment, the storage module is further configured to: when the data size of the data to be stored meets the preset size condition, store the data to be stored in the target After the database, the attribute information of the data to be stored is obtained, and when the attribute information of the data to be stored meets the video storage condition, the video data related to the data to be stored is requested to be obtained and stored.
在该实施方式中,还根据所述待存储数据的属性信息来判断是否需要请求获取所述待存储数据相关的视频数据并对其进行存储,比如如果待存储数据是需要被重点关注的人员,则可请求获取并存储与该人员相关的预设时间点和预设时间长度的视频数据,以便后续进行进一步的查看。其中,所述预设时间点和预设时间长度可根据实际应用的需要进行设置,比如所述预设时间点可设置为所述待存储数据的生成时间,所述预设时间长度可设置为2分钟。In this embodiment, it is also judged according to the attribute information of the data to be stored whether to request to obtain the video data related to the data to be stored and store it, for example, if the data to be stored is a person who needs to be focused on, Then, you can request to obtain and store video data related to the person at a preset time point and a preset time length, so that you can view it later. Wherein, the preset time point and preset time length can be set according to actual application needs, for example, the preset time point can be set as the generation time of the data to be stored, and the preset time length can be set as 2 minutes.
在本实施例的一个可选实现方式中,所述装置还包括对于所述待存储数据进行预处理的部分,即如图9所示,所述装置包括:In an optional implementation manner of this embodiment, the device further includes a part for preprocessing the data to be stored, that is, as shown in FIG. 9, the device includes:
获取模块901,被配置为获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;The obtaining module 901 is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
确定模块902,被配置为根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;The determining module 902 is configured to determine a data storage rule to be stored based on the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and Sub-rules of the data storage database to be stored;
预处理模块903,被配置为对于所述待存储数据进行预处理The preprocessing module 903 is configured to preprocess the data to be stored
存储模块904,被配置为根据所述待存储数据存储规则对于所述待存储数据进行存储。The storage module 904 is configured to store the data to be stored according to the data storage rule to be stored.
在本实施例的一个可选实现方式中,所述预处理可包括以下处理中的一种或多种:去重处理、去噪处理、压缩处理等等。In an optional implementation manner of this embodiment, the preprocessing may include one or more of the following processes: deduplication processing, denoising processing, compression processing, and so on.
在该实施方式中,为了进一步提高数据的有效性,提高数据质量,节省计算资源,在对于所述待存储数据进行存储之前还对所述待存储数据进行去 重处理、去噪处理和/或压缩处理等预处理。In this embodiment, in order to further improve the validity of the data, improve the quality of the data, and save computing resources, before storing the data to be stored, the data to be stored is also subjected to deduplication processing, denoising processing, and / or Pre-processing such as compression processing.
在一个具体应用场景中,一个部署有100路监控视频的游乐园,需要对100路视频进行人脸实时分析,假设平均每个摄像头同一时刻只抓拍到一个人,那么根据现有技术的存储方案,一年内将会产生并存储百亿级的数据量,即使进行跟踪去重后,也将会产生亿级的数据量,总数据大小达到1000T。而如果采用本发明提出的分级存储技术方案,假设做出以下设置:同一人在10分钟内经过同一摄像头时只计算频次不存储数据;待存储数据涉及逃犯、曾经犯罪人员时才进行视频获取和存储;对其中10个摄像头实施重点监控。那么100路视频一年只会产生大约50T的数据量,即处理数据量整整压缩了20倍。由此可见,本发明技术方案能够实现数据的有效存储,提高数据质量,大大提高存储资源的利用率,节约存储资源。In a specific application scenario, an amusement park with 100 channels of surveillance video deployed requires real-time face analysis of the 100 channels of video. Assuming that only one person is captured by each camera at the same time, then the storage solution according to the prior art In a year, tens of billions of data will be generated and stored. Even after tracking and deduplication, it will generate billions of data, with a total data size of 1000T. If the hierarchical storage technology solution proposed by the present invention is adopted, it is assumed that the following settings are made: the same person passes the same camera within 10 minutes and only calculates the frequency and does not store the data; when the data to be stored involves fugitives and criminals, video acquisition and Storage; implement key monitoring on 10 of them. Then 100-channel video will only produce about 50T of data a year, that is, the amount of processed data is compressed by 20 times. It can be seen that the technical solution of the present invention can achieve effective storage of data, improve data quality, greatly improve the utilization rate of storage resources, and save storage resources.
本发明实施例还公开了一种电子设备,图10示出根据本发明一实施方式的电子设备的结构框图,如图10所示,所述电子设备1000包括存储器1001和处理器1002;其中,An embodiment of the present invention also discloses an electronic device. FIG. 10 shows a structural block diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 10, the electronic device 1000 includes a memory 1001 and a processor 1002;
所述存储器1001用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器1002执行以实现上述任一方法步骤。The memory 1001 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1002 to implement any of the above method steps.
图11适于用来实现根据本发明实施方式的数据存储方法的计算机系统的结构示意图。11 is a schematic structural diagram of a computer system suitable for implementing a data storage method according to an embodiment of the present invention.
如图11所示,计算机系统1100包括中央处理单元(CPU)1101,其可以根据存储在只读存储器(ROM)1102中的程序或者从存储部分1108加载到随机访问存储器(RAM)1103中的程序而执行上述实施方式中的各种处理。在RAM1103中,还存储有系统1100操作所需的各种程序和数据。CPU1101、ROM1102以及RAM1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。As shown in FIG. 11, the computer system 1100 includes a central processing unit (CPU) 1101 that can be loaded into a random access memory (RAM) 1103 according to a program stored in a read-only memory (ROM) 1102 or from a storage section 1108 Instead, various processes in the above-described embodiment are executed. In the RAM 1103, various programs and data necessary for the operation of the system 1100 are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
以下部件连接至I/O接口1105:包括键盘、鼠标等的输入部分1106;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1107;包括硬盘等的存储部分1108;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1109。通信部分1109经由诸如因特网的网络执行通信处理。驱动器1110也根据需要连接至I/O接口1105。可拆卸介质1111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1110上, 以便于从其上读出的计算机程序根据需要被安装入存储部分1108。The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc .; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 1108 including a hard disk, etc. ; And a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. The driver 1110 is also connected to the I / O interface 1105 as necessary. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as necessary, so that the computer program read out therefrom is installed into the storage portion 1108 as needed.
特别地,根据本发明的实施方式,上文描述的方法可以被实现为计算机软件程序。例如,本发明的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行所述数据存储方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分1109从网络上被下载和安装,和/或从可拆卸介质1111被安装。In particular, according to embodiments of the present invention, the method described above may be implemented as a computer software program. For example, embodiments of the present invention include a computer program product that includes a computer program tangibly contained on a readable medium thereof, the computer program containing program code for performing the data storage method. In such an embodiment, the computer program may be downloaded and installed from the network through the communication section 1109, and / or installed from the removable medium 1111.
附图中的流程图和框图,图示了按照本发明各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the drawings illustrate the possible implementation architecture, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the road map or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of the code contains one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession can actually be executed in parallel, and sometimes they can also be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
描述于本发明实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules described in the embodiments of the present invention may be implemented in software or hardware. The described units or modules may also be provided in the processor, and the names of these units or modules in some cases do not constitute a limitation on the units or modules themselves.
作为另一方面,本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中所述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本发明实施例的方法。As another aspect, an embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a computer-readable storage medium included in the device described in the foregoing embodiments; or may exist alone , A computer-readable storage medium that is not installed in the device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in the embodiments of the present invention.
以上描述仅为本发明的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本发明实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本发明实施例中公开的(但不限于)具有类似功能的技术特 征进行互相替换而形成的技术方案。The above description is only the preferred embodiment of the present invention and the explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solution formed by the specific combination of the above technical features, and should also cover the above-mentioned Other technical solutions formed by any combination of technical features or their equivalents. For example, the above features and the technical features disclosed in the embodiments of the present invention (but not limited to) having similar functions are replaced with each other to form a technical solution.

Claims (16)

  1. 一种数据存储方法,其特征在于,包括:A data storage method is characterized by including:
    获取待存储数据包,其中,所述待存储数据包包括待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;Obtaining a data package to be stored, wherein the data package to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
    根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;Determine the data storage rule to be stored according to the data source information of the data to be stored and the target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of the data source to be stored and a sub-rule of the data storage database ;
    根据所述待存储数据存储规则对于所述待存储数据进行存储。Storing the data to be stored according to the data storage rule to be stored.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,包括:The method according to claim 1, wherein the determining the data storage rule to be stored according to the data source information and the data target database information of the data to be stored comprises:
    根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;Determine the data source category of the data to be stored according to the data source information of the data to be stored;
    根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;Determining the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
    根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;Determine the category of the target database of data to be stored according to the information of the target database of data to be stored;
    根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。The sub-rule of the data storage database to be stored is determined according to the category of the target database of the data to be stored.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述待存储数据存储规则对于所述待存储数据进行存储,包括:The method according to claim 1 or 2, wherein the storing the data to be stored according to the data storage rule to be stored comprises:
    判断所述待存储数据是否符合所述待存储数据存储规则;Determine whether the data to be stored conforms to the data storage rule to be stored;
    将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。Storing the data to be stored in accordance with the data storage rule to be stored in the target database.
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述待存储数据存储数据源子规则包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件;和/或,The method according to any one of claims 1-3, wherein the data source sub-rules for storing data to be stored include one or more of the following rules: data quality meets preset quality conditions, and storage time interval meets Preset interval conditions; and / or,
    所述待存储数据存储数据库子规则包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。The sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述待存储数据 存储规则对于所述待存储数据进行存储,包括:The method according to claim 4, wherein the storing the data to be stored according to the data storage rule includes:
    判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;Judging whether the quality of the data to be stored meets the preset quality condition, and discarding the data to be stored when the quality of the data to be stored does not meet the preset quality condition;
    当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;When the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
    当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述待存储数据;When the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
    当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;When the storage time interval of the data to be stored satisfies the preset interval condition, determine whether the data size of the data to be stored meets the preset size condition, and when the data size of the data to be stored does not satisfy the When the preset size condition is stated, part of the data to be stored is stored in the target database;
    当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。When the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
  6. 根据权利要求5所述的方法,其特征在于,所述当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中之后,还包括:The method according to claim 5, wherein after the data size of the data to be stored meets the preset size condition, after storing the data to be stored in the target database, the method further includes :
    获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。Obtain the attribute information of the data to be stored, and when the attribute information of the data to be stored meets the video storage condition, request to obtain and store the video data related to the data to be stored.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述根据所述待存储数据存储规则对于所述待存储数据进行存储之前,还包括:The method according to any one of claims 1-6, wherein before storing the data to be stored according to the data storage rule to be stored, the method further comprises:
    对于所述待存储数据进行预处理。Pre-process the data to be stored.
  8. 一种数据存储装置,其特征在于,包括:A data storage device, including:
    获取模块,被配置为获取待存储数据包,其中,所述待存储数据包包括 待存储数据、待存储数据的数据源信息以及待存储数据目标数据库信息;The obtaining module is configured to obtain a data packet to be stored, wherein the data packet to be stored includes data to be stored, data source information of the data to be stored, and target database information of the data to be stored;
    确定模块,被配置为根据所述待存储数据的数据源信息和待存储数据目标数据库信息确定待存储数据存储规则,其中,所述待存储数据存储规则包括待存储数据存储数据源子规则和待存储数据存储数据库子规则;The determining module is configured to determine the data storage rule to be stored based on the data source information of the data to be stored and the data target database information of the data to be stored, wherein the data storage rule to be stored includes a sub-rule of data source to be stored and a data Storage data storage database sub-rules;
    存储模块,被配置为根据所述待存储数据存储规则对于所述待存储数据进行存储。The storage module is configured to store the data to be stored according to the data storage rule to be stored.
  9. 根据权利要求8所述的装置,其特征在于,所述确定模块包括:The apparatus according to claim 8, wherein the determination module comprises:
    第一确定子模块,被配置为根据所述待存储数据的数据源信息确定所述待存储数据的数据源类别;The first determining submodule is configured to determine the data source category of the data to be stored according to the data source information of the data to be stored;
    第二确定子模块,被配置为根据所述待存储数据的数据源类别确定所述待存储数据存储数据源子规则;A second determining sub-module configured to determine the sub-rule of the data source of the data to be stored according to the type of the data source of the data to be stored;
    第三确定子模块,被配置为根据所述待存储数据目标数据库信息确定所述待存储数据目标数据库的类别;The third determining submodule is configured to determine the category of the data target database to be stored based on the data target database information to be stored;
    第四确定子模块,被配置为根据所述待存储数据目标数据库的类别确定所述待存储数据存储数据库子规则。The fourth determination submodule is configured to determine the sub-rule of the data storage database to be stored according to the category of the target database of the data to be stored.
  10. 根据权利要求8或9所述的装置,其特征在于,所述存储模块包括:The device according to claim 8 or 9, wherein the storage module comprises:
    判断子模块,被配置为判断所述待存储数据是否符合所述待存储数据存储规则;A judgment sub-module configured to judge whether the data to be stored conforms to the data storage rule to be stored;
    存储子模块,被配置为将符合所述待存储数据存储规则的待存储数据存储至所述目标数据库中。The storage submodule is configured to store the data to be stored that meets the data storage rule to be stored in the target database.
  11. 根据权利要求8-10任一所述的装置,其特征在于,所述待存储数据存储数据源子规则包括以下规则中的一种或多种:数据质量满足预设质量条件、存储时间间隔满足预设间隔条件;和/或,The device according to any one of claims 8 to 10, wherein the sub-rules for storing the data source of the data to be stored include one or more of the following rules: data quality meets a preset quality condition, and storage time interval meets Preset interval conditions; and / or,
    所述待存储数据存储数据库子规则包括以下规则中的一种或多种:数据相似度满足预设相似度条件、数据大小满足预设大小条件、视频存储条件。The sub-rules of the data storage database to be stored include one or more of the following rules: data similarity meets a preset similarity condition, data size meets a preset size condition, and video storage condition.
  12. 根据权利要求11所述的装置,其特征在于,所述存储模块被配置为:The apparatus according to claim 11, wherein the storage module is configured to:
    判断所述待存储数据的质量是否满足所述预设质量条件,并当所述待存储数据的质量不满足所述预设质量条件时,丢弃所述待存储数据;Judging whether the quality of the data to be stored meets the preset quality condition, and discarding the data to be stored when the quality of the data to be stored does not meet the preset quality condition;
    当所述待存储数据的质量满足所述预设质量条件时,判断所述待存储数据与所述目标数据库之间的相似度是否满足所述预设相似度条件,并当所述待存储数据与所述目标数据库之间的相似度不满足所述预设相似度条件时,新建数据库,将所述待存储数据存入新建数据库中;When the quality of the data to be stored satisfies the preset quality condition, determine whether the similarity between the data to be stored and the target database satisfies the preset similarity condition, and when the data to be stored When the similarity with the target database does not satisfy the preset similarity condition, create a new database, and store the data to be stored in the newly created database;
    当所述待存储数据与所述目标数据库之间的相似度满足所述预设相似度条件时,判断所述待存储数据的存储时间间隔是否满足所述预设间隔条件,并当所述待存储数据的存储时间间隔不满足所述预设间隔条件时,丢弃所述待存储数据;When the similarity between the data to be stored and the target database satisfies the preset similarity condition, it is determined whether the storage time interval of the data to be stored meets the preset interval condition, and when the pending When the storage time interval of the stored data does not satisfy the preset interval condition, discard the data to be stored;
    当所述待存储数据的存储时间间隔满足所述预设间隔条件时,判断所述待存储数据的数据大小是否满足所述预设大小条件,并当所述待存储数据的数据大小不满足所述预设大小条件时,将所述待存储数据的部分数据存入所述目标数据库中;When the storage time interval of the data to be stored satisfies the preset interval condition, determine whether the data size of the data to be stored meets the preset size condition, and when the data size of the data to be stored does not satisfy the When the preset size condition is stated, part of the data to be stored is stored in the target database;
    当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中。When the data size of the data to be stored meets the preset size condition, the data to be stored is stored in the target database.
  13. 根据权利要求12所述的装置,其特征在于,所述存储模块还被配置为:The apparatus according to claim 12, wherein the storage module is further configured to:
    当所述待存储数据的数据大小满足所述预设大小条件时,将所述待存储数据存入所述目标数据库中之后,获取所述待存储数据的属性信息,并当所述待存储数据的属性信息满足所述视频存储条件时,请求获取所述待存储数据相关的视频数据并对其进行存储。When the data size of the data to be stored meets the preset size condition, after the data to be stored is stored in the target database, the attribute information of the data to be stored is acquired, and when the data to be stored When the attribute information of meets the video storage condition, request to obtain video data related to the data to be stored and store it.
  14. 根据权利要求8-13任一所述的装置,其特征在于,还包括:The device according to any one of claims 8-13, further comprising:
    预处理模块,被配置为对于所述待存储数据进行预处理。The preprocessing module is configured to preprocess the data to be stored.
  15. 一种电子设备,其特征在于,包括存储器和处理器;其中,An electronic device characterized by comprising a memory and a processor; wherein,
    所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现权利要求1-7任一项所述的方法步骤。The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any one of claims 1-7.
  16. 一种计算机可读存储介质,其上存储有计算机指令,其特征在于,该计算机指令被处理器执行时实现权利要求1-7任一项所述的方法步骤。A computer-readable storage medium on which computer instructions are stored, characterized in that, when the computer instructions are executed by a processor, the method steps of any one of claims 1-7 are implemented.
PCT/CN2018/110652 2018-10-17 2018-10-17 Data storage method and apparatus, and electronic device and computer readable storage medium WO2020077563A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/110652 WO2020077563A1 (en) 2018-10-17 2018-10-17 Data storage method and apparatus, and electronic device and computer readable storage medium
CN201880002365.4A CN109564567B (en) 2018-10-17 2018-10-17 Data storage method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/110652 WO2020077563A1 (en) 2018-10-17 2018-10-17 Data storage method and apparatus, and electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020077563A1 true WO2020077563A1 (en) 2020-04-23

Family

ID=65872591

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110652 WO2020077563A1 (en) 2018-10-17 2018-10-17 Data storage method and apparatus, and electronic device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN109564567B (en)
WO (1) WO2020077563A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851443A (en) * 2019-10-28 2020-02-28 网联清算有限公司 Database storage management method and device, storage medium and electronic equipment
CN110784482B (en) * 2019-11-04 2022-03-25 浙江国利信安科技有限公司 Message storage method and device of industrial audit system
CN111078768A (en) * 2019-11-25 2020-04-28 深圳壹账通智能科技有限公司 Data import method and system based on graphic database and readable storage medium
CN116541448B (en) * 2023-05-10 2023-12-08 汉友科技有限公司 Data integration processing method and device based on SaaS

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008135A (en) * 2014-05-07 2014-08-27 南京邮电大学 Multi-source heterogeneous database fusion system and data query method thereof
CN104423953A (en) * 2013-09-04 2015-03-18 中国石油天然气股份有限公司 Timing data processing script execution system and method of supervisory control and data acquisition (SCADA) system
US20160162523A1 (en) * 2013-08-07 2016-06-09 Beijing Jingdong Shangke Information Technology Co., Ltd. Multidimensional data storage and retrieval method and device for monitoring system
CN107122401A (en) * 2017-03-22 2017-09-01 广州优视网络科技有限公司 To the method for data database storing, equipment, middleware equipment and server

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102648467B (en) * 2009-09-25 2018-10-02 阿德南·法科 Database and method for evaluating the data from database
CN102141996A (en) * 2010-01-29 2011-08-03 国际商业机器公司 Data access method and configuration management database system
CN102799634B (en) * 2012-06-26 2014-11-12 中国农业银行股份有限公司 Data storage method and device
US8935201B1 (en) * 2014-03-18 2015-01-13 Palantir Technologies Inc. Determining and extracting changed data from a data source
CN105095287B (en) * 2014-05-14 2018-09-28 华为技术有限公司 LSM data ordering by merging method and apparatus
CN104615785A (en) * 2015-03-04 2015-05-13 浪潮集团有限公司 Data storage method and device based on TYKY cNosql
CN105117470B (en) * 2015-08-28 2019-11-22 广州酷狗计算机科技有限公司 Date storage method and device
CN105205117B (en) * 2015-09-09 2019-03-05 郑州悉知信息科技股份有限公司 A kind of tables of data moving method and device
CN105893566A (en) * 2016-03-31 2016-08-24 北京资配易投资顾问有限公司 Stock quotation data storage method and device
CN106649590A (en) * 2016-11-18 2017-05-10 北京奇虎科技有限公司 Method and apparatus of processing storage space of database
CN107103025B (en) * 2017-01-05 2020-08-14 亚信科技(中国)有限公司 Data processing method and data processing platform
CN107783734B (en) * 2017-11-17 2021-03-16 北京联想超融合科技有限公司 Resource allocation method, device and terminal based on super-fusion storage system
CN108388599B (en) * 2018-02-01 2022-08-02 平安科技(深圳)有限公司 Electronic device, data migration and calling method and storage medium
CN108388598B (en) * 2018-02-01 2022-04-22 平安科技(深圳)有限公司 Electronic device, data storage method, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160162523A1 (en) * 2013-08-07 2016-06-09 Beijing Jingdong Shangke Information Technology Co., Ltd. Multidimensional data storage and retrieval method and device for monitoring system
CN104423953A (en) * 2013-09-04 2015-03-18 中国石油天然气股份有限公司 Timing data processing script execution system and method of supervisory control and data acquisition (SCADA) system
CN104008135A (en) * 2014-05-07 2014-08-27 南京邮电大学 Multi-source heterogeneous database fusion system and data query method thereof
CN107122401A (en) * 2017-03-22 2017-09-01 广州优视网络科技有限公司 To the method for data database storing, equipment, middleware equipment and server

Also Published As

Publication number Publication date
CN109564567B (en) 2023-07-25
CN109564567A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
WO2020077563A1 (en) Data storage method and apparatus, and electronic device and computer readable storage medium
US10762127B2 (en) Face recognition image data cache
WO2018035667A1 (en) Display method and apparatus, electronic device, computer program product, and non-transient computer readable storage medium
WO2020000834A1 (en) Traffic accident handling method and system, and server
US20220301317A1 (en) Method and device for constructing object motion trajectory, and computer storage medium
WO2022105019A1 (en) Snapshot quality evaluation method and apparatus for vehicle bayonet device, and readable medium
US10880672B2 (en) Evidence management system and method
WO2022099884A1 (en) Personnel and case association analysis method and apparatus based on face recognition
WO2023061082A1 (en) Image security processing method and apparatus, electronic device, and storage medium
Balchandani et al. A deep learning framework for smart street cleaning
US20210124741A1 (en) Predicting potential incident event data structures based on multi-modal analysis
CN108288025A (en) A kind of car video monitoring method, device and equipment
CN111062043B (en) Medical image identification method and system based on edge calculation
EP3890312A1 (en) Distributed image analysis method and system, and storage medium
CN111654678A (en) Monitoring and early warning system based on 5G
GB2575388A (en) Method, apparatus and system for discovering and displaying information related to video content
CN111064924A (en) Video monitoring method and system based on artificial intelligence
US11706381B2 (en) Selective obfuscation of objects in media content
US10747812B1 (en) Video analytics
CN111275035B (en) Method and system for identifying background information
KR20200122900A (en) Vehicle tracking system based on surveillance videos
CN115221453B (en) Media resource management method, device, server and medium
US7260642B2 (en) Method and system for real-time monitoring image transmission
RU2778208C1 (en) System for smart monitoring of user's behavior during interaction with content
CN212012909U (en) Monitoring and early warning system based on 5G

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: 18937267

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 09/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18937267

Country of ref document: EP

Kind code of ref document: A1