Time and space based query method, device and equipment and readable storage medium
By using rectangular data table storage and mapping table query methods, the problem of low efficiency in storing and querying temporal and spatial data in existing technologies is solved, achieving efficient storage and querying and providing accurate data item and object information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-05-15
AI Technical Summary
Existing data processing methods are insufficient for efficiently storing and querying data related to time and space dimensions, especially in scenarios such as pedestrian tracking and product inspection, and cannot meet the data storage and query requirements.
A rectangular data table storage method is adopted, which determines the target cell by date, spatial location and time range, merges data items to form a data item set, and uses a mapping table to provide additional information to achieve efficient storage and retrieval.
It reduces storage space usage, improves query efficiency, and can quickly and accurately obtain the time and space data required by users, while providing additional related information.
Smart Images

Figure CN116226208B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a time- and space-based query method, apparatus, device, and readable storage medium. Background Technology
[0002] In real-world production and daily life, various fields generate massive amounts of data. Existing data processing methods are mostly used for processing streaming data that is closely related to the time dimension. However, in many application scenarios, data generation is related not only to the time dimension but also to the spatial dimension. For example, in pedestrian tracking scenarios, a large amount of pedestrian data is generated at different times and locations. Similarly, in product inspection scenarios, a large amount of product data is generated at different times and on different production lines. Existing data processing methods are not suitable for these application scenarios. Therefore, how to store temporal and spatial data more conveniently and how to query temporal and spatial data more efficiently have become technical problems that urgently need to be solved by those skilled in the art. Summary of the Invention
[0003] The purpose of this invention is to provide a time- and space-based query method, apparatus, device, and readable storage medium that can store and query time- and space data more efficiently.
[0004] According to one aspect of the present invention, a time- and space-based query method is provided, the method comprising:
[0005] The system receives a query command sent by a client and retrieves a target rectangular data table from a preset database based on the date in the query command; wherein the database includes rectangular data tables for different dates.
[0006] Based on the spatial location and time range in the query instruction, the target cell is determined from the target rectangular data table; wherein, each row or column of the rectangular data table represents a different spatial location and a different time range;
[0007] The data items in each of the identified target cells are merged to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range;
[0008] The set of data items is sent to the client as the query result.
[0009] Optionally, sending the set of data items as query results to the client includes:
[0010] Each data item in the data item set is queried sequentially, and the object that has a mapping relationship with the currently queried data item is determined according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items;
[0011] One or more identified objects are formed into an object set, and the data item set and the object set are sent to the client as query results.
[0012] Optionally, the method further includes:
[0013] When N data item sets and N object sets are formed based on N query commands, objects that exist in at least M object sets are set as priority objects; where M and N are both positive integers, and M≤N;
[0014] From the set of N data items, identify one or more key data items that have a mapping relationship with the key object;
[0015] The key object, and one or more key data items that have a mapping relationship with the key object, are sent to the client.
[0016] Optionally, sending the key object and one or more key data items that have a mapping relationship with the key object to the client includes:
[0017] Each key data item is queried sequentially to determine the target data item set to which the currently queried key data item belongs, and the query conditions used to form the target data item set are set as target query conditions associated with the key object;
[0018] The key object, one or more key data items, and one or more target query conditions associated with the key object are displayed in the client's display interface.
[0019] Optionally, sending the key object and one or more key data items that have a mapping relationship with the key object to the client includes:
[0020] For a key data item, determine the target data item set to which the key data item belongs, and set the query conditions that form the target data item set as the target query conditions;
[0021] The key data items and the target query conditions are displayed together in the client's display interface.
[0022] Optionally, the data item is: an image, or an image number; wherein the image is captured by a camera located at a specific spatial location within a specific time range;
[0023] The object is: pedestrian image, or pedestrian identification information.
[0024] To achieve the above objectives, the present invention also provides a time- and space-based query device, the device comprising:
[0025] A receiving module is used to receive a query instruction sent by a client and retrieve a target rectangular data table from a preset database according to the date in the query instruction; wherein the database includes rectangular data tables for different dates;
[0026] The determination module is used to determine the target cell from the target rectangular data table based on the spatial location and time range in the query instruction; wherein, each row or column of the rectangular data table represents a different spatial location and a different time range;
[0027] The merge module is used to merge the data items in the identified target cells to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range;
[0028] The sending module is used to send the set of data items as query results to the client.
[0029] Optionally, the sending module is used for:
[0030] Each data item in the data item set is queried sequentially, and the object that has a mapping relationship with the currently queried data item is determined according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items;
[0031] One or more identified objects are formed into an object set, and the data item set and the object set are sent to the client as query results.
[0032] To achieve the above objectives, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the time- and space-based query method described above.
[0033] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the time- and space-based query method described above.
[0034] The present invention provides a time- and space-based query method, apparatus, device, and readable storage medium that efficiently stores time- and space data using a special data storage method called a rectangular data table. Compared with traditional data storage methods, storing time- and space data using a rectangular data table can significantly reduce storage space. Furthermore, during the query process, the target rectangular data table is first located in the database by date, then the target cell is located in the target rectangular data table by spatial location and time range, and finally the data item required by the user is obtained from the target cell. The data query process based on the rectangular data table is relatively fast and efficient. The present invention can store and query time- and space data more efficiently. Attached Figure Description
[0035] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0036] Figure 1 This is a schematic diagram of an optional time- and space-based query method provided in Embodiment 1;
[0037] Figure 2 A schematic diagram of the rectangular data table provided in Example 1;
[0038] Figure 3 This is a schematic diagram of an optional time- and space-based query method provided in Embodiment 2;
[0039] Figure 4 This is a schematic diagram of an optional component structure of the time- and space-based query device provided in Embodiment 3;
[0040] Figure 5 This is a schematic diagram of an optional hardware architecture for a computer device provided in Embodiment 4. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0042] Example 1
[0043] This invention provides a time- and space-based query method, such as... Figure 1 As shown, the method specifically includes the following steps:
[0044] Step S101: Receive a query instruction sent by the client, and retrieve the target rectangular data table from the preset database according to the date in the query instruction.
[0045] The database stores rectangular data tables for different dates. Each row and column of the rectangular data table represents a different spatial location and a different time range; that is, each row of the rectangular data table represents a different spatial location and each column represents a different time range, or vice versa. Furthermore, the rectangular data table includes multiple cells, each cell corresponding to a time range and a spatial location, and each cell stores one or more data items. Figure 2 The diagram shows a rectangular data table where each row represents a different spatial location, each column represents a different time range, and each cell stores multiple data items (i.e., record_id).
[0046] Specifically, prior to step S101, the method further includes:
[0047] Step A1: Create a new rectangular data table in the database at a set time every day, and add the date of the day to the table name of the newly created rectangular data table;
[0048] Step A2: Within a day, data items generated at a specific spatial location and within a specific time range are stored in the corresponding cells of a newly created rectangular data table for that day.
[0049] In this embodiment, a 24-hour day is divided into multiple time ranges according to preset rules, and data sources for generating data items are set at multiple spatial locations. Therefore, the data source at each spatial location will generate data items within different time ranges, and the generated data items will be stored in the corresponding cells of the rectangular data table according to the two dimensions of spatial location and time range. In this way, time and space data (i.e., data items) can be stored efficiently and it is convenient to query time and space data later. In addition, compared with traditional data storage methods, storing time and space data using rectangular data tables can greatly reduce storage space.
[0050] Furthermore, the step of retrieving the target rectangular data table from a preset database based on the date in the query instruction specifically includes:
[0051] The database is searched for a rectangular data table whose table name contains the date, and the found rectangular data table is used as the target rectangular data table.
[0052] Step S102: Determine the target cell from the target rectangle data table according to the spatial location and time range in the query instruction.
[0053] In this embodiment, a date corresponds to a rectangular data table, and a cell in the rectangular data table corresponds to a spatial location and a time range. By searching for the target rectangular data table from the database by date, and by searching for the target cell from the target rectangular data table by spatial location and time range, the search efficiency can be improved and the search time can be shortened.
[0054] Step S103: Merge the data items in each of the identified target cells to form a data item set.
[0055] It should be noted that a query command may include multiple spatial locations and multiple time ranges. Therefore, the above query method may find multiple target cells. When multiple target cells are found, the data items in each target cell need to be merged to form a data item set.
[0056] Step S104: Send the set of data items as the query result to the client.
[0057] Through the query methods described in steps S101 to S104 above, users only need to input three parameters—date, time range, and spatial location—to quickly, efficiently, and accurately retrieve the time and space data they need using a rectangular data table. This embodiment provides a convenient technical solution for storing time and space data and for efficiently querying it.
[0058] Specifically, step S104 includes:
[0059] Step B1: Query each data item in the data item set in sequence, and determine the object that has a mapping relationship with the currently queried data item according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items;
[0060] In this embodiment, data items stored in the rectangular data table can belong to different objects. Therefore, a mapping table is also formed at the same time as the rectangular data table, so as to represent the mapping relationship between the data items stored in the rectangular data table and each object. In this embodiment, the object can be understood as a category. If all data items in all rectangular data tables in the database are classified, each data item can be classified into at least one object category. That is, data items with similar characteristics will be considered as objects of the same category.
[0061] Step B2: Form an object set from the identified one or more objects, and send the data item set and the object set as query results to the client.
[0062] In this embodiment, in addition to providing users with data items that meet their needs based on a rectangular data table, additional information can also be provided to users based on a mapping table. In practical applications, the mapping table can be manually formed by relevant personnel after the rectangular data table is formed, or it can be automatically formed using a pre-trained model. No specific limitation is made here. The mapping table can represent additional association information of data items.
[0063] Furthermore, the client can send one query command at a time or send N query commands at once. When the client sends N query commands at once, the method further includes:
[0064] Step C1: When N data item sets and N object sets are formed according to N query instructions, the objects that exist in at least M object sets are set as key objects; where M and N are both positive integers, and M≤N;
[0065] Step C2: Identify one or more key data items from the set of N data items that have a mapping relationship with the key object;
[0066] Step C3: Send the key object and one or more key data items that have a mapping relationship with the key object to the client.
[0067] When a client issues multiple query commands, a large number of data items and objects will be retrieved. However, users typically need key data and objects that satisfy all or most of the query commands. Therefore, steps C1 to C3 above can filter out key objects and key data items from the numerous query results, thereby providing users with more accurate query results. It should be noted that when multiple key objects are identified in step C1, the key data items associated with each key object need to be identified separately according to the method in step C2.
[0068] Furthermore, step C3 specifically includes:
[0069] Step C31: Query each key data item in sequence, determine the target data item set to which the currently queried key data item belongs, and set the query conditions used to form the target data item set as target query conditions associated with the key object;
[0070] Step C32: Display the key object, one or more key data items, and one or more target query conditions associated with the key object in the display interface of the client.
[0071] Through steps C31 to C32 above, in addition to showing users each key object, the system also shows users the key data items belonging to each key object, as well as the query conditions satisfied by each key object, so that users can obtain query results more intuitively and clearly.
[0072] Furthermore, step C3 specifically includes:
[0073] Step C31': For a key data item, determine the target data item set to which the key data item belongs, and set the query conditions that form the target data item set as the target query conditions;
[0074] Step C32': Display the key data items and the target query conditions together in the client's display interface.
[0075] It should be noted that steps C31 to C32 focus on showing users the key objects and the query conditions they satisfy; while steps C31' to C32' focus on showing users the key data items and the query conditions they satisfy.
[0076] In this embodiment, temporal and spatial data is stored using a special data storage method called a rectangular data table, thereby reducing excessive storage space usage. Furthermore, the data query process based on the rectangular data table is relatively fast and efficient. This invention enables more efficient storage and querying of temporal and spatial data. In addition, this invention can also form a mapping table simultaneously with the rectangular data table to store objects that have a mapping relationship with the data items in the rectangular data table, thereby providing additional information to the user through the mapping table.
[0077] Example 2
[0078] This invention uses personnel flow investigation as an application scenario to illustrate a time- and space-based query method. In this embodiment, the data items in Embodiment 1 can be instantiated as: images, or image numbers; wherein, the images are captured by a camera located at a specific spatial location within a specific time range; the objects in Embodiment 1 can also be instantiated as: pedestrian images, or pedestrian identification information; such as Figure 3 As shown, the method specifically includes the following steps:
[0079] Step S301: Receive a query instruction sent by the client, and retrieve the target rectangular data table from the preset database according to the date in the query instruction.
[0080] The database stores rectangular data tables for different dates. Each row or column of the rectangular data table represents a camera at a different spatial location and a different time range within a day. Specifically, each row represents a camera at a different spatial location, and each column represents a different time range within a day; or, each row represents a different time range within a day, and each column represents a camera at a different spatial location. Furthermore, the rectangular data table includes multiple cells, each corresponding to a camera and a time range, and each cell stores an image or an image number. The image is captured using a camera located at a specific spatial location within a specific time range, and the number uniquely identifies the image. Preferably, to reduce storage pressure, only the image number can be stored in the cell.
[0081] Specifically, prior to step S301, the method further includes:
[0082] Step A1: Create a new rectangular data table in the database at a set time every day, and add the date of the day to the table name of the newly created rectangular data table;
[0083] Step A2: Within a day, store the images or their numbers generated by cameras at specific spatial locations within a specific time range into the corresponding cells of the newly created rectangular data table for that day.
[0084] In this embodiment, a 24-hour day is divided into multiple time ranges according to preset rules, and cameras for taking pictures are set at multiple spatial locations. Therefore, the camera at each spatial location will generate images in different time ranges, and each image has a unique identification number. The generated images or image numbers can be stored in the corresponding cells of a rectangular data table according to the two dimensions of the camera to which they belong and the time range.
[0085] Step S302: Determine the target cell from the target rectangle data table according to the camera and time range in the query instruction.
[0086] In this embodiment, a date corresponds to a rectangular data table, and a cell in the rectangular data table corresponds to a camera and a time range.
[0087] Step S303: Merge the images or image numbers in each of the identified target cells to form a data item set.
[0088] It should be noted that a query command may include multiple cameras and multiple time ranges. Therefore, the above query method may find multiple target cells. When multiple target cells are found, the images or image numbers in each target cell need to be merged to form a data item set.
[0089] Step S304: Send the set of data items as the query result to the client.
[0090] Specifically, when the cell stores the image number (i.e., image ID), step S304 includes:
[0091] Step B1: Query the number of each image in the data item set in sequence, and determine the pedestrian identification information (i.e., pedestrian ID) that has a mapping relationship with the number of the currently queried image according to the preset mapping table; wherein, the mapping table includes the identification information of multiple pedestrians, and the mapping relationship between the identification information of a pedestrian and the numbers of multiple images;
[0092] In this embodiment, the images stored in the rectangular data table can belong to different pedestrians. Therefore, a mapping table is also formed at the same time as the rectangular data table to represent the mapping relationship between the images stored in the rectangular data table and each known pedestrian. Furthermore, since images or image numbers can be stored in the cells, pedestrian images or pedestrian identification information can also be stored in the mapping table. Therefore, the mapping table can include: a mapping relationship between images and pedestrian images, a mapping relationship between images and pedestrian identification information, a mapping relationship between image numbers and pedestrian images, or a mapping relationship between image numbers and pedestrian image identification information.
[0093] Step B2: Form an object set from the identification information of one or more pedestrians, and send the data item set and the object set as the query result to the client.
[0094] In this embodiment, in addition to providing users with images that meet their needs or image numbers that can be found based on a rectangular data table, the mapping table can also provide users with pedestrian information (pedestrian image or pedestrian ID) to which the image belongs. In practical applications, the mapping table can be manually formed by relevant personnel after the rectangular data table is formed, or it can be automatically formed using a pre-trained model (e.g., a pedestrian recognition model). No specific limitation is made here.
[0095] Furthermore, the client can send one query command at a time or send N query commands at once. When the client sends N query commands at once, the method further includes:
[0096] Step C1: When N data item sets and N object sets are formed according to N query instructions, the pedestrian identification information that exists in at least M object sets is set as key pedestrian information; where M and N are both positive integers, and M≤N;
[0097] Step C2: Identify one or more key image information items from the N data item set that have a mapping relationship with the key pedestrian information; wherein, the key image information item is an image or an image number;
[0098] Step C3: Send the key pedestrian information and one or more key image information that have a mapping relationship with the key pedestrian information to the client.
[0099] When a client issues multiple query commands, it will retrieve a large amount of image and pedestrian information. However, users usually need key images and key pedestrians that satisfy all or most of the query commands. Therefore, by going through steps C1 to C3 above, key images and key pedestrians can be filtered out from the numerous query results, thereby providing users with more accurate query results.
[0100] In practical applications, the target pedestrian can be identified first, along with the time range within which the target pedestrian appears in various spatial locations. This identified spatial location and time range can then be used as a query command to identify key pedestrians who have spatiotemporal overlap with the target pedestrian. This embodiment not only identifies which key pedestrians have spatiotemporal overlap with the target pedestrian but also acquires image information of key pedestrians captured by cameras, thus providing relevant data for crime investigation, information retrieval, and epidemic prevention and control.
[0101] It should also be noted that, in addition to being applied to personnel flow investigation scenarios, the solution in the above embodiment one can also be applied to other application scenarios involving time and space data. For example, in the product inspection scenario, when a defective product is found, the production line and production time of the defective product can be determined first, and then other products produced in the same time range and on the same production line as the defective product can be found based on the production line and production time as a query instruction, thereby facilitating product quality inspection.
[0102] Example 3
[0103] This invention provides a time- and space-based query device, such as... Figure 4 As shown, the device specifically includes the following components:
[0104] The receiving module 401 is used to receive a query instruction sent by the client and retrieve a target rectangular data table from a preset database according to the date in the query instruction; wherein the database includes rectangular data tables for different dates;
[0105] The determining module 402 is used to determine the target cell from the target rectangular data table according to the spatial location and time range in the query instruction; wherein, each row and each column of the rectangular data table represents a different spatial location and a different time range;
[0106] The merging module 403 is used to merge the data items in the determined target cells to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range;
[0107] The sending module 404 is used to send the set of data items as query results to the client.
[0108] Specifically, the sending module 404 is used for:
[0109] Each data item in the data item set is queried sequentially, and the object that has a mapping relationship with the currently queried data item is determined according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items;
[0110] One or more identified objects are formed into an object set, and the data item set and the object set are sent to the client as query results.
[0111] Specifically, the device further includes:
[0112] The mapping module is used to, when N data item sets and N object sets are formed according to N query instructions, set objects that exist in at least M object sets as key objects; where M and N are both positive integers, and M≤N; determine one or more key data items that have a mapping relationship with the key objects in the N data item sets; and send the key objects and the one or more key data items that have a mapping relationship with the key objects to the client.
[0113] Furthermore, the mapping module is specifically used for:
[0114] Each key data item is queried sequentially to determine the target data item set to which the currently queried key data item belongs, and the query conditions used to form the target data item set are set as target query conditions associated with the key object;
[0115] The key object, one or more key data items, and one or more target query conditions associated with the key object are displayed in the client's display interface.
[0116] In addition, the mapping module is also used for:
[0117] For a key data item, determine the target data item set to which the key data item belongs, and set the query conditions that form the target data item set as the target query conditions;
[0118] The key data items and the target query conditions are displayed together in the client's display interface.
[0119] Furthermore, the data item is: an image, or an image number; wherein the image is captured by a camera located at a specific spatial location within a specific time range;
[0120] The object is: pedestrian image, or pedestrian identification information.
[0121] Example 4
[0122] This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 5 As shown, the computer device 50 in this embodiment includes, but is not limited to, a memory 501 and a processor 502 that are communicatively connected to each other via a system bus. It should be noted that... Figure 5 Only a computer device 50 with components 501-502 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0123] In this embodiment, the memory 501 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 501 may be an internal storage unit of the computer device 50, such as the hard disk or memory of the computer device 50. In other embodiments, the memory 501 may also be an external storage device of the computer device 50, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 50. Of course, the memory 501 may include both the internal storage unit and the external storage device of the computer device 50. In this embodiment, the memory 501 is typically used to store the operating system and various application software installed on the computer device 50. In addition, the memory 501 may also be used to temporarily store various types of data that have been output or will be output.
[0124] In some embodiments, processor 502 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other time- and space-based query chip. This processor 502 is typically used to control the overall operation of computer device 50.
[0125] Specifically, in this embodiment, the processor 502 is used to execute the program of the time-space-based query method stored in the memory 501. When the program of the time-space-based query method is executed, it performs the following steps:
[0126] The system receives a query command sent by a client and retrieves a target rectangular data table from a preset database based on the date in the query command; wherein the database includes rectangular data tables for different dates.
[0127] Based on the spatial location and time range in the query instruction, the target cell is determined from the target rectangular data table; wherein, each row or column of the rectangular data table represents a different spatial location and a different time range;
[0128] The data items in each of the identified target cells are merged to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range;
[0129] The set of data items is sent to the client as the query result.
[0130] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.
[0131] Example 5
[0132] This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, app store, etc., which stores a computer program. When the computer program is executed by a processor, it implements the following method steps:
[0133] The system receives a query command sent by a client and retrieves a target rectangular data table from a preset database based on the date in the query command; wherein the database includes rectangular data tables for different dates.
[0134] Based on the spatial location and time range in the query instruction, the target cell is determined from the target rectangular data table; wherein, each row or column of the rectangular data table represents a different spatial location and a different time range;
[0135] The data items in each of the identified target cells are merged to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range;
[0136] The set of data items is sent to the client as the query result.
[0137] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.
[0138] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0139] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0141] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A time- and space-based query method, characterized in that, The method includes: Every day, a new rectangular data table containing multiple cells is created in a preset database. Within a day, data items generated at specific spatial locations and within a specific time range are stored in the corresponding cells of the newly created rectangular data table. The system receives a query command sent by a client and retrieves a target rectangular data table from the database based on the date in the query command; wherein the database includes rectangular data tables for different dates. Based on the spatial location and time range in the query instruction, the target cell is determined from the target rectangular data table; wherein, each row or column of the rectangular data table represents a different spatial location and a different time range; The data items in each of the identified target cells are merged to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range; Sending the set of data items as query results to the client includes: Each data item in the data item set is queried sequentially, and the object that has a mapping relationship with the currently queried data item is determined according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items; One or more identified objects are formed into an object set, and the data item set and the object set are sent to the client as query results.
2. The time- and space-based query method according to claim 1, characterized in that, The method further includes: When N data item sets and N object sets are formed based on N query commands, objects that exist in at least M object sets are set as priority objects; where M and N are both positive integers, and M≤N; From the set of N data items, identify one or more key data items that have a mapping relationship with the key object; The key object, and one or more key data items that have a mapping relationship with the key object, are sent to the client.
3. The time- and space-based query method according to claim 2, characterized in that, Sending the key object and one or more key data items that have a mapping relationship with the key object to the client includes: Each key data item is queried sequentially to determine the target data item set to which the currently queried key data item belongs, and the query conditions used to form the target data item set are set as target query conditions associated with the key object; The key object, one or more key data items, and one or more target query conditions associated with the key object are displayed in the client's display interface.
4. The time- and space-based query method according to claim 2, characterized in that, Sending the key object and one or more key data items that have a mapping relationship with the key object to the client includes: For a key data item, determine the target data item set to which the key data item belongs, and set the query conditions that form the target data item set as the target query conditions; The key data items and the target query conditions are displayed together in the client's display interface.
5. The time- and space-based query method according to any one of claims 1 to 4, characterized in that, The data item is: an image, or an image number; wherein the image is captured by a camera located at a specific spatial location within a specific time range; The object is: pedestrian image, or pedestrian identification information.
6. A time- and space-based query device, characterized in that, The device includes: A receiving module is used to receive a query command sent by a client and retrieve a target rectangular data table from a preset database according to the date in the query command; wherein the database includes rectangular data tables for different dates; The determination module is used to determine the target cell from the target rectangular data table based on the spatial location and time range in the query instruction; wherein each row or column of the rectangular data table represents a different spatial location and a different time range; The merge module is used to merge the data items in the identified target cells to form a data item set; wherein, a cell stores one or more data items generated at a specific spatial location and within a specific time range; The sending module is used to send the set of data items as query results to the client; The device is also used for: A new rectangular data table with multiple cells is created in the database every day, and data items generated at specific spatial locations and within a specific time range are stored in the corresponding cells of the newly created rectangular data table. The sending module is used for: Each data item in the data item set is queried sequentially, and the object that has a mapping relationship with the currently queried data item is determined according to the preset mapping table; wherein, the mapping table includes multiple objects, and the mapping relationship between an object and multiple data items; One or more identified objects are formed into an object set, and the data item set and the object set are sent to the client as query results.
7. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.