Data storage, query method and device, computer equipment and storage medium

By using a master-slave server stacking structure, the problem of expanding the capacity of the integrated video image data server was solved, improving processing performance and storage space, and achieving the integrity and accuracy of data query.

CN116248695BActive Publication Date: 2025-12-12ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111485154.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-12-12
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

Existing video image data integrated servers cannot be expanded by adding computing boards or storage devices, resulting in limited processing performance and storage space.

Method used

A master-slave server stacking structure is adopted. The slave server connects to the master server, determines the compatibility through the target algorithm information of the master server, sends the data to be stored to the master server for storage, and performs data query on the master server.

Benefits of technology

This improved the server's processing performance and storage space, ensuring the integrity and accuracy of data queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248695B_ABST
    Figure CN116248695B_ABST
Patent Text Reader

Abstract

The application discloses a data storage and query method and device, computer equipment and a storage medium. The data query method is executed by a slave server, at least one shooting device accesses the slave server, and the method comprises the following steps: acquiring main server target algorithm information issued by a main server; determining the compatibility of the main server target algorithm and the slave server target algorithm according to target data and the main server target algorithm information, wherein the target data is obtained by processing original data uploaded by the shooting device according to the slave server target algorithm; determining to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the main server for storage. The technical scheme of the application can improve the processing performance and storage space of the server.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to the technical field of data processing and intelligent monitoring, in particular to a data storage and query method and device, computer equipment and a storage medium. BACKGROUND

[0002] With the development of intelligent monitoring technology, a video image data integrated server appears, which is used for providing the structured media data, and the storage and retrieval of data.

[0003] In the data stored in the server, both the frequently accessed data such as structured data and feature vectors, and the less frequently accessed data such as unstructured pictures and videos are included. With the expansion of the business, the shooting devices accessing the server are increasing, and higher requirements for the processing performance and storage space of the server are also put forward. However, since the video image data integrated server is an all-in-one machine, it cannot be expanded by expanding the computing single board and storage device. SUMMARY

[0004] The embodiment of the present application provides a data storage and query method and device, computer equipment and a storage medium, so as to improve the processing performance and storage space of the server.

[0005] In a first aspect, the embodiment of the present application provides a data storage method, which is executed by a slave server, at least one shooting device accesses the slave server, and the method comprises the following steps:

[0006] obtaining the main server target algorithm information issued by a main server;

[0007] determining the compatibility of the main server target algorithm and the slave server target algorithm according to the target data and the main server target algorithm information, wherein the target data is obtained by processing the original data uploaded by the shooting device according to the slave server target algorithm;

[0008] determining the to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the main server for storage.

[0009] In a second aspect, the embodiment of the present application further provides a data query method, which is executed by a main server, the main server accesses at least one slave server, and the main server includes the stored data obtained according to the data storage method in any of the embodiments of the present application, and the method comprises the following steps:

[0010] determining a candidate feature vector according to the stored data, wherein the candidate feature vector includes a main server feature vector and a slave server feature vector;

[0011] determine dimensions of each candidate feature vector, and unify the dimension of the master server feature vector and the dimension of the slave server feature vector;

[0012] determine a standard feature vector matched with the data query request, and compare each candidate feature vector after the dimension unification with the standard feature vector, and determine a target feature vector in each candidate feature vector.

[0013] In a third aspect, the embodiment of the present application further provides a data storage device, which is arranged in a slave server, at least one shooting device accesses the slave server, and the device comprises:

[0014] a master server target algorithm information acquisition module, configured to acquire master server target algorithm information issued by a master server;

[0015] a compatibility determination module, configured to determine the compatibility of the master server target algorithm and the slave server target algorithm according to target data and the master server target algorithm information, wherein the target data is obtained by processing original data uploaded by the shooting device according to the slave server target algorithm;

[0016] a to-be-stored data sending module, configured to determine to-be-stored data from the original data and the target data according to the compatibility, and send the to-be-stored data to the master server for storage.

[0017] In a fourth aspect, the embodiment of the present application further provides a data query device, which is arranged in a master server, the master server accesses at least one slave server, and the master server comprises stored data obtained according to the data storage method in any embodiment of the present application, and the device comprises:

[0018] a candidate feature vector determination module, configured to determine candidate feature vectors according to the stored data, wherein the candidate feature vectors comprise master server feature vectors and slave server feature vectors;

[0019] a dimension unification module, configured to determine dimensions of each candidate feature vector, and unify the dimension of the master server feature vector and the dimension of the slave server feature vector;

[0020] a feature vector comparison module, configured to determine a standard feature vector matched with the data query request, and compare each candidate feature vector after the dimension unification with the standard feature vector, and determine a target feature vector in each candidate feature vector.

[0021] In a fifth aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data storage method or the data query method according to any one of the embodiments of the present application.

