CN110020040B - Method, device and system for querying data - Google Patents

Method, device and system for querying data Download PDF

Info

Publication number
CN110020040B
CN110020040B CN201710706286.9A CN201710706286A CN110020040B CN 110020040 B CN110020040 B CN 110020040B CN 201710706286 A CN201710706286 A CN 201710706286A CN 110020040 B CN110020040 B CN 110020040B
Authority
CN
China
Prior art keywords
data
query
keyword
result
server
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.)
Active
Application number
CN201710706286.9A
Other languages
Chinese (zh)
Other versions
CN110020040A (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710706286.9A priority Critical patent/CN110020040B/en
Publication of CN110020040A publication Critical patent/CN110020040A/en
Application granted granted Critical
Publication of CN110020040B publication Critical patent/CN110020040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3325Reformulation based on results of preceding query
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Abstract

The application discloses a method, a device and a system for querying data. Wherein, a specific implementation mode of the method comprises the following steps: sending the query field of the query keyword to a keyword storage server; receiving first verification data returned by the keyword storage server according to the query field and data identifications associated with values in the query field; sending data identifications associated with the values in the query field to a result server so that the result server can obtain query results according to the data identifications associated with the values in the query field, wherein the query keywords and the query results corresponding to the query keywords are associated with the same data identifications; receiving a query result and second verification data returned by the result server; and determining the query result as a valid query result in response to the first verification data and the second verification data being matched. The implementation mode can improve the effectiveness of the query data.

Description

Method, device and system for querying data
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of internet technologies, and in particular, to a method, an apparatus, and a system for querying data.
Background
With the development of the internet, data owners often store data in third-party service platforms. When a user inquires data, an inquiry request is sent to a third-party service platform according to information provided by a data owner. If the data of the data owner is damaged and modified by a third party, the query result is not credible, and the interests of the user and the data owner are damaged. Therefore, the effectiveness of data storage and querying is not high.
Disclosure of Invention
It is an object of the present application to provide an improved method, apparatus and system for querying data to solve the technical problems mentioned in the background section above.
In a first aspect, an embodiment of the present application provides a method for querying data, where the method includes: sending the query field of the query keyword to a keyword storage server; receiving first verification data returned by the keyword storage server according to the query field and data identifications associated with values in the query field; sending data identifications associated with the values in the query field to a result server so that the result server can obtain query results according to the data identifications associated with the values in the query field, wherein the query keywords and the query results corresponding to the query keywords are associated with the same data identifications; receiving a query result and second verification data returned by the result server; and determining the query result as a valid query result in response to the first verification data and the second verification data being matched.
In some embodiments, sending the query field of the query keyword to the keyword storage server comprises: dividing the query field into at least one keyword division segment according to a preset keyword division rule; and respectively sending query requests to the keyword storage servers associated with the keyword segmentation segments according to the keyword segmentation segments obtained by segmentation so that each keyword storage server can obtain the first verification data and the data identification associated with each value in the query field.
In some embodiments, the data identifier associated with each value in the query field is obtained by: the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment; dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field; the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifications in the upper boundary identification set and the lower boundary identification set step by step according to the corresponding keyword segmentation segments so as to screen out the data identifications associated with the values which do not belong to the query field; and determining the filtered upper boundary identification set and the filtered lower boundary identification set and the data identification in the intermediate identification set as the data identification associated with each value in the query field.
In some embodiments, the first authentication data includes data identifications filtered out by the key storage server.
In a second aspect, the present application further provides an apparatus for querying data, the apparatus comprising: the first sending module is configured to send a query field of a query keyword to a keyword storage server; the first receiving module is configured to receive first verification data returned by the keyword storage server according to the query field and data identifiers associated with the values in the query field; the second sending module is configured to send the data identifiers associated with the values in the query field to the result server so that the result server can obtain query results according to the data identifiers associated with the values in the query field, wherein the query keywords and the query results corresponding to the query keywords are associated with the same data identifiers; the second receiving module is configured to receive the query result and the second verification data returned by the result server; and the result verification module is configured to determine the query result as a valid query result in response to the first verification data and the second verification data being matched.
In some embodiments, the first transmitting module comprises: a dividing unit configured to divide the query field into at least one keyword division segment according to a predetermined keyword division rule; and the sending unit is configured to send query requests to the keyword storage servers associated with the keyword segmentation segments according to the keyword segmentation segments obtained by segmentation, so that each keyword storage server can obtain the first verification data and the data identifiers associated with the values in the query fields.
In some embodiments, the data identifier associated with each value in the query field includes a data identifier obtained by the keyword storage server through the following method: the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment; dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field; the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifications in the upper boundary identification set and the lower boundary identification set step by step according to the corresponding keyword segmentation segments so as to screen out the data identifications associated with the values which do not belong to the query field; and determining the filtered upper boundary identification set and the filtered lower boundary identification set and the data identification in the intermediate identification set as the data identification associated with each value in the query field.
In some embodiments, the first authentication data includes data identifications filtered out by the key storage server.
In a third aspect, the present application further provides a system for querying data, where the system includes a keyword storage server, a result server, and a terminal, where: the terminal is configured to send a query field of a query keyword to a keyword storage server; the keyword storage server is configured to obtain the first verification data and the data identifiers associated with the values in the query field according to the query field and feed back the data identifiers to the terminal; the terminal is also configured to receive first verification data returned by the keyword storage server and data identifications associated with values in the query field, and send the data identifications associated with the values in the query field to the result server; the result server is configured to obtain a query result according to the data identifier associated with each value in the query field and feed the query result back to the terminal, wherein the query keyword and the query result corresponding to the query keyword are associated with the same data identifier; the terminal is also configured to receive the query result and the second verification data returned by the result server, and determine the query result as a valid query result in response to the first verification data being matched with the second verification data.
According to the method, the device and the system for querying data, the query field of the query keyword is sent to the keyword storage server through the terminal; the keyword storage server acquires the first verification data and the data identification associated with each value in the query field according to the query field and feeds back the data identification to the terminal; the terminal receives first verification data returned by the keyword storage server and data identifications associated with values in the query field, and sends the data identifications associated with the values in the query field to the result server; the result server acquires a query result according to the data identification associated with each value in the query field and feeds the query result back to the terminal, wherein the query keyword and the query result corresponding to the query keyword are associated with the same data identification; and the terminal receives the query result and the second verification data returned by the result server, responds to the matching of the first verification data and the second verification data, and determines the query result as a valid query result. The query keywords and the query results are respectively stored on different servers, the query keywords and the query results are associated through the same data identification, and verification is carried out according to verification data respectively returned by the keyword storage server and the result server, so that the validity of the query data can be improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method of querying data, according to the present application;
FIG. 3 is a schematic block diagram illustrating one embodiment of an apparatus for querying data according to the present application;
FIG. 4 is a block diagram illustrating one embodiment of a system for querying data according to the present application;
fig. 5 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the method of querying data of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, a server 105, and data storage platforms 103, 104. The terminal devices 101, 102, the server 105 and the data storage platforms 103, 104 may be communicatively connected to each other via a network. The network herein may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102 to interact with the server 105 over the network to receive or send messages or the like. Various communication client applications, such as shopping applications, search applications, instant messaging tools, etc., may be installed on the terminal devices 101, 102.
The terminal devices 101, 102 may be various electronic devices with communication functions, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server that provides various services, such as a background server or the like that provides support for various applications or the like on the terminal devices 101, 102. The server 105 may analyze and otherwise process the received data such as the query or the unlocking request, and feed back the processing result to the terminal apparatuses 101 and 102. For example, addresses of the keyword storage server and the result server are fed back to the terminal apparatuses 101, 102.
The server 105 may send the data to the data storage platforms 103, 104 for storage over a network. In the present application, the server 105 may divide each piece of data into two parts, which are stored on the data storage platforms 103 and 104, respectively, and the two parts may be marked by one identical data identifier. For example, when the data of the server 105 is described in a key-value pair, the key (key) may be stored in the data storage platform 103 and the value (value) may be stored in the data storage platform 104. The data storage platforms 103, 104 may each include one or more storage devices. For example, a user may query for data via the terminal devices 101, 102. The query request is sent to the data storage platform 103 through the terminal devices 101 and 102 to obtain the data identifier corresponding to the query keyword, and then the data identifier is sent to the data storage platform 104 through the terminal devices 101 and 102 to obtain the query result.
Generally, the method for querying data provided by the present application can be applied to the terminal devices 101 and 102. Accordingly, the apparatus for querying data provided by the present application may be disposed in the terminal device 101, 102.
It should be understood that the number of terminal devices, data storage platforms and servers in fig. 1 is illustrative only. There may be any number of terminal devices, data storage platforms, and servers, as desired for implementation.
With continued reference to FIG. 2, FIG. 2 illustrates one embodiment of a method of querying data of the present application. The method for querying data comprises the following steps:
step 201, sending the query field of the query keyword to a keyword storage server.
In this embodiment, an electronic device (e.g., terminal devices 101 and 102 shown in fig. 1) running the method of querying data may send a query field of a query keyword of data to be queried to a keyword storage server. Here, the data to be queried may be any data that the user wants to query, such as student achievements, medical records, and the like.
Generally, when a user queries data, the query result can be obtained through the query field of the query keyword. For example, when the query keyword is a student number, the specific value of the student number may be used as a query field to obtain the score of the student of the query result. In this embodiment, the query results corresponding to the query keyword and the query field may be stored in different servers, respectively, and the query results corresponding to the query keyword and the query field may be associated by using the same data identifier. For example, the data owner (e.g., server 105 shown in FIG. 1) may store the student numbers on a keyword storage server (e.g., data storage platform 103 shown in FIG. 1), and the data owner may also machine-generate a random number for each student number and then store the student achievements on a results server (e.g., data storage platform 104 shown in FIG. 1) based on the random number.
Step 202, receiving the first verification data returned by the keyword storage server according to the query field and the data identifier associated with each value in the query field.
In this embodiment, the keyword storage server may generate the first verification data according to the query field, and obtain the data identifier associated with each value in the query field. An electronic device (e.g., terminal devices 101, 102 shown in fig. 1) running the method for querying data may receive the first authentication data and the data identification from a keyword storage server.
Here, the first verification data may be redundant data acquired by the keyword storage server in the process of acquiring the data identifier associated with each value according to the query field, and used for verifying the query result. For example, the first verification data may include, but is not limited to, at least one of: data identifications associated with values in the query field, verification values generated by the data identifications, and the like. Optionally, the first authentication data may include data identifications filtered out by the keyword storage server.
It can be understood that, since the query result corresponding to the query keyword and the query field can be associated by the same data identifier, the keyword storage server can obtain the data identifier corresponding to each value in the query field according to the query field. For example, a certain value in the query field (e.g., a school number 0012345) may correspond to a data identity FF0F (binary number 1111111100001111). When the query field is the school numbers 0012345-0012354, the keyword storage server can return data identifications corresponding to the 10 school numbers respectively.
Step 203, sending the data identifier associated with each value in the query field to the result server, so that the result server can obtain the query result according to the data identifier associated with each value in the query field.
In this embodiment, the electronic device (for example, the terminal devices 101 and 102 shown in fig. 1) running the method for querying data may then send the data identifier received from the keyword storage server in step 202 to the result server, so that the result server searches for and feeds back a corresponding query result according to the data identifier. When the method for querying data in this embodiment is applied to student score query, the query result may be, for example, examination scores of 10 students corresponding to the school numbers 0012345-0012354.
The result server may also generate second verification data while obtaining the query result. The second verification data may be redundant data that is obtained when the result server searches the query result according to the query field and is used for verifying the query result. The second verification data may include, for example and without limitation, an authentication key generated by digitally signing each piece of data by a preset key algorithm. The preset key Algorithm may be a known Algorithm for digital signature, such as The Secure Hash Algorithm (SHA), The MD5 Algorithm (Message-Digest Algorithm 5), The RSA public key Encryption Algorithm, The DES (Data Encryption Standard) Algorithm, and so on, which are not described herein again.
And step 204, receiving the query result and the second verification data returned by the result server.
In this embodiment, the electronic device (e.g., terminal devices 101, 102 shown in fig. 1) running the method of querying data may then receive the query result and the second verification data returned by the result server from the result server.
Step 205, in response to the first verification data and the second verification data matching, determining the query result as a valid query result.
In this embodiment, the electronic device (for example, the terminal devices 101 and 102 shown in fig. 1) running the method for querying data may further match the first verification data with the second verification data, and if the first verification data matches the second verification data, the query result may be determined to be a valid query result.
Here, the matching of the first authentication data and the second authentication data may be a matching of consistency. For example, when the data identifier associated with each value in the field is queried during the first verification data, the electronic device may generate an authentication key generated by digitally signing through a preset key algorithm according to the data identifiers, and when the authentication key is consistent with the authentication key of the second verification data, the first verification data and the second verification data are matched.
When the first verification data and the second verification data are not matched, the electronic equipment can determine that the query result is wrong or invalid, and can give a prompt of the wrong or invalid query.
In some optional implementations of this embodiment, the data owner may further segment the query keyword according to a predetermined segmentation rule, and store different segments on different keyword storage servers. The predetermined splitting rule may be issued by the data owner. For example, one segment may be divided every 4 bits from the lower order, and the student number 0012345 may be divided into segments "001", "2345". At this time, the sending, by the electronic device, the query field of the query keyword to the keyword storage server may include: dividing the query field into at least one keyword division segment according to a preset keyword division rule; and respectively sending query requests to the keyword storage servers associated with the keyword segmentation segments according to the keyword segmentation segments obtained by segmentation so that each keyword storage server can obtain the first verification data and the data identifications associated with the values in the query fields. For example, the query keyword is a student number, the query field is 0002345-0012353, and the electronic device may divide the query field into "000-001" and "345-353", and send the divided query field to the first keyword storage server and the second keyword storage server respectively, so that the first keyword storage server and the second keyword storage server may obtain the first verification data and the data identifier associated with each value in the query field according to a predetermined rule.
In some implementations, the keyword storage server obtains the data identifiers associated with the values in the query field by: the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment; dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field; the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifiers in the upper boundary identifier set and the lower boundary identifier set step by step according to the corresponding keyword segmentation segments; and determining the filtered data identifications in the upper boundary identification set, the lower boundary identification set and the middle identification set as the data identifications associated with the values in the query field. When the query field is divided into more segments, and so on, the second keyword storage server and the subsequent keyword storage servers at all levels sequentially filter the data identifiers in the upper boundary identifier set and the lower boundary identifier set according to the order from high level to low level.
For example, taking a query keyword as a student number, the query field is 000345 to 002353, the electronic device may divide the query field into "000 to 002" and "345 to 353", for example, the electronic device may send the high-order keyword segmentation segment "000 to 002" to the first keyword storage server, the first keyword storage server traverses the high-order segment of the stored student number, and obtains a data identifier corresponding to the student number with the high-order segment of "000 to 002", for example, the data identifier corresponding to the student number of 000000 to 002999 is obtained as an initial data identifier, and is stored by the initial data identifier set. Meanwhile, the electronic device may identify these data as redundant data as part of the first authentication information. It can be understood that, the initial data identifier obtained by the first keyword storage server has a part of data identifiers, such as data identifiers corresponding to 000000 to 000344 and 002354 to 002999, which are not desired by the user, and the part of data identifiers is mainly contained in the data identifiers associated with the largest and smallest first keyword segmentation fields in the query field, and needs to be filtered according to other bit fields. The first keyword storage server may divide the initial set of data identifiers into an upper identifier set, a middle identifier set, and a lower identifier set, where the upper identifier is a data identifier associated with a query field with a high order of 000, and the lower identifier is a data identifier associated with a query field with a high order of 002; the intermediate identifier is the data identifier associated with the 001 high order query field.
The first key store server may send the initial set of data identifications to the second key store server. The second key storage server may filter the data identifiers in the upper and lower bound identifier sets according to the second query fields "345-353" received from the electronic device. For the data identifiers in the upper identifier set, the second keyword storage server can filter the data identifiers through the upper bound range 353 of the query field, and screen out the data identifiers corresponding to the query fields with the second query fields being 354-999. Similarly, for the data identifiers in the lower bound identifier set, the second keyword storage server may filter through the lower bound range 345 of the query field, and screen out the data identifiers corresponding to the query field with the second query field of 000 to 344. Optionally, the second key storage server may filter the data identifiers in the upper and lower bound identifier sets through a bloom filter.
In some optional implementations of this embodiment, the first verification data includes data identifiers filtered by the keyword storage server, and the electronic device may obtain the authentication key by signing through a digital signature algorithm (e.g., MD5 digest) according to the data identifiers. When the keyword storage server has multiple levels, the electronic device may further calculate the key value of the root node from the last level in sequence, where the key of the upper level node is the concatenation of the key values of the lower level nodes, and the last level node is calculated by the included data identifier. The electronic device may use the calculated authentication key as a verification value of the first verification data. The second verification data may include key values obtained by signing the data identifications of the pieces of data stored on the result server by a digital signature algorithm (e.g., MD5 digest), and calculate a concatenation of the key values to obtain an authentication key as the second verification data. When the first verification data is consistent with the second verification data, the electronic device may please determine that the first verification data matches the second verification data, otherwise, the first verification data does not match the second verification data.
In the method for querying data of the embodiment, the query keyword and the query result are respectively stored in different servers, the query keyword and the query result are associated through the same data identifier, and verification is performed according to the verification data respectively returned by the keyword storage server and the result server, so that the validity of the query data can be improved.
With further reference to fig. 3, as an implementation of the method for querying data corresponding to the embodiment shown in fig. 2, the present application provides an embodiment of an apparatus for querying data.
As shown in fig. 3, the apparatus 300 for querying data of the present embodiment includes: a first sending module 301, a first receiving module 302, a second sending module 303, a second receiving module 304 and a result verifying module 305. The first sending module 301 may be configured to send a query field of a query keyword to the keyword storage server; the first receiving module 302 may be configured to receive first verification data returned by the keyword storage server according to the query field and data identifiers associated with respective values in the query field; the second sending module 303 may be configured to send the data identifier associated with each value in the query field to the result server, so that the result server obtains the query result according to the data identifier associated with each value in the query field, where the query keyword and the query result corresponding to the query keyword are associated with the same data identifier; the second receiving module 304 may be configured to receive the query result and the second verification data returned by the result server; the result verification module 305 may be configured to determine the query result as a valid query result in response to the first verification data and the second verification data matching.
In some optional implementations of this embodiment, the first sending module 301 may include: a dividing unit (not shown) configured to divide the query field into at least one keyword segment according to a predetermined keyword division rule; the sending unit (not shown) may be configured to send, according to the key fragments obtained by the segmentation, query requests to the key storage servers associated with the key fragments, respectively, so that each key storage server obtains the first verification data and the data identifier associated with each value in the query field.
In some optional implementation manners of this embodiment, the data identifier associated with each value in the query field includes a data identifier obtained by the keyword storage server through the following method: the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment; dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field; the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifications in the upper boundary identification set and the lower boundary identification set step by step according to the corresponding keyword segmentation segments so as to screen out the data identifications associated with the values which do not belong to the query field; and determining the filtered upper boundary identification set and the filtered lower boundary identification set and the data identification in the intermediate identification set as the data identification associated with each value in the query field.
In some optional implementations of this embodiment, the first verification data may include data identifications filtered out by the keyword storage server.
It should be noted that modules described in the apparatus 300 for querying data correspond to respective steps in the method described with reference to fig. 2. Thus, the operations and features described above with respect to the method for querying data are equally applicable to the apparatus 300 and the modules or units included therein, and are not described herein again.
Those skilled in the art will appreciate that the above-described means for querying data 300 may also include some other well-known structures, such as processors, memories, etc., which are not shown in fig. 3 in order to not unnecessarily obscure embodiments of the present disclosure.
As shown in FIG. 4, a system 400 for querying data is shown, in accordance with one embodiment of the present application. The system 400 may include a keyword storage server 401, a results server 402, and a terminal 403. Wherein: the terminal 403 may be configured to send a query field of the query keyword to the keyword storage server 401; the keyword storage server 401 may be configured to obtain the first verification data and the data identifier associated with each value in the query field according to the query field, and feed back the data identifier to the terminal 403; the terminal 403 may also be configured to receive the first verification data and the data identifier associated with each value in the query field returned by the keyword storage server 401, and send the data identifier associated with each value in the query field to the result server 402; the result server 402 may be configured to obtain a query result according to the data identifier associated with each value in the query field, and feed back the query result to the terminal 403, where the query keyword and the query result corresponding to the query keyword are associated with the same data identifier; the terminal 403 may be further configured to receive the query result and the second verification data returned by the result server 402, and determine the query result as a valid query result in response to the first verification data and the second verification data matching.
The method 200 for querying data and the apparatus 300 for querying data in the foregoing embodiments may be applied to the terminal 403 in the system 400, and are not described herein again.
Referring now to FIG. 5, a block diagram of a computer system 500 suitable for use in implementing a terminal device/server of an embodiment of the present application is shown. The terminal device/server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the system 500 are also stored. The CPU601, ROM 502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a touch screen, a microphone, a scanner, or the like; an output section 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), or the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the non-volatile computer readable medium referred to in this application may be a non-volatile computer readable signal medium or a non-volatile computer readable storage medium or any combination of the two. A non-transitory computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the non-volatile computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a non-transitory computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a first sending module, a first receiving module, a second sending module, a second receiving module, and a result verification module. Where the names of these modules do not in some cases constitute a limitation on the unit itself, for example, the first sending module may also be described as a "module configured to send the query field of the query keyword to the keyword storage server".
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (11)

