Method and device for sorting and displaying query data

By calculating weights based on department path length in office scenarios and displaying articles related to keywords in order, the problem of different articles in the existing technology being ranked first, and data query efficiency is improved.

CN118939889APending Publication Date: 2024-11-12BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310524790.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In office scenarios, it is difficult for the existing technology to effectively sort and display articles related to keywords, resulting in dissimilar articles ranking first, reducing the efficiency of data search.

Method used

By receiving search instructions containing accounts and keywords, searching for results in a preset article library, and determining the weight of each search result based on the path length of the department in the organization tree, sorting and displaying departments from the same or work content close to each other. Articles.

Benefits of technology

It improves the efficiency of data query in office scenarios, puts the most similar articles at the forefront, and improves the efficiency of users' search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939889A_ABST
    Figure CN118939889A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for sorting and displaying query data, and relates to the technical field of data processing. The method comprises the steps of receiving a search instruction used for indicating search based on a keyword, wherein the search instruction carries a currently used account number and the keyword; based on a keyword in the search instruction, searching in a preset article library to obtain at least one search result, the search result comprising an article and an author name of the article; determining a first department to which an account carried in the search instruction belongs and a second department to which an author name in each search result belongs; according to the path length of each second department and the first department in the organization tree, the weight corresponding to each search result is determined, and the path length is used for representing the closeness degree of the work content of the two departments; and sorting and displaying the search results based on the weight corresponding to each search result. According to the invention, the efficiency of data search in an office scene can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and device for sorting and displaying query data. Background Art

[0002] With the development of technology, users often enter keywords on the search page to search for content related to the keyword, and then sort and display the searched content.

[0003] In related technologies, when a search instruction is received for instructing a keyword-based search, a search is performed in a preset article library based on the keyword in the search instruction to obtain at least one search result, and the search results are sorted and displayed according to the number of times the keyword appears in the article, so that users can quickly view the documents most similar to the keyword.

[0004] However, in an office scenario, articles from the same department or departments with similar work content are often the most similar. In this way, based on the above method, dissimilar articles may be ranked at the front, resulting in low data search efficiency. Summary of the Invention

[0005] In view of this, the present application provides a method and device for sorting and displaying query data, which can improve the efficiency of data search in office scenarios.

[0006] To achieve the above objectives, this application mainly provides the following technical solutions:

[0007] In a first aspect, the present application provides a method for sorting and displaying query data, the method comprising:

[0008] receiving a search instruction for instructing a keyword-based search, wherein the search instruction carries a currently used account and keywords;

[0009] Based on the keywords in the search instruction, searching in a preset article library to obtain at least one search result, the search result including an article and the author name of the article;

[0010] Determining the first department to which the account carried in the search instruction belongs, and the second department to which the author name in each search result belongs;

[0011] Determine a weight corresponding to each search result based on the path length between each second department and the first department in the organizational tree, wherein the path length is used to indicate the closeness of the work contents of the two departments;

[0012] The search results are sorted and displayed based on the weight corresponding to each search result.

[0013] In a second aspect, the present application provides a device for sorting and displaying query data, the device comprising:

[0014] a receiving unit, configured to receive a search instruction for instructing a keyword-based search, wherein the search instruction carries a currently used account and keywords;

[0015] A search unit, configured to search a preset article library based on the keywords in the search instruction to obtain at least one search result, wherein the search result includes at least an article and the author name of the article;

[0016] a first determining unit, configured to determine a first department to which the account carried in the search instruction belongs, and a second department to which the author name in each search result belongs;

[0017] a second determining unit, configured to determine a weight corresponding to each search result based on a path length between each second department and the first department in the organizational tree, wherein the path length is used to indicate a degree of similarity between the work contents of the two departments;

[0018] The display unit is used to sort and display the search results based on the weight corresponding to each search result.

[0019] In a third aspect, the present application also provides an electronic device comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method for sorting and displaying query data according to the first aspect above.

[0020] In a fourth aspect, the present application provides a storage medium for storing a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for sorting and displaying query data described in the first aspect.

