A data retrieval method, apparatus and electronic device

By establishing static data archive tables and dynamic capture record tables in the database, and combining them with the Elasticsearch storage engine, the problem of slow fusion retrieval speed in big data scenarios was solved, achieving efficient and accurate data retrieval.

CN116069782BActive Publication Date: 2026-04-14ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies, when faced with big data scenarios, suffer from slow retrieval speed and low efficiency in fusion retrieval methods, making them unable to effectively handle large amounts of complex data.

Method used

By establishing static data archive tables and dynamic snapshot record tables, and building a common index, the Elasticsearch storage engine is used for data storage and retrieval, optimizing the data retrieval process, including segmented insertion and index matching to improve efficiency.

Benefits of technology

In large-scale big data scenarios, ensuring that data has a unique and definite value improves the accuracy and efficiency of data fusion retrieval and reduces retrieval latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069782B_ABST
    Figure CN116069782B_ABST
Patent Text Reader

Abstract

The application discloses a data retrieval method, device and electronic equipment. The method comprises the following steps: firstly, establishing a static data archive table and a dynamic snapshot record table, and establishing an index corresponding to the static data archive table and the dynamic snapshot record table; then, receiving a first archive value of specified data to be retrieved by a user, and determining a target sub-record table corresponding to the data to be retrieved in the dynamic snapshot record table according to the index and the first archive value; finally, searching for target data information corresponding to the data to be retrieved in the target sub-record table. Through the above method, when facing a large data scale scene, not only can the data in the database be ensured to have a unique determined value that can be queried, but also the attribute information and the data information corresponding to the database data can be accurately found based on the index corresponding to the static data archive table and the dynamic snapshot record table, so that the efficiency of data fusion retrieval is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical fields of database systems, full-text retrieval and information extraction systems, and in particular to a data retrieval method, apparatus and electronic device. Background Technology

[0002] With the development of the security industry, the requirements for comprehensive trajectory data retrieval, including facial recognition data, vehicle information, and Media Access Control Address (MAC) information, are becoming increasingly stringent. This comprehensive trajectory data retrieval, also known as fusion retrieval, requires retrieving a person's presence records at different times and locations using their personal information.

[0003] In related technologies, the main fusion retrieval method involves developing a full-text search storage engine using the storage engine plugin mechanism of the relational database MySQL. This involves linking the existing full-text search system to the MySQL database and implementing fusion queries using standard Structured Query Language (SQL). Specifically, a "full-text search link table" is used in the MySQL database to represent the full-text search system. When a user accesses the "full-text search link table" using standard SQL, the full-text search storage engine automatically forwards the full-text search request to the full-text search system for processing. Fusion queries are then achieved by connecting the "full-text search link table" with other databases representing structured information.

[0004] However, the above method relies entirely on the performance of the MySQL storage engine. In real-world business scenarios, the amount of data received by the database is increasing, and the data structure is becoming more complex. Therefore, performing fusion retrieval based on the MySQL storage engine may result in slow retrieval speed and low efficiency. Summary of the Invention

[0005] This application provides a data retrieval method, apparatus, and electronic device that can solve the problems of slow retrieval speed and low efficiency of current fusion retrieval methods when facing big data scenarios.

[0006] Firstly, this application provides a data retrieval method, the method comprising:

[0007] Establish a static data archive table and a dynamic capture record table, and establish an index that corresponds to both the static data archive table and the dynamic capture record table. The static data archive table is used to store the attribute values ​​corresponding to the database data, and the dynamic capture record table is used to store the data information corresponding to the database data.

[0008] Receive the first archive value of the data to be retrieved specified by the user, wherein the archive value represents a target attribute value that is uniquely determined;

[0009] Based on the index and the first file value, the target sub-record table corresponding to the data to be retrieved is determined in the dynamic capture record table;

[0010] The target data information corresponding to the data to be retrieved is retrieved from the target sub-record table.

[0011] By using the above method, data fusion retrieval is achieved based on static data archive tables and dynamic capture record tables. When facing large-scale big data scenarios, this not only ensures that all data in the database has unique and identifiable values, but also allows for accurate retrieval of attribute information and data information corresponding to the database data based on the indexes shared by the static data archive tables and dynamic capture record tables, thereby improving the efficiency of data fusion retrieval.

