CN113010585A - Information search method, system, device and medium - Google Patents

Information search method, system, device and medium Download PDF

Info

Publication number
CN113010585A
CN113010585A CN202110424393.9A CN202110424393A CN113010585A CN 113010585 A CN113010585 A CN 113010585A CN 202110424393 A CN202110424393 A CN 202110424393A CN 113010585 A CN113010585 A CN 113010585A
Authority
CN
China
Prior art keywords
search
information
database
target information
target
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
CN202110424393.9A
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.)
Ctrip Travel Network Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Network Technology Shanghai 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 Ctrip Travel Network Technology Shanghai Co Ltd filed Critical Ctrip Travel Network Technology Shanghai Co Ltd
Priority to CN202110424393.9A priority Critical patent/CN113010585A/en
Publication of CN113010585A publication Critical patent/CN113010585A/en
Pending legal-status Critical Current

Links

Images

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/24Querying
    • G06F16/248Presentation of query results

Landscapes

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

Abstract

The invention discloses an information searching method, a system, equipment and a medium, wherein the information searching method comprises the following steps: receiving a search request; searching target information in a database according to the search request; and if at least two pieces of target information are searched, sequencing the target information according to an organization structure corresponding to the target information in the database. According to the method and the device, the target information is searched in the database according to the received search request, and if at least two pieces of target information are searched, the target information is sequenced according to the organization structure corresponding to the target information in the database, so that the sequencing of the search results is optimized, and the condition that the sequencing is disordered is avoided.

Description

