CN113434732A - Data retrieval method, device and storage medium - Google Patents

Data retrieval method, device and storage medium Download PDF

Info

Publication number
CN113434732A
CN113434732A CN202110622112.0A CN202110622112A CN113434732A CN 113434732 A CN113434732 A CN 113434732A CN 202110622112 A CN202110622112 A CN 202110622112A CN 113434732 A CN113434732 A CN 113434732A
Authority
CN
China
Prior art keywords
retrieval
tags
tag
target
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110622112.0A
Other languages
Chinese (zh)
Inventor
葛赵泳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110622112.0A priority Critical patent/CN113434732A/en
Publication of CN113434732A publication Critical patent/CN113434732A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/7867Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title and artist information, manually generated time, location and usage information, user ratings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/732Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/738Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Library & Information Science (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The disclosure relates to the field of computers, and discloses a data retrieval method, a data retrieval device and a storage medium, wherein the method is applied to NVR and specifically comprises the following steps: the method comprises the steps of sequencing a plurality of first retrieval tags acquired from other NVRs and a plurality of second retrieval tags recorded in historical search data according to retrieval frequency, sending the sequenced retrieval tags to other NVRs respectively, sharing retrieval tags among the NVRs on the basis of determining the heat degree of each retrieval tag, storing the plurality of first retrieval tags and the plurality of second retrieval tags of which the sequenced retrieval frequency is greater than a first threshold value, namely, storing retrieval results corresponding to target retrieval tags into a storage space, achieving the purpose of hierarchical storage according to the retrieval heat degree, and directly searching corresponding retrieval results in the storage space when a retrieval request aiming at the target retrieval tags is received, thereby rapidly acquiring the retrieval results and improving the efficiency of the NVRs in retrieving structured data.

Description

Data retrieval method, device and storage medium
Technical Field
The present application relates to computer technologies, and in particular, to a data retrieval method, apparatus, and storage medium.
Background
A Network Video Recorder (NVR) is a store-and-forward part of a Network Video monitoring system, and the core function of the NVR is the store and forward of Video streams. The NVR and the network camera or the video encoder work cooperatively to complete the functions of video recording, storage and forwarding of videos.
However, in the current intelligent big data era, NVR generates and saves massive structured data in the monitoring process.
For example, the NVR works in cooperation with a network camera to store a large amount of image data collected by the network camera, and the image data is usually structured data set according to different monitoring requirements.
For another example, NVR works in conjunction with a video encoder to store a huge amount of video data encoded by the video encoder, and so on.
Due to the large amount of structured data in the above process; moreover, the structural composition of structured data varies greatly. In order to realize targeted monitoring analysis, in the application process, a user generally needs to search structured data meeting a certain attribute condition set within a specified time for data mining and decision analysis.
In the existing searching process, a user is required to start searching after selecting attribute characteristics one by one on an interface each time. When the structured database is large, that is, the number of structured data is large, the result returned by searching is slow, and the user experience is seriously influenced.
Disclosure of Invention
The embodiment of the disclosure provides a data retrieval method, a data retrieval device and a storage medium, which are used for improving the efficiency of retrieving structured data.
The specific technical scheme provided by the disclosure is as follows:
in a first aspect, a data retrieval method applied to a network video recorder NVR includes:
acquiring a plurality of first retrieval tags sent by other NVRs;
sequencing the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data according to retrieval frequency, and respectively sending the sequenced plurality of first retrieval tags and the sequenced plurality of second retrieval tags to other NVRs;
storing a retrieval result corresponding to a target retrieval tag into a storage space, wherein the target retrieval tag is a retrieval tag with a retrieval frequency greater than a first threshold value in a plurality of first retrieval tags and a plurality of second retrieval tags which are sequenced;
when a retrieval request aiming at the target retrieval tag is received, searching a corresponding retrieval result in the storage space.
Optionally, before obtaining the plurality of first retrieval tags issued by the other plurality of NVRs, the method further includes:
analyzing each received historical retrieval request to obtain a plurality of retrieval word segmentation attributes;
and generating and recording a plurality of corresponding second retrieval labels according to the plurality of retrieval word segmentation attributes.
Optionally, the step of sorting the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data according to retrieval frequency, and sending the sorted plurality of first retrieval tags and the sorted plurality of second retrieval tags to the other plurality of NVRs, respectively, includes:
respectively counting the occurrence retrieval frequencies of the first retrieval labels and the second retrieval labels recorded in the historical search data, and sequencing the first retrieval labels and the second retrieval labels according to the sequence of the retrieval frequencies from high to low;
and respectively sending each sequenced first retrieval tag and each sequenced second retrieval tag to other NVRs according to a preset period.
Optionally, the sending the sorted first retrieval tags and the sorted second retrieval tags to other NVRs according to a preset period includes:
and respectively sending the sequenced first retrieval labels and second retrieval labels to other NVRs in a multicast or broadcast mode according to a preset period.
Optionally, storing the retrieval result corresponding to the target retrieval tag in a storage space, including:
storing a plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in a memory, wherein the second threshold value is larger than the first threshold value;
storing a plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in a flash memory or a solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and storing a plurality of retrieval results corresponding to the target retrieval labels with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
Optionally, generating and recording a plurality of corresponding second search tags according to the plurality of search participle attributes, including:
and operating the plurality of search word segmentation attributes to generate a plurality of second search labels, wherein the operation comprises any one or any combination of the following operations: a sum operation, or operation, not operation;
a plurality of second retrieval tags are recorded in the storage area.
Optionally, before the storing the retrieval result corresponding to the target retrieval tag in the storage space, the method further includes:
respectively acquiring respective capacity values of a memory, a flash memory, a solid state disk and a hard disk in a storage space;
storing a retrieval result corresponding to the target retrieval tag into a storage space, wherein the method comprises the following steps:
if the capacity value of the memory is larger than the storage capacity of a plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency larger than a second threshold value in the memory, wherein the second threshold value is larger than the first threshold value;
if the capacity value of the flash memory or the solid state disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in the flash memory or the solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and if the capacity value of the hard disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
In a second aspect, an apparatus for data retrieval, comprises:
the acquiring unit is used for acquiring a plurality of first retrieval tags sent by other NVRs;
the sorting unit is used for sorting the first retrieval tags and the second retrieval tags recorded in the historical search data according to retrieval frequency and respectively sending the sorted first retrieval tags and second retrieval tags to other NVRs;
the storage unit is used for storing a retrieval result corresponding to a target retrieval tag into a storage space, wherein the target retrieval tag is a retrieval tag with a retrieval frequency larger than a first threshold value in a plurality of first retrieval tags and a plurality of second retrieval tags which are sequenced;
and the searching unit is used for searching a corresponding searching result in the storage space when a searching request aiming at the target searching label is received.
Optionally, the system further comprises a generating unit, configured to, before obtaining the plurality of first search tags sent by the other multiple NVRs, parse each received historical search request to obtain a plurality of search participle attributes;
and generating and recording a plurality of corresponding second retrieval labels according to the plurality of retrieval word segmentation attributes.
Optionally, the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data are sorted according to retrieval frequency, and the sorted plurality of first retrieval tags and the sorted plurality of second retrieval tags are respectively sent to the other plurality of NVRs, and the sorting unit is configured to:
respectively counting the occurrence retrieval frequencies of the first retrieval labels and the second retrieval labels recorded in the historical search data, and sequencing the first retrieval labels and the second retrieval labels according to the sequence of the retrieval frequencies from high to low;
and respectively sending each sequenced first retrieval tag and each sequenced second retrieval tag to other NVRs according to a preset period.
Optionally, the sorted first retrieval tags and second retrieval tags are respectively sent to other NVRs according to a preset period, and the sorting unit is configured to:
and respectively sending the sequenced first retrieval labels and second retrieval labels to other NVRs in a multicast or broadcast mode according to a preset period.
Optionally, the retrieval result corresponding to the target retrieval tag is stored in a storage space, and the storage unit is configured to:
storing a plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in a memory, wherein the second threshold value is larger than the first threshold value;
storing a plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in a flash memory or a solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and storing a plurality of retrieval results corresponding to the target retrieval labels with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
Optionally, a plurality of corresponding second search tags are generated and recorded according to the plurality of search word segmentation attributes, and the storage unit is configured to:
and operating the plurality of search word segmentation attributes to generate a plurality of second search labels, wherein the operation comprises any one or any combination of the following operations: a sum operation, or operation, not operation;
a plurality of second retrieval tags are recorded in the storage area.
Optionally, the system further comprises a capacity unit, wherein the capacity unit is used for respectively acquiring respective capacity values of the memory, the flash memory, the solid state disk and the hard disk in the storage space before the retrieval result corresponding to the target retrieval tag is stored in the storage space;
storing a retrieval result corresponding to the target retrieval tag into a storage space, wherein the storage unit is used for:
if the capacity value of the memory is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, the NVR stores the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in the memory, wherein the second threshold value is larger than the first threshold value;
if the capacity value of the flash memory or the solid state disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in the flash memory or the solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and if the capacity value of the hard disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
In a third aspect, a terminal includes:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in the memory to implement a method as in any one of the first aspect.
In a fourth aspect, a computer-readable storage medium, wherein instructions, when executed by a processor, enable the processor to perform the method of any of the first aspect.
In summary, in the embodiments of the present disclosure, it is disclosed that the NVR sorts a plurality of first retrieval tags acquired from other NVRs and a plurality of second retrieval tags recorded in the history search data according to retrieval frequency, and sends the sorted retrieval tags to other NVRs respectively, the sharing of the retrieval labels among the NVRs can be realized on the basis of the definition of the popularity of each retrieval label, and the NVR compares the sorted first retrieval tags and the second retrieval tags with the retrieval frequency greater than a first threshold value, namely, the retrieval result corresponding to the target retrieval tag is stored in the storage space, thereby achieving the purpose of hierarchical storage according to the search heat, when a retrieval request aiming at the target retrieval tag is received, the NVR directly searches in the storage space and reads a corresponding retrieval result, therefore, the retrieval result is quickly obtained, and the efficiency of the NVR for retrieving the structured data is improved.
Drawings
FIG. 1 is a diagram illustrating an architecture of a system for retrieving structured data according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating the NVR retrieving the structured data in the embodiment of the present application;
FIG. 3 is a schematic flowchart illustrating a process of ordering structured data by NVR in an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating an NVR storage retrieval result according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating another example of NVR storage retrieval result according to the present application;
fig. 6a is a schematic diagram of a logic architecture of a terminal according to an embodiment of the present disclosure;
fig. 6b is a schematic diagram of a logic architecture of another terminal according to an embodiment of the present disclosure;
fig. 7 is a schematic entity architecture diagram of a terminal in the embodiment of the present disclosure.
Detailed Description
In order to improve the efficiency of the NVR in retrieving structured data, in the embodiment of the present application, the NVR sorts a plurality of first retrieval tags acquired from other NVRs and a plurality of second retrieval tags recorded in history search data according to retrieval frequency, and sends the sorted retrieval tags to other NVRs, respectively, so that the retrieval tags can be shared among the NVRs on the basis of determining the heat of each retrieval tag, and the NVR stores the retrieval results corresponding to the target retrieval tag, i.e., the plurality of first retrieval tags and the plurality of second retrieval tags whose retrieval frequency is greater than a first threshold value after sorting, into a storage space, so as to achieve the purpose of hierarchical storage according to the retrieval heat, and when receiving a retrieval request for the target retrieval tag, the NVR directly searches and reads the corresponding retrieval result in the storage space, thereby obtaining the retrieval result quickly, and then the efficiency of NVR to structured data retrieval is improved.
In the following, a preferred embodiment of the present application will be described in detail with reference to the drawings, first, in the embodiment of the present disclosure, a system includes at least two network video recorders, and referring to fig. 1, the network video recorders performing structured data retrieval in the system are exemplarily shown by NVR1, NVR2, and NVRn, and it is assumed that retrieval of structured data 1 is performed in NVR1, retrieval of structured data 2 is performed in NVR2, and retrieval of structured data n is performed in NVRn.
Accordingly, NVR1 stores search result 1 for searching structured data 1, NVR2 stores search result 2 for searching structured data 2, and NVRn stores search result n for searching structured data n. In the implementation process, data interaction can be performed among the NVRs 1, 2 or NVRn, and one of the NVRs is represented by NVR to introduce the data retrieval method.
The following describes a case where a data retrieval method is performed by NVR, the data retrieval method being applied to NVR. Referring to fig. 2, in the embodiment of the present disclosure, a specific process of the NVR executing the retrieval of the structured data is as follows:
step 200: and acquiring a plurality of first retrieval labels sent by other NVRs.
It should be noted that, the NVR as the execution subject is any one of the NVR1, NVR2, and NVRn, and correspondingly, the other NVRs are the other NVRs except the NVR among the NVR1, NVR2, and NVRn. In addition, the first search tag here collectively represents search tags issued by a plurality of other NVRs. That is, the first and second are only used to distinguish the specific source of the search tag, and the essence is the search tag.
In an implementation process, the NVR acquires the first retrieval tags sent by the other NVRs during the process of executing the retrieval request, for example, the NVR synchronously receives the first retrieval tags sent by the other NVRs; meanwhile, when the NVR receives the retrieval request, the NVR generates a plurality of second retrieval labels correspondingly.
The plurality of first search tags and/or the second search tags are generated in advance, and before the step of obtaining the plurality of first search tags sent by the other plurality of NVRs, the method further includes:
step a: and analyzing each received historical retrieval request to obtain a plurality of retrieval word segmentation attributes.
The NVR is a device that can support the input of a search request, for example, a user can input a search request of "count female pedestrians wearing a mask", "monitor the situation of a non-motor vehicle running red light from 8:00 to 10: 00", or "record a license plate of a private car running backwards from 7:00 to 9:00 or 17:00 to 19: 00" on an interface of the NVR to respectively meet different requirements of monitoring.
After the NVR acquires the historical retrieval requests, the NVR analyzes the received historical retrieval requests to obtain a plurality of corresponding retrieval participle attributes. For example, after analyzing the historical search request of "count female pedestrian wearing mask" by NVR, a plurality of search word attributes "pedestrian, female, wearing mask" are obtained; after analyzing the historical retrieval request of monitoring the red light running condition of the non-motor vehicle of 8:00 to 10:00, the NVR obtains a plurality of retrieval participle attributes of 'the non-motor vehicle, the red light running condition of 8:00 to 10: 00'; after analyzing the history retrieval request of recording the license plate of the private car of 7:00 to 9:00 or 17:00 to 19:00, the NVR obtains a plurality of retrieval participle attributes of private car, 7:00 to 9:00, 17:00 to 19:00 and reverse.
Step b: and generating and recording a plurality of corresponding second retrieval labels according to the plurality of retrieval word segmentation attributes.
In the implementation process, after the plurality of search participle attributes are analyzed and obtained, the NVR performs operation on the plurality of search participle attributes to generate a plurality of second search tags, wherein the operation includes any one or any combination of the following operations: and operation, or operation, not operation.
Still by way of example, after obtaining the search segmentation attribute "pedestrian, woman, mask on mask", NVR sums up pedestrian, woman, mask on mask, so that a second search tag of "woman on mask" can be generated; after the retrieval word segmentation attributes ' private car, 7:00 to 9:00, 17:00-19:00, reverse running and license plate ' are obtained, NVR performs sum operation on the retrieved word segmentation attributes, namely the sum operation on the private car, the reverse running and the license plate ', the sum operation on the ' 7:00 to 9:00 ' and the ' 17:00 to 19:00 ', the sum operation on the obtained result is performed, and a second retrieval label ' 7:00 to 9:00, the private car, the reverse running license plate ' or ' 17:00-19:00, the private car and the reverse running license plate ' is generated.
The NVR records a plurality of second retrieval tags in the storage area. For example, the 'female pedestrian wearing a mask', 7:00 to 9:00, private car, wrong-way license plate 'or' 17:00 to 19:00, private car, wrong-way license plate 'is stored in the corresponding storage area, so that the' female pedestrian wearing a mask ', the' private car, the 'wrong-way license plate' can be more conveniently sent to other multiple NVRs. The storage area is not limited herein, and may be flexibly set according to a use requirement, for example, the storage area may include a hard disk, a usb disk, and the like.
Here, the scheme in which the first search tag is generated by the other NVRs and recorded in the storage area is the same as the second search tag, and is not described again.
Step 201: and sequencing the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data according to retrieval frequency, and respectively sending the sequenced plurality of first retrieval tags and the sequenced plurality of second retrieval tags to other NVRs.
In the implementation process, the NVR collects the received first retrieval tags of other NVRs and the second retrieval tags recorded by the NVR and conducts sequencing processing so as to obtain historical search data with high heat. Referring to fig. 3, the step 201 includes the following steps:
step 2010: and respectively counting the occurrence retrieval frequencies of the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data, and sequencing the first retrieval tags and the second retrieval tags according to the sequence from high retrieval frequency to low retrieval frequency.
In the execution process, the NVR sequentially counts the number of times of retrieval of each first retrieval tag and each second retrieval tag, calculates the ratio of the number of times of occurrence of a certain first retrieval tag to the sum of the number of times of occurrence of all retrieval tags to calculate the retrieval frequency of a certain first retrieval tag, and similarly calculates the ratio of the number of times of occurrence of a certain second retrieval tag to the sum of the number of times of occurrence of all retrieval tags to calculate the retrieval frequency of a certain second retrieval tag.
After the retrieval frequency of each first retrieval tag and each second retrieval tag is obtained, the NVR sorts the corresponding first retrieval tags and the corresponding second retrieval tags in sequence from high to low. Thus, the obtained retrieval tag ranked in the front is the search data with higher heat; the retrieval tags ranked at the back are the search data with lower heat.
Step 2011: and respectively sending each sequenced first retrieval tag and each sequenced second retrieval tag to other NVRs according to a preset period.
In an implementation process, after obtaining the sorted first retrieval tags and second retrieval tags, the NVR sends the sorted first retrieval tags and second retrieval tags to other NVRs according to a preset period, for example, 24 hours.
In addition, the NVR may select a multicast or broadcast mode to transmit the first search tag and the second search tag to other NVRs.
In the first case, the NVR sends the first search tag and the second search tag to other NVRs by multicast, which saves more bandwidth compared to broadcast, that is, the NVR and other NVRs are called multicast group, so that when the NVR sends the search tags to other NVRs, the NVR only needs to send one ordered first search tag and one ordered second search tag, and thus, all other NVRs belonging to the group can receive one copy of the search tag sent by the NVR.
In the second case, the NVR sends the first retrieval tag and the second retrieval tag to other NVRs in a broadcast manner, and the transmission manner in the second case belongs to a multicast delivery manner, and delivers a copy of the first retrieval tag and the second retrieval tag to other NVRs, so that delivery of a plurality of single packets can be completed, and copies of packets can be delivered through separate connections until each NVR receives one first retrieval tag and one second retrieval tag.
It should be noted that, when the number of the sorted first retrieval tags and second retrieval tags is large, the first retrieval tag and the second retrieval tag that are sorted in the top may be selected as the sending object, and the specific selection number and the selection manner are not limited here.
Step 202: and storing a retrieval result corresponding to the target retrieval tag into a storage space, wherein the target retrieval tag is a retrieval tag with a retrieval frequency greater than a first threshold value in the plurality of first retrieval tags and the plurality of second retrieval tags which are sequenced.
Since the NVR acquires the first retrieval tags issued by other NVRs, and the second retrieval tags stored in the NVR, all the first retrieval tags and all the second retrieval tags are stored in the NVR. In addition, since the NVRs transmit the sorted first search tags and second search tags to the other NVRs, all the first search tags and all the second search tags are also stored in the other NVRs.
Considering the capacity size of the NVR storage space and the retrieval times of a user, a first threshold value for representing the retrieval heat degree can be flexibly set, namely the retrieval heat degree is artificially divided through the first threshold value; and the retrieval tags with retrieval frequency larger than a first threshold value in the plurality of ordered first retrieval tags and the plurality of ordered second retrieval tags are collectively called as target retrieval tags.
However, the NVR and the other NVRs have different stored search results, that is, the NVR stores only the search results corresponding to the second search tags recorded in the NVR itself, and the other NVRs store only the search results corresponding to the first search tags recorded in the NVR itself. Therefore, in the execution process, the NVR only needs to store the retrieval result corresponding to the target retrieval tag in the storage space.
It should be noted that, the storage space of the NVR is different from a common Personal Computer (PC) device, the storage space (e.g. cache) of the NVR is specific to an embedded device, and the storage space includes a memory, a flash memory, a solid state disk, and a hard disk, where the data reading rate is arranged from high to low, and capacity values of the memory, the flash memory, the solid state disk, and the hard disk can be flexibly set according to different hardware parameters of the NVR, and the like.
Because the memory, the flash memory, the solid state disk and the hard disk are arranged from high to low according to the data reading rate, in order to bring good user experience to users, a plurality of retrieval results corresponding to the target retrieval tag can be respectively placed into the memory, the flash memory, the solid state disk and the hard disk according to the retrieval frequency.
Preferably, the target retrieval tag larger than the first threshold is further subdivided: target retrieval tags with relatively high retrieval frequency are put into the memory, so that retrieval results of the target retrieval tags with more retrieval times can be fed back to a user at a higher speed; secondly, target retrieval tags with the highest retrieval frequency are placed in the flash memory and the solid state disk, so that retrieval results of the target retrieval tags with the highest retrieval frequency can be fed back to a user at the second highest speed; then, the target retrieval tag with relatively low retrieval frequency is put into the memory, so that the retrieval result of the target retrieval tag with low retrieval frequency can be fed back to the user at a low speed.
Specifically, when step 202 is executed, the following manners may be adopted, but not limited to:
the first method is as follows: storing the retrieval result corresponding to the target retrieval tag in the storage space, as shown in fig. 4, the specific steps of storing include:
step 2020: and storing a plurality of retrieval results corresponding to the target retrieval tags with the retrieval frequency larger than a second threshold value in a memory, wherein the second threshold value is larger than the first threshold value.
In the implementation process, in order to find out a plurality of search results to be put into the memory, the NVR searches for a target search tag with a search frequency greater than a second threshold value from among the target search tags, obviously, the second threshold value is greater than the first threshold value, but a specific numerical value of the second threshold value may be flexibly set according to circumstances.
After the target retrieval tag with the retrieval frequency larger than the second threshold is compared, the target retrieval tag with the relatively high retrieval frequency is found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tag in the memory, so that the corresponding retrieval results can be fed back to the user at a relatively high speed.
Step 2021: and storing a plurality of retrieval results corresponding to the target retrieval tags with retrieval frequency smaller than a second threshold and larger than a third threshold in a flash memory or a solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold.
In the implementation process, in order to find out a plurality of search results to be put into the flash memory or the solid state disk, the NVR searches for a target search tag with a search frequency smaller than the second threshold and larger than a third threshold in the target search tag, obviously, the third threshold is larger than the first threshold, and the third threshold is smaller than the second threshold, but a specific value of the third threshold may be flexibly set according to circumstances.
After the target retrieval tags with retrieval frequency smaller than the second threshold and larger than the third threshold are compared, the target retrieval tags with the retrieval frequency higher than the second threshold are found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tags in the flash memory or the solid state disk, so that the corresponding retrieval results can be fed back to the user at the second highest speed.
Step 2022: and storing a plurality of retrieval results corresponding to the target retrieval labels with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
In the implementation process, in order to find out a plurality of search results to be put into the hard disk, the NVR searches for a target search tag whose search frequency is less than the third threshold and greater than the first threshold from among the target search tags, obviously, this is a process of searching for a target search tag whose search frequency is relatively low.
After the target retrieval tags with retrieval frequency smaller than the third threshold and larger than the first threshold are compared, the target retrieval tags with relatively low retrieval frequency are found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tags in the hard disk, so that the corresponding retrieval results can be fed back to the user at a low speed. Less fast is illustrated here with respect to the case of the above-mentioned relatively high and second highest frequency of retrieval.
In addition, in the implementation process, the NVR correspondingly puts the retrieval result corresponding to the target retrieval tag with the retrieval frequency lower than the first threshold value into the storage area, and when the corresponding retrieval result cannot be found in the memory, the flash memory, the solid state disk and the hard disk, the NVR can continuously find the retrieval result corresponding to the target retrieval tag with the retrieval frequency lower than the first threshold value in the storage area.
Through the further subdivision processing, the retrieval frequency is further divided according to the heat degree, and the retrieval results corresponding to the target retrieval labels are stored in a partition mode according to the number of the user search times, so that the retrieval results can be fed back to the user at the maximum probability, and the user experience is further improved.
The second method comprises the following steps: the retrieval result corresponding to the target retrieval tag is stored in the storage space, and referring to fig. 5, the specific storage steps include:
in this case, in view of the difference in hardware configuration of different NVRs, before the NVR stores the retrieval result corresponding to the target retrieval tag in the storage space, the method further includes:
and respectively acquiring respective capacity values of the memory, the flash memory, the solid state disk and the hard disk in the storage space by the NVR.
In the implementation process, in order to maximize the utilization rate of the NVR, the NVR obtains respective capacity values of the memory, the flash memory, the solid state disk and the hard disk in the storage space before storing the retrieval result corresponding to the target retrieval tag. I.e. the maximum storage space of a storage location is determined prior to storage.
Step 2020': and if the capacity value of the memory is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in the memory, wherein the second threshold value is larger than the first threshold value.
In the implementation process, the NVR first compares whether the capacity value of the memory is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, and if it is determined that the capacity value of the memory is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, the memory is sufficient to accommodate the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency greater than the second threshold.
In order to find out a plurality of search results that should be put into the memory, the NVR searches the target search tags for a search frequency greater than the second threshold, and obviously, the second threshold is synchronized with the second threshold in step 2020.
After the target retrieval tag with the retrieval frequency larger than the second threshold is compared, the target retrieval tag with the relatively high retrieval frequency is found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tag in the memory, so that the corresponding retrieval results can be fed back to the user at a relatively high speed.
Step 2021': if the capacity value of the flash memory or the solid state disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in the flash memory or the solid state disk, wherein the third threshold is larger than the first threshold, and the third threshold is smaller than the second threshold.
In the implementation process, the NVR first compares whether the capacity value of the flash memory or the solid-state disk is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, and if it is determined that the capacity value of the flash memory or the solid-state disk is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, the flash memory or the solid-state disk is sufficient to accommodate the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency less than the second threshold and greater than the third threshold.
In order to find out a plurality of search results to be put into the flash memory or the solid state disk, the NVR searches for a target search tag with a search frequency smaller than the second threshold and larger than a third threshold from among the target search tags, obviously, the third threshold is larger than the first threshold, and the third threshold is smaller than the second threshold, but a specific value of the third threshold may be flexibly set according to circumstances.
After the target retrieval tags with retrieval frequency smaller than the second threshold and larger than the third threshold are compared, the target retrieval tags with the retrieval frequency higher than the second threshold are found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tags in the flash memory or the solid state disk, so that the corresponding retrieval results can be fed back to the user at the second highest speed.
Step 2022': and if the capacity value of the hard disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
In the implementation process, the NVR first compares whether the capacity value of the hard disk is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, and if it is determined that the capacity value of the hard disk is greater than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, the hard disk is sufficient to accommodate the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency less than the third threshold and greater than the first threshold.
In order to find out a plurality of search results to be put into the hard disk, the NVR searches for a target search tag with a search frequency smaller than the third threshold and larger than the first threshold from among the target search tags, and obviously, this is a process of searching for a target search tag with a relatively low search frequency.
After the target retrieval tags with retrieval frequency smaller than the third threshold and larger than the first threshold are compared, the target retrieval tags with relatively low retrieval frequency are found, and the NVR further stores a plurality of retrieval results corresponding to the target retrieval tags in the hard disk, so that the corresponding retrieval results can be fed back to the user at a low speed. Less fast is illustrated here with respect to the case of the above-mentioned relatively high and second highest frequency of retrieval.
Step 203: when a retrieval request aiming at the target retrieval tag is received, searching a corresponding retrieval result in the storage space.
Because the NVR already stores the retrieval result of the historical retrieval request for the target retrieval tag in the storage space (specifically including the memory, the flash memory, the solid-state disk, and the hard disk), in the implementation process, when the NVR receives the retrieval request for the target retrieval tag again, the NVR searches the corresponding retrieval result in the storage space, specifically, the NVR searches the corresponding retrieval result in the memory first, if the corresponding retrieval result is not found, the NVR continues to search the corresponding retrieval result in the flash memory and the solid-state disk, and if the corresponding retrieval result is not found, the NVR continues to search the corresponding retrieval result in the hard disk.
Unlike NVRs which store corresponding retrieval results in a storage area, the retrieval results for the target retrieval tag can be obtained quickly and efficiently.
The above embodiments are further described in detail below using a specific application scenario.
Application scenarios:
the historical search data of the NVR records 3 second retrieval tags which are respectively '7: 00 to 9:00, private car, retrograde license plate', '7: 00 to 9:00, bus, retrograde license plate', '7: 00 to 9:00, non-motor vehicle and retrograde license plate', wherein the retrieval times of '7: 00 to 9:00, private car and retrograde license plate' are 5 times, 'the retrieval times of' 7:00 to 9:00, bus and retrograde license plate 'are 6 times,' and the retrieval times of '7: 00 to 9:00, non-motor vehicle and retrograde license plate' are 7 times.
The NVR acquires 8 first retrieval tags sent by other 4 NVRs, wherein the 8 first retrieval tags are respectively '7: 00 to 9:00, private car, red light running license plate', 7:00 to 9:00, public bus, red light running license plate ', 7:00 to 9:00, non-motor vehicle, red light running license plate', 7:00 to 9:00, private car, overspeed running license plate ', 7:00 to 9:00, public bus, overspeed running license plate', 7:00 to 9:00, non-motor vehicle, overspeed running license plate ', 11, private car, violation lane changing license plate', and 7:00 to 9:00, public bus, 12, Illegal lane-changing license plate'.
NVR respectively calculates retrieval frequencies of 3 second retrieval tags and 8 first retrieval tags, the retrieval frequencies can be directly ranked in a mode of comparing the retrieval times, and the 3 second retrieval tags and the 8 first retrieval tags which are ranked are respectively 7:00 to 9:00, buses and illegal lane-changing license plates with the retrieval times of 12, 7:00 to 9:00, private cars and illegal lane-changing license plates with the retrieval times of 11, 7:00 to 9:00, non-motor vehicles and overspeed-driving license plates with the retrieval times of 10, 7:00 to 9:00, buses and overspeed-driving license plates with the retrieval times of 9, 7:00 to 9:00, private cars and overspeed-driving license plates with the retrieval times of 8, 7:00 to 9:00, non-motor vehicles and reverse driving license plates with the retrieval times of 6, 7:00 to 9:00, 9:00 and reverse driving license plates with the retrieval times of 6, The bus, the license plate for going backwards, the license plate for private car and the license plate for going backwards with the retrieval frequency of 5 times of 7: 00-9: 00, the license plate for non-motor vehicle and red light running with the retrieval frequency of 4 times of 7: 00-9: 00, the license plate for bus and red light running with the retrieval frequency of 3 times of 7: 00-9: 00, the license plate for private car and the license plate for red light running with the retrieval frequency of 2 times of 7: 00-9: 00.
And the NVR sends the sorted 8 first retrieval tags and 3 second retrieval tags to other NVRs respectively in a broadcast mode according to a preset 24-hour period. Thus, all NVRs acquire the 8 sorted first search tags and 3 second search tags.
Assuming that the first threshold value is 5 times, the NVR selects "7: 00 to 9:00, bus, illegal lane-changing license plate", search "7: 00 to 9:00, private car, illegal lane-changing license plate", search "7: 00 to 9:00, non-motor vehicle, overspeed-running license plate", search "7: 00 to 9:00, bus, overspeed-running license plate", search "7: 00 to 9:00, private car, overspeed-running license plate", search "7: 00 to 9:00, non-motor vehicle, retrograde license plate", search "7: 00 to 9:00, bus, retrograde license plate" with search number of 6 as the target search tag. If the second threshold value is 10 times, then the NVR selects the retrieval result corresponding to the target retrieval tag of the "7: 00 to 9:00, bus, illegal lane-changing license plate" with the retrieval times of 12 times and the "7: 00 to 9:00, private car, illegal lane-changing license plate" with the retrieval times of 11 times, and stores the retrieval result in the memory; if the third threshold value is 8 times, then the NVR retrieves the retrieval result corresponding to the target retrieval tag of "7: 00 to 9:00, non-motor vehicle, overspeed driving license plate" with 10 times, and "7: 00 to 9:00, bus, overspeed driving license plate" with 9 times, and stores the retrieval result in the flash memory or the solid state disk; the NVR stores a plurality of retrieval results corresponding to target retrieval labels with retrieval frequency smaller than a third threshold and larger than a first threshold, namely 7: 00-9: 00, private cars and overspeed driving license plates with retrieval times of 8, 7: 00-9: 00, non-motor vehicles and reverse driving license plates with retrieval times of 7, 7: 00-9: 00, buses and reverse driving license plates with retrieval times of 6 in a hard disk.
When a retrieval request aiming at a target retrieval tag of '7: 00 to 9:00, non-motor vehicle and overspeed driving license plate' is received, the NVR searches a corresponding retrieval result in a flash memory or a solid state disk; when a retrieval request aiming at a target retrieval tag of '7: 00 to 9:00, a private car and an illegal lane-changing license plate' is received, the NVR searches a corresponding retrieval result in the memory; when a retrieval request aiming at a target retrieval tag of 7:00 to 9:00, a bus and an overspeed driving license plate is received, the NVR searches a corresponding retrieval result in the flash memory or the solid state disk, so that the retrieval result is fed back to a user rapidly according to the situation.
Based on the same inventive concept, referring to fig. 6a, an embodiment of the present application provides an apparatus for data retrieval, including:
an obtaining unit 610, configured to obtain a plurality of first retrieval tags sent by other NVRs;
a sorting unit 620, configured to sort the multiple first retrieval tags and the multiple second retrieval tags recorded in the historical search data according to retrieval frequency, and send the sorted multiple first retrieval tags and multiple second retrieval tags to the other multiple NVRs, respectively;
a storage unit 630, configured to store a retrieval result corresponding to a target retrieval tag in a storage space, where the target retrieval tag is a retrieval tag with a retrieval frequency greater than a first threshold value among the plurality of sorted first retrieval tags and the plurality of second retrieval tags;
the searching unit 640 is configured to, when a search request for the target search tag is received, search a corresponding search result in the storage space.
Optionally, referring to fig. 6b, the apparatus further includes a generating unit 610 ', where the generating unit 610' is configured to, before obtaining a plurality of first search tags sent by a plurality of other NVRs, parse each received historical search request to obtain a plurality of search participle attributes;
and generating and recording a plurality of corresponding second retrieval labels according to the plurality of retrieval word segmentation attributes.
Optionally, the multiple first retrieval tags and the multiple second retrieval tags recorded in the historical search data are sorted according to retrieval frequency, and the sorted multiple first retrieval tags and multiple second retrieval tags are respectively sent to the other multiple NVRs, where the sorting unit 620 is configured to:
respectively counting the occurrence retrieval frequencies of the first retrieval labels and the second retrieval labels recorded in the historical search data, and sequencing the first retrieval labels and the second retrieval labels according to the sequence of the retrieval frequencies from high to low;
and respectively sending each sequenced first retrieval tag and each sequenced second retrieval tag to other NVRs according to a preset period.
Optionally, the sorted first retrieval tags and second retrieval tags are respectively sent to other NVRs according to a preset period, and the sorting unit 620 is configured to:
and respectively sending the sequenced first retrieval labels and second retrieval labels to other NVRs in a multicast or broadcast mode according to a preset period.
Optionally, the retrieval result corresponding to the target retrieval tag is stored in a storage space, and the storage unit 630 is configured to:
storing a plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in a memory, wherein the second threshold value is larger than the first threshold value;
storing a plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in a flash memory or a solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and storing a plurality of retrieval results corresponding to the target retrieval labels with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
Optionally, a plurality of corresponding second search tags are generated and recorded according to the plurality of search participle attributes, and the storage unit 630 is configured to:
and operating the plurality of search word segmentation attributes to generate a plurality of second search labels, wherein the operation comprises any one or any combination of the following operations: a sum operation, or operation, not operation;
a plurality of second retrieval tags are recorded in the storage area.
Optionally, the system further includes a capacity unit 630 ', where the capacity unit 630' is configured to obtain respective capacity values of the memory, the flash memory, the solid state disk, and the hard disk in the storage space before the retrieval result corresponding to the target retrieval tag is stored in the storage space;
the retrieval result corresponding to the target retrieval tag is stored in the storage space, and the storage unit 630 is configured to:
if the capacity value of the memory is larger than the storage capacity of a plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency larger than a second threshold value in the memory, wherein the second threshold value is larger than the first threshold value;
if the capacity value of the flash memory or the solid state disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with retrieval frequency smaller than a second threshold and larger than a third threshold in the flash memory or the solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and if the capacity value of the hard disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency smaller than the third threshold and larger than the first threshold in the hard disk.
It should be noted that, in the embodiment of the present application, the above-mentioned apparatus for data retrieval may be understood as an NVR, that is, the NVR includes an obtaining unit 610, a sorting unit 620, a storing unit 630, a searching unit 640, a generating unit 610 ', a capacity unit 630', and the like. However, in the actual operation process, a data retrieving apparatus is not limited thereto, and a data retrieving apparatus may also be understood as other computer devices that can perform the above functions, that is, a scheme that the other computer devices include the obtaining unit 610, the sorting unit 620, the storing unit 630, the searching unit 640, the generating unit 610 ', the capacity unit 630', and the like is also within the protection scope of the present application.
Based on the same inventive concept, referring to fig. 7, an embodiment of the present disclosure provides a terminal, including:
a memory 701 for storing executable instructions;
a processor 702 for reading and executing executable instructions stored in a memory to implement a method as in any of the first aspects.
Wherein in fig. 7, the bus architecture may include any number of interconnected buses and bridges, with one or more processors, represented by processor 702, and various circuits, represented by memory 701, being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver may be a plurality of elements, i.e., including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 702 is responsible for managing the bus architecture and general processing, and the memory 701 may store data used by the processor 702 in performing operations.
The processor 702 is responsible for managing the bus architecture and general processing, and the memory 701 may store data used by the processor 702 in performing operations.
The memory 701 and the processor 702 cooperate with each other to implement any one of the methods executed by the NVR in steps 200 to 203 in the above embodiments, which is not described herein again.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor, enable the processor to perform the method of any one of the first aspect.
In summary, in the embodiments of the present application, it is disclosed that the NVR sorts a plurality of first retrieval tags acquired from other NVRs and a plurality of second retrieval tags recorded in the history search data according to retrieval frequency, and sends the sorted retrieval tags to other NVRs respectively, the sharing of the retrieval labels among the NVRs can be realized on the basis of the definition of the popularity of each retrieval label, and the NVR compares the sorted first retrieval tags and the second retrieval tags with the retrieval frequency greater than a first threshold value, namely, the retrieval result corresponding to the target retrieval tag is stored in the storage space, thereby achieving the purpose of hierarchical storage according to the search heat, when a retrieval request aiming at the target retrieval tag is received, the NVR directly searches in the storage space and reads a corresponding retrieval result, therefore, the retrieval result is quickly obtained, and the efficiency of the NVR for retrieving the structured data is improved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product system. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product system embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program product systems according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A data retrieval method is applied to a Network Video Recorder (NVR), and comprises the following steps:
acquiring a plurality of first retrieval tags sent by other NVRs;
sequencing the plurality of first retrieval tags and a plurality of second retrieval tags recorded in historical search data according to retrieval frequency, and respectively sending the sequenced first retrieval tags and second retrieval tags to the other NVRs;
storing a retrieval result corresponding to a target retrieval tag into a storage space, wherein the target retrieval tag is a retrieval tag with a retrieval frequency greater than a first threshold value in the plurality of first retrieval tags and the plurality of second retrieval tags which are sequenced;
and when a retrieval request aiming at the target retrieval tag is received, searching a corresponding retrieval result in the storage space.
2. The method of claim 1, wherein prior to obtaining the first plurality of retrieval tags from the other plurality of NVRs, further comprising:
analyzing each received historical retrieval request to obtain a plurality of retrieval word segmentation attributes;
and generating and recording a plurality of corresponding second retrieval labels according to the plurality of retrieval word segmentation attributes.
3. The method of claim 1, wherein the sorting the first retrieval tags and the second retrieval tags recorded in the historical search data according to retrieval frequency and sending the sorted first retrieval tags and second retrieval tags to the other NVRs respectively comprises:
respectively counting the occurrence retrieval frequencies of the plurality of first retrieval tags and the plurality of second retrieval tags recorded in the historical search data, and sequencing the first retrieval tags and the second retrieval tags according to the sequence from high retrieval frequency to low retrieval frequency;
and respectively sending the sequenced first retrieval labels and second retrieval labels to the other NVRs according to a preset period.
4. The method of claim 3, wherein the sending the sorted first search tags and the sorted second search tags to the other NVRs according to a preset period comprises:
and respectively sending the sequenced first retrieval labels and second retrieval labels to the other NVRs in a multicast or broadcast mode according to a preset period.
5. The method of claim 1, wherein storing the search result corresponding to the target search tag in a storage space comprises:
storing a plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in a memory, wherein the second threshold value is larger than the first threshold value;
storing a plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency smaller than a second threshold and larger than a third threshold in a flash memory or a solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and storing a plurality of retrieval results corresponding to the target retrieval labels with the retrieval frequency smaller than a third threshold and larger than the first threshold in a hard disk.
6. The method of claim 2, wherein generating and recording a corresponding plurality of second search tags based on the plurality of search term attributes comprises:
performing an operation on the plurality of search word segmentation attributes to generate a plurality of second search labels, wherein the operation includes any one or any combination of the following operations: a sum operation, or operation, not operation;
and recording the plurality of second retrieval tags in a storage area.
7. The method of claim 5, before storing the search result corresponding to the target search tag in the storage space, further comprising:
respectively acquiring respective capacity values of a memory, a flash memory, a solid state disk and a hard disk in the storage space;
storing a retrieval result corresponding to the target retrieval tag into a storage space, wherein the method comprises the following steps:
if the capacity value of the memory is larger than the storage capacity of a plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag with the retrieval frequency larger than a second threshold value in the memory, wherein the second threshold value is larger than the first threshold value;
if the capacity value of the flash memory or the solid state disk is larger than the storage capacity of a plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag, of which the retrieval frequency is smaller than a second threshold and larger than a third threshold, in the flash memory or the solid state disk, wherein the third threshold is larger than the first threshold and smaller than the second threshold;
and if the capacity value of the hard disk is larger than the storage capacity of the plurality of retrieval results corresponding to the target retrieval tag, storing the plurality of retrieval results corresponding to the target retrieval tag, of which the retrieval frequency is smaller than a third threshold and larger than the first threshold, in the hard disk.
8. An apparatus for data retrieval, comprising:
the acquiring unit is used for acquiring a plurality of first retrieval tags sent by other NVRs;
the sorting unit is used for sorting the first retrieval tags and the second retrieval tags recorded in the historical search data according to retrieval frequency and respectively sending the sorted first retrieval tags and second retrieval tags to the other NVRs;
the storage unit is used for storing a retrieval result corresponding to a target retrieval tag into a storage space, wherein the target retrieval tag is a retrieval tag with a retrieval frequency larger than a first threshold value in the plurality of first retrieval tags and the plurality of second retrieval tags which are sequenced;
and the searching unit is used for searching a corresponding searching result in the storage space when a searching request aiming at the target searching label is received.
9. A terminal, comprising:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in the memory to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor, enable the processor to perform the method of any of claims 1-7.
CN202110622112.0A 2021-06-04 2021-06-04 Data retrieval method, device and storage medium Pending CN113434732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110622112.0A CN113434732A (en) 2021-06-04 2021-06-04 Data retrieval method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110622112.0A CN113434732A (en) 2021-06-04 2021-06-04 Data retrieval method, device and storage medium

Publications (1)

Publication Number Publication Date
CN113434732A true CN113434732A (en) 2021-09-24

Family

ID=77803945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110622112.0A Pending CN113434732A (en) 2021-06-04 2021-06-04 Data retrieval method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113434732A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934069A (en) * 2017-04-24 2017-07-07 中国工商银行股份有限公司 Data retrieval method and system
CN108287873A (en) * 2017-12-29 2018-07-17 深圳云天励飞技术有限公司 Data processing method and related product
US20190146991A1 (en) * 2016-06-09 2019-05-16 Panasonic Intellectual Property Management Co., Ltd. Image search device, image search system, and image search method
CN111897894A (en) * 2019-05-06 2020-11-06 北京四维图新科技股份有限公司 POI retrieval heat determining method, device, equipment and storage medium
CN112463074A (en) * 2020-12-14 2021-03-09 苏州浪潮智能科技有限公司 Data classification storage method, system, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190146991A1 (en) * 2016-06-09 2019-05-16 Panasonic Intellectual Property Management Co., Ltd. Image search device, image search system, and image search method
CN106934069A (en) * 2017-04-24 2017-07-07 中国工商银行股份有限公司 Data retrieval method and system
CN108287873A (en) * 2017-12-29 2018-07-17 深圳云天励飞技术有限公司 Data processing method and related product
CN111897894A (en) * 2019-05-06 2020-11-06 北京四维图新科技股份有限公司 POI retrieval heat determining method, device, equipment and storage medium
CN112463074A (en) * 2020-12-14 2021-03-09 苏州浪潮智能科技有限公司 Data classification storage method, system, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN109189991B (en) Duplicate video identification method, device, terminal and computer readable storage medium
CN110234037B (en) Video clip generation method and device, computer equipment and readable medium
CN110275983B (en) Retrieval method and device of traffic monitoring data
JP6833842B2 (en) Optimized media fingerprint retention to improve system resource utilization
CN110764706B (en) Storage system, data management method, and storage medium
CN102831405B (en) Method and system for outdoor large-scale object identification on basis of distributed and brute-force matching
CN107092686B (en) File management method and device based on cloud storage platform
CN116188821B (en) Copyright detection method, system, electronic device and storage medium
EP2735984A1 (en) Video query method, device and system
CN106383830B (en) Data retrieval method and equipment
CN110543584B (en) Method, device, processing server and storage medium for establishing face index
CN104484134A (en) Method and device for allocating distributed type storage magnetic discs
JP2008242965A (en) Moving image presentation system
Yadamjav et al. Querying recurrent convoys over trajectory data
CN112231344B (en) Real-time stream data query method and device
US11250001B2 (en) Accurate partition sizing for memory efficient reduction operations
CN113590898A (en) Data retrieval method and device, electronic equipment, storage medium and computer product
CN106257447A (en) The video storage of cloud storage server and search method, video cloud storage system
CN111159107B (en) Data processing method and server cluster
CN113434732A (en) Data retrieval method, device and storage medium
Xu et al. Automated pedestrian safety analysis using data from traffic monitoring cameras
WO2023165219A1 (en) Target retrieval method and device, and storage medium
CN115269519A (en) Log detection method and device and electronic equipment
JP7133037B2 (en) Message processing method, device and system
CN111159438B (en) Data storage and retrieval method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210924