[0012] In one possible design, a dynamic snapshot recording table is established, including:

[0013] Establish vehicle capture record forms, human image capture record forms, and alarm record forms;

[0014] The vehicle capture record table, the human image capture record table, and the alarm record table are used as the dynamic capture record table.

[0015] By using the above method, a dynamic capture record table is established, and the data information corresponding to the database data is stored in the dynamic capture record table, which helps to accurately find the data information corresponding to the data to be retrieved during data fusion retrieval.

[0016] In one possible design, establishing an index that corresponds to both the static data archive table and the dynamic capture record table includes:

[0017] When a database data insertion request is received, it is determined whether the indexes corresponding to the static data archive table and the dynamic capture record table exist.

[0018] If so, then determine the second file value and the first file body type corresponding to the database data, wherein the file body type is used to distinguish the database data;

[0019] Based on the index, the second file value and the first file subject type are inserted into the static data file table and the dynamic capture record table.

[0020] Using the above method, an index can be created that corresponds to both the static data archive table and the dynamic capture record table. Based on the index, the attribute information and data information corresponding to the database data can be accurately found.

[0021] In one possible design, inserting the second file value and the first file body type into the static data file table and the dynamic capture record table according to the index includes:

[0022] Based on the index, the static data archive table and the dynamic capture record table can be located;

[0023] When the first file subject type is a person, the first file subject type is directly inserted into the static data file table, and the second file value is inserted into the dynamic capture record table in segments according to a preset method;

[0024] When the first file subject type is a vehicle, the first file subject type and the second file value are directly inserted into the static data file table and the dynamic capture record table;

[0025] When the first file body type is a local area network address, the first file body type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

[0026] Using the above method, the insertion method of the second file value and the first file type can be determined according to the first file type. Thus, when the first file type is a person, the problem of high retrieval delay and low efficiency caused by the excessive length of the second file value's numerical string can be solved.

[0027] In one possible design, determining the target sub-record table corresponding to the data to be retrieved based on the index and the first file value includes:

[0028] Based on the index, the first archive value and the target attribute information corresponding to the data to be retrieved are found in the static data archive table;

[0029] Based on the index and the second file subject type in each target attribute information, the target sub-record table corresponding to the data to be retrieved is determined.

[0030] Using the above method, based on the index and the first file value corresponding to the data to be retrieved, the target sub-record table corresponding to the data to be retrieved can be accurately found, thus improving the accuracy of data fusion retrieval.

[0031] Secondly, this application provides a data retrieval device, the device comprising:

[0032] A module is established to create a static data archive table and a dynamic capture record table, and to create an index that corresponds to both the static data archive table and the dynamic capture record table. The static data archive table is used to store the attribute values ​​corresponding to the database data, and the dynamic capture record table is used to store the data information corresponding to the database data.

[0033] The receiving module is used to receive the first archive value of the data to be retrieved specified by the user, wherein the archive value represents a target attribute value that is uniquely determined.

[0034] The determination module is used to determine the target sub-record table corresponding to the data to be retrieved in the dynamic capture record table based on the index and the first file value;

[0035] The retrieval module is used to retrieve the target data information corresponding to the data to be retrieved from the target sub-record table.

[0036] In one possible design, the establishment module is specifically used for:

[0037] Establish vehicle capture record forms, human image capture record forms, and alarm record forms;

[0038] The vehicle capture record table, the human image capture record table, and the alarm record table are used as the dynamic capture record table.

[0039] In one possible design, the building module further includes:

[0040] The judgment unit is used to determine whether the indexes corresponding to the static data archive table and the dynamic capture record table exist when a database data insertion request is received;

[0041] The determining unit is configured to determine the second file value and the first file body type corresponding to the database data if an index corresponding to the static data archive table and the dynamic capture record table exists, wherein the file body type is used to distinguish the database data;

[0042] An insertion unit is used to insert the second file value and the first file body type into the static data file table and the dynamic capture record table according to the index.

[0043] In one possible design, the insertion unit is specifically used for:

[0044] Based on the index, the static data archive table and the dynamic capture record table can be located;

[0045] When the first file subject type is a person, the first file subject type is directly inserted into the static data file table, and the second file value is inserted into the dynamic capture record table in segments according to a preset method;