Information search method, system, device and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, a device, and a medium for searching information.
Background
At present, various cross-regional and cross-team project collaboration exists in large and medium-sized enterprises, scenes of searching specific contacts through names, mailboxes, account numbers, telephones and other information are quite common, when the number of employees of an enterprise reaches tens of thousands of people, problems of same names, same characters, polyphones and the like become more and more obvious, for people with the same names, the same characters and the polyphones, when information such as names, pinyin initials or English initials and the like is input to perform personnel search, the situation that other branches or the same people of other departments are arranged in front of search targets, the sequencing is disordered, or search results cannot be hit when pinyin initials are used for searching polyphone names or homophone wrongly-written characters are input to search the homophone names occurs.
Disclosure of Invention
The invention provides an information search method, system, equipment and medium, aiming at overcoming the defect that the search engine in the prior art has disordered sequencing or can not hit the search result when searching information.
The invention solves the technical problems through the following technical scheme:
a first aspect of the present invention provides an information search method, including:
receiving a search request;
searching target information in a database according to the search request;
and if at least two pieces of target information are searched, sequencing the target information according to an organization structure corresponding to the target information in the database.
Preferably, the step of sorting the target information according to an organization structure corresponding to the target information in the database includes:
acquiring a search account corresponding to the search request;
acquiring an organization architecture corresponding to the search account from the database;
respectively comparing the association degrees between the organization structure corresponding to the search account and the organization structure corresponding to each piece of target information;
and sequencing the target information according to the relevance.
Preferably, if the target information is a target contact, the step of searching for the target information in the database according to the search request specifically includes:
and if the search request is the pinyin of the target contact person, searching the target contact person according to at least one pinyin of the contact persons in the database.
Preferably, the information search method further includes:
if the contact person in the database comprises polyphone characters, adding other pinyin except the current pinyin for the contact person in the database.
The second aspect of the invention provides an information search system, which comprises a receiving module, a search module and a sorting module;
the receiving module is used for receiving a search request;
the searching module is used for searching target information in a database according to the searching request;
the sorting module is used for sorting the target information according to an organization structure corresponding to the target information in the database if at least two pieces of target information are searched.
Preferably, the sorting module includes a first obtaining unit, a second obtaining unit, a comparing unit and a sorting unit;
the first acquisition unit is used for acquiring a search account corresponding to the search request;
the second obtaining unit is used for obtaining an organization structure corresponding to the search account from the database;
the comparison unit is used for respectively comparing the association degree between the organization architecture corresponding to the search account and the organization architecture corresponding to each piece of target information;
the sorting unit is used for sorting the target information according to the relevance.
Preferably, if the target information is a target contact, the search module is specifically configured to search the target contact according to at least one pinyin of the contact in the database if the search request is the pinyin of the target contact.
Preferably, the information search system further comprises an adding module;
the adding module is used for adding other pinyin except the current pinyin for the contact person in the database if the contact person in the database comprises polyphone characters.
A third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the information search method according to the first aspect when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the information search method according to the first aspect.
The positive progress effects of the invention are as follows:
according to the method and the device, the target information is searched in the database according to the received search request, and if at least two pieces of target information are searched, the target information is sequenced according to the organization structure corresponding to the target information in the database, so that the sequencing of the search results is optimized, and the condition that the sequencing is disordered is avoided.
Drawings
Fig. 1 is a flowchart of an information search method according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of step 103 of the information searching method according to embodiment 1 of the present invention.
Fig. 3 is a schematic block diagram of an information search system according to embodiment 2 of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
As shown in fig. 1, the present embodiment provides an information search method, where an execution subject of the information search method may be an application program such as a search engine, and may be an electronic device, which is not limited in this respect. Specifically, the information search method includes:
step 101, receiving a search request.
In this embodiment, an executing body of the information search method takes a search engine as an example, and the search engine receives a search request input by a searcher on a search engine interface, and specifically, receives an information search keyword input by the searcher on the search engine interface.
The search engine in the present embodiment is an open-source elastic search engine, and may be another type of search engine, which is not specifically limited herein.
102, searching target information in a database according to a search request; the database may specifically be an index database.
In the embodiment, the search engine performs word segmentation on the received information search keywords, specifically, the search engine performs word segmentation on the information search keywords by using a plurality of word segmenters, optimizes all the information search keywords to be searched into a search engine-friendly uniform format, and facilitates searching of target information; the search engine searches the target information in the database according to the information search keyword after the word segmentation processing, it should be noted that the target information searched by the search engine may be one or multiple, and when one target information is obtained by searching, the target information is directly displayed without sorting.
And 103, if at least two pieces of target information are searched, sequencing the target information according to an organization structure corresponding to the target information in the database.
For example, the search engine searches for "zhang san" in the index database according to the received search request for searching for "zhang san", at this time, the search engine searches for all "zhang san" in the index database, and sorts all "zhang san" according to the organization structure corresponding to each zhang san ".
In this embodiment, if the search engine searches for at least two pieces of target information, if an organization structure corresponding to the target information exists in the index database, the at least two pieces of target information are directly sorted according to the organization structure corresponding to the target information in the index database; if the index database does not have the organization structure corresponding to the target information, the organization structure corresponding to the target information is added into the index database, and then at least two pieces of target information are sequenced according to the organization structure corresponding to the target information. The implementation mode adopts the mode to sort the target information, and avoids the situation of disordered sorting.
In this embodiment, the organization structure includes a staff organization structure and a department organization structure.
In an alternative embodiment, as shown in fig. 2, the step 103 specifically includes the following steps:
and step 1031, obtaining a search account corresponding to the search request.
In this embodiment, when a searcher initiates a search request on a search engine interface, the search request carries a search account of the searcher, and at this time, when the search engine receives the search request of the searcher, the search engine can obtain the search account of the searcher corresponding to the search request.
And 1032, acquiring an organization architecture corresponding to the search account from the database.
In the embodiment, each searcher corresponds to one search account, each search account has a corresponding organization structure in the index database, and the search engine can accurately query the organization structure of the searcher corresponding to the search account from the index database through the search account.
And 1033, respectively comparing the association degrees between the organization structure corresponding to the search account and the organization structure corresponding to each piece of target information.
And 1034, sorting the target information according to the association degree.
For example, the target information is "lie four", the search account number of the search person is "wang" and "wang" is 0008, the "wang" logs in the search engine through the search account number and initiates a search request for searching for "lie four", at this time, the search engine acquires an organization structure of "wang" from the index database according to the acquired search account number of the "wang" such as an organization structure of the "wang" is an X branch company development department, when the "wang" searches for "lie four", a search keyword "LS" or "LISI" is input on the search engine interface, at this time, two "lie four" are searched, wherein the first organization of the "lie four" is an X branch company personnel department, and the second organization of the "lie four" is a Y branch company development department; the search engine respectively compares the association degree between the organization structure of Wangzao and each organization structure of Liquan, the first Liquan and Wangzhi belong to different departments of the same branch, the second Liquan and Wangzhi belong to the same department of different branches, since the association degree between persons in different departments of the same division is usually higher than that between persons in the same department of different divisions, namely, the association degree of the Wangzao and the first Liquan is higher than that of the Wangzao and the second Liquan, therefore, when the search engine ranks two "lie four", the "lie four" belonging to a different department of the same division as the "wang" will be ranked before the "lie four" belonging to the same division as the "wang", i.e., the first "lie four" will be ranked before the second "lie four".
It should be noted that, in the present embodiment, when the search keyword is a first pinyin letter or a full pinyin, the case is not distinguished.
In this embodiment, the search engine respectively compares the association degrees between the organization structure of the searcher corresponding to the search account and the organization structure corresponding to each target information, arranges the target information with high association degree with the searcher in front, and orders at least two target information in sequence from high to low according to the association degrees, so that the ordering result is more reasonable and ordered.
In an optional implementation manner, if the target information is a target contact, the step 102 specifically includes: and if the search request is the pinyin of the target contact person, searching the target contact person according to at least one pinyin of the contact persons in the database. If the contact person in the database comprises the polyphone, adding other pinyin besides the current pinyin for the contact person in the database. Specifically, if the contact is a pinyin, the search engine can search the target contact in the index database according to the pinyin first letter or the pinyin full pinyin of the contact; if the contact is a polyphone (i.e. the contact has multiple pinyins or the same pinyin has multiple chinese characters, e.g. "single new" has two pinyins, i.e. shanxin and danxin; and the pinyin "wangxuan" corresponds to multiple different chinese characters, such as "wangxuan", etc.), then other pinyins except the current pinyin are added to the contact in the index database, and then the search engine searches the target contact in the index database according to the pinyin initials or pinyin syllabification of the contact, thereby avoiding the situation that the search engine cannot hit the target contact when searching the contact, because the polyphone has no recognized pronunciation in the name, the target contact cannot be searched by using the pinyin initials or the pinyin, or the target contact cannot be hit when inputting homophony mismatching characters, and improving the hit rate and accuracy of the search result.
For example, taking a person search of an enterprise as an example, the information search method in the present embodiment is further described.
In a specific implementation process, a search engine acquires personnel information of each upstream system and stores the personnel information into an index database, for example, the search engine acquires personnel information in systems such as company personnel, seat management, extension management and the like; the personnel information may be at least one of a job number, a Chinese name, an English name, a mailbox, a telephone, a seat, an extension number, an operator number, and an organization structure, and may also be other information, which is not specifically limited herein.
Further, in the embodiment, the Chinese in the Name field in the database is copied to the Chinese _ Name field, and the other fields are copied to the Foreign _ Name field, and the search engine respectively adopts different preprocessing logics and word segmenters for the Chinese _ Name and the Foreign _ Name fields. It should be noted that, if special optimization processing is to be performed on multiple languages such as chinese, english, japanese, korean, and the like, the Foreign _ Name can be disassembled into the Name field of each country according to actual situations so as to facilitate search engine optimization.
If the staff information in the index database has polyphones, adding other pinyins except the current pinyin for the polyphone staff information in the index database, for example, if the Name has polyphones, adding additional py1_ Name and py2_ Name in the database, specifically, calculating multiple readings of the polyphone from the Chinese _ Name by using the Pinyin4j packet of Java and storing the multiple readings into related fields, and similarly, for the Pinyin full pinyin, adding Pinyin1_ Name, Pinyin2_ Name and the like in the index database. For example, the surname is "single pin" has two pinyins, and the current pinyin of the Name in the index database has the pinyin initials py1_ Name of "SJ" and the pinyin full pin pinyin1_ Name of "SHANJIE", at which time, other pinyins are added in the index database in addition to the current pinyin of the Name, i.e., the pinyin initials py2_ Name of "DJ" and the pinyin full pin pinyin2_ Name of "DANJIE", where the added pinyin initials and pinyin full pins are not case-sensitive.
It should be noted that, in the present embodiment, related fields are added on the basis of the original fields, the original fields are not modified, and the newly added polyphone fields are entered into the organization structure of the original name, so that the organization structure of the newly added polyphone and the organization structure of the original name can correspond to each other, which not only increases the friendliness of the search engine, but also ensures that the data of the upstream system can be matched with the data of the downstream system.
And step two, searching the target contact in the database by the search engine according to the received search request.
Before searching, the search engine of the embodiment uses an IK word segmentation device for a Chinese _ Name field in an index database, uses edge _ ngram (a word segmentation device) and ngram for a job number, an English Name, a mailbox, a telephone, an agent, a extension number, an operator number and the like, and uses a pattern word segmentation device for an organization structure, so that the leader job number and the organization Name can form independent words.
When searching a target contact, a search engine is specifically divided into two-stage dsql (self-defined structured query language) query, firstly, first-letter matching query is carried out on fields such as a job number, a mailbox, a telephone, an agent, an extension number, an operator number, a pinyin first letter and the like, and when no hit exists in the first-stage search, a more comprehensive (more matching fields and more comprehensive matching modes) qdsl (query expression) query is used for improving the query speed; in qdsl of the two-level search, boost (boost ) attributes are set for each query condition, and are used for boosting the authority of each dimension attribute, and the numerical value and the relative weight value between each attribute need to be repeatedly tested and verified according to an actual data set.
And step three, if at least two target contacts are searched, sequencing the target contacts according to an organization structure corresponding to the target contacts in the index database.
In this embodiment, when receiving a search request from a searcher, a search engine may obtain a job number of the searcher and an organization structure of the searcher, and when performing the two-stage dsql query, the query conditions all include a leader _ Path (personnel organization structure) and an organization _ Path (department organization structure) of the searcher as match (identity/similarity) conditions of related fields. And respectively comparing the association degree between the organization architecture corresponding to the searcher and the organization architecture corresponding to each target contact by the search engine. And at least two target contacts are sorted according to the relevance, so that the target contacts can be searched with pertinence and accuracy, the hit rate of searching is improved, and the sorting accuracy is improved.
In this embodiment, the boost values of the two fields, i.e., the leader _ Path and the organization _ Path, in the search condition should be similar to the boost values of other conventional matching fields, where the weight of the leader _ Path is slightly higher than that of the organization _ Path (where the boost values of various attributes need to be repeatedly measured).
leader _ Path is a sequence of job numbers from the highest leader of the company to oneself, and the fields are similar: c0001 (director job number)/C1001 (CEO job number)/C1101 (department responsible worker number)/C1111 (employee job number), which expresses a tree of reporting relationships between persons, and can be used by the search engine to rank ahead persons who belong to a Leader with themselves, thereby improving the hit rate.
Organization _ Path is the Organization structure of a company, and a search engine can use the information to arrange the people who belong to the Organization in front of the Organization, so that the hit rate is improved. This field is similar:
1. head office _00a 1/management _00a2/X division _00a 3/technology _00b 1/research & development _00b 2/test team _00b 3;
2. head office _00a 1/management _00a2/Y division _00a 3/technology _00c 1/research & development _00c 2/test team _00c 3;
3. head office _00a 1/management _00a2/X affiliate _00a3/HR _00d 1/recruitment team _00d 2/interviewer team _00d 3;
in the embodiment, a signature mechanism similar to a block chain is introduced, and the concept of signature verification of a previous block by a next block enhances the identification of each node in organization _ Path, specifically, an auxiliary field "_ 00a 1" is added behind each organization architecture name in an index database, and when a search engine compares the association degree of the organization architecture of a searcher and the organization architecture of a target contact, the association degree of the searcher and the target contact can be more accurately obtained by identifying and comparing the auxiliary fields in the organization architecture of the department by the search engine, thereby avoiding the sorting error caused by the same organization name of different branch companies.
The embodiment updates the index database of the search engine once every preset time, and specifically, updates the data in the index database by adopting a mode of newly creating an index and deleting an old index so as to maintain data updating, generates a brand new index by naming the current timestamp for each updating, deletes the alias of the old index after the preparation of the new index is finished, newly creates the alias for the new index, and deletes the old index and the internal data. Smooth switching and system simplicity in each data update process are guaranteed. The preset time may be set to 2 hours, and may be set to other values.
According to the method and the device, the target information is searched in the database according to the received search request, and if at least two pieces of target information are searched, the target information is sequenced according to the organization structure corresponding to the target information in the database, so that the sequencing of the search results is optimized, and the condition that the sequencing is disordered is avoided; furthermore, other pinyins except the current pinyin are added to the contact person in the data, and the target contact person is searched according to at least one pinyin of the contact person in the database, so that the hit rate and the accuracy of the search result are improved.
Example 2
As shown in fig. 3, the present embodiment provides an information search system including a receiving module 1, a search module 2, a sorting module 3, and an adding module 4.
The receiving module 1 is used for receiving a search request.
In this embodiment, the information search system takes a search engine as an example, and the search engine receives a search request input by a searcher on a search engine interface, and specifically, receives an information search keyword input by the searcher on the search engine interface.
The search engine in the present embodiment is an open-source elastic search, and may be another type of search engine, which is not specifically limited herein.
The searching module 2 is used for searching target information in the database according to the searching request; the database may specifically be an index database.
In the embodiment, the search engine performs word segmentation on the received information search keywords, specifically, the search engine performs word segmentation on the information search keywords by using a plurality of word segmenters, optimizes all the information search keywords to be searched into a search engine-friendly uniform format, and facilitates searching of target information; the search engine searches the target information in the database according to the information search keyword after the word segmentation processing, it should be noted that the target information searched by the search engine may be one or multiple, and when one target information is obtained by searching, the target information is directly displayed without sorting.
The sorting module 3 is configured to, if at least two pieces of target information are searched, sort the target information according to an organization structure corresponding to the target information in the database.
For example, the search engine searches for "zhang san" in the index database according to the received search request for searching for "zhang san", at this time, the search engine searches for all "zhang san" in the index database, and sorts all "zhang san" according to the organization structure corresponding to each zhang san ".
In this embodiment, if the search engine searches for at least two pieces of target information, if an organization structure corresponding to the target information exists in the index database, the at least two pieces of target information are directly sorted according to the organization structure corresponding to the target information in the index database; if the index database does not have the organization structure corresponding to the target information, the organization structure corresponding to the target information is added into the index database, and then at least two pieces of target information are sequenced according to the organization structure corresponding to the target information. The implementation mode adopts the mode to sort the target information, and avoids the situation of disordered sorting.
In this embodiment, the organization structure includes a staff organization structure and a department organization structure.
In an alternative embodiment, as shown in fig. 3, the sorting module 3 includes a first obtaining unit 311, a second obtaining unit 312, a comparing unit 313 and a sorting unit 314.
The first obtaining unit 311 is configured to obtain a search account corresponding to the search request.
In this embodiment, when a searcher initiates a search request on a search engine interface, the search request carries a search account of the searcher, and at this time, when the search engine receives the search request of the searcher, the search engine can obtain the search account of the searcher corresponding to the search request.
The second obtaining unit 312 is configured to obtain an organization structure corresponding to the search account from the database.
In the embodiment, each searcher corresponds to one search account, each search account has a corresponding organization structure in the index database, and the search engine can accurately query the organization structure of the searcher corresponding to the search account from the index database through the search account.
The comparing unit 313 is configured to compare the association degrees between the organization structure corresponding to the search account and the organization structure corresponding to each piece of target information.
The sorting unit 314 is configured to sort the target information according to the relevance.
For example, the target information is "lie four", the search account number of the search person is "wang" and "wang" is 0008, the "wang" logs in the search engine through the search account number and initiates a search request for searching for "lie four", at this time, the search engine acquires an organization structure of "wang" from the index database according to the acquired search account number of the "wang" such as an organization structure of the "wang" is an X branch company development department, when the "wang" searches for "lie four", a search keyword "LS" or "LISI" is input on the search engine interface, at this time, two "lie four" are searched, wherein the first organization of the "lie four" is an X branch company personnel department, and the second organization of the "lie four" is a Y branch company development department; the search engine respectively compares the association degree between the organization structure of Wangzao and each organization structure of Liquan, the first Liquan and Wangzhi belong to different departments of the same branch, the second Liquan and Wangzhi belong to the same department of different branches, since the association degree between persons in different departments of the same division is usually higher than that between persons in the same department of different divisions, namely, the association degree of the Wangzao and the first Liquan is higher than that of the Wangzao and the second Liquan, therefore, when the search engine ranks two "lie four", the "lie four" belonging to a different department of the same division as the "wang" will be ranked before the "lie four" belonging to the same division as the "wang", i.e., the first "lie four" will be ranked before the second "lie four".
It should be noted that, in the present embodiment, when the search keyword is a first pinyin letter or a full pinyin, the case is not distinguished.
In this embodiment, the search engine respectively compares the association degrees between the organization structure of the searcher corresponding to the search account and the organization structure corresponding to each target information, arranges the target information with high association degree with the searcher in front, and orders at least two target information in sequence from high to low according to the association degrees, so that the ordering result is more reasonable and ordered.
In an optional implementation manner, if the target information is the target contact, the search module 2 is specifically configured to search the target contact according to at least one pinyin of the contacts in the database if the search request is the pinyin of the target contact. The adding module 4 is used for adding other pinyins except the current pinyin for the contact person in the database if the contact person in the database comprises the polyphone. Specifically, if the contact is a pinyin, the search engine can search the target contact in the index database according to the pinyin first letter or the pinyin full pinyin of the contact; if the contact is a polyphone (i.e. the contact has multiple pinyins or the same pinyin has multiple chinese characters, e.g. "single new" has two pinyins, i.e. shanxin and danxin; and the pinyin "wangxuan" corresponds to multiple different chinese characters, such as "wangxuan", etc.), then other pinyins except the current pinyin are added to the contact in the index database, and then the search engine searches the target contact in the index database according to the pinyin initial or the pinyin full spelling of the contact, thereby avoiding the situation that the search engine cannot hit the target contact when searching the contact because the polyphone has no acknowledged pronunciation in the name, or cannot hit the target contact when inputting the homophone with the wrong character, and improving the hit rate and accuracy of the search result.
For example, taking a person search of an enterprise as an example, the information search method in the present embodiment is further described.
In a specific implementation process, a search engine acquires personnel information of each upstream system and stores the personnel information into an index database, for example, the search engine acquires personnel information in systems such as company personnel, seat management, extension management and the like; the personnel information may be at least one of a job number, a Chinese name, an English name, a mailbox, a telephone, a seat, an extension number, an operator number, and an organization structure, and may also be other information, which is not specifically limited herein.
Further, in the embodiment, the Chinese in the Name field in the database is copied to the Chinese _ Name field, other fields are copied to the Foreign _ Name field, and the search engine adopts different preprocessing logics and word segmenters for the Chinese _ Name field and the Foreign _ Name field respectively. It should be noted that, if special optimization processing is to be performed on multiple languages such as chinese, english, japanese, korean, and the like, the Foreign _ Name can be disassembled into the Name field of each country according to actual situations so as to facilitate search engine optimization.
If the staff information in the index database has polyphones, adding other pinyins except the current pinyin for the polyphone staff information in the index database, for example, if the Name has polyphones, adding additional py1_ Name and py2_ Name in the database, specifically, calculating multiple readings of the polyphone from the Chinese _ Name by using the Pinyin4j packet of Java and storing the multiple readings into related fields, and similarly, for the Pinyin full pinyin, adding Pinyin1_ Name, Pinyin2_ Name and the like in the index database. For example, the surname is "single pin" has two pinyins, and the current pinyin of the Name in the index database has the pinyin initials py1_ Name of "SJ" and the pinyin full pin pinyin1_ Name of "SHANJIE", at which time, other pinyins are added in the index database in addition to the current pinyin of the Name, i.e., the pinyin initials py2_ Name of "DJ" and the pinyin full pin pinyin2_ Name of "DANJIE", where the added pinyin initials and pinyin full pins are not case-sensitive.
It should be noted that, in the present embodiment, related fields are added on the basis of the original fields, the original fields are not modified, and the newly added polyphone fields are entered into the organization structure of the original name, so that the organization structure of the newly added polyphone and the organization structure of the original name can correspond to each other, which not only increases the friendliness of the search engine, but also ensures that the data of the upstream system can be matched with the data of the downstream system.
And step two, searching the target contact in the database by the search engine according to the received search request.
Before searching, the search engine of the embodiment uses an IK word segmentation device for a Chinese _ Name field in an index database, uses edge _ ngram, ngram and the like for a job number, an English Name, a mailbox, a telephone, an agent, a extension number, an operator number and the like, and uses a pattern word segmentation device for an organization architecture, so that the leader job number and the organization Name can form independent words.
When searching a target contact, a search engine is specifically divided into two-stage dsql query, firstly, first-letter matching query is carried out on fields such as a job number, a mailbox, a telephone, a seat, an extension number, an operator number, a pinyin first letter and the like, and when no hit exists in the first-stage search, a more comprehensive (more matching fields and more comprehensive matching modes) qqqqqqqqql query is used for improving the query speed; a boost attribute should be set for each query condition in the qdsl of the two-level search, and the boost attribute is used for improving the authority of each dimension attribute, and the numerical value and the weight relative value between each attribute need to be repeatedly tested and verified according to an actual data set.
And step three, if at least two target contacts are searched, sequencing the target contacts according to an organization structure corresponding to the target contacts in the index database.
In this embodiment, when receiving a search request from a searcher, a search engine may obtain the job number of the searcher and the organization structure of the searcher, and when performing the two-stage dsql query, the leader _ Path and organization _ Path of the searcher are all taken as match conditions of the relevant fields in the query conditions. And respectively comparing the association degree between the organization architecture corresponding to the searcher and the organization architecture corresponding to each target contact by the search engine. And at least two target contacts are sorted according to the relevance, so that the target contacts can be searched with pertinence and accuracy, the hit rate of searching is improved, and the sorting accuracy is improved.
In this embodiment, the boost values of the two fields, i.e., the leader _ Path and the organization _ Path, in the search condition should be similar to the boost values of other conventional matching fields, where the weight of the leader _ Path is slightly higher than that of the organization _ Path (where the boost values of various attributes need to be repeatedly measured).
leader _ Path is a job number sequence from the highest leader of the company to oneself, and the fields are similar: c0001 (board Leader number)/C1001 (CEO number)/C1101 (department responsible employee number)/C1111 (employee number), which expresses a report relationship tree between persons, and a search engine can use this information to rank a person who belongs to a Leader with himself in front, thereby improving the hit rate.
Organization _ Path is the Organization structure tree of a company, and a search engine can use the information to arrange the people who belong to the Organization in front of the Organization, so that the hit rate is improved. This field is similar:
1. head office _00a 1/management _00a2/X division _00a 3/technology _00b 1/research & development _00b 2/test team _00b 3;
2. head office _00a 1/management _00a2/Y division _00a 3/technology _00c 1/research & development _00c 2/test team _00c 3;
3. head office _00a 1/management _00a2/X affiliate _00a3/HR _00d 1/recruitment team _00d 2/interviewer team _00d 3;
in the embodiment, a signature mechanism similar to a block chain is introduced, and the concept of signature verification of a previous block by a next block enhances the identification of each node in organization _ Path, specifically, an auxiliary field "_ 00a 1" is added behind each organization architecture name in an index database, and when a search engine compares the association degree of the organization architecture of a searcher and the organization architecture of a target contact, the association degree of the searcher and the target contact can be more accurately obtained by identifying and comparing the auxiliary fields in the organization architecture of the department by the search engine, thereby avoiding the sorting error caused by the same organization name of different branch companies.
The embodiment updates the index database of the search engine once every preset time, and specifically, updates the data in the index database by adopting a mode of newly creating an index and deleting an old index so as to maintain data updating, generates a brand new index by naming the current timestamp for each updating, deletes the alias of the old index after the preparation of the new index is finished, newly creates the alias for the new index, and deletes the old index and the internal data. Smooth switching and system simplicity in each data update process are guaranteed. The preset time may be set to 2 hours, and may be set to other values.
According to the method and the device, the target information is searched in the database according to the received search request, and if at least two pieces of target information are searched, the target information is sequenced according to the organization structure corresponding to the target information in the database, so that the sequencing of the search results is optimized, and the condition that the sequencing is disordered is avoided; furthermore, other pinyins except the current pinyin are added to the contact person in the data, and the target contact person is searched according to at least one pinyin of the contact person in the database, so that the hit rate and the accuracy of the search result are improved.
Example 3
Fig. 4 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the information search method of embodiment 1 when executing the computer program. The electronic device 30 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the information search method provided in embodiment 1 of the present invention, by executing the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, the resulting device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via a network adapter 36. As shown in FIG. 4, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of the information search method provided in embodiment 1.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps of implementing the information search method described in embodiment 1 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. An information search method, characterized in that the information search method comprises:
receiving a search request;
searching target information in a database according to the search request;
and if at least two pieces of target information are searched, sequencing the target information according to an organization structure corresponding to the target information in the database.
2. The information search method of claim 1, wherein the step of ranking the target information according to an organizational schema in the database corresponding to the target information comprises:
acquiring a search account corresponding to the search request;
acquiring an organization architecture corresponding to the search account from the database;
respectively comparing the association degrees between the organization structure corresponding to the search account and the organization structure corresponding to each piece of target information;
and sequencing the target information according to the relevance.
3. The information searching method according to claim 1, wherein if the target information is a target contact, the step of searching the target information in the database according to the search request specifically includes:
and if the search request is the pinyin of the target contact person, searching the target contact person according to at least one pinyin of the contact persons in the database.
4. The information search method according to claim 3, further comprising:
if the contact person in the database comprises polyphone characters, adding other pinyin except the current pinyin for the contact person in the database.
5. An information search system is characterized by comprising a receiving module, a search module and a sorting module;
the receiving module is used for receiving a search request;
the searching module is used for searching target information in a database according to the searching request;
the sorting module is used for sorting the target information according to an organization structure corresponding to the target information in the database if at least two pieces of target information are searched.
6. The information search system according to claim 5, wherein the sorting module includes a first obtaining unit, a second obtaining unit, a comparing unit, and a sorting unit;
the first acquisition unit is used for acquiring a search account corresponding to the search request;
the second obtaining unit is used for obtaining an organization structure corresponding to the search account from the database;
the comparison unit is used for respectively comparing the association degree between the organization architecture corresponding to the search account and the organization architecture corresponding to each piece of target information;
the sorting unit is used for sorting the target information according to the relevance.
7. The information search system of claim 5, wherein if the target information is a target contact, the search module is specifically configured to search for the target contact according to at least one pinyin for a contact in the database if the search request is a pinyin for the target contact.
8. The information search system of claim 7, further comprising an add module;
the adding module is used for adding other pinyin except the current pinyin for the contact person in the database if the contact person in the database comprises polyphone characters.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the information search method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the information search method according to any one of claims 1 to 4.
CN202110424393.9A 2021-04-20 2021-04-20 Information search method, system, device and medium Pending CN113010585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110424393.9A CN113010585A (en) 2021-04-20 2021-04-20 Information search method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110424393.9A CN113010585A (en) 2021-04-20 2021-04-20 Information search method, system, device and medium