[0022] In a sixth aspect, an embodiment of the present application further provides a storage medium containing computer executable instructions for executing the data storage method or the data query method according to any one of the embodiments of the present application when executed by a computer processor.

[0023] The embodiment of the present application solves the problem of limited processing performance and storage space of the server in the prior art by deploying the master-slave server structure, the slave server accesses the master server, at least one shooting device accesses the slave server, the slave server determines the compatibility of the master server target algorithm and the slave server target algorithm according to the master server target algorithm information and the target data issued by the master server, and determines the to-be-stored data in the original data and the target data according to the compatibility, and sends the to-be-stored data to the master server for storage. The processing performance and the storage space of the server are improved by stacking the master-slave server, storing the original data and the target data obtained by processing the original data in each slave server, and storing only the to-be-stored data determined in the original data and the target data in the master server. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a flowchart of a data storage method in the first embodiment of the present application;

[0025] Figure 2 is a flowchart of another data storage method in the second embodiment of the present application;

[0026] Figure 3 is a flowchart of a data query method in the third embodiment of the present application;

[0027] Figure 4 is a structural schematic diagram of a data storage device in the fourth embodiment of the present application;

[0028] Figure 5 is a structural schematic diagram of a data query device in the fifth embodiment of the present application;

[0029] Figure 6 is a structural schematic diagram of a computer device in the sixth embodiment of the present application. DETAILED DESCRIPTION

[0030] The application will be described in further detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are intended for explanation only and are not limiting of the application. It should also be noted that, for the sake of brevity, the drawings have not necessarily been drawn to scale and that certain features of the application can also be used in combinations other than the combinations shown in the figures.

[0031] Embodiment one

[0032] Figure 1 is a flowchart of a data storage method provided by the embodiment one of the application. The embodiment can be applied to the case where the storage space and processing performance of the master server are improved by stacking the master server and the slave server when a large number of shooting devices are accessed. The method can be executed by a data storage device, which can be realized by software and / or hardware and is generally integrated in the slave server and used in cooperation with the shooting device and the master server.

[0033] As shown in Figure 1 , the technical solution of the embodiment of the application specifically includes the following steps:

[0034] S110, obtaining master server target algorithm information issued by the master server.

[0035] The embodiment of the application sets a master-slave server structure, wherein the master server accesses at least one slave server, the master server can also access a shooting device, and the slave server accesses at least one shooting device. The master server can be determined by election or designation. Preferably, the first server that performs data storage is taken as the master server, and the servers that are subsequently added are taken as slave servers. After the slave server accesses the master server, the data to be stored is synchronized to the master server.

[0036] The master server target algorithm is an algorithm that the master server relies on to process the original data uploaded by the shooting device. Exemplarily, the master server target algorithm can be a face recognition algorithm, a vehicle recognition algorithm, etc. The type of the master server target algorithm is not limited in the embodiment. Correspondingly, the master server target algorithm information can be identity information, version number, etc. of the master server target algorithm, can also be the master server target algorithm itself, or the difference between the master server target algorithm and the target algorithm of the slave server. The specific content of the master server target algorithm information is not limited in the embodiment.

[0037] In the embodiment of the application, the master server target algorithm can be queried by the slave server from the master server, and the master server feeds back the master server target algorithm information to the slave server. After the target algorithm is updated, the master server can also actively issue the master server target algorithm information to each slave server, or the master server collects the target algorithm information of each slave server to determine whether to actively issue the master server target algorithm information to the slave server. The embodiment does not limit this.

[0038] In the embodiment of the present application, after the slave server accesses the master server, the slave server can be unified with the target algorithm version of the master server, the slave server processes the raw data uploaded by the shooting device according to the unified target algorithm, and synchronizes the data with relatively high access frequency, such as structured data and feature vectors, non-structured data such as microfilm pictures, to the master server, and the data with relatively low access frequency, such as raw images and videos, is still stored in the slave server. This setting can save the storage space of the master server and ensure the unified query of the data in the master server.

[0039] In the embodiment of the present application, after the slave server accesses the master server, due to the limitation of hardware and other conditions, the target algorithm version of some slave servers cannot be unified with the master server, and the data in the slave server cannot be directly synchronized to the master server at this time. In order to ensure the consistency of the data synchronized from the slave server to the master server and the master server, the master server target algorithm information is obtained, and according to the master server target algorithm information, the related information of the master server target algorithm can be determined, so as to determine the compatibility of the master server target algorithm and the slave server target algorithm.

[0040] S120, determining the compatibility of the master server target algorithm and the slave server target algorithm according to the target data and the master server target algorithm information.

[0041] The target data is obtained by processing the raw data uploaded by the shooting device according to the slave server target algorithm. The target data can include algorithm processing results matched with the slave server target algorithm, and global feature vectors, structured data and the like matched with the raw data. The target data is saved in the slave server together with the raw data uploaded by the shooting device.