1. A method of querying data, the method comprising:
sending the query field of the query keyword to a keyword storage server;
receiving first verification data returned by the keyword storage server according to the data identification associated with each value in the query field and the data identification associated with each value in the query field;
sending data identifications associated with the values in the query field to a result server so that the result server can obtain query results according to the data identifications associated with the values in the query field, wherein the query keywords and the query results corresponding to the query keywords are associated with the same data identifications;
receiving a query result and second verification data returned by the result server;
in response to the first verification data and the second verification data matching, determining the query result as a valid query result.
2. The method of claim 1, wherein sending the query field of the query keyword to a keyword storage server comprises:
dividing the query field into at least one keyword division segment according to a preset keyword division rule;
and respectively sending query requests to the keyword storage servers associated with the keyword segmentation segments according to the keyword segmentation segments obtained by segmentation so that each keyword storage server can obtain the first verification data and the data identification associated with each value in the query field.
3. The method of claim 2, wherein the data identifier associated with each value in the query field is obtained by:
the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment;
dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field;
the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifications in the upper boundary identification set and the lower boundary identification set step by step according to the corresponding keyword segmentation segments so as to screen out the data identifications associated with the values which do not belong to the query field;
and determining the filtered upper boundary identification set and the filtered lower boundary identification set and the data identification in the intermediate identification set as the data identification associated with each value in the query field.
4. The method of claim 1, wherein the first authentication data comprises data identifications filtered out by the key store server.
5. An apparatus for querying data, the apparatus comprising:
the first sending module is configured to send a query field of a query keyword to a keyword storage server;
the first receiving module is configured to receive first verification data returned by the keyword storage server according to the data identifiers associated with the values in the query field and the data identifiers associated with the values in the query field;
the second sending module is configured to send the data identifiers associated with the values in the query field to the result server, so that the result server can obtain query results according to the data identifiers associated with the values in the query field, wherein the query keywords and the query results corresponding to the query keywords are associated with the same data identifiers;
the second receiving module is configured to receive the query result and the second verification data returned by the result server;
a result verification module configured to determine the query result as a valid query result in response to the first verification data and the second verification data matching.
6. The apparatus of claim 5, wherein the first sending module comprises:
the segmentation unit is configured to segment the query field into at least one keyword segmentation segment according to a preset keyword segmentation rule;
and the sending unit is configured to send query requests to the keyword storage servers associated with the keyword segmentation segments according to the keyword segmentation segments obtained by segmentation, so that each keyword storage server can obtain the first verification data and the data identifiers associated with the values in the query fields.
7. The apparatus of claim 6, wherein the data identifier associated with each value in the query field comprises a data identifier obtained by the keyword storage server by:
the method comprises the steps that a first keyword storage server obtains an initial data identification set according to a first keyword segmentation segment and sends the initial data identification set to a second keyword storage server, wherein the initial data identification is a data identification associated with the first keyword segmentation segment;
dividing the initial data identification set into an upper boundary identification set, a middle identification set and a lower boundary identification set, wherein the upper boundary identification is the data identification associated with the largest first keyword segmentation segment in the query field, and the lower boundary identification is the data identification associated with the smallest first keyword segmentation segment in the query field;
the second keyword storage server and the subsequent keyword storage servers at all levels filter the data identifications in the upper boundary identification set and the lower boundary identification set step by step according to the corresponding keyword segmentation segments so as to screen out the data identifications associated with the values which do not belong to the query field;
and determining the filtered upper boundary identification set and the filtered lower boundary identification set and the data identification in the intermediate identification set as the data identification associated with each value in the query field.
8. The apparatus of claim 5, wherein the first authentication data comprises data identifications filtered out by the key store server.
9. A system for querying data, the system comprising a keyword storage server, a result server and a terminal, wherein:
the terminal is configured to send a query field of a query keyword to a keyword storage server;
the keyword storage server is configured to obtain the first verification data and the data identifiers associated with the values in the query field according to the query field and feed back the data identifiers to the terminal;
the terminal is also configured to receive first verification data returned by the keyword storage server and data identifications associated with values in the query field, and send the data identifications associated with the values in the query field to the result server;
the result server is configured to obtain a query result according to the data identifier associated with each value in the query field and feed the query result back to the terminal, wherein the query keyword and the query result corresponding to the query keyword are associated with the same data identifier;
the terminal is also configured to receive the query result and the second verification data returned by the result server, and determine the query result as a valid query result in response to the first verification data being matched with the second verification data.
10. A computing device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
11. A non-transitory computer-readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing the method according to any one of claims 1-4.
CN201710706286.9A 2017-08-17 2017-08-17 Method, device and system for querying data Active CN110020040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710706286.9A CN110020040B (en) 2017-08-17 2017-08-17 Method, device and system for querying data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710706286.9A CN110020040B (en) 2017-08-17 2017-08-17 Method, device and system for querying data

