CN110580333A - data table processing method, searching method, device, equipment and storage medium - Google Patents

data table processing method, searching method, device, equipment and storage medium Download PDF

Info

Publication number
CN110580333A
CN110580333A CN201910792363.6A CN201910792363A CN110580333A CN 110580333 A CN110580333 A CN 110580333A CN 201910792363 A CN201910792363 A CN 201910792363A CN 110580333 A CN110580333 A CN 110580333A
Authority
CN
China
Prior art keywords
data tables
target data
linked
link
tables
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910792363.6A
Other languages
Chinese (zh)
Inventor
刘飞燕
李敏
林健
金建良
吴林强
许琮浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Zhongyun Data Technology Co Ltd
Huzhou Big Data Operation Co Ltd
Hangzhou City Big Data Operation Co Ltd
Original Assignee
Hangzhou Zhongyun Data Technology Co Ltd
Huzhou Big Data Operation Co Ltd
Hangzhou City Big Data Operation 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 Hangzhou Zhongyun Data Technology Co Ltd, Huzhou Big Data Operation Co Ltd, Hangzhou City Big Data Operation Co Ltd filed Critical Hangzhou Zhongyun Data Technology Co Ltd
Priority to CN201910792363.6A priority Critical patent/CN110580333A/en
Publication of CN110580333A publication Critical patent/CN110580333A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

the invention belongs to the technical field of computers, and discloses a data table processing method, a searching device, data table processing equipment and a storage medium. The method comprises the following steps: receiving table names of at least two target data tables to be linked; determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information prestored in a preset database; and determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked. According to the data table processing method provided by the embodiment of the invention, the shortest path is determined by analyzing the link paths between every two data tables or between a plurality of data tables in the database, so that unnecessary program design trouble can be reduced by using the shortest path when a programmer designs a search program finally, and the search can be faster and more efficient.

Description