[0021] By means of the above technical solution, the present application provides a method and apparatus for sorting and displaying query data, comprising: receiving a search instruction for instructing a keyword-based search, wherein the search instruction carries a currently used account and a keyword; searching a preset article library based on the keyword in the search instruction to obtain at least one search result, wherein the search result includes at least an article and the author name of the article; determining the first department to which the account carried in the search instruction belongs, and the second department to which the author name in each search result belongs; determining a weight corresponding to each search result based on the path length between each second department and the first department in the organizational tree, wherein the path length is used to represent the degree of proximity between the work contents of the two departments; and sorting and displaying the search results based on the weight corresponding to each search result. Since the path length is used to represent the degree of proximity between the work contents of the two departments, the weight calculated based on the path length essentially represents the degree of proximity to the work content of the department to which the current account belongs, that is, the greater the weight corresponding to the search result, the closer it is to the work content of the department to which the current account belongs, and the smaller the weight corresponding to the search result, the less close it is to the work content of the department to which the current account belongs. In this way, when sorting based on weight, articles from the same department or those with similar work content can be placed at the front, and in an office scenario, the most similar articles can be placed at the front, thereby improving the efficiency of data query in the office scenario.

[0022] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0024] Figure 1 A flowchart of a method for sorting and displaying query data disclosed in this application;

[0025] Figure 2 A schematic diagram of a method for sorting and displaying query data disclosed in this application;

[0026] Figure 3 A flowchart of a method for determining weights corresponding to search results disclosed in this application;

[0027] Figure 4 This is a flowchart of another method for determining weights corresponding to search results disclosed in this application;

[0028] Figure 5 This is a flowchart of another method for determining weights corresponding to search results disclosed in this application;

[0029] Figure 6 A flowchart of another method for determining search results disclosed in this application;

[0030] Figure 7 This is a structural diagram of a device for sorting and displaying query data disclosed in this application;

[0031] Figure 8 This is a structural diagram of another device for sorting and displaying query data disclosed in this application;

[0032] Figure 9 This is a block diagram of a device disclosed in this application. DETAILED DESCRIPTION

[0033] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0034] With the development of technology, users can enter keywords on the search page to search for content related to the keyword and sort and display the searched content.

[0035] In related technologies, when a search instruction is received for instructing a keyword-based search, a search is performed in a preset article library based on the keyword in the search instruction to obtain at least one search result, and the search results are sorted and displayed according to the number of times the keyword appears in the article, so that users can quickly view the documents most similar to the keyword.

[0036] However, in an office scenario, articles from the same department or departments with similar work content are often the most similar. In this way, based on the above method, dissimilar articles may be ranked at the front, resulting in low data search efficiency.

[0037] In order to solve the above problems, the embodiment of the present application provides a method for sorting and displaying query data, which can improve the efficiency of data query. The specific execution steps are as follows: Figure 1 As shown, including:

[0038] Step 101: Receive a search instruction for instructing to search based on keywords.

[0039] The search command carries the currently used account and keywords.

[0040] In a specific implementation of this step, a search engine is provided on the terminal. A user can register an account on the search engine and log in to the search engine using the registered account. Later, when the user needs to use the search engine to search, the user can click the search engine on the terminal. In response to the user's click, the terminal interface displays the search engine's search page, which includes a search box and a search button. The user can enter keywords in the search box and click the search button. When the user clicks the search button, the search engine obtains the keywords entered in the search box and the account used, and generates a search instruction based on the keywords and account.

[0041] Step 102: Based on the keywords in the search instruction, search in a preset article library to obtain at least one search result.

[0042] The search results include at least the article and the author name of the article. The search results may also include information such as the field to which the article belongs, the abstract, and the title, etc., which are not limited to this step.

[0043] In a specific implementation of this step, a keyword in the search instruction is obtained, and based on the keyword, articles containing the keyword are searched in the article library, and the author names of these articles are obtained. Afterwards, each found article and corresponding author name is used as a search result.

