Data query method and related apparatus
AssigneeMashang Consumer Finance Co., Ltd.
InventorQuan Lu
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a data query method. In the method, a first query result of a first database in response to a first query request is obtained. The first database stores data within a first time window. A second query result of a second database is obtained when the first query result does not meet a preset check condition. The second database stores data within a second time window. A start time of the second time window being after a start time of the first time window. A target query result based on at least one of the first query request and the second query result is generated by processing circuity. An update frequency of the second database is higher than an update frequency of the first database.
Claims17
A data query method, comprising:
- obtaining a first query result of a first database in response to a query request, the first database storing data of a first time window;
- obtaining a second query result of a second database when the first query result does not meet a preset check condition, the second database storing data of a second time window, a start time of the second time window being after a start time of the first time window;
- and
- generating, by processing circuitry, a target query result based on at least one of the first query result or the second query result, wherein
- an update frequency of the second database is higher than an update frequency of the first database;
- the second database includes a vector database and a document database, associations between the vector database and the document database being indicated in an index file;
- and
- the method further comprises:
- adding, to the document database, a second service document generated within the second time window;
- slicing the second service document to obtain a plurality of document slices;
- and
- storing a plurality of slice vectors corresponding to the plurality of document slices in the vector database.
A data query apparatus, the apparatus comprising:
- processing circuitry configured to:
- obtain a first query result of a first database in response to a query request, the first database storing data of a first time window;
- obtain a second query result of a second database when the first query result does not meet a preset check condition, the second database storing data of a second time window, a start time of the second time window being after a start time of the first time window;
- and
- generate a target query result based on at least one of the first query result or the second query result, wherein
- an update frequency of the second database is higher than an update frequency of the first database;
- the second database includes a vector database and a document database, associations between the vector database and the document database being indicated in an index file;
- and
- the processing circuitry is configured to:
- add a second service document that is generated within the second time window to the document database;
- and
- slice the second service document to obtain a plurality of document slices and store a plurality of slice vectors corresponding to the plurality of document slices in the vector database.
A non-transitory computer-readable storage medium, storing instructions which when executed by a processor cause the processor to perform:
- obtaining a first query result of a first database in response to a query request, the first database storing data of a first time window;
- obtaining a second query result of a second database when the first query result does not meet a preset check condition, the second database storing data of a second time window, a start time of the second time window being after a start time of the first time window;
- and
- generating, by processing circuitry, a target query result based on at least one of the first query result or the second query result, wherein
- an update frequency of the second database is higher than an update frequency of the first database;
- the second database includes a vector database and a document database, associations between the vector database and the document database being indicated in an index file;
- and
- the instructions when executed by the processor further cause the processor to perform:
- adding, to the document database, a second service document generated within the second time window;
- and
- slicing the second service document to obtain a plurality of document slices, and storing a plurality of slice vectors corresponding to the plurality of document slices in the vector database.
Dependencies are inferred from the claim text.