[0042] The compatibility is used to judge the difference between the master server target algorithm and the slave server target algorithm, and the influence degree on the algorithm processing result. The higher the compatibility is, the smaller the influence of the difference between the master server target algorithm and the slave server target algorithm on the algorithm processing result is. For the same raw data uploaded by the shooting device, the consistency of the algorithm processing results obtained by processing the raw data through the master server target algorithm and the slave server target algorithm is higher.

[0043] Specifically, the feature vector dimension of the master server can be determined according to the master server target algorithm information, the feature vector dimension of the master server is compared with the feature vector dimension of the slave server, and the compatibility of the master server target algorithm and the slave server target algorithm is determined.

[0044] S130, determining to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the master server for storage.

[0045] The to-be-stored data is data with a high access frequency, such as structured data, and a feature vector matched with a video or an image.

[0046] Specifically, when the compatibility is high, it indicates that the consistency of the algorithm processing results obtained by the master server target algorithm and the slave server target algorithm is high for the same data, and the difference between the feature vector in the target data and the feature vector obtained by processing the original data uploaded by the shooting device through the master server target algorithm is small. Since data query in the master server needs to be performed through feature vector comparison, at this time, the structured data and the feature vector can be uploaded to the master server as to-be-stored data, so as to ensure the data integrity when the master server performs data retrieval.

[0047] When the compatibility is low, it indicates that the consistency of the algorithm processing results obtained by the master server target algorithm and the slave server target algorithm is low for the same data, and the difference between the feature vector in the target data and the feature vector obtained by processing the original data uploaded by the shooting device through the master server target algorithm is large. At this time, if the feature vector in the target data is sent to the master server, the accuracy of the data when the master server performs data retrieval will be affected. At this time, the master server target algorithm information can be determined according to the master server target algorithm information, the original data uploaded by the shooting device is reprocessed through the master server target algorithm information, a new feature vector is obtained, and the structured data and the new feature vector are uploaded to the master server as to-be-stored data, so as to realize the data compatibility of the master server and the slave server.

[0048] The technical scheme of the embodiment, by deploying the master server and the slave server, the slave server accesses the master server, at least one shooting device accesses the slave server, the slave server determines the compatibility of the master server target algorithm and the slave server target algorithm according to the master server target algorithm information and the target data sent by the master server, and determines to-be-stored data in the original data and the target data according to the compatibility, and sends the to-be-stored data to the master server for storage. The problem that the processing performance and the storage space of the server are limited in the prior art is solved, the master-slave server stacking mode is adopted, the original data and the target data obtained by processing the original data are stored in each slave server, only the to-be-stored data determined in the original data and the target data is stored in the master server, and the processing performance and the storage space of the server are improved.

[0049] Embodiment two

[0050] Figure 2is a flowchart of another data storage provided by the second embodiment of the present application, and the second embodiment of the present application further specifies the process of obtaining the master server target algorithm information, the process of determining the compatibility of the master server target algorithm and the slave server target algorithm, and the process of determining the data to be stored in the original data and the target data on the basis of the above-mentioned embodiments.

[0051] Correspondingly, as shown in Figure 2 The technical scheme of the embodiment of the present application specifically comprises the following steps:

[0052] S210, sending a master server target algorithm version query request to the master server, and receiving the master server target algorithm version sent by the master server.

[0053] In this embodiment, the slave server queries the target algorithm version from the master server, the slave server sends a master server target algorithm version query request to the master server, and the master server feeds back the master server target algorithm version to the slave server.

[0054] S220, determining whether the master server target algorithm version matches the slave server target algorithm version, if yes, executing S270, otherwise executing S230.

[0055] The slave server compares the master server target algorithm version fed back by the master server with the local target algorithm version, if the versions are consistent, the structured data and the feature vector and other data with high access frequency in the target data are directly sent to the master server to realize data synchronization.

[0056] It should be noted that the master server target algorithm and the slave server target algorithm can be one or multiple. When the master server target algorithm and the slave server target algorithm are multiple, each master server target algorithm and the corresponding slave server target algorithm are compared to determine the master server target algorithm and the slave server target algorithm that do not match, so as to generate a master server target algorithm information issuance request corresponding to the master server target algorithm.

[0057] S230, sending a master server target algorithm information issuance request to the master server, and receiving the master server target algorithm information sent by the master server.

[0058] When the master server target algorithm version and the slave server target algorithm version are inconsistent, the slave server requests the master server to issue the master server target algorithm information. The master server can directly issue the master server target algorithm information with differences to the slave server, or can issue the difference information between the master server target algorithm and the slave server target algorithm to the slave server, and the present embodiment does not limit this.

[0059] S240, determining the master server feature vector dimension according to the master server target algorithm information.

[0060] The feature vector dimension is used to represent the attribute of the sample, and the number of the master server feature vector dimension can be determined through the master server target algorithm information.