[0044] Step 103: Determine the first department to which the account carried in the search instruction belongs, and the second department to which the author name in each search result belongs.

[0045] The first department is the department to which the account belongs, and the second department is the department to which the author name belongs. The two can be the same department or different departments.

[0046] In a specific implementation of this step, after obtaining the currently used account, the search engine can also determine the username of the user using the search engine based on the account. Based on the username and the preset name-department correspondence, the first department to which the username belongs is determined, and this department is determined as the first department to which the account belongs. Simultaneously, for each search result, the author name in the search result is obtained, and based on the author name and the name-department correspondence, the second department to which the author name belongs is determined.

[0047] The search engine used above is developed by a company. The search engine is provided with a correspondence between the name and department of each employee in the company. In this way, the department to which the employee belongs can be determined based on the acquired name.

[0048] In the above process, only employees of the company can determine the department corresponding to the employee name. If the author name in a search result is not an employee of the company, the department to which the author name belongs will not be determined, and the weight corresponding to the search result will not be determined. For such a search result, you can delete it to not display the search result, or you can set the weight corresponding to such a search result to 0. When there are multiple such search results, these search results can be sorted and displayed according to the frequency of keyword occurrence. Of course, other sorting methods can also be used to sort and display these search results, and these are not limited here.

[0049] In addition, since articles published by leaders are more representative and authoritative, this application can only determine the weights corresponding to search results that include articles published by leaders, and not the weights corresponding to other search results. Therefore, the second department to which the author name in each search result belongs can be determined based on the pre-set correspondence between the leader name and the department.

[0050] Step 104 : Determine the weight corresponding to each search result according to the path length between each second department and the first department in the organizational tree.

[0051] Among them, the path length is used to indicate the closeness of the work content of two departments. The organizational structure includes the connection lines between departments and adjacent departments, such as Figure 2 As shown. When the number of connections between two departments is smaller, the path between the two departments is shorter, the likelihood of overlap between the two departments' work content is greater, and the work content of the two departments is closer. When the number of connections between two departments is larger, and the path between the two departments is longer, the likelihood of overlap between the two departments' work content is smaller, and the work content of the two departments is closer. For example, the number of connections between Department 1.1.1 and Department 1.1 is the smallest, the path between the two departments is the shortest, and the work content of the two departments is the closest. The number of connections between Department 1.1.1 and Department 1.2.1 is the largest, the path between the two departments is the longest, and the work content of the two departments is the least similar. Path length and weight are negatively correlated. That is, the longer the path, the smaller the weight, and the shorter the path, the larger the weight.

[0052] In a specific implementation of this step, the degree of proximity between each second department and the first department in terms of work content is determined based on the path length between each second department and the first department in the organizational tree. Based on the degree of proximity between each second department and the first department in terms of work content, a weight is determined for each second department, which is then used as the weight corresponding to each search result.

[0053] Step 105: sort and display the search results based on the weight corresponding to each search result.

[0054] In a specific implementation of this step, the weight corresponding to each search result is sorted to obtain a sorted result, and the search results are sorted and displayed according to the sorted result, so that the user can view the most similar articles first.

[0055] In addition, this application can also first create a correspondence between departments and weights for each account and store the correspondence. When searching based on keywords, the department to which the author name in each search result belongs can be determined based on the author name in each search result and the pre-set correspondence between the name and department. Afterwards, based on the pre-created correspondence between the department and weight, the weight corresponding to the author name in each search result is determined, and the weight corresponding to each search result is obtained. Then, based on the weight corresponding to each search result, the search results are sorted and displayed.

[0056] The preset correspondence between names and departments may be only the correspondence between the leader's name and the department, or may be the correspondence between all employees and departments.

[0057] The specific process of creating the correspondence between name and weight is as follows: determine the first department to which the account belongs, and based on the path length between each department and the first department in the organizational tree, determine the weight corresponding to each department, and obtain the correspondence between the department and the weight.