[0046] When the first file subject type is a vehicle, the first file subject type and the second file value are directly inserted into the static data file table and the dynamic capture record table;

[0047] When the first file body type is a local area network address, the first file body type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

[0048] In one possible design, the determining module is specifically used for:

[0049] Based on the index, the first archive value and the target attribute information corresponding to the data to be retrieved are found in the static data archive table;

[0050] Based on the index and the second file subject type in each target attribute information, the target sub-record table corresponding to the data to be retrieved is determined.

[0051] Thirdly, this application provides an electronic device, comprising:

[0052] Memory, used to store computer programs;

[0053] When the processor executes the computer program stored in the memory, it implements the above-described data retrieval method steps.

[0054] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described data retrieval method steps.

[0055] Based on the data retrieval method provided in this application, data fusion retrieval is achieved through a static data archive table and a dynamic capture record table. When facing large-scale big data scenarios, it can not only ensure that all data in the database has a unique and identifiable value, but also accurately find the attribute information and data information corresponding to the database data based on the indexes that are jointly provided by the static data archive table and the dynamic capture record table, thereby improving the efficiency of data fusion retrieval.

[0056] The technical effects of each of the second to fourth aspects mentioned above, as well as the technical effects that each aspect may achieve, are described above with reference to the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect, and will not be repeated here. Attached Figure Description

[0057] Figure 1 This application provides one possible application scenario illustration;

[0058] Figure 2 A flowchart of a data retrieval method provided in this application;

[0059] Figure 3 This is the second possible application scenario diagram provided by this application;

[0060] Figure 4 A schematic diagram of the structure of a data retrieval device provided in this application;

[0061] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing together, or B existing alone. A connected to B can represent: A and B directly connected, or A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for distinguishing the purpose of description and should not be construed as indicating or implying relative importance or order.

[0063] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0064] The current fusion search method utilizes the storage engine plugin mechanism of the relational database MySQL to develop a full-text search storage engine, links the existing full-text search system to the MySQL database, and implements fusion queries through the standard Structured Query Language (SQL). Specifically, a "full-text search link table" is used in the MySQL database to represent the full-text search system. When a user accesses the "full-text search link table" through standard SQL, the full-text search storage engine automatically forwards the full-text search request to the full-text search system for processing, and achieves fusion queries by connecting the "full-text search link table" with other databases representing structured information.

[0065] However, the above method relies entirely on the performance of the MySQL storage engine. In real-world business scenarios, the amount of data received by the database is increasing, and the data structure is becoming more complex. Therefore, performing fusion retrieval based on the MySQL storage engine may result in slow retrieval speed and low efficiency.

[0066] To address the aforementioned issues, this application provides a data retrieval method that achieves data fusion retrieval through a static data archive table and a dynamic capture record table. In scenarios involving large-scale data, this method not only ensures that all data in the database has unique, queryable values, but also accurately retrieves the corresponding attribute and data information based on the indexes shared by the static data archive table and the dynamic capture record table, thereby improving the efficiency of data fusion retrieval. The methods and apparatus described in this application are based on the same technical concept. Since the principles by which the methods and apparatus solve the problems are similar, embodiments of the apparatus and methods can be referred to interchangeably, and repeated details will not be elaborated further.

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application is provided in conjunction with the accompanying drawings.

[0068] like Figure 1 The diagram shown is a possible application scenario provided by an embodiment of this application. The application scenario includes: front-end data source 11, message middleware 12, and database 13.

[0069] For example, front-end data source 11 refers to the large amount of dynamic structured data and dynamic unstructured data existing in the security industry. Among them, dynamic structured data includes: vehicle passage data, human image data, non-motorized vehicle structured data, and data collected through smart terminals or radio frequency identification (RFID) technology; dynamic unstructured data includes: face capture images, vehicle capture images, and checkpoint capture videos, and dynamic unstructured data can be converted into dynamic structured data;

[0070] The message middleware 12 is used to transmit various data from the front-end data source 11 to the database 13. The data includes dynamic structured data and dynamic unstructured data. Common message middleware includes message-oriented middleware (RabbitMQ), open-source message middleware (ActiveMQ), distributed publish-subscribe message middleware (Kafka), and queue-based message middleware (RocketMQ). In this embodiment, Kafka and RabbitMQ are mainly involved.