[0061] S250, determining the compatibility of the master server target algorithm and the slave server target algorithm according to the slave server feature vector dimension and the master server feature vector dimension in the target data.

[0062] When determining the compatibility of the master server target algorithm and the slave server target algorithm through the comparison of the master server feature vector and the slave server feature vector, the compatibility of the master server target algorithm and the slave server target algorithm can be determined by comparing the number of dimensions of the master server feature vector and the slave server feature vector, or measuring the influence of the different dimensions in the master server feature vector and the slave server feature vector on the feature vector.

[0063] Correspondingly, S250 can further include:

[0064] S251, judging whether the ratio of the number of slave server feature vector dimensions to the number of master server feature vector dimensions is greater than or equal to a preset threshold value, if yes, executing S255, otherwise executing S252.

[0065] In the embodiment of the application, when the ratio of the number of slave server feature vector dimensions to the number of master server feature vector dimensions is greater than or equal to the preset threshold value, the slave server feature vector dimension is close to the master server feature vector dimension, and it is considered that the compatibility of the master server target algorithm and the slave server target algorithm is high.

[0066] S252, determining the different dimensions according to the slave server feature vector dimension and the master server feature vector dimension.

[0067] The embodiment takes the judgment of the ratio of the slave server feature vector dimension to the master server feature vector dimension and the judgment of the influence degree of the different dimensions on the feature vector comparison result as an example, and the compatibility of the master server target algorithm and the slave server target algorithm can also be determined by only using the ratio of the slave server feature vector dimension to the master server feature vector dimension or only using the judgment of the influence degree of the different dimensions on the feature vector comparison result.

[0068] S253, respectively calculating the feature vector comparison results of the slave server feature vector and the master server feature vector, and determining the influence degree of the different dimensions on the feature vector comparison result.

[0069] Specifically, when the target algorithm is a face recognition algorithm, if it is determined that the master server feature vector has added a feature vector of eye lashes relative to the slave server feature vector, a first comparison result between the master server feature vector and the sample feature vector is calculated, and a second comparison result between the slave server feature vector and the sample feature vector is calculated. The difference between the first comparison result and the second comparison result, and the ratio of the first comparison result, are used as the influence degree of the feature vector comparison result of the difference dimension.

[0070] In S254, it is determined whether the influence degree is less than a preset influence degree threshold. If yes, S255 is executed; otherwise, S256 is executed.

[0071] When the influence degree is less than or equal to the preset influence degree threshold, it is considered that the compatibility of the master server target algorithm and the slave server target algorithm is greater than a preset compatibility threshold.

[0072] In S255, it is determined that the compatibility of the master server target algorithm and the slave server target algorithm is greater than the preset compatibility threshold.

[0073] In S256, it is determined that the compatibility of the master server target algorithm and the slave server target algorithm is less than the preset compatibility threshold.

[0074] In S260, it is determined whether the compatibility is greater than a preset compatibility threshold. If yes, S270 is executed; otherwise, S280 is executed.

[0075] In S270, the structured data in the target data and the slave server feature vector are used as the to-be-stored data.

[0076] When the compatibility of the master server target algorithm and the slave server target algorithm is greater than the preset compatibility threshold, that is, when the compatibility of the master server target algorithm and the slave server target algorithm is high, the structured data in the target data and the feature vector are used as the to-be-stored data and are synchronized to the master server.

[0077] Optionally, the feature vector in the to-be-stored data can also be identified as needing to be updated while the to-be-stored data is synchronized to the master server, but a lower task priority of feature vector update is set for the to-be-stored data, for example, the to-be-stored data is identified as a first task priority.

[0078] In S280, the master server feature vector is recalculated according to the original data and the master server target algorithm.

[0079] When the compatibility of the master server target algorithm and the slave server target algorithm is low, the feature vector in the target data is uploaded to the master server, and the feature vector cannot be applied to data query in the master server. Therefore, the feature vector needs to be recalculated.

[0080] Optionally, the structured data in the target data can be uploaded to the master server first, and it is identified that the feature vector needs to be updated, and the update of the feature vector is set to a higher task priority, for example, the feature vector is identified as a second task priority, and the level of the second task priority is higher than that of the first task priority. When there is idle computing resource in the slave server, the raw data uploaded by the shooting device is processed according to the master server target algorithm, and the master server feature vector is recalculated and uploaded to the master server.

[0081] Optionally, when it is determined that the compatibility of the master server target algorithm and the slave server target algorithm is low, the raw data uploaded by the shooting device is processed according to the master server target algorithm, the master server feature vector is recalculated, and the structured data in the target data and the recalculated master server feature vector are uploaded to the master server as the to-be-stored data.

[0082] S290, the structured data in the target data and the recalculated master server feature vector are uploaded to the master server as the to-be-stored data.