Publications (1)

Publication Number Publication Date
CN113010585A true CN113010585A (en) 2021-06-22

Family

ID=76388747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110424393.9A Pending CN113010585A (en) 2021-04-20 2021-04-20 Information search method, system, device and medium

Country Status (1)

Country Link
CN (1) CN113010585A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100070488A1 (en) * 2008-09-12 2010-03-18 Nortel Networks Limited Ranking search results based on affinity criteria
US20160357756A1 (en) * 2015-06-02 2016-12-08 Gartner Inc Methods and apparatus for integrating search results of a local search engine with search results of a global generic search engine
CN107155362A (en) * 2014-08-29 2017-09-12 邻客音公司 The search results ranking that will be inquired about for members profiles
CN109033386A (en) * 2018-07-27 2018-12-18 天津字节跳动科技有限公司 Search ordering method, device, computer equipment and storage medium
CN110083677A (en) * 2019-05-07 2019-08-02 北京字节跳动网络技术有限公司 Searching method, device, equipment and the storage medium of contact person

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100070488A1 (en) * 2008-09-12 2010-03-18 Nortel Networks Limited Ranking search results based on affinity criteria
CN107155362A (en) * 2014-08-29 2017-09-12 邻客音公司 The search results ranking that will be inquired about for members profiles
US20160357756A1 (en) * 2015-06-02 2016-12-08 Gartner Inc Methods and apparatus for integrating search results of a local search engine with search results of a global generic search engine
CN109033386A (en) * 2018-07-27 2018-12-18 天津字节跳动科技有限公司 Search ordering method, device, computer equipment and storage medium
CN110083677A (en) * 2019-05-07 2019-08-02 北京字节跳动网络技术有限公司 Searching method, device, equipment and the storage medium of contact person