Publications (2)

Publication Number Publication Date
CN110020040A CN110020040A (en) 2019-07-16
CN110020040B true CN110020040B (en) 2021-07-06

Family

ID=67186088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710706286.9A Active CN110020040B (en) 2017-08-17 2017-08-17 Method, device and system for querying data

Country Status (1)

Country Link
CN (1) CN110020040B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299619B (en) * 2018-10-09 2020-12-25 北京腾云天下科技有限公司 Data query method, computing device and system
CN110737678B (en) * 2019-10-23 2023-08-04 北京锐安科技有限公司 Data searching method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610881A (en) * 2014-11-06 2016-05-25 阿里巴巴集团控股有限公司 Distributed cache range query method, device and system
CN106897335A (en) * 2016-06-28 2017-06-27 阿里巴巴集团控股有限公司 A kind of storage method of business datum, the generation method of record identifier and device
CN106959963A (en) * 2016-01-12 2017-07-18 杭州海康威视数字技术股份有限公司 A kind of data query method, apparatus and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110214165A1 (en) * 2010-02-26 2011-09-01 David Kerr Jeffreys Processor Implemented Systems And Methods For Using Identity Maps And Authentication To Provide Restricted Access To Backend Server Processor or Data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610881A (en) * 2014-11-06 2016-05-25 阿里巴巴集团控股有限公司 Distributed cache range query method, device and system
CN106959963A (en) * 2016-01-12 2017-07-18 杭州海康威视数字技术股份有限公司 A kind of data query method, apparatus and system
CN106897335A (en) * 2016-06-28 2017-06-27 阿里巴巴集团控股有限公司 A kind of storage method of business datum, the generation method of record identifier and device