[0083] Through the recalculation of the feature vector, the data in the master server can be unified.

[0084] S2100, the to-be-stored data is sent to the master server for storage.

[0085] The technical scheme of the embodiment, by deploying the structure of the master and slave servers, the slave server accesses the master server, and at least one shooting device accesses the slave server. When it is determined that the target algorithm versions of the master and slave servers are inconsistent, the master server feature vector dimension is determined according to the master server target algorithm information issued by the master server, the slave server feature vector dimension is determined according to the target data, the compatibility of the master server target algorithm and the slave server target algorithm is determined according to the master server feature vector dimension and the slave server feature vector dimension, when the compatibility is high, the structured data and the feature vector are directly sent to the master server, and when the compatibility is low, the feature vector is recalculated according to the master server target algorithm information, and the structured data and the recalculated feature vector are sent to the master server. The problem that the processing performance and the storage space of the server in the prior art are limited is solved. The original data and the target data obtained by processing the original data are stored in each slave server by using the master-slave server stacking mode, only the to-be-stored data determined in the original data and the target data is stored in the master server, the processing performance and the storage space of the server are improved, and when the compatibility of the master server target algorithm and the slave server target algorithm is low, the feature vector is recalculated and uploaded according to the master server target algorithm information, and the uniformity of the data in the master server is ensured.

[0086] Embodiment three

[0087] Figure 3 is a flowchart of a data query method in embodiment three of the present application. The embodiment can be applied to the case where the storage space and processing performance of the master server are improved by stacking the master server and the slave server when a large number of shooting devices are accessed. The method can be executed by a data query device, which can be implemented by software and / or hardware and is generally integrated in the master server and used in cooperation with the shooting device and the slave server.

[0088] As shown in Figure 3 , the technical solution of the embodiment of the present application specifically includes the following steps:

[0089] S310, determining candidate feature vectors according to the stored data, wherein the candidate feature vectors include master server feature vectors and slave server feature vectors.

[0090] The master server includes the stored data obtained by the data storage method in any of the above embodiments.

[0091] According to the data storage method of the above embodiment, when the compatibility of the target algorithm of the master server and the target algorithm of the slave server is high, the structured data and the feature vectors in the target data of the slave server are directly uploaded to the master server. Although the compatibility of the target algorithm of the master server and the target algorithm of the slave server is high, there are still differences, and the dimensions of the master server feature vectors and the slave server feature vectors are different.

[0092] S320, determining the dimensions of each candidate feature vector and unifying the dimensions of the master server feature vectors and the dimensions of the slave server feature vectors.

[0093] Optionally, determining the dimensions of each candidate feature vector and unifying the dimensions of the master server feature vectors and the dimensions of the slave server feature vectors can include: if the dimension of the master server feature vector is higher than the dimension of the slave server feature vector, reducing the dimension of the master server feature vector to the dimension of the slave server feature vector, or improving the dimension of the slave server feature vector to the dimension of the master server feature vector. When the dimension of the slave server feature vector is improved, if the feature vector of the distinguished dimension cannot be derived from other dimensions in the slave server feature vector, a classical value or a default value can be used for the feature vector of the distinguished dimension. Correspondingly, if the dimension of the slave server feature vector is higher than the dimension of the master server feature vector, the dimension of the master server feature vector can be improved to the dimension of the slave server feature vector, or the dimension of the slave server feature vector can be reduced to the dimension of the master server feature vector. The unification method of the dimensions of the feature vectors is not limited in the embodiment, and the ascending and descending methods of the dimensions of the feature vectors are also not limited.

[0094] Since the compatibility of the master server target algorithm and the slave server target algorithm is high, the increase and decrease of the dimension of the feature vector has a small influence on the feature comparison result. By unifying the dimension of the candidate feature vector, the data consistency of the master server is realized.

[0095] S330, determine the standard feature vector matched with the data query request, and compare the unified dimension of each candidate feature vector with the standard feature vector, and determine the target feature vector in each candidate feature vector.

[0096] When the master server performs data query, the standard feature vector is determined according to the data query request, each candidate feature vector after dimension unification is compared with the standard feature vector, the target feature vector is determined in each candidate feature vector according to the comparison result, and the data matched with the target feature vector is provided to the user as the data query result.

[0097] The technical scheme of the embodiment of the application, by deploying the structure of the master server and the slave server, the slave server accesses the master server, at least one shooting device accesses the slave server, the slave server determines the to-be-stored data from the original data and the target data obtained after processing the original data, and sends the to-be-stored data to the master server, the master server stores the to-be-stored data, and then determines the candidate feature vector according to the stored data, unifies the dimensions of the master server feature vector and the slave server feature vector in each candidate feature vector, and performs feature vector comparison according to each candidate feature vector after unifying the dimensions, thereby realizing data query. The problem that the processing performance and the storage space of the server in the prior art are limited is solved, each to-be-stored data sent by the slave server is stored, the storage space is saved, the availability of the master server data during data query is ensured, the dimensions of the feature vectors are unified, and the accuracy of the data query result is ensured.