Similar Documents

Publication Publication Date Title
CN109754233B (en) Method and system for intelligently recommending position information
US11789952B2 (en) Ranking enterprise search results based on relationships between users
CN108509547B (en) Information management method, information management system and electronic equipment
US20200073953A1 (en) Ranking Entity Based Search Results Using User Clusters
US10839162B2 (en) Service management control platform
CN105373365B (en) For managing the method and system of the archives about approximate string matching
US6931408B2 (en) Method of storing, maintaining and distributing computer intelligible electronic data
US20120166414A1 (en) Systems and methods for relevance scoring
EP2503477B1 (en) A system and method for contextual resume search and retrieval based on information derived from the resume repository
CN109241259B (en) ER model-based natural language query method, device and system
CN112035599B (en) Query method and device based on vertical search, computer equipment and storage medium
CN109359113B (en) Tax payment report checking method and device, storage medium and server
Feng et al. Practical duplicate bug reports detection in a large web-based development community
CN115470338B (en) Multi-scenario intelligent question answering method and system based on multi-path recall
CN111914066B (en) Global searching method and system for multi-source database
CN114722137A (en) Security policy configuration method and device based on sensitive data identification and electronic equipment
CN111125116A (en) Method and system for positioning code field in service table and corresponding code table
CN113010585A (en) Information search method, system, device and medium
Zhu et al. A data cleaning method for heterogeneous attribute fusion and record linkage
Nguyen et al. A vietnamese natural language interface to database
CN114328524A (en) Document processing method, query method, system, equipment and medium
CN112380264A (en) Policy analysis and matching method and device based on personal full life cycle
CN113239177A (en) Knowledge point query method, knowledge point query device, knowledge point query server, knowledge point query medium and product
Hettiarachchi et al. SPARCL: An improved approach for matching Sinhalese words and names in record clustering and linkage
CN113204696A (en) Retrieval method of intelligent search engine based on text atlas

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