[0058] Alternatively, if only the weights corresponding to search results that include articles published by leaders are to be determined, a correspondence between the leader's name and weight can be created for each account and stored. When searching based on keywords, the weight corresponding to each search result can be determined based on the author name in each search result and the pre-set correspondence between the leader's name and weight. The search results can then be sorted and displayed based on the weights corresponding to each search result.

[0059] In an embodiment of the present application, a search instruction for instructing a keyword-based search is received, wherein the search instruction carries a currently used account and a keyword; based on the keyword in the search instruction, a search is performed in a preset article library to obtain at least one search result, wherein the search result includes at least an article and the author name of the article; the first department to which the account carried in the search instruction belongs and the second department to which the author name in each search result belongs are determined; the weight corresponding to each search result is determined based on the path length between each second department and the first department in the organizational tree, wherein the path length is used to represent the degree of proximity between the work content of the two departments; and the search results are sorted and displayed based on the weight corresponding to each search result. Since the path length is used to represent the degree of proximity between the work content of the two departments, the weight calculated based on the path length essentially represents the degree of proximity to the work content of the department to which the current account belongs, that is, the greater the weight corresponding to the search result, the closer the work content of the department to which the current account belongs, and the smaller the weight corresponding to the search result, the less similar the work content of the department to which the current account belongs. In this way, when sorting based on the weight, articles from the same department or departments with similar work content can be ranked first, and in an office scenario, the most similar articles can be ranked first, thereby improving the efficiency of data query.

[0060] Furthermore, the present application provides a method for determining the weight corresponding to the search results. The method is used to determine the weight corresponding to each search result. The specific steps are as follows: Figure 3 As shown, including:

[0061] Step 301 : Determine the first position of the first department in the organization tree, and the second position of each second department in the organization tree.

[0062] In a specific implementation of this step, the first department is found in the organization tree, and the first position corresponding to the first department in the organization tree is determined. Similarly, the second department is found in the organization tree, and the second position corresponding to the second department in the organization tree is determined.

[0063] For example, Figure 2 As shown, let the first department be department 1.1.1 and the second department be department 1.2.1. The position corresponding to department 1.1.1 is determined as the first position, and the position corresponding to department 1.2.1 is determined as the second position.

[0064] Step 302: Determine the length of a path from a first location to each second location in the organization tree.

[0065] In the specific implementation of this step, Figure 2As shown, the line between two adjacent departments represents the path length between the two departments, and one line represents 1. When the first department is department 1.1.1 and the second department is department 1.2.1, there are four lines between the first position of the first department and the second position of the second department, and the path length between the two departments is 4.

[0066] Step 303: Calculate the weight corresponding to each search result based on the path length from the first location to each second location and a preset formula.

[0067] In this step, the path length and weight are negatively correlated. That is, the longer the path, the smaller the corresponding weight, and the shorter the path, the larger the corresponding weight. For example, the path length and weight are negatively proportional, so the weight calculation formula is n = 1 / L, where n is the weight and L is the path length. Alternatively, if the maximum weight is set to m, the weight calculation formula is n = 1 / L*m.

[0068] In addition, since the path length used in the above calculation formula cannot be 0, but the actually determined path length may be 0, in order to determine the corresponding weight for each path length, the weight calculation formula can be set to n = 1 / (L + a) * m, where n is the weight, m ​​is the maximum weight, L is the path length, and a is a positive integer greater than 0.

[0069] Furthermore, when there are multiple authors of an article, the present application provides a method for determining the weight corresponding to the search results. The specific steps of the method are as follows: Figure 5 As shown, including:

[0070] Step 401: When the article in the search result corresponds to multiple author names, determine the second department to which each author name belongs.

[0071] Step 402: Determine the path length between each second department and the first department in the institutional organization tree, and determine the weight corresponding to each author name.

[0072] The specific implementation of this step is the same as the method of determining the weight in step 303, and will not be repeated here.

[0073] Step 403: Obtain the weight corresponding to the corresponding search result according to the weight corresponding to each author name.

[0074] In a specific implementation of this step, the weights corresponding to each author name may be added together to obtain the weight corresponding to the search result, or the average value of these weights may be determined as the weight corresponding to the search result.