[0098] Embodiment four

[0099] Figure 4 It is a structure schematic diagram of a data storage device in embodiment four of the application, which is deployed in a slave server, at least one shooting device accesses the slave server, and the device comprises a master server target algorithm information acquisition module 410, a compatibility determination module 420, and a to-be-stored data sending module 430, wherein:

[0100] The master server target algorithm information acquisition module 410 is used to acquire the master server target algorithm information issued by the master server.

[0101] The compatibility determination module 420 is configured to determine the compatibility of the master server target algorithm and the slave server target algorithm according to the target data and the master server target algorithm information, wherein the target data is obtained by processing the original data uploaded by the shooting device according to the slave server target algorithm.

[0102] The data to be stored sending module 430 is configured to determine the data to be stored from the original data and the target data according to the compatibility, and send the data to be stored to the master server for storage.

[0103] The technical scheme of the embodiment, by deploying the structure of the master server and the slave server, the slave server accesses the master server, at least one shooting device accesses the slave server, the slave server determines the compatibility of the master server target algorithm and the slave server target algorithm according to the master server target algorithm information and the target data sent by the master server, and determines the data to be stored from the original data and the target data according to the compatibility, and sends the data to be stored to the master server for storage. The problem that the processing performance and the storage space of the server are limited in the prior art is solved, the original data and the target data obtained by processing the original data are stored in each slave server in a master-slave server stacking manner, and only the data to be stored determined from the original data and the target data is stored in the master server, so that the processing performance and the storage space of the server are improved.

[0104] On the basis of the above embodiment, the master server target algorithm information acquisition module 410 comprises:

[0105] The master server target algorithm version query unit is configured to send a master server target algorithm version query request to the master server, and receive the master server target algorithm version sent by the master server;

[0106] The master server target algorithm information acquisition unit is configured to send a master server target algorithm information issuing request to the master server if it is determined that the master server target algorithm version does not match the slave server target algorithm version, and receive the master server target algorithm information sent by the master server.

[0107] On the basis of the above embodiment, the compatibility determination module 420 comprises:

[0108] The master server feature vector dimension determination unit is configured to determine the master server feature vector dimension according to the master server target algorithm information;

[0109] The compatibility determination unit is configured to determine the compatibility of the master server target algorithm and the slave server target algorithm according to the slave server feature vector dimension and the master server feature vector dimension in the target data.

[0110] On the basis of the above-mentioned embodiments, the compatibility determination unit is specifically configured to:

[0111] If it is determined that the ratio of the number of dimensions of the slave server feature vector to the number of dimensions of the master server feature vector is greater than or equal to a preset threshold value, it is determined that the compatibility of the master server target algorithm and the slave server target algorithm is greater than a preset compatibility threshold value; and / or,

[0112] According to the slave server feature vector dimension and the master server feature vector dimension, the distinguishing dimension is determined.

[0113] The feature vector comparison results of the slave server feature vector and the master server feature vector are calculated respectively, and the influence degree of the distinguishing dimension on the feature vector comparison result is determined.

[0114] If it is determined that the influence degree is less than a preset influence degree threshold value, it is determined that the compatibility of the master server target algorithm and the slave server target algorithm is greater than a preset compatibility threshold value.

[0115] On the basis of the above-mentioned embodiments, the to-be-stored data sending module 430 comprises:

[0116] The first to-be-stored data determination unit is configured to, if it is determined that the compatibility is greater than a preset compatibility threshold value, take the structured data in the target data and the slave server feature vector as to-be-stored data.

[0117] The feature vector calculation unit is configured to, otherwise, recompute the master server feature vector according to the original data and the master server target algorithm.

[0118] The second to-be-stored data determination unit is configured to take the structured data in the target data and the recomputed master server feature vector as to-be-stored data.

[0119] The data storage device provided in the embodiments of the present application can execute the data storage method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the method.

[0120] Embodiment five

[0121] Figure 5 FIG. 1 is a structural schematic diagram of a data query device in Embodiment five of the present application. The device is deployed in a master server, the master server accesses at least one slave server, the master server comprises stored data obtained according to the data storage method in any of the embodiments of the present application, and the device comprises a candidate feature vector determination module 510, a dimension unification module 520, and a feature vector comparison module 530.

[0122] The candidate feature vector determination module 510 is used to determine candidate feature vectors based on stored data, wherein the candidate feature vectors include the main server feature vector and the slave server feature vector.

[0123] The dimension unification module 520 is used to determine the dimension of each candidate feature vector and unify the dimension of the main server feature vector and the feature vector of the slave server.