[0071] Message middleware 12 is used for data transmission because it has peak shaving and decoupling functions. Peak shaving refers to reducing the pressure on the front-end data source 11 due to the large amount of data being transmitted and on the database 13 due to the large amount of data being received.

[0072] For example, when the front-end data source 11 transmits various data to the database 13, if there is too much data, it will put a lot of pressure on both the front-end data source 11 and the database 13. However, if the front-end data source 11 first transmits the data to the message middleware 12 and automatically ends the transmission process after completion, and then the database 13 receives the data from the message middleware 12, if the message middleware 12 is currently receiving data, it will not process the database 13's request to receive data until the message middleware 12 is ready, thus alleviating the pressure on the front-end data source 11 and the database 13.

[0073] The decoupling function refers to enhancing the independent existence capability of the front-end data source 11 and the database 13. For example, when the front-end data source 11 transmits data to the database 13, if the database 13 fails and cannot receive the data normally, it will cause the data transmission of the front-end data source 11 to fail, thus decoupling the front-end data source 11 and the database 13. However, if the front-end data source 11 first transmits the data to the message middleware 12, and then the database 13 receives the data from the message middleware 12, then even if the database 13 fails, it will not affect the front-end data source 11's transmission of data.

[0074] Database 13 is used to store various data transmitted by message middleware 12, and mainly includes access service, query service, and storage engine. The access service is primarily used to pull various data from message middleware 12 to the storage engine within the database; the query service is a query system that provides query interfaces, offering both general SQL query interfaces and customized advanced and complex query interfaces for various query business scenarios; the storage engine is used to partition and store various data.

[0075] Based on the above application scenarios, the data processing method provided in the embodiments of this application will be described and explained below with reference to the accompanying drawings, such as... Figure 2 The diagram shown is a flowchart of a data retrieval method provided in this application, which specifically includes the following steps:

[0076] S21, Establish a static data archive table and a dynamic capture record table, and establish a common index for the static data archive table and the dynamic capture record table;

[0077] To address the issue that current fusion retrieval methods rely entirely on the performance of the MySQL storage engine, and that as the amount and complexity of data received by database 13 increase, fusion retrieval based on the MySQL storage engine may result in slow retrieval speed and low efficiency, this embodiment of the application improves database 13 to enhance retrieval efficiency. Specific improvement methods may include:

[0078] Firstly, to ensure that all data in database 13 has unique and queryable values, the data storage method of the storage engine in database 13 can be improved. The storage engine can be a distributed search and analysis engine (Elasticsearch, ES). Specifically, firstly, a static data archive table P_DOSSIER_MERGE is created, as shown in Table 1:

[0079] Table 1. A static data archive table

[0080] Table 1 stores the attribute values ​​of each database, namely the file value and the data subject type. The file value represents a unique attribute value. For example, the file value of a vehicle is the license plate number, and the file value of a person is the ID card number. The file subject type is used to distinguish the data from each database. For example, the file subject type of a vehicle is represented by the value 1, and the file subject type of a person is represented by the value 2.

[0081] Then, vehicle capture record tables, facial image capture record tables, and alarm record tables are established, and these tables are used as dynamic capture record tables. The vehicle capture record table P_PICRECORD stores vehicle information captured by the acquisition equipment, including traffic violation information, as shown in Table 2.

[0082]

[0083] Table 2. Vehicle Capture Record Form

[0084] The face capture record table P_FACE_RECORD is used to store face capture information captured by the acquisition device, as shown in Table 3:

[0085]

[0086] Table 3. A record form for capturing portrait images.

[0087] The alarm log table P_SURVEY is used to store alarm information corresponding to various types of files captured by the data acquisition device, including violations and irregularities, as shown in Table 4:

[0088]

[0089] Table 4. An alarm record form

[0090] Tables 2, 3, and 4 store the data information corresponding to each attribute value. For example, if the file value of data A is ZQH6B, the data information corresponding to the file value ZQH6B includes the vehicle capture time, alarm type, and alarm capture time. Thus, the captured images of data A at various times can be obtained based on the data information.