Also Published As

Publication number Publication date
CN110020040A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
US20180374097A1 (en) A distributed user profile identity verification system for e-commerce transaction security
CN107302597B (en) Message file pushing method and device
CN109743161B (en) Information encryption method, electronic device and computer readable medium
CN108933695B (en) Method and apparatus for processing information
CN109376534B (en) Method and apparatus for detecting applications
US11244153B2 (en) Method and apparatus for processing information
CN108011949B (en) Method and apparatus for acquiring data
CN110895603B (en) Multi-system account information integration method and device
CN107844488B (en) Data query method and device
CN115757406A (en) Data storage method and device, electronic equipment and storage medium
CN110020040B (en) Method, device and system for querying data
CN106202440B (en) Data processing method, device and equipment
CN113590756A (en) Information sequence generation method and device, terminal equipment and computer readable medium
CN107918617B (en) Data query method and device
CN112463749A (en) File sharing method, device, medium and electronic equipment
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN109218339B (en) Request processing method and device
CN108363707B (en) Method and device for generating webpage
CN111988262A (en) Authentication method, authentication device, server and storage medium
CN114398678A (en) Registration verification method and device for preventing electronic file from being tampered, electronic equipment and medium
CN109067542B (en) Token generation method, and tracking method and device based on Token
CN114201532A (en) Data query method, device, medium and equipment based on ESOP system
CN109657481B (en) Data management method and device
CN110795604A (en) Method, apparatus, computing device and medium for generating transaction serial number
CN111460273B (en) Information pushing method and device

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
GR01 Patent grant
GR01 Patent grant