[0124] The feature vector comparison module 530 is used to determine the standard feature vector that matches the data query request, and compare each candidate feature vector after dimension unification with the standard feature vector to determine the target feature vector among the candidate feature vectors.

[0125] The technical solution of this invention employs a master-slave server architecture. The slave server connects to the master server, and at least one imaging device connects to the slave server. The slave server determines the data to be stored from the raw data and the target data obtained after processing the raw data, and sends this data to the master server. The master server stores the data to be stored and determines candidate feature vectors based on the stored data. The dimensions of the master server's feature vectors and the slave server's feature vectors are unified. Feature vector comparison is performed based on the unified dimension of each candidate feature vector, thereby enabling data querying. This solves the problems of limited server processing performance and storage space in existing technologies. By storing the data to be stored sent from the slave server, storage space is saved while ensuring the availability of the master server's data during data querying. Furthermore, the unified feature vector dimensions ensure the accuracy of the data query results.

[0126] The data query device provided in the embodiments of the present invention can execute the data query method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Example 6

[0128] Figure 6 This is a schematic diagram of the structure of a computer device provided in Embodiment Six of the present invention, as shown below. Figure 6 As shown, the computer device includes a processor 60, a memory 61, an input device 62, and an output device 63; the number of processors 60 in the computer device can be one or more. Figure 6 Taking a processor 60 as an example; the processor 60, memory 61, input device 62, and output device 63 in a computer device can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.

[0129] The memory 61 is a computer readable storage medium, which can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the data storage method in the embodiment of the present application (for example, the master server target algorithm information obtaining module 410, the compatibility determining module 420 and the to-be-stored data sending module 430 in the data storage device), or the modules corresponding to the data query method in the embodiment of the present application (for example, the candidate feature vector determining module 510, the dimension unifying module 520 and the feature vector comparing module 530 in the data query device). The processor 60 executes the software programs, instructions and modules stored in the memory 61, so as to execute various function applications and data processing of the computer device, that is, to realize the data storage method described above. The method comprises:

[0130] obtaining the master server target algorithm information issued by the master server;

[0131] determining the compatibility of the master server target algorithm and the slave server target algorithm according to the target data and the master server target algorithm information, wherein the target data is obtained by processing the original data uploaded by the shooting device according to the slave server target algorithm;

[0132] determining the to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the master server for storage.

[0133] or realizing the data query method described above. The method comprises:

[0134] determining the candidate feature vector according to the stored data, wherein the candidate feature vector comprises the master server feature vector and the slave server feature vector;

[0135] determining the dimensions of each candidate feature vector, and unifying the dimensions of the master server feature vector and the slave server feature vector;

[0136] determining the standard feature vector matched with the data query request, and comparing each candidate feature vector after the dimension unification with the standard feature vector, so as to determine the target feature vector in each candidate feature vector.

[0137] The memory 61 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; and the data storage area can store data created according to the use of the terminal and the like. In addition, the memory 61 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 61 can further include a memory disposed remotely with respect to the processor 60, which can be connected to the computer device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0138] The input device 62 can be used to receive input digital or character information, and to generate key signal inputs related to the user settings and function controls of the computer device. The output device 63 can include a display device such as a display screen.

[0139] Embodiment seven

[0140] The embodiment seven of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute a data storage method, the method comprising:

[0141] obtaining the master server target algorithm information issued by the master server;

[0142] determining the compatibility of the master server target algorithm and the slave server target algorithm according to the target data and the master server target algorithm information, wherein the target data is obtained by processing the original data uploaded by the shooting device according to the slave server target algorithm;

[0143] determining the to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the master server for storage.

[0144] The computer executable instructions, when executed by the computer processor, can also be used to execute a data query method, the method comprising:

[0145] determining candidate feature vectors according to the stored data, wherein the candidate feature vectors include master server feature vectors and slave server feature vectors;

[0146] determining the dimensions of each candidate feature vector, and unifying the dimensions of the master server feature vectors and the slave server feature vectors;

[0147] determining a standard feature vector matched with the data query request, and comparing each candidate feature vector after the dimension unification with the standard feature vector to determine a target feature vector in each candidate feature vector.

[0148] Of course, the storage medium provided by the embodiments of the present application contains computer executable instructions, which are not limited to the method operations described above, but can also perform the related operations in the data storage method or the data query method provided by any of the embodiments of the present application.

[0149] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH, a hard disk or an optical disk, etc., including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0150] It is worth noting that the above embodiments of the data storage device or the data query device include various units and modules only according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual distinction, and do not limit the protection scope of the present application.