Data table processing method, searching method, device, equipment and storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a data table processing method, a searching device, data table processing equipment and a storage medium.
Background
with the development of the data processing technology era, internet, intelligent devices and other information technologies, data is growing explosively, and in the face of massive data and complicated business logic, in order to realize data query from a database, developers or business personnel need to compile a structured query language program according to the data table link relation of the database when designing the database.
however, when data links are performed between different data tables, various link paths exist, and professional data managers need to gradually select appropriate link paths and further write a structured query statement program, so that desired data can be quickly acquired during searching.
therefore, in the prior art, when programmers design data search programs, due to the link diversity among data tables, the data search programs mainly depend on the subjective design of designers, and the link mode of the data table links cannot be selected efficiently, so that the search programs are difficult to design, time-consuming and labor-consuming, and the optimal paths cannot be selected quickly and effectively for searching.
Disclosure of Invention
The embodiment of the invention aims to provide a data table processing method, and aims to solve the problems that in the prior art, the design is difficult and time and labor are wasted due to the fact that a programmer mainly selects a data table link mode subjectively.
the embodiment of the invention is realized in such a way that a data table processing method comprises the following steps:
Receiving table names of at least two target data tables to be linked, wherein the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for linking the data tables;
Determining all link paths between every two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information between tables pre-stored in the preset database and established based on the relation of the key fields;
and determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked.
Another object of an embodiment of the present invention is to provide a search method, where the method includes:
receiving a search request input by a user, extracting keywords from the search request, determining search keywords, and determining table names of at least two target data tables to be linked in a preset database according to the search keywords, wherein the search keywords correspond to key fields in the target data tables;
Determining a shortest link path for linking the at least two target data tables to be linked according to the table names of the at least two target data tables to be linked, wherein the shortest link path for linking the at least two target data tables to be linked is obtained by the data table processing method in the embodiment of the invention;
And inquiring data information corresponding to the search request from the preset database for feedback according to the shortest link path linking the at least two target data tables to be linked.
another object of an embodiment of the present invention is to provide a data table processing apparatus, including:
the device comprises a data table name receiving unit, a data table name receiving unit and a data table name processing unit, wherein the data table name receiving unit is used for receiving table names of at least two target data tables to be linked, the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for data table linking;
the data table link path determining unit is used for determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relationship information between tables pre-stored in the preset database and established based on the relationship of the key fields;
And the shortest link path determining unit is used for determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two of the at least two target data tables to be linked.
Another object of an embodiment of the present invention is to provide a search apparatus, including:
The device comprises a search request receiving unit, a search query processing unit and a search query processing unit, wherein the search query receiving unit is used for receiving a search query input by a user, extracting keywords of the search query, determining search keywords, and determining table names of at least two target data tables to be linked in a preset database according to the search keywords, and the search keywords correspond to key fields in the target data tables;
the query path determining unit is configured to determine, according to the table names of the at least two target data tables to be linked, a shortest link path linking the at least two target data tables to be linked, where the shortest link path linking the at least two target data tables to be linked is obtained by executing the data table processing method in the embodiment of the present invention;
And the result feedback unit is used for inquiring data information corresponding to the search request from the preset database for feedback according to the shortest link path linking the at least two target data tables to be linked.
It is a further object of an embodiment of the present invention to provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the data table processing and/or the search method.
it is a further object of an embodiment of the present invention to provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the above-mentioned steps of the data table processing and/or the search method.
according to the data table processing method provided by the embodiment of the invention, the shortest path is determined by analyzing the link paths between every two data tables or between a plurality of data tables in the database, and finally, when a programmer designs a search program, unnecessary program design trouble can be reduced by using the shortest path, and the obtained search program has higher search speed.
Drawings
FIG. 1 is a flow chart of a data table processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for processing a data table according to an embodiment of the present invention;
FIG. 3 is a flowchart for determining all link paths according to an embodiment of the present invention;
fig. 4 is a flowchart of determining a shortest link path according to an embodiment of the present invention;
FIG. 5 is a flowchart of a searching method according to an embodiment of the present invention;
FIG. 6 is a flowchart of determining a target data table name according to an embodiment of the present invention;
FIG. 7 is a block diagram of a data table processing apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram of another exemplary data table processing apparatus according to the present invention;
Fig. 9 is a block diagram of a structure of a data table link path determining unit according to an embodiment of the present invention;
fig. 10 is a block diagram of a shortest link path determining unit according to an embodiment of the present invention;
fig. 11 is a block diagram of a search apparatus according to an embodiment of the present invention;
fig. 12 is a block diagram of a search request receiving unit according to an embodiment of the present invention;
FIG. 13 is a block diagram showing an internal configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
it will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
Example one
As shown in fig. 1, in an embodiment, a data table method is provided, which may specifically include the following steps:
Step S102, receiving table names of at least two target data tables to be linked, wherein the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for linking the data tables;
step S104, determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information between tables which is pre-stored in a preset database and is established based on the relation of key fields;
And step S106, determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked.
In the embodiment of the invention, a preset database can be regarded as an electronic file cabinet for storing electronic files, a user can add, inquire, update, delete and the like to data in the files, the data can be stored together in a certain mode, can be shared by a plurality of users, has the smallest redundancy rate, and is a data set independent from an application program, the database stores the data by taking a data table as an organization unit, and the data table is a grid virtual table for temporarily storing the data.
In the embodiment of the present invention, all the attributes of each data table in the database may be used as the key fields of the table, the data tables are linked together according to the key fields to form a data table link, the link mode may further include a basic link, an internal link, an external link, a cross link, and the like, and the basic link mode all belongs to the basic common knowledge of the database technology, and further listing and one-to-one statement and explanation are not provided in the embodiment of the present invention.
in the embodiment of the invention, the link relation between any two target data tables is traversed, and the link path between any two target data tables is determined, so that a subsequent user can use the shortest link path for design when needing to design a data search program, further the programming design is easier and more efficient, and the obtained search program search data is quicker and more efficient.
in one embodiment, the data table link instruction for linking at least two target data tables can be generated according to the shortest link path. The data table link instruction can be a simple structured query statement, and by setting a convenient program segment, the data table experienced by the shortest link path of the target data table can be called and jumped to query only by inputting the table names of two or more target data tables, so that the design of the search instruction is faster and more efficient.
in one embodiment, as shown in fig. 2, a data table processing method, which is different from the method shown in fig. 1, further includes step S202.
step S202, judging whether at least two target data tables to be linked belong to the same data table set, if so, linking the at least two target data tables to be linked, wherein the data tables in the same data table set directly and/or indirectly have a linking relation.
in the embodiment of the invention, the data tables with link relation in the database are firstly divided, complete link paths can be arranged among the data tables of the same data table set, and the data tables of different data table sets can not be linked, so that when the data table processing is carried out, whether a target data table is in the same data table set is firstly judged, if the target data table is in the same data table set, the link paths among the target data tables can be effectively inquired, and if the target data table is not in the same data table set, the data link relation among the target data tables does not exist, the link relation can be fed back, so that redundant operation processes can be reduced conveniently, and the data processing capability is improved.
In an embodiment, as shown in fig. 3, step S104 may specifically include:
Step S302, selecting two target data tables from at least two target data tables to be linked as a link starting point and a link ending point;
Step S304, determining all link paths between the link starting point and the link ending point according to the link relation information;
and step S306, repeating the step S302 and the step S304 until all the link paths between any two target data tables are obtained.
in the embodiment of the invention, when the link paths between the data tables are determined, all the possible link paths are obtained by traversing all the data tables linked with the data tables, thereby being more beneficial to determining the shortest link path.
in an embodiment, as shown in fig. 4, step S106 may specifically include:
step S402, arranging all link paths between every two target data tables to be linked;
Step S404, selecting the shortest link path in all link paths between every two target data tables to be linked;
Step S406, link the shortest link path between every two of the at least two target data tables to be linked to obtain the shortest link path linking all the target data tables in the at least two target data tables to be linked.
In other embodiments of the present invention, a network may be specifically constructed according to the relationship of the primary external keys in the table in the database, and the primary keys or external keys in one table that can be associated with the primary keys or external keys of other tables are all nodes of the graph. A pair of main foreign keys or foreign keys associated with each other, i.e., edges constituting a graph (two nodes of an edge, i.e., a main foreign key or a foreign key constituting the pair of relationships); in addition, an edge is also formed between the main key and the foreign key of the same table, the data table and the link path between the data tables are converted into the node and the edge of the graph, the node is a table name @ field, the edge is a table name 1@ field 1-a table name 2@ field 2, and the weight of the edge in the two cases is set to be 1 for the convenience of network calculation. If there is no relationship between a pair of primary and foreign keys, it is considered that there is an edge between them, but the weight of the edge takes a large value, such as 1000. Then, based on Dijkstra algorithm, finding out the shortest path between two tables, further, aiming at the shortest link path between multiple target data tables, carrying out full arrangement on all data tables, and based on the shortest path between two tables, finding out the shortest one of two target data tables, and if necessary, filtering out the shortest link path with opposite direction.
in the embodiment of the invention, the shortest link path between any two target data tables is determined, and then when a plurality of target data tables need to be linked, the shortest link path between the two target data tables can be linked, so that the shortest link path for linking the plurality of target data tables can be obtained, the plurality of target data tables can also determine the shortest link path quickly, and the data processing capability is improved.
According to the data sheet processing method provided by the embodiment of the invention, the link paths among the data sheets are comprehensively compared by traversing the link relation among the data sheets, so that a user can conveniently determine the shortest link path for processing the data sheets, and the efficiency of processing the data sheets is further improved.
example two
As shown in fig. 5, in one embodiment, there is provided a search method, the method comprising:
Step S502, receiving a search request input by a user, extracting keywords from the search request, determining search keywords, and determining table names of at least two target data tables to be linked in a preset database according to the search keywords, wherein the search keywords correspond to key fields in the target data tables;
Step S504, determining a shortest link path linking at least two target data tables to be linked according to the table names of the at least two target data tables to be linked, and obtaining the shortest link path linking the at least two target data tables to be linked by executing the data table processing method of the embodiment of the invention;
step S506, according to the shortest link path linking at least two target data tables to be linked, querying data information corresponding to the search request from a preset database for feedback.
In the embodiment of the invention, the search request of the user mainly refers to a request that the user needs to call or query data from a preset database, for example, data tables including a table 1-name + identity card, a table 2-name + academic number and a table 3-academic number + achievement exist in the database, the search request of the user is the achievement of Zhang III, the corresponding target data tables are the table 1 and the table 3, and if the shortest link path between the data tables is the table 1-the table 2-the table 3, the achievement of Zhang III is queried through the path.
in one embodiment, as shown in fig. 6, step S502 specifically includes:
Step S602, receiving a search request input by a user, extracting keywords from the search request, and determining the search keywords;
Step S604, matching the search keywords in a preset keyword field library to determine a keyword field;
Step S606, a target data table in a preset database is searched according to the key field, and the name of the target data table is determined, wherein the target data table at least comprises data information corresponding to the key field.
In the embodiment of the invention, the problem that the search input of the user is fuzzy or poor in accuracy is considered, the search keyword is extracted from the search request, and the accuracy and efficiency of the search are improved. For example, in the above example, if the search request is "how many physical subject scores of zhang san of students" input by the user, "the" zhang san "+" physical "+" scores "can be extracted by extracting the search keyword, and correspondingly, when the keyword segment library is preset, the" scores "can be attributed to the query" scores "and the" zhang san "can be attributed to the query" names ", the corresponding keyword field determined according to the search keyword is the" scores "+" names ", further, the corresponding target data table is table 1+ table 3, and further, the shortest link path between table 1 and table 3 is determined by the data table processing method in the foregoing embodiment one: table 1-table 2-table 3, and further, the path is taken as a query path for querying "how many physical subject scores of three students are".
according to the searching method provided by the embodiment of the invention, the target data table related to the searching request is determined after the searching request is analyzed, the shortest link path of the target data table is determined by using the data table processing method provided by the embodiment of the invention, and then the request result data corresponding to the searching request is inquired and fed back through the shortest link path, so that the searching reaction speed is improved, and the searching technology is more efficient.
EXAMPLE III
As shown in fig. 7, in one embodiment, there is provided a data table processing apparatus including:
a data table name receiving unit 710, configured to receive table names of at least two target data tables to be linked, where the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database include key fields for performing data table linking;
the data table link path determining unit 720 is configured to determine all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relationship information between tables pre-stored in a preset database and established based on a relationship of key fields;
the shortest link path determining unit 730 is configured to determine, according to all link paths between every two of the at least two target data tables to be linked, a shortest link path linking all of the at least two target data tables to be linked.
in the embodiment of the invention, a preset database can be regarded as an electronic file cabinet for storing electronic files, a user can add, inquire, update, delete and the like to data in the files, the data can be stored together in a certain mode, can be shared by a plurality of users, has the smallest redundancy rate, and is a data set independent from an application program, the database stores the data by taking a data table as an organization unit, and the data table is a grid virtual table for temporarily storing the data.
In the embodiment of the present invention, all the attributes of each data table in the database may be used as the key fields of the table, the data tables are linked together according to the key fields to form a data table link, the link mode may further include a basic link, an internal link, an external link, a cross link, and the like, and the basic link mode all belongs to the basic common knowledge of the database technology, and further listing and one-to-one statement and explanation are not provided in the embodiment of the present invention.
in the embodiment of the invention, the link paths between every two target data tables are determined by traversing the link relations between all the target data tables, so that a subsequent user can use the shortest link path for design when needing to design a data search program, further the programming design is easier and more efficient, and the obtained search program search data is quicker and more efficient.
In one embodiment, the data table link instruction for linking at least two target data tables can be generated according to the shortest link path. The data table link instruction can be a simple structured query statement, and by setting a convenient program segment, the data table experienced by the shortest link path of the target data table can be called and jumped to query only by inputting the table names of two or more target data tables, so that the design of the search instruction is faster and more efficient.
In one embodiment, as shown in fig. 8, a data table processing apparatus, which is different from the apparatus shown in fig. 7 in that it further includes a data table dividing unit 810.
the data table dividing unit 810 is configured to determine whether at least two target data tables to be linked belong to the same data table set, and if so, link the at least two target data tables to be linked, where the data tables in the same data table set directly and/or indirectly have a link relationship.
in the embodiment of the invention, the data tables with link relation in the database are firstly divided, complete link paths can be arranged among the data tables of the same data table set, and the data tables of different data table sets can not be linked, so that when the data table processing is carried out, whether a target data table is in the same data table set is firstly judged, if the target data table is in the same data table set, the link paths among the target data tables can be effectively inquired, and if the target data table is not in the same data table set, the data link relation among the target data tables does not exist, the link relation can be fed back, so that redundant operation processes can be reduced conveniently, and the data processing capability is improved.
In an embodiment, as shown in fig. 9, the data table link path determining unit 720 may specifically include:
A link end point determining unit 721 for selecting two target data tables as a link start point and a link end point from at least two target data tables to be linked;
A link path determination unit 722 for determining all link paths between the link start point and the link end point according to the link relationship information; in the embodiment of the present invention, the link endpoint determining unit 721 and the link path determining unit 722 repeatedly operate until all link paths between any two target data tables are obtained.
in the embodiment of the invention, when the link paths between the data tables are determined, all the paths are listed by traversing all the data tables linked with the data tables to obtain all possible link paths, thereby being beneficial to determining the shortest link path.
In an embodiment, as shown in fig. 10, the shortest link path determining unit 730 may specifically include:
a path arrangement unit 731, configured to arrange all link paths between every two at least two target data tables to be linked;
A first shortest path determining unit 732, configured to select a shortest link path from all link paths between every two of at least two target data tables to be linked;
The second shortest path determining unit 733 links the shortest link path between every two of the at least two target data tables to be linked to obtain the shortest link path linking all the target data tables in the at least two target data tables to be linked.
in other embodiments of the present invention, a network may be specifically constructed according to the relationship of the primary external keys in the table in the database, and the primary keys or external keys in one table that can be associated with the primary keys or external keys of other tables are all nodes of the graph. A pair of main foreign keys or foreign keys associated with each other, i.e., edges constituting a graph (two nodes of an edge, i.e., a main foreign key or a foreign key constituting the pair of relationships); in addition, an edge is also formed between the main key and the foreign key of the same table, the data table and the link path between the data tables are converted into the node and the edge of the graph, the node is a table name @ field, the edge is a table name 1@ field 1-a table name 2@ field 2, and the weight of the edge in the two cases is set to be 1 for the convenience of network calculation. If there is no relationship between a pair of primary and foreign keys, it is considered that there is an edge between them, but the weight of the edge takes a large value, such as 1000. Then, based on Dijkstra algorithm, finding out the shortest path between two tables, further, aiming at the shortest link path between multiple target data tables, carrying out full arrangement on all data tables, and based on the shortest path between two tables, finding out the shortest one of two target data tables, and if necessary, filtering out the shortest link path with opposite direction.
In the embodiment of the invention, the shortest link path between any two target data tables is determined, and then when a plurality of target data tables need to be linked, the shortest link path between the two target data tables can be linked, so that the shortest link path for linking the plurality of target data tables can be obtained, the plurality of target data tables can also determine the shortest link path quickly, and the data processing capability is improved.
the data sheet processing device provided by the embodiment of the invention comprehensively compares the link paths between the data sheets by traversing the link relation between the data sheets, so that a user can conveniently determine the shortest link path for processing the data sheets, and the efficiency of processing the data sheets is further improved.
Example four
As shown in fig. 11, in one embodiment, there is provided a search apparatus including:
A search request receiving unit 1110, configured to receive a search request input by a user, perform keyword extraction on the search request, determine a search keyword, and determine, according to the search keyword, table names of at least two target data tables to be linked included in a preset database, where the search keyword corresponds to a key field in the target data table;
the query path determining unit 1120 is configured to determine, according to the table names of the at least two target data tables to be linked, a shortest link path linking the at least two target data tables to be linked, where the shortest link path linking the at least two target data tables to be linked is obtained by executing a data table processing method according to an embodiment of the present invention;
The result feedback unit 1130 is configured to query, from a preset database, data information corresponding to the search request for feedback according to a shortest link path linking at least two target data tables to be linked.
In the embodiment of the invention, the search request of the user mainly refers to a request that the user needs to call or query data from a preset database, for example, data tables including a table 1-name + identity card, a table 2-name + academic number and a table 3-academic number + achievement exist in the database, the search request of the user is the achievement of Zhang III, the corresponding target data tables are the table 1 and the table 3, and if the shortest link path between the data tables is the table 1-the table 2-the table 3, the achievement of Zhang III is queried through the path.
In an embodiment, as shown in fig. 12, the search request receiving unit 1110 specifically includes:
a keyword extraction unit 1111, configured to receive a search request input by a user, perform keyword extraction on the search request, and determine a search keyword;
A keyword matching unit 1112, configured to match the search keyword with a preset keyword field library, and determine a keyword field;
And the data table name determining unit 1113 is configured to search a target data table in the preset database according to the key field, and determine a target data table name, where the target data table at least includes data information corresponding to the key field.
In the embodiment of the invention, the problem that the search input of the user is fuzzy or poor in accuracy is considered, the search keyword is extracted from the search request, and the accuracy and efficiency of the search are improved. For example, in the above example, if the search request is "how many physical subject scores of zhang san of students" input by the user, "the" zhang san "+" physical "+" scores "can be extracted by extracting the search keyword, and correspondingly, when the keyword segment library is preset, the" scores "can be attributed to the query" scores "and the" zhang san "can be attributed to the query" names ", the corresponding keyword field determined according to the search keyword is the" scores "+" names ", further, the corresponding target data table is table 1+ table 3, and further, the shortest link path between table 1 and table 3 is determined by the data table processing method in the foregoing embodiment one: table 1-table 2-table 3, and further, the path is taken as a query path for querying "how many physical subject scores of three students are".
According to the searching device provided by the embodiment of the invention, the target data table related to the search request is determined after the search request is analyzed, the shortest link path of the target data table is determined by using the data table processing method provided by the embodiment of the invention, and then the request result data corresponding to the search request is inquired and fed back through the shortest link path, so that the response speed of the search is improved, and the searching technology is more efficient.
EXAMPLE five
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving table names of at least two target data tables to be linked, wherein the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for linking the data tables;
Determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information between tables which is pre-stored in a preset database and is established based on the relation of key fields;
And determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked.
FIG. 13 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may be specifically an independent physical server or a terminal, may also be a server cluster formed by a plurality of physical servers, and may be a cloud server providing basic cloud computing services such as a cloud server, a cloud database, a cloud storage, and a CDN. But not limited thereto, the smart phone, the tablet computer, the notebook computer, the desktop computer, the smart speaker, the smart watch, and the like may also be used. As shown in fig. 13, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen linked by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a data table processing method and/or a search method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a method of data table processing and/or a method of searching. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
EXAMPLE six
in one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of:
Receiving table names of at least two target data tables to be linked, wherein the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for linking the data tables;
determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information between tables which is pre-stored in a preset database and is established based on the relation of key fields;
and determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked.
it should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
the above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. a method for processing a data table, the method comprising:
receiving table names of at least two target data tables to be linked, wherein the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for linking the data tables;
determining all link paths between every two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relation information between tables pre-stored in the preset database and established based on the relation of the key fields;
and determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two at least two target data tables to be linked.
2. The method according to claim 1, wherein the link relationship information at least includes link relationships between data tables, and wherein if a key field included in one data table in the predetermined database exists in another data table at the same time, a link relationship exists between the two data tables.
3. the method according to claim 2, wherein after receiving the table names of at least two target data tables to be linked, further comprising:
and judging whether the at least two target data tables to be linked belong to the same data table set, if so, linking the at least two target data tables to be linked, wherein the data tables in the same data table set directly and/or indirectly have a linking relation.
4. The method according to claim 1, wherein the determining all link paths between two target data tables to be linked according to table names of the at least two target data tables to be linked and link relationship information between tables pre-stored in the preset database and established based on the relationship of the key fields specifically comprises:
Step a, selecting two target data tables from the at least two target data tables to be linked as a link starting point and a link ending point;
B, determining all link paths between the link starting point and the link ending point according to the link relation information;
And c, repeating the step a and the step b until all the link paths between any two target data tables are obtained.
5. the method according to claim 1, wherein the determining a shortest link path linking all the at least two target data tables to be linked according to all link paths between every two of the at least two target data tables to be linked specifically includes:
Arranging all link paths between every two target data tables to be linked;
Selecting the shortest link path in all link paths between every two target data tables to be linked;
and linking the shortest link paths between every two target data tables to be linked to obtain the shortest link path for linking all the target data tables in the at least two target data tables to be linked.
6. A method of searching, the method comprising:
Receiving a search request input by a user, extracting keywords from the search request, determining search keywords, and determining table names of at least two target data tables to be linked in a preset database according to the search keywords, wherein the search keywords correspond to key fields in the target data tables;
determining a shortest link path for linking the at least two target data tables to be linked according to the table names of the at least two target data tables to be linked, wherein the shortest link path for linking the at least two target data tables to be linked is obtained by executing the data table processing method of any one of claims 1 to 5;
and inquiring data information corresponding to the search request from the preset database for feedback according to the shortest link path linking the at least two target data tables to be linked.
7. a data table processing apparatus, the apparatus comprising:
The device comprises a data table name receiving unit, a data table name receiving unit and a data table name processing unit, wherein the data table name receiving unit is used for receiving table names of at least two target data tables to be linked, the at least two target data tables to be linked are data tables in a preset database, and the data tables in the preset database comprise key fields for data table linking;
The data table link path determining unit is used for determining all link paths between every two at least two target data tables to be linked according to the table names of the at least two target data tables to be linked and link relationship information between tables pre-stored in the preset database and established based on the relationship of the key fields;
And the shortest link path determining unit is used for determining the shortest link path for linking all the at least two target data tables to be linked according to all the link paths between every two of the at least two target data tables to be linked.
8. a search apparatus, characterized in that the apparatus comprises:
the device comprises a search request receiving unit, a search query processing unit and a search query processing unit, wherein the search query receiving unit is used for receiving a search query input by a user, extracting keywords of the search query, determining search keywords, and determining table names of at least two target data tables to be linked in a preset database according to the search keywords, and the search keywords correspond to key fields in the target data tables;
The query path determining unit is used for determining a shortest link path for linking the at least two target data tables to be linked according to the table names of the at least two target data tables to be linked, wherein the shortest link path for linking the at least two target data tables to be linked is obtained by executing the data table processing method of any one of claims 1 to 5;
and the result feedback unit is used for inquiring data information corresponding to the search request from the preset database for feedback according to the shortest link path linking the at least two target data tables to be linked.
9. a computer arrangement comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to carry out the steps of the method of any one of claims 1 to 5 or 6.
10. A computer-readable storage medium, having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of the method of any one of claims 1 to 5 or 6.
CN201910792363.6A 2019-08-26 2019-08-26 data table processing method, searching method, device, equipment and storage medium Pending CN110580333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910792363.6A CN110580333A (en) 2019-08-26 2019-08-26 data table processing method, searching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910792363.6A CN110580333A (en) 2019-08-26 2019-08-26 data table processing method, searching method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110580333A true CN110580333A (en) 2019-12-17