[0075] Furthermore, the present application also provides a method for determining the weight corresponding to the search results. Figure 1 The specific description of step 102 in the embodiment is as follows: Figure 5 As shown, including:

[0076] Step 501: Get the label of the department to which the author name belongs in each search result, and obtain the label corresponding to each search result.

[0077] The label is used to indicate the author's position in the department, for example, the label is employee or the leader of the department, such as the label is the leader of department 1.1 or the label is an employee in department 1.1.

[0078] In a specific implementation of this step, the electronic device also stores the tags corresponding to each person in the company. Thus, when the author name in each search result is obtained, the tag of the author name in each search result is determined based on the tags corresponding to each person, and the tag is determined as the tag of each search result.

[0079] Step 502: Determine the weight corresponding to each search result based on the weight and label corresponding to each search result.

[0080] In the specific implementation of this step, since articles published by leaders are more representative, articles written by leaders can be ranked first. Therefore, when a search result is tagged as a leader of a department, the weight corresponding to the search result can be increased or not adjusted. When a search result is tagged as an employee of the department, the weight corresponding to the search result can be reduced.

[0081] Step 503: When the tag is used to indicate that the author name is an employee name, the weight corresponding to the search result is adjusted based on a preset adjustment rule to obtain the weight corresponding to the search result.

[0082] In a specific implementation of this step, the preset adjustment rule may be to increase the weight corresponding to the search result by a preset value, for example, to increase the weight corresponding to the search result by 0.5. Alternatively, the preset adjustment rule may be other rules for increasing and adjusting the weight corresponding to the search result.

[0083] For example, Figure 2 As shown, assume that the first department to which the account carried in the search instruction belongs is department 1.1.1, and the person whose author name is in a search result is in department 1.2.1. Figure 3 In the embodiment described above, the weight corresponding to the search result may be determined to be 4. When the tag of a search result is the leader of a department, the weight corresponding to the search result may be increased to 4.5.

[0084] Step 504: When the tag is used to indicate that the author name is a leader name, the weight corresponding to the search result is not adjusted.

[0085] Furthermore, the present application provides a method for determining search results. Figure 1 Step 102 in the embodiment is as follows: Figure 6 As shown, including:

[0086] Step 601: Generate query conditions according to the search instruction.

[0087] The search instruction may include at least one search dimension and keywords corresponding to each search dimension. The search dimension may be title, text, abstract, etc., which are used to indicate the part of the article to be searched.

[0088] In a specific implementation of this step, when a user enters a keyword, they can also set the search dimension corresponding to the keyword. When the user clicks the search button, a search instruction is generated based on the input keyword, the search dimension set for the keyword, and the currently used account. A search dimension and the keyword corresponding to the search dimension are then used as a query condition. In this way, at least one query condition can be generated based on the search instruction.

[0089] For example, when the search instruction includes three search dimensions, three query conditions are generated according to the keywords corresponding to the three search dimensions respectively.

[0090] Step 602: Check whether the preset query parameters are obtained.

[0091] The preset query parameters are used to indicate that the search results must meet all query conditions. The preset query parameters may be pre-set by a technician or may be set by a user according to his or her needs when using a search engine.

[0092] In a specific embodiment of this step, if the query parameter is set by the user, the search instruction carries the query parameter, so that the query parameter can be obtained from the search instruction to determine whether the query parameter is a preset query parameter. If the query parameter is pre-set by a technician, the query parameter can be obtained at the pre-set location to determine whether the query parameter is a preset query parameter.

[0093] For example, the preset query parameter is a must parameter, so it is necessary to determine whether the query parameter is a must parameter.

[0094] Step 603: If yes, search in a preset article library to find articles that meet all the query conditions and obtain at least one search result.

[0095] In a specific implementation of this step, if the query parameter is a preset query parameter, it means that the queried article needs to meet all query conditions. In this way, it is necessary to find articles that meet all query conditions and obtain search results based on the found articles.

