CN109299234B - Information query method and device and computer readable storage medium - Google Patents
Information query method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN109299234B CN109299234B CN201811095039.0A CN201811095039A CN109299234B CN 109299234 B CN109299234 B CN 109299234B CN 201811095039 A CN201811095039 A CN 201811095039A CN 109299234 B CN109299234 B CN 109299234B
- Authority
- CN
- China
- Prior art keywords
- field
- target
- mapping
- information
- identifier
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Disclosed herein are an information query method, an information query device, and a computer-readable storage medium, including: acquiring a query request carrying a target field and target information corresponding to the target field; judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped; if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation; and acquiring information corresponding to the target information of other fields except the acquired table field in the table corresponding to the acquired table identification. It can be seen from the embodiments of the present invention that, since the table identifiers obtained according to the target field are all table identifiers containing table fields with the same meaning as the target field, all information related to the target information can be queried in the tables corresponding to the table identifiers, thereby implementing comprehensive query of the information.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an information query method, an information query device and a computer readable storage medium.
Background
A data table is a structure for storing data information that includes table fields and corresponding information, and since the time and personnel for creating the data table may be different, the names of the table fields representing the same meaning may also be different.
However, because the names of the table fields are different, when the related information is queried according to the target table field and the corresponding target information (for example, other information of a person is queried according to the identification number of the person), only the data table containing the name of the target table field can be found, but the data table containing the name of other fields with the same meaning as the target table field cannot be found, so that the information query result is incomplete, and the information query degree is low.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present invention provide an information query method, an apparatus, and a computer-readable storage medium, which can perform a comprehensive query on related information according to a target table field and corresponding target information, thereby improving an information query degree.
To achieve the object of the embodiments of the present invention, an embodiment of the present invention provides an information query method, including:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
If the target field is not the mapping field, further comprising:
acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field;
obtaining the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the obtained table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Before the information corresponding to the target information of the fields other than the target table field is acquired from the table corresponding to the target table identifier, the method further comprises the following steps:
judging whether the target information is found in a target table field of a table corresponding to the target table identifier;
the obtaining, in the table corresponding to the target table identifier, information corresponding to the target information of fields other than the target table field includes:
and if the target information is found in the target table field of the table corresponding to the target table identifier, acquiring the information corresponding to the target information of the other fields except the target table field in the table corresponding to the target table identifier.
Before the query request carrying the target field and the target information corresponding to the target field is obtained, the method further includes:
acquiring mapping fields corresponding to all table fields in all tables according to a mapping field induction model established in advance;
and establishing a corresponding relation according to the table identification, the table field and the obtained mapping field of the table.
The pre-established mapping field induction model obtains mapping fields corresponding to all table fields in all tables, and comprises the following steps:
acquiring at least one piece of information in a first table and under a first table field;
and obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
An embodiment of the present invention further provides an information query apparatus, including:
the processing module is used for acquiring a query request carrying a target field and target information corresponding to the target field;
the judging module is used for judging whether the target field is the mapping field according to the corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
the processing module is further configured to, if the target field is the mapping field, obtain a table identifier and a table field corresponding to the target field in a correspondence relationship among the table identifier, the table field, and the mapping field, and use the obtained table identifier as the target table identifier and the table field as the target table field;
the processing module is further configured to obtain, in the table corresponding to the target table identifier, information corresponding to the target information in fields other than the target table field.
If the target field is not the mapped field, the processing module is further configured to:
acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field;
obtaining the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the obtained table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
The judging module is further configured to judge whether the target information is found in a target table field of a table corresponding to the target table identifier;
the processing module is specifically configured to, if the target information is found in the target table field of the table corresponding to the target table identifier, obtain, in the table corresponding to the target table identifier, information corresponding to the target information in the fields other than the target table field.
The embodiment of the present invention further provides a short message query device, including: a processor and a memory, wherein the memory has stored therein the following instructions executable by the processor:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
An embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores computer-executable instructions, and the computer-executable instructions are configured to perform the following steps:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Compared with the prior art, the embodiment of the invention at least comprises the following steps: acquiring a query request carrying a target field and target information corresponding to the target field; judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped; if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field; and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification. According to the technical scheme provided by the embodiment of the invention, as the target field is determined to be the specification field to which one or more table fields are uniquely mapped, and the table identifications obtained according to the target field are all the table identifications containing the table fields with the same meaning as the target field, all the information related to the target information can be inquired in the tables corresponding to the table identifications, so that the comprehensive inquiry of the information is realized.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the embodiments of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the application do not constitute a limitation of the embodiments of the invention.
Fig. 1 is a schematic flowchart of an information query method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an information query apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
An embodiment of the present invention provides an information query method, as shown in fig. 1, the method includes:
Specifically, the target field may be an identification number field, a mobile phone number field, a license number field, a name field, a passport number field, a vehicle number field, a flight number field, a mailbox number field, or the like. Assuming that the target field is an identification number field, the target information corresponding to the target field is a specific 18-digit number, and the query request may be information for a person having an identification number xxxxxxxxxxxxxxxx.
And 102, judging whether the target field is the mapping field according to the corresponding relation among the table identification, the table field and the mapping field which is established in advance.
Wherein the mapping field is a specification field to which one or more table fields are uniquely mapped.
Specifically, assume that there are three tables, table 1, table 2 and table 3, and the table fields of table 1 are: name field, phone number field and home address field, the table fields of table 2 are: contact person field, cell phone number field and company address field, the table field of table 3 is: a name field, an identification number field, and an office address field. The name field has the same meaning as the contact field, and the specification field of such meaning field is set as the contact field, so that the specification field mapped by the name field is the contact field (namely, the mapping field corresponding to the table field of the name field is the contact field); the meaning of the 'telephone number field' and the 'mobile phone number field' is the same, and the specification field of the meaning field is set as a 'contact information field', so that the specification field mapped by the 'telephone number field' and the 'mobile phone number field' is a 'contact information field' (namely the mapping field corresponding to the 'telephone number field' and the 'mobile phone number field' is a 'contact information field'); the meaning of the "company address field" and the "office address field" is the same, and the specification field of such meaning field is set as the "company address field", then the "company address field" and the "office address field" are mapped to the specification field as the "company address field" (i.e. the mapping fields corresponding to the table fields "company address field" and "office address field" are the "company address field"), correspondingly, the table field with the same meaning as the "family address field" is mapped to the specification field as the "family address field", and the table field with the same meaning as the "identity card number field" is mapped to the specification field as the "identity card number field", so the corresponding relationship of the table identification, the table field and the mapping field can be as shown in table 1:
TABLE 1
And 103, if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field from the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
Specifically, assuming that the corresponding relationship among the table identifier, the table field, and the mapping field is shown in table 1, and the target field is a "contact field", the corresponding table identifier and table field are: "table 1" and "name field", "table 2" and "contact field", "table 3" and "name field".
And 104, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Specifically, if the obtained target table identifier and the target table field are: table 1 "and" name field "," table 2 "and" contact field "," table 3 "and" name field ", and since the target field is" contact field ", the target information may be the name of a person, and assuming that the name is zhang-three, the step refers to: the contact way and the home address of Zhang III are obtained in the table 1, the contact way and the company address of Zhang III are obtained in the table 2, and the identification number and the company address of Zhang III are obtained in the table 3, so that the contact way, the home address, the company address and the identification number of Zhang III are finally obtained.
Specifically, it is assumed that three tables A, B, C are provided, and that a field indicating sfzh (identification number) and a field hzh (passport number) are provided in table a, a field indicating sfzh (identification number) is provided in table B, and a field indicating hzh (passport number) is provided in table C, which are obtained by field mapping. Because the table A and the table B have the same name field sfzh, the table A and the table B can be associated through the sfzh field; similarly, table a and table C have hzh fields with the same name, and we can associate table a with table C via hzh fields. "4 _0_30_ zjhm" represents the original field name indicating the identity card number field in table a, "4 _0_23_ gmsfhm" represents the original field name indicating the identity card number field in table B, "4 _0_30_ hz" represents the original field name indicating the passport number in table a, "4 _0_28_ hz" represents the original field name indicating the passport number in table C, "sfzh" represents the field name mapping "4 _0_30_ zjhm" in table a and "4 _0_23_ gmsfhm" in table B, "hzh" represents the field name mapping "4 _0_30_ hz" in table a and "4 _0_28_ hzhm" in table B. This format is a lightweight data exchange format-JOSN format. Table a and table B are associated by the entity of the identification number and table a and table C are associated by the entity of the passport number. Assuming that the identity number of a given person requires to search the information of the person as completely as possible, the identity number may be first searched for "4 _0_30_ zjhm" in table a to obtain partial information of the person, and then the above association product (the above JOSN format product is analyzed) is used, so that it can be found that table a and table B can be associated through the identity number, and the "4 _0_28_ hzhm" field in table B can be found from the association product, and then the "4 _0_28_ hzhm" field in table B can be searched to obtain more information related to the identity number.
The information query method provided by the embodiment of the invention obtains a query request carrying a target field and target information corresponding to the target field; judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped; if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field; and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification. According to the technical scheme provided by the embodiment of the invention, as the target field is determined to be the specification field to which one or more table fields are uniquely mapped, and the table identifications obtained according to the target field are all the table identifications containing the table fields with the same meaning as the target field, all the information related to the target information can be inquired in the tables corresponding to the table identifications, so that the comprehensive inquiry of the information is realized.
Optionally, if the target field is not a mapping field, further comprising:
and 105, acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field.
And 106, acquiring the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And step 107, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, before obtaining information corresponding to the target information in fields other than the target table field in the table corresponding to the target table identifier, the method further includes:
step 108, judging whether the target information is found in the target table field of the table corresponding to the target table identification.
Acquiring information corresponding to target information of fields except target table fields in a table corresponding to the target table identification, wherein the information comprises the following steps:
and if the target information is found in the target table field of the table corresponding to the target table identification, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, before obtaining the query request carrying the target field and the target information corresponding to the target field, the method further includes:
and step 109, acquiring mapping fields corresponding to all table fields in all tables according to the mapping field induction model established in advance.
Step 110, establishing a corresponding relationship according to the table identifier, the table field and the obtained mapping field of the table.
Optionally, the mapping field induction model established in advance obtains mapping fields corresponding to all table fields in all tables, and includes:
step 109a, at least one piece of information in the first table and under the first table field is obtained.
And step 109b, obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
Specifically, the obtained information is in a character string form, so that the mapping field corresponding to the obtained information can be obtained according to the mapping field induction model, and the supported mapping field induction types include: identification number, Mobile phone number, license number, name, passport number, car number, flight number, mailbox number, Media Access Control (MAC) address, and International Mobile Equipment Identity (IMEI) of Mobile phone, etc
An embodiment of the present invention further provides an information query apparatus, as shown in fig. 2, where the information query apparatus 2 includes:
the processing module 21 is configured to obtain a query request carrying a target field and target information corresponding to the target field.
The judging module 22 is configured to judge whether the target field is a mapping field according to a pre-established correspondence between the table identifier, the table field, and the mapping field; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped.
The processing module 21 is further configured to, if the target field is the mapping field, obtain the table identifier and the table field corresponding to the target field in the correspondence between the table identifier, the table field, and the mapping field, and use the obtained table identifier as the target table identifier and the table field as the target table field.
The processing module 21 is further configured to obtain information corresponding to the target information in fields other than the target table field in the table corresponding to the target table identifier.
Optionally, if the target field is not a mapping field, the processing module 21 is further configured to:
and acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field.
And acquiring the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the determining module 22 is further configured to determine whether the target information is found in a target table field of the table corresponding to the target table identifier.
The processing module 21 is specifically configured to, if the target information is found in the target table field of the table corresponding to the target table identifier, obtain information corresponding to the target information in fields other than the target table field in the table corresponding to the target table identifier.
Optionally, the processing module 21 is further configured to:
and acquiring mapping fields corresponding to all table fields in all tables according to a mapping field induction model established in advance.
And establishing a corresponding relation according to the table identification, the table field and the obtained mapping field of the table.
Optionally, the processing module 21 is specifically configured to:
at least one piece of information in the first table under the first table field is obtained.
And obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
The information inquiry device provided by the embodiment of the invention acquires an inquiry request carrying a target field and target information corresponding to the target field; judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped; if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field; and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification. According to the technical scheme provided by the embodiment of the invention, as the target field is determined to be the specification field to which one or more table fields are uniquely mapped, and the table identifications obtained according to the target field are all the table identifications containing the table fields with the same meaning as the target field, all the information related to the target information can be inquired in the tables corresponding to the table identifications, so that the comprehensive inquiry of the information is realized.
In practical applications, the Processing module 21 and the determining module 22 may be implemented by a Central Processing Unit (CPU), a Micro Processing Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like, which are located in the information query apparatus.
An embodiment of the present invention further provides an information query apparatus, which includes: a processor and a memory, wherein the memory has stored therein the following instructions executable by the processor:
and acquiring a query request carrying a target field and target information corresponding to the target field.
Judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped.
And if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field from the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the memory further stores the following instructions executable by the processor:
and acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field.
And acquiring the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the memory further stores the following instructions executable by the processor:
and judging whether the target information is found in the target table field of the table corresponding to the target table identifier.
And if the target information is found in the target table field of the table corresponding to the target table identification, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the memory further stores the following instructions executable by the processor:
and acquiring mapping fields corresponding to all table fields in all tables according to a mapping field induction model established in advance.
And establishing a corresponding relation according to the table identification, the table field and the obtained mapping field of the table.
Optionally, the memory has stored therein the following instructions executable by the processor:
at least one piece of information in the first table under the first table field is obtained.
And obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
An embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores computer-executable instructions, and the computer-executable instructions are configured to perform the following steps:
and acquiring a query request carrying a target field and target information corresponding to the target field.
Judging whether the target field is a mapping field according to a corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more table fields are uniquely mapped.
And if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field from the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the computer-executable instructions are further for performing the steps of:
and acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field.
And acquiring the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field.
And acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the computer-executable instructions are further for performing the steps of:
and judging whether the target information is found in the target table field of the table corresponding to the target table identifier.
And if the target information is found in the target table field of the table corresponding to the target table identification, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Optionally, the computer-executable instructions are further for performing the steps of:
and acquiring mapping fields corresponding to all table fields in all tables according to a mapping field induction model established in advance.
And establishing a corresponding relation according to the table identification, the table field and the obtained mapping field of the table.
Optionally, the computer-executable instructions are specifically configured to perform the steps of:
at least one piece of information in the first table under the first table field is obtained.
And obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
Although the embodiments of the present invention have been described above, the descriptions are only used for understanding the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.
Claims (10)
1. An information query method, comprising:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field in the corresponding relationship, acquiring the table identifier and the table field corresponding to the target field in the corresponding relationship among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
2. The information query method of claim 1, wherein if the target field is not a mapping field in the corresponding relationship, further comprising:
acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field;
obtaining the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the obtained table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
3. The information query method according to claim 1 or 2, before obtaining, in the table corresponding to the target table identifier, information corresponding to the target information in fields other than the target table field, further comprising:
judging whether the target information is found in a target table field of a table corresponding to the target table identifier;
acquiring information corresponding to the target information of fields except the target table field in a table corresponding to the target table identifier, wherein the information comprises:
and if the target information is found in the target table field of the table corresponding to the target table identifier, acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identifier.
4. The information query method of claim 1, wherein before the obtaining of the query request carrying the target field and the target information corresponding to the target field, the method further comprises:
acquiring mapping fields corresponding to all table fields in all tables according to a mapping field induction model established in advance;
and establishing a corresponding relation according to the table identification, the table field and the obtained mapping field of the table.
5. The information query method of claim 4, wherein the pre-established mapping field induction model obtains mapping fields corresponding to all table fields in all tables, and comprises:
acquiring at least one piece of information in a first table and under a first table field;
and obtaining the mapping field corresponding to the obtained information according to the mapping field induction model until the corresponding mapping field is obtained according to at least one piece of information under the last field in the last table.
6. An information inquiry apparatus, comprising:
the processing module is used for acquiring a query request carrying a target field and target information corresponding to the target field;
the judging module is used for judging whether the target field is the mapping field according to the corresponding relation among the table identification, the table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
the processing module is further configured to, if the target field is the mapping field, obtain a table identifier and a table field corresponding to the target field in a correspondence relationship among the table identifier, the table field, and the mapping field, and use the obtained table identifier as the target table identifier and the table field as the target table field;
the processing module is further configured to obtain, in the table corresponding to the target table identifier, information corresponding to the target information in fields other than the target table field.
7. The information query device of claim 6, wherein if the target field is not the mapping field, the processing module is further configured to:
acquiring a mapping field corresponding to the target field according to the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired mapping field as the target mapping field;
obtaining the table identifier and the table field corresponding to the target mapping field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the obtained table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
8. The information query device according to claim 6 or 7, wherein the determining module is further configured to determine whether the target information is found in a target table field of a table corresponding to the target table identifier;
the processing module is specifically configured to, if the target information is found in a target table field of the table corresponding to the target table identifier, obtain information corresponding to the target information in fields other than the target table field from the table corresponding to the target table identifier.
9. An information inquiry apparatus, comprising: a processor and a memory, wherein the memory has stored therein the following instructions executable by the processor:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
10. A computer-readable storage medium having stored thereon computer-executable instructions for performing the steps of:
acquiring a query request carrying a target field and target information corresponding to the target field;
judging whether the target field is the mapping field according to a corresponding relation among a table identifier, a table field and the mapping field which is established in advance; wherein the mapping field is a specification field to which one or more of the table fields are uniquely mapped;
if the target field is the mapping field, acquiring the table identifier and the table field corresponding to the target field in the corresponding relation among the table identifier, the table field and the mapping field, and taking the acquired table identifier as the target table identifier and the table field as the target table field;
and acquiring information corresponding to the target information of other fields except the target table field in the table corresponding to the target table identification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811095039.0A CN109299234B (en) | 2018-09-19 | 2018-09-19 | Information query method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811095039.0A CN109299234B (en) | 2018-09-19 | 2018-09-19 | Information query method and device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109299234A CN109299234A (en) | 2019-02-01 |
CN109299234B true CN109299234B (en) | 2022-03-15 |
Family
ID=65163462
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811095039.0A Active CN109299234B (en) | 2018-09-19 | 2018-09-19 | Information query method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109299234B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110636451B (en) * | 2019-08-21 | 2021-06-11 | 深圳市天彦通信股份有限公司 | Information management method and related device |
CN110516081A (en) * | 2019-09-02 | 2019-11-29 | 北京明略软件系统有限公司 | The display methods and device of tables of data mapping relations |
CN112579592A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Isomorphic data storage method and device |
CN111159217A (en) * | 2019-12-27 | 2020-05-15 | 北京明略软件系统有限公司 | Data query method, device, server and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5895465A (en) * | 1997-09-09 | 1999-04-20 | Netscape Communications Corp. | Heuristic co-identification of objects across heterogeneous information sources |
CN102567329A (en) * | 2010-12-15 | 2012-07-11 | 金蝶软件(中国)有限公司 | Data query method and data query system |
CN103729337A (en) * | 2013-12-27 | 2014-04-16 | 金蝶软件(中国)有限公司 | Report conversion method and device |
CN106649314A (en) * | 2015-10-29 | 2017-05-10 | 北京国双科技有限公司 | Data query method and device |
CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106776638A (en) * | 2015-11-24 | 2017-05-31 | 大唐软件技术股份有限公司 | Database operation method and device |
US10430413B2 (en) * | 2016-03-15 | 2019-10-01 | Sap Se | Data information framework |
CN107391739A (en) * | 2017-08-07 | 2017-11-24 | 北京奇艺世纪科技有限公司 | A kind of query statement generation method, device and electronic equipment |
-
2018
- 2018-09-19 CN CN201811095039.0A patent/CN109299234B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5895465A (en) * | 1997-09-09 | 1999-04-20 | Netscape Communications Corp. | Heuristic co-identification of objects across heterogeneous information sources |
CN102567329A (en) * | 2010-12-15 | 2012-07-11 | 金蝶软件(中国)有限公司 | Data query method and data query system |
CN103729337A (en) * | 2013-12-27 | 2014-04-16 | 金蝶软件(中国)有限公司 | Report conversion method and device |
CN106649314A (en) * | 2015-10-29 | 2017-05-10 | 北京国双科技有限公司 | Data query method and device |
CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
Non-Patent Citations (1)
Title |
---|
"对象映射关系型数据库技术研究";黄丽娟等;《计算机工程与设计》;20041130;第25卷(第11期);1994-1995 * |
Also Published As
Publication number | Publication date |
---|---|
CN109299234A (en) | 2019-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109299234B (en) | Information query method and device and computer readable storage medium | |
CN109669980B (en) | Cross-database access method and device for data | |
WO2019109529A1 (en) | Webpage identification method, device, computer apparatus, and computer storage medium | |
CN103703467A (en) | Method and apparatus for storing data | |
CN110868763B (en) | Method, device and system for establishing Bluetooth connection | |
WO2018145546A1 (en) | Authentication method, device and storage medium | |
CN110012049B (en) | Information push method, system, server and computer readable storage medium | |
CN111132027B (en) | Scene recognition network graph drawing method, scene recognition method and device | |
WO2017177778A1 (en) | Information transmission management method and apparatus, server, and storage medium | |
CN108255915A (en) | File management method and device and machine-readable storage medium | |
CN113191784A (en) | Abnormal enterprise identification method and device, electronic equipment and storage medium | |
CN104601448A (en) | Method and device for handling virtual card | |
US10554760B2 (en) | Method and networking equipment for acquiring feature information | |
CN105827780A (en) | Caller identification method and caller identification device | |
US20210064660A1 (en) | Graph search using index vertices | |
CN111814020A (en) | Data acquisition method and device | |
CN107992538B (en) | Message log generation method and device, query method and information processing system | |
CN103473290B (en) | The processing method and processing device of the attribute data of point of interest | |
CN103716419A (en) | Cross-terminal domain name processing method and cross-terminal domain name processing system | |
CN111092949B (en) | Method and device for registering equipment | |
CN112995900B (en) | SIM card distribution method, device, server and computer readable storage medium | |
US20100076945A1 (en) | System and method for providing business information to a communication device | |
CN109246686B (en) | Multi-card user address book updating method and device based on cloud technology | |
CN109522014B (en) | Algorithm processing method based on new product development, electronic device and readable storage medium | |
CN106789315B (en) | System configuration 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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230805 Address after: Room 103-365, No. 2, Lane 99, Changjiang South Road, Baoshan District, Shanghai, 2019 Patentee after: Shanghai Guisheng Technology Co.,Ltd. Address before: 102218 5th floor, building 1, China Coal Construction Group building, 398 Zhongdong Road, Dongxiaokou Town, Changping District, Beijing Patentee before: MININGLAMP SOFTWARE SYSTEMS Co.,Ltd. |