[0151] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A data storage method characterized by comprising: The method is executed by a slave server, at least one shooting device accesses the slave server, and the method comprises the following steps of: obtaining master server target algorithm information issued by a master server; determining compatibility of the master server target algorithm and the slave server target algorithm according to target data and the master server target algorithm information, wherein the target data is obtained by processing original data uploaded by the shooting device according to the slave server target algorithm; determining to-be-stored data from the original data and the target data according to the compatibility, and sending the to-be-stored data to the master server for storage; determining to-be-stored data from the original data and the target data according to the compatibility, comprising: if it is determined that the compatibility is greater than a preset compatibility threshold, then taking structured data in the target data and a slave server feature vector as the to-be-stored data; otherwise, recalculating a master server feature vector according to the original data and the master server target algorithm; taking the structured data in the target data and the recalculated master server feature vector as the to-be-stored data.

2. The method of claim 1, wherein, The step of obtaining the master server target algorithm information issued by the master server comprises the following steps of: sending a master server target algorithm version query request to the master server, and receiving a master server target algorithm version sent by the master server; if it is determined that the master server target algorithm version does not match a slave server target algorithm version, then sending a master server target algorithm information issuing request to the master server, and receiving master server target algorithm information sent by the master server.

3. The method of claim 1, wherein, The step of determining the compatibility of the master server target algorithm and the slave server target algorithm according to the target data and the master server target algorithm information comprises the following steps of: determining a master server feature vector dimension according to the master server target algorithm information; determining the compatibility of the master server target algorithm and the slave server target algorithm according to a slave server feature vector dimension and the master server feature vector dimension in the target data.

4. The method of claim 3, wherein, The step of determining the compatibility of the master server target algorithm and the slave server target algorithm according to the slave server feature vector dimension and the master server feature vector dimension in the target data comprises the following steps of: if it is determined that a ratio of the number of the slave server feature vector dimension to the number of the master server feature vector dimension is greater than or equal to a preset threshold, then determining that the compatibility of the master server target algorithm and the slave server target algorithm is greater than a preset compatibility threshold; and / or determining a distinguishing dimension according to the slave server feature vector dimension and the master server feature vector dimension; respectively calculating feature vector comparison results of the slave server feature vector and the master server feature vector to determine an influence degree of the distinguishing dimension on the feature vector comparison results; if it is determined that the influence degree is less than a preset influence degree threshold, then determining that the compatibility of the master server target algorithm and the slave server target algorithm is greater than the preset compatibility threshold.

5. A query method of data, characterized by, The method is executed by a master server, the master server accesses at least one slave server, and the master server comprises stored data obtained according to the data storage method in any one of claims 1-4, and the method comprises the following steps of: determining a candidate feature vector according to the stored data, wherein the candidate feature vector comprises a master server feature vector and a slave server feature vector; Determine the dimension of each candidate feature vector, and unify the dimension of the master server feature vector and the dimension of the slave server feature vector; Determine the standard feature vector matched with the data query request, and compare each candidate feature vector after the dimension is unified with the standard feature vector, and determine the target feature vector in each candidate feature vector.

6. A storage device for data, characterized by The device is deployed in a slave server, at least one shooting device accesses the slave server, and the device comprises: A master server target algorithm information acquisition module is configured to acquire master server target algorithm information issued by a master server; A compatibility determination module is configured to determine the compatibility of the master server target algorithm and the slave server target algorithm according to target data and master server target algorithm information, wherein the target data is obtained by processing original data uploaded by a shooting device according to the slave server target algorithm; A to-be-stored data sending module is configured to determine to-be-stored data from the original data and the target data according to the compatibility, and send the to-be-stored data to the master server for storage; The to-be-stored data sending module comprises: A first to-be-stored data determination unit is configured to, if it is determined that the compatibility is greater than a preset compatibility threshold, take the structured data in the target data and the slave server feature vector as to-be-stored data; A feature vector calculation unit is configured to, otherwise, re-calculate a master server feature vector according to the original data and the master server target algorithm; A second to-be-stored data determination unit is configured to take the structured data in the target data and the re-calculated master server feature vector as to-be-stored data.

7. A data search device, characterized by comprising: The device is deployed in a master server, the master server accesses at least one slave server, and the master server comprises stored data obtained according to the data storage method of any one of claims 1-5, and the device comprises: A candidate feature vector determination module is configured to determine candidate feature vectors according to the stored data, wherein the candidate feature vectors comprise master server feature vectors and slave server feature vectors; A dimension unification module is configured to determine the dimension of each candidate feature vector, and unify the dimension of the master server feature vector and the dimension of the slave server feature vector; A feature vector comparison module is configured to determine a standard feature vector matched with a data query request, and compare each candidate feature vector after the dimension is unified with the standard feature vector, and determine a target feature vector in each candidate feature vector.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the data storage method of any one of claims 1-4 or the data query method of claim 5 when executing the program.

9. A storage medium containing computer-executable instructions, wherein: The computer executable instructions are used to execute the data storage method of any one of claims 1-4 or the data query method of claim 5 when executed by the computer processor.

Citation Information

Patent Citations

  • Unification method and equipment of feature vectors, communication system and storage medium

    CN112910958A