[0096] For example, there are two query conditions generated in step 401, namely query condition A and query condition B. The search dimension in query condition A is the title, and its corresponding keyword is standard. The search dimension in query condition B is the text, and its corresponding keyword is also standard. When it is detected that the query parameter is the preset query parameter, the article library is searched for articles that include standard in the title and also include standard in the text, and search results are obtained based on these articles.

[0097] Furthermore, as a response to the above Figure 1-6 The embodiment of the method shown in the figure is implemented. The embodiment of the present application provides a device for sorting and displaying query data, which can improve the efficiency of data query in office scenarios. The embodiment of the device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 7 As shown, the device includes:

[0098] The receiving unit 701 is configured to receive a search instruction for instructing a keyword-based search, wherein the search instruction carries a currently used account and a keyword;

[0099] A search unit 702 is configured to search a preset article library based on the keywords in the search instruction to obtain at least one search result, wherein the search result includes at least an article and the author name of the article;

[0100] A first determining unit 703 is configured to determine the first department to which the account carried in the search instruction belongs, and the second department to which the author name in each search result belongs;

[0101] A second determining unit 704 is configured to determine a weight corresponding to each search result based on a path length between each second department and the first department in the organizational tree, wherein the path length represents a degree of similarity between the work contents of the two departments;

[0102] The display unit 705 is configured to sort and display the search results based on the weight corresponding to each search result.

[0103] Optional, such as Figure 8 As shown, the second determining unit 704 includes:

[0104] A first determining module 7041 is configured to determine a first position of the first department in the organization tree, and a second position of each second department in the organization tree;

[0105] A second determining module 7042 is configured to determine the length of a path from the first position to each second position in the organization tree;

[0106] The calculation module 7043 is used to calculate the weight corresponding to each search result based on the path length from the first position to each second position and a preset formula.

[0107] Optional, such as Figure 8 As shown, the search unit 702 includes:

[0108] A generating module 7021 is configured to generate a query condition according to the search instruction, wherein the search instruction includes at least one search dimension and keywords corresponding to each search dimension;

[0109] A determination module 7022 is configured to detect whether a preset query parameter is obtained, wherein the preset query parameter is used to indicate that the search result must meet all query conditions;

[0110] The search module 7023 is used to search in a preset article library if yes, find articles that meet all the query conditions, and obtain at least one search result.

[0111] Optional, such as Figure 8 As shown, the device also includes:

[0112] The acquisition unit 706 is used to acquire the label of the department to which the author name belongs in each search result, and obtain the label corresponding to each search result;

[0113] The third determining unit 707 is configured to determine the weight corresponding to each search result according to the weight corresponding to each search result and the label.

[0114] Optional, such as Figure 8 As shown, the third determining unit 707 is further configured to:

[0115] When the tag is used to indicate that the author name is an employee name, the weight corresponding to the search result is adjusted based on a preset adjustment rule to obtain the weight corresponding to the search result.

[0116] When the tag is used to indicate that the author name is a leader name, the weight corresponding to the search result is not adjusted.

[0117] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the above Figure 1-6 The method for sorting and displaying query data described in .

[0118] Furthermore, the embodiment of the present application also provides a storage medium for storing a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 1-6 The method for sorting and displaying query data in .

[0119] Figure 9 is a block diagram of a device 90 provided in an embodiment of the present application. The device 90 includes at least one processor 901, and at least one memory 902 and a bus 903 connected to the processor 901; wherein the processor 901 and the memory 902 communicate with each other through the bus 903. The processor 901 is used to call the program instructions in the memory 902 to execute the above-mentioned method for sorting and displaying query data. The device in this article can be a server (for example: a local server or a cloud server), a smart phone, a tablet computer, a PDA, a portable computer, or a fixed terminal such as a desktop computer.

[0120] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] It is understood that the relevant features of the above methods and devices can be referenced to each other. In addition, the terms "first" and "second" in the above embodiments are used to distinguish between the embodiments, and do not represent the advantages and disadvantages of the embodiments.

[0122] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0123] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings herein. According to the above description, it is obvious that the structure required for constructing such systems is suitable. In addition, the application is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the application described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the application.