[0091] Secondly, to accurately retrieve database data from Elasticsearch, the access service in database 13 can be improved. Specifically, when the access service receives a database data insertion request, it determines whether an index exists that corresponds to both the static data archive table and the dynamic capture record table. This index includes all fields from both tables, as well as the relationships between them, such as specifying the parent table as P_DOSSIER_MERGE and the child tables as P_PICRECORD, P_FACE_RECORD, and P_SURVEY. If no index exists, it is created for both the static data archive table and the dynamic capture record table.

[0092] If an index exists, the second file value and the first file body type corresponding to the database data are determined. Based on the index, the second file value and the first file body type are inserted into the static data file table and the dynamic capture record table. Specifically, first, the static data file table and the dynamic capture record table are found based on the index. Then, to improve retrieval efficiency, the insertion method for the second file value and the first file body type can be determined based on the first file body type.

[0093] When the first file type is a person, the query service in database 13 can be improved to enhance the matching efficiency of file values. Specifically, the first file type can be directly inserted into the static data file table. In this case, the second file value is an ID card number, which is typically an 18-digit string. During data retrieval, if the default bitwise segmentation is used, the number of matches will increase geometrically with the length of the input file value's digit string, resulting in high retrieval latency and low efficiency with large datasets. To address this issue, the second file value can be segmented and inserted into the dynamic capture record table according to a preset method.

[0094] For example, such as Figure 3As shown, the second file value is 123456789123456789. Therefore, the second file is stored in eight segments: Administrative Division - Province 31 (file value 12), Administrative Division - Province / City 32 (file value 1234), Administrative Division - Province / City / County 33 (file value 123456), Year of Birth 34 (file value 789), Year of Birth 35 (file value 7891), Month and Year of Birth 36 (file value 789123), Day of Birth 37 (file value 78912345), and Remaining Value 38 (file value 6789). When data retrieval requires matching the second file value, segmented matching—that is, matching the next segment only after the previous segment has been successfully matched—can improve matching efficiency and thus improve data retrieval efficiency.

[0095] When the first file type is a vehicle, the first file type and the second file value are directly inserted into the static data file table and the dynamic capture record table; when the first file type is a local area network address, the first file type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

[0096] By using the above methods, a static data archive table and a dynamic capture record table are established, along with a common index for both tables. This not only satisfies full-text search requirements but also improves search efficiency during data retrieval.

[0097] S22, Receive the first file value of the data to be retrieved specified by the user;

[0098] After the database 13 is improved, each data in the front-end data source 11 is transmitted to the improved database 13 through the message middleware 12, and each data is saved in accordance with the above method, which is the database data in the embodiment of this application.

[0099] Furthermore, to implement the data fusion method based on the improved database 13, it is necessary to first receive the first file value of the data to be retrieved specified by the user, and use the ES query syntax query_string to specify the keyword of the data to be retrieved, for example, query = keyworld. At the same time, the related table to be queried and the related conditions are specified by using the statement has_child to query the parent table through the child table.

[0100] For example, if the data to be retrieved is: to retrieve information about vehicle A that appeared in time period T, and the license plate is ZQH6B obtained through fuzzy search, then the specified statement is as follows:

[0101] {"query":{"bool":{"filter":[{"bool":{"filter":[{"bool":{"filter":[{"bool":{"filter":[{"term":{"_TYPE":{"value":"P_DOSSIER_MERGE","boost":1.0}}},{"query_st ring":{"query":"ZQH6B","fields":["ADDRESS^1.0","CARD_NO^1.0","MAC_AD DR^1.0","MAC_ADDR.MH^1.0","NAME^2.0","PHONE_NO^1.0","PLATE_NU M^1.0","RFID_SN^1.0"],"type":"phrase","default_operator":"and","max_determini zed_states":10000,"enable_position_increments":true,"fuzziness":"AUTO","fuzzy_prefix_length":0,"fuzzy_max_expansions":50,"phrase_slop":0,"escape":false,"auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"should":[{"has_child":{"query":{"bool":{"filter":[{"bool":{"filter":[{"bool":{"filter":[{"range":{"CAP_TIME":{"from":1603764667000,"to":null,"include_lower":true,"include_upper":true,"boo st":1.0}}},{"range":{"CAP_TIME":{"from":null,"to":1604110267000,"include_low er":true,"include_upper":false,"boost":1.0}}},{"term":{"POSITION":{"value":"B","boost":1.0}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":tr ue,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"type":"P_PICRECORD"}}]}}]}},"highlight":{"require_field_match":true,"fields":{"*":{}},"pre_tags":[". <em> "],"post_tags":["< / em> "]},"from":0,"size":10000}

[0102] S23, Based on the index and the first file value, determine the target sub-record table corresponding to the data to be retrieved in the dynamic capture record table;

[0103] In this embodiment of the application, after receiving the first file value of the data to be retrieved specified by the user, the target sub-record table corresponding to the data to be retrieved is determined based on the index that is jointly corresponding to the static data file table and the dynamic capture record table, and the first file value of the data to be retrieved.

[0104] Specifically, the first file value and the target attribute information corresponding to the data to be retrieved are found in the static data file table based on the index, and the target sub-record table corresponding to the data to be retrieved is determined based on the second file body type in the index and the target attribute information.

[0105] For example, the data to be retrieved is: information about vehicle A that appeared in time period T. A fuzzy search reveals the license plate as ZQH6B, meaning the first file value is ZQH6B. Then, based on the index, the first file value ZQH6B and the corresponding target attribute information for the data to be retrieved are found in P_DOSSIER_MERGE. Specifically, the second file's main body type is the value 1, the license plate number is ZQH6B, and the license plate type is civilian vehicle. Further, based on the index and the second file's main body type in the target attribute information, the target sub-record tables corresponding to the data to be retrieved are determined to be P_PICRECORD and P_SURVEY.

[0106] S24. Retrieve the target data information corresponding to the data to be retrieved from the target sub-record table.

[0107] In this embodiment of the application, after determining the target sub-record table corresponding to the data to be retrieved, the target data information corresponding to the data to be retrieved is retrieved from the target sub-record table.

[0108] For example, the data to be retrieved is: information about vehicle A that appeared in time period T. Fuzzy search yields license plate ZQH6B, meaning the first file value is ZQH6B. The target attribute information corresponding to the data to be retrieved includes: second file type is value 1, license plate number is ZQH6B, and license plate type is civilian vehicle. The target sub-record tables corresponding to the data to be retrieved are P_PICRECORD and P_SURVEY. Each target attribute information is compared with the data information in P_PICRECORD and P_SURVEY. In P_PICRECORD and P_SURVEY, the target data information corresponding to the data to be retrieved is determined as follows: vehicle A capture time T1, vehicle A capture time T2, vehicle A capture time T3, vehicle A capture time T4, alarm type 1 and alarm capture time t1, alarm type 2 and alarm capture time t2.

[0109] Furthermore, by determining that the capture times T1, T2, t1, and t2 of vehicle A are all outside the time period T, while the capture times T3 and T4 of vehicle A are within the time period T, and that capture time T3 corresponds to vehicle image 1 and capture time T4 corresponds to vehicle image 2, the image information of vehicle A within the time period T can be obtained based on the target data information, namely image 1 and image 2.

[0110] Based on the above data retrieval method, data fusion retrieval is achieved through static data archive tables and dynamic capture record tables. When facing large-scale big data scenarios, it can not only ensure that all data in the database has unique and identifiable values, but also accurately find the attribute information and data information corresponding to the database data based on the indexes that are jointly provided by the static data archive tables and dynamic capture record tables, thereby improving the efficiency of data fusion retrieval.

[0111] Based on the same inventive concept, this application also provides a data retrieval device, such as... Figure 4 The diagram shown is a structural schematic of a data retrieval device according to this application. The device includes:

[0112] Module 41 is used to create a static data archive table and a dynamic capture record table, and to create an index that corresponds to both the static data archive table and the dynamic capture record table. The static data archive table is used to store the attribute values ​​corresponding to the database data, and the dynamic capture record table is used to store the data information corresponding to the database data.

[0113] The receiving module 42 is used to receive the first file value of the data to be retrieved specified by the user, wherein the file value represents the target attribute value with uniquely determined value;

[0114] The determining module 43 is used to determine the target sub-record table corresponding to the data to be retrieved in the dynamic capture record table based on the index and the first file value.

[0115] The retrieval module 44 is used to retrieve the target data information corresponding to the data to be retrieved from the target sub-record table.

[0116] In one possible design, the establishment module 41 is specifically used for:

[0117] Establish vehicle capture record forms, human image capture record forms, and alarm record forms;

[0118] The vehicle capture record table, the human image capture record table, and the alarm record table are used as the dynamic capture record table.

[0119] In one possible design, the establishment module 41 further includes:

[0120] The judgment unit is used to determine whether the indexes corresponding to the static data archive table and the dynamic capture record table exist when a database data insertion request is received;

[0121] The determining unit is configured to determine the second file value and the first file body type corresponding to the database data if an index corresponding to the static data archive table and the dynamic capture record table exists, wherein the file body type is used to distinguish the database data;

[0122] An insertion unit is used to insert the second file value and the first file body type into the static data file table and the dynamic capture record table according to the index.

[0123] In one possible design, the insertion unit is specifically used for:

[0124] Based on the index, the static data archive table and the dynamic capture record table can be located;

[0125] When the first file subject type is a person, the first file subject type is directly inserted into the static data file table, and the second file value is inserted into the dynamic capture record table in segments according to a preset method;

[0126] When the first file subject type is a vehicle, the first file subject type and the second file value are directly inserted into the static data file table and the dynamic capture record table;

[0127] When the first file body type is a local area network address, the first file body type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

[0128] In one possible design, the determining module 43 is specifically used for:

[0129] Based on the index, the first archive value and the target attribute information corresponding to the data to be retrieved are found in the static data archive table;

[0130] Based on the index and the second file subject type in each target attribute information, the target sub-record table corresponding to the data to be retrieved is determined.

[0131] Based on the aforementioned data retrieval device, data fusion retrieval is achieved through a static data archive table and a dynamic capture record table. When facing large-scale big data scenarios, it not only ensures that all data in the database has unique and identifiable values, but also accurately retrieves the attribute information and data information corresponding to the database data based on the indexes jointly corresponding to the static data archive table and the dynamic capture record table, thereby improving the efficiency of data fusion retrieval.

[0132] Based on the same inventive concept, this application also provides an electronic device that can realize the functions of the aforementioned data retrieval device. (Refer to...) Figure 4 The electronic device includes:

[0133] At least one processor 51 and a memory 52 connected to at least one processor 51. In this embodiment, the specific connection medium between the processor 51 and the memory 52 is not limited. Figure 5 The example shown is the connection between processor 51 and memory 52 via bus 50. Bus 50 is... Figure 5 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Bus 50 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 5 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 51 can also be called a controller; there is no restriction on the name.

[0134] In this embodiment, memory 52 stores instructions executable by at least one processor 51. By executing the instructions stored in memory 52, at least one processor 51 can perform the data retrieval method described above. Processor 51 can implement... Figure 4 The functions of each module in the device shown.

[0135] The processor 51 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 52 and calling data stored in memory 52, the processor can perform various functions and process data, thereby monitoring the device as a whole.

[0136] In one possible design, processor 51 may include one or more processing units. Processor 51 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 51. In some embodiments, processor 51 and memory 52 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.

[0137] Processor 51 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the data retrieval method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0138] Memory 52, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 52 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 52 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 52 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0139] By designing and programming the processor 51, the code corresponding to the data retrieval method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the code during operation. Figure 2 The steps of the data retrieval method in the illustrated embodiment are as follows. How to design and program the processor 51 is a technique well-known to those skilled in the art and will not be described further here.

[0140] Based on the same inventive concept, embodiments of this application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the data retrieval method described above.

[0141] In some possible implementations, various aspects of the data retrieval method provided in this application may also be implemented as a program product, which includes program code that, when the program product is run on a device, causes the control device to perform the steps in the data retrieval method according to the various exemplary embodiments of this application described above.

[0142] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0145] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0146] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data retrieval method, characterized in that, The method includes: Establish a static data archive table and a dynamic capture record table, and establish an index that corresponds to both the static data archive table and the dynamic capture record table. The static data archive table is used to store the attribute values ​​corresponding to the database data, and the dynamic capture record table is used to store the data information corresponding to the database data. Receive the first archive value of the data to be retrieved specified by the user, wherein the archive value represents a target attribute value that is uniquely determined; Based on the index and the first file value, the target sub-record table corresponding to the data to be retrieved is determined in the dynamic capture record table; The target data information corresponding to the data to be retrieved is retrieved from the target sub-record table.

2. The method as described in claim 1, characterized in that, Establish a dynamic snapshot record form, including: Establish vehicle capture record forms, human image capture record forms, and alarm record forms; The vehicle capture record table, the human image capture record table, and the alarm record table are used as the dynamic capture record table.

3. The method as described in claim 1, characterized in that, The step of establishing an index that corresponds to both the static data archive table and the dynamic capture record table includes: When a database data insertion request is received, it is determined whether the indexes corresponding to the static data archive table and the dynamic capture record table exist. If so, then determine the second file value and the first file body type corresponding to the database data, wherein the file body type is used to distinguish the database data; Based on the index, the second file value and the first file subject type are inserted into the static data file table and the dynamic capture record table.

4. The method as described in claim 3, characterized in that, The step of inserting the second file value and the first file body type into the static data file table and the dynamic capture record table according to the index includes: Based on the index, the static data archive table and the dynamic capture record table can be located; When the first file subject type is a person, the first file subject type is directly inserted into the static data file table, and the second file value is inserted into the dynamic capture record table in segments according to a preset method; When the first file subject type is a vehicle, the first file subject type and the second file value are directly inserted into the static data file table and the dynamic capture record table; When the first file body type is a local area network address, the first file body type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

5. The method as described in claim 1, characterized in that, The step of determining the target sub-record table corresponding to the data to be retrieved based on the index and the first file value includes: Based on the index, the first archive value and the target attribute information corresponding to the data to be retrieved are found in the static data archive table; Based on the index and the second file subject type in each target attribute information, the target sub-record table corresponding to the data to be retrieved is determined.

6. A data retrieval device, characterized in that, The device includes: A module is established to create a static data archive table and a dynamic capture record table, and to create an index that corresponds to both the static data archive table and the dynamic capture record table. The static data archive table is used to store the attribute values ​​corresponding to the database data, and the dynamic capture record table is used to store the data information corresponding to the database data. The receiving module is used to receive the first archive value of the data to be retrieved specified by the user, wherein the archive value represents a target attribute value that is uniquely determined. The determination module is used to determine the target sub-record table corresponding to the data to be retrieved in the dynamic capture record table based on the index and the first file value; The retrieval module is used to retrieve the target data information corresponding to the data to be retrieved from the target sub-record table.

7. The apparatus as claimed in claim 6, characterized in that, The establishment module is specifically used for: Establish vehicle capture record forms, human image capture record forms, and alarm record forms; The vehicle capture record table, the human image capture record table, and the alarm record table are used as the dynamic capture record table.

8. The apparatus as claimed in claim 6, characterized in that, The establishment module also includes: The judgment unit is used to determine whether the indexes corresponding to the static data archive table and the dynamic capture record table exist when a database data insertion request is received; The determining unit is configured to determine the second file value and the first file body type corresponding to the database data if an index corresponding to the static data archive table and the dynamic capture record table exists, wherein the file body type is used to distinguish the database data; An insertion unit is used to insert the second file value and the first file body type into the static data file table and the dynamic capture record table according to the index.

9. The apparatus as claimed in claim 8, characterized in that, The insertion unit is specifically used for: Based on the index, the static data archive table and the dynamic capture record table can be located; When the first file subject type is a person, the first file subject type is directly inserted into the static data file table, and the second file value is inserted into the dynamic capture record table in segments according to a preset method; When the first file subject type is a vehicle, the first file subject type and the second file value are directly inserted into the static data file table and the dynamic capture record table; When the first file body type is a local area network address, the first file body type and the second file value are directly inserted into the static data file table and the dynamic capture record table.

10. The apparatus as claimed in claim 6, characterized in that, The determining module is specifically used for: Based on the index, the first archive value and the target attribute information corresponding to the data to be retrieved are found in the static data archive table; Based on the index and the second file subject type in each target attribute information, the target sub-record table corresponding to the data to be retrieved is determined.

11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the method steps of any one of claims 1-5.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method steps of any one of claims 1-5.

Citation Information

Patent Citations

  • Smart community data management system, data processing method thereof and medium

    CN112883772A

  • Techniques for using dynamic data sources with static search mechanisms

    US8688702B1