Family

ID=68812282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910792363.6A Pending CN110580333A (en) 2019-08-26 2019-08-26 data table processing method, searching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110580333A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904736A (en) * 2022-12-30 2023-04-04 壹沓科技(上海)有限公司 Task execution method and device, storage medium and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110040745A1 (en) * 2009-08-12 2011-02-17 Oleg Zaydman Quick find for data fields
CN109117429A (en) * 2017-06-22 2019-01-01 北京嘀嘀无限科技发展有限公司 Data base query method, device and electronic equipment
CN109213775A (en) * 2018-09-18 2019-01-15 深圳壹账通智能科技有限公司 Searching method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110040745A1 (en) * 2009-08-12 2011-02-17 Oleg Zaydman Quick find for data fields
CN109117429A (en) * 2017-06-22 2019-01-01 北京嘀嘀无限科技发展有限公司 Data base query method, device and electronic equipment
CN109213775A (en) * 2018-09-18 2019-01-15 深圳壹账通智能科技有限公司 Searching method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904736A (en) * 2022-12-30 2023-04-04 壹沓科技(上海)有限公司 Task execution method and device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
US20190324608A1 (en) Method and apparatus for homepage cluster system management based on tree structure
US10268655B2 (en) Method, device, server and storage medium of searching a group based on social network
Hasani et al. Lambda architecture for real time big data analytic
US10303793B2 (en) Similarity and ranking of databases based on database metadata
CN109564566B (en) Discovery of calling applications for controlling file hydration behavior
CN111813799B (en) Database query statement generation method, device, computer equipment and storage medium
CN109076107A (en) It is customized based on detection and the automatic detection and optimization of user experience upgrading is provided
CN110689232A (en) Workflow configuration optimization processing method and device and computer equipment
CN109361628B (en) Message assembling method and device, computer equipment and storage medium
US20170169069A1 (en) Data integrity checking in a distributed filesystem using object versioning
CN111737981A (en) Vocabulary error correction method and device, computer equipment and storage medium
Pertesis et al. Efficient skyline query processing in spatialhadoop
CN110580333A (en) data table processing method, searching method, device, equipment and storage medium
CN111078671A (en) Method, device, equipment and medium for modifying data table field
US9542457B1 (en) Methods for displaying object history information
CN109800247A (en) Data search method, device, computer equipment and storage medium
US10042957B2 (en) Devices and methods for implementing dynamic collaborative workflow systems
CN115455006A (en) Data processing method, data processing device, electronic device, and storage medium
JP2024505238A (en) Data processing system with operations on logical dataset groups
CN112231541A (en) Data retrieval method, system, computer device and storage medium
CN109871214B (en) Program code generation method, program code generation device, computer device, and storage medium
CN111291159A (en) Patent retrieval method, device, system, computer equipment and storage medium
KR20200059349A (en) Search service method
CN112416966A (en) Ad hoc query method, apparatus, computer device and storage medium

Legal Events

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

Application publication date: 20191217

RJ01 Rejection of invention patent application after publication