[0124] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0125] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0128] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0130] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0131] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for sorting and displaying query data, characterized in that: The method comprises: Receiving a search instruction for instructing to search based on keywords, wherein the search instruction carries a currently used account and keywords; Based on the keywords in the search instruction, searching in a preset article library to obtain at least one search result, the search result including an article and the author name of the article; Determine the first department to which the account carried in the search instruction belongs, and the second department to which the author name in each search result belongs; Determine the weight corresponding to each search result according to the path length between each second department and the first department in the organization tree, wherein the path length is used to indicate the closeness of the work contents of the two departments; The search results are sorted and displayed based on the weight corresponding to each search result.

2. The method according to claim 1, characterized in that Determining the weight corresponding to each search result according to the path length between each second department and the first department in the organization tree includes: respectively determining a first position of the first department in the institution organization tree and a second position of each second department in the institution organization tree; In the organization tree, determining the length of a path from the first position to each second position; The weight corresponding to each search result is calculated according to the path length from the first position to each second position and a preset formula.

3. The method according to claim 1, characterized in that: The step of searching in a preset article library based on the keywords in the search instruction to obtain at least one search result includes: Generate a query condition according to the search instruction, wherein the search instruction includes at least one search dimension and a keyword corresponding to each search dimension; Detecting whether a preset query parameter is obtained, wherein the preset query parameter is used to indicate that the searched result needs to satisfy all query conditions; If yes, a search is performed in a preset article library to find articles that meet all the query conditions and obtain at least one search result.

4. The method according to claim 1, characterized in that The method further comprises: Obtaining the label of the author name in each search result, and obtaining the label corresponding to each search result, wherein the label is used to indicate the status of the corresponding author name in the department to which it belongs; The weight corresponding to each search result is determined according to the weight corresponding to each search result and the label.

5. The method according to claim 4, characterized in that The step of determining the weight corresponding to each search result according to the weight corresponding to each search result and the label includes: When the tag is used to indicate that the author name is an employee name, the weight corresponding to the search result is adjusted based on a preset adjustment rule to obtain the weight corresponding to the search result; When the tag is used to indicate that the author name is a leader name, the weight corresponding to the search result is not adjusted.

6. A device for sorting and displaying query data, characterized in that: The device comprises: A receiving unit, configured to receive a search instruction for instructing to search based on a keyword, wherein the search instruction carries a currently used account and a keyword; A search unit, configured to search in a preset article library based on the keywords in the search instruction to obtain at least one search result, wherein the search result at least includes an article and the author name of the article; A first determining unit, configured to determine a first department to which the account carried in the search instruction belongs, and a second department to which the author name in each search result belongs; A second determining unit is used to determine the weight corresponding to each search result according to the path length between each second department and the first department in the organization tree, wherein the path length is used to indicate the similarity of the work contents of the two departments; The display unit is used to sort and display the search results based on the weight corresponding to each search result.

7. The device according to claim 6, characterized in that The second determining unit includes: A first determination module, used to respectively determine a first position of the first department in the institution organization tree, and a second position of each second department in the institution organization tree; A second determination module, used to determine the length of a path from the first position to each second position in the organization tree; The calculation module is used to calculate the weight corresponding to each search result according to the path length from the first position to each second position and a preset formula.

8. The device according to claim 6, characterized in that The search unit comprises: A generating module, configured to generate a query condition according to the search instruction, wherein the search instruction includes at least one search dimension and a keyword corresponding to each search dimension; A judgment module, used to detect whether a preset query parameter is obtained, wherein the preset query parameter is used to indicate that the search result needs to meet all query conditions; The search module is used to search in a preset article library if yes, find articles that meet all the query conditions, and obtain at least one search result.

9. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the method for sorting and displaying query data as described in any one of claims 1-5.

10. A readable storage medium, characterized in that: The storage medium is used to store a computer program, wherein when the computer program is running, it controls the device where the storage medium is located to execute the method for sorting and displaying query data according to any one of claims 1 to 5.