Method, device, electronic device and readable storage medium for implementing organizational structure view
By constructing an index file using full-text search technology and designing an organizational view with absolute encoding paths and name paths, the problems of slow response and low efficiency in the traditional lazy loading mode are solved, achieving fast retrieval and efficient rendering, improving user experience and search success rate.
Patent Information
- Application Number
- CN202011528464.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-12-22
AI Technical Summary
When constructing organizational tree structures, especially when there are many organizational levels, existing technologies require rendering requests layer by layer in the lazy loading mode, resulting in slow system response and poor user experience. Furthermore, traditional lazy loading and full loading modes are inefficient and pose performance risks when dealing with large amounts of data.
The index file is constructed using full-text search technology. The organizational view is designed using absolute encoding paths and absolute name paths. Combined with an open-source full-text search engine and a Chinese word segmenter, it achieves fast retrieval and rendering in lazy loading mode, extracts unique industry terms and synonyms, and improves search efficiency and accuracy.
It significantly improves the response speed and search success rate of organizational structure views, avoids the problems of layer-by-layer loading and rendering, provides a semantic search experience based on text similarity, and reduces database resource consumption and performance risks.
Smart Images

Figure CN112612845B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer organization management, and in particular to an organization view implementation method, device, electronic device and readable storage medium. Background Art
[0002] The organizational tree is used to clearly and intuitively reflect the superior-subordinate relationship in an organization. It is a common function control that is used frequently in daily management systems. The organizational tree can achieve two functions in use: one is to complete the rapid loading of the organizational tree based on the predefined relationship information between institutions; the other is to support efficient search and positioning based on keywords. At present, the construction of the organizational tree generally includes two modes: lazy loading (loading on demand or in layers, not loading all data) and full loading. Full loading is suitable for modes with few node trees. For national commercial banking organizations with a business scope covering the entire domain, the number of institutions reaches 100,000 and the number of records of relationships between institutions reaches 500,000. Considering performance and loading efficiency, only lazy loading mode can be used. The problem with the traditional lazy loading mode is that when there are many institutional levels, it may span multiple layers from the top level to the bottom level, such as 5 to 7 layers. When accurately locating an institution at the 7th layer based on search, it will need to request / render 6 times in series to complete the layer-by-layer expansion of the tree, resulting in slow system response and poor user experience. Summary of the invention
[0003] The purpose of this application is to solve at least one of the above technical defects. The technical solution adopted by this application is as follows:
[0004] In a first aspect, an embodiment of the present application discloses a method for implementing an organizational structure view, the method comprising:
[0005] Receive index file input by user;
[0006] Based on the full-text search technology, the index file is used to search and output the search results in the pre-built organizational structure view;
[0007] According to the retrieval results, the organizational relationship view rendering of the retrieval results is completed according to a preset loading mode.
[0008] Furthermore, the construction of the organizational view includes: obtaining entity information and entity relationship information of each institution; wherein the entity information includes institution code and institution name; the entity relationship information includes institution code, superior institution code, relationship type between the institution and the superior institution, absolute code path, absolute name path; wherein the relationship type between the institution and the superior institution includes administrative relationship and financial relationship; and constructing the organizational view using the obtained institution entity information and entity relationship information.
[0009] Furthermore, before receiving the index file input by the user, the method further includes:
[0010] The index file is constructed according to preset index construction rules and a pre-constructed organizational view based on a full-text search engine and a Chinese word segmenter; wherein the index file includes a first index file and a second index file; wherein the second index file is an index file constructed based on general keywords of a basic general dictionary.
[0011] Furthermore, the constructing of the first index file includes:
[0012] Step 1: Obtain target organization data; wherein the target organization belongs to a node of the organizational structure view;
[0013] Step 2: extracting industry keywords from the target institution data; wherein the keywords include but are not limited to the target institution's proprietary industry terms;
[0014] Step 3: Use a full-text search engine and a Chinese word segmenter to construct a first index file based on the industry keywords. The use of a full-text search engine and a Chinese word segmenter to construct a first index file based on the keywords further includes:
[0015] Step 3-1, obtain synonyms for each industry keyword;
[0016] Step 3-2: construct an industry dictionary based on the industry keywords, wherein the industry dictionary includes industry keywords and their synonyms;
[0017] Step 3-3: construct an index file of target industry keywords according to a word segmentation algorithm; wherein the index file of target industry keywords is a first index file.
[0018] Furthermore, the method includes: receiving user update instructions; controlling the system to update the index file of preset dimensions according to update rules based on the update instructions; wherein the preset dimensions include but are not limited to: organization code, organization name, relationship type, absolute code path, absolute name path, organization accounting level, organization type; the update rules include but are not limited to: updating the index file of the set dimension at the set update time.
[0019] Furthermore, the searching and outputting the search results in the pre-built organizational structure view by using the index file includes:
[0020] Step 1, loading the index file and constructing a search formula based on the index file; wherein the search formula includes the index file, relationship type information and search limit range information; further, the search limit range information includes the number of the top-level organization in the organization;
[0021] Step 2: Based on the open source full-text search engine and open source Chinese word segmenter, use basic general dictionaries and industry dictionaries to search in the organizational view;
[0022] Step 3: output the search result; wherein the search result includes at least one search result data.
[0023] Furthermore, after outputting the search results, the method further includes: arranging the preset number of search results in positive order according to the similarity scores between each data of the search results and the index. After arranging the preset number of search results in positive order, the preset number of search results arranged in positive order can also be sorted again according to a preset sorting rule; wherein the sorting rule includes:
[0024] Step 1: Calculate the similarity between the index input by the user and the institution name in the search results based on the open source full-text search engine;
[0025] Step 2: Analyze the user's search habits based on the user's historical search data collected in advance;
[0026] Step 3: sort the search results based on the user's search habits and the calculated similarity.
[0027] Furthermore, the rendering of the organizational relationship view of the search result according to the preset loading mode includes:
[0028] Step 1: receiving a user's selection instruction for at least one retrieval data in the retrieval results;
[0029] Step 2, the selected instruction completes the construction of the organizational relationship view of the selected retrieval organization according to the absolute coding path and / or absolute name path of the organization of the selected retrieval data, wherein the preset loading mode includes a lazy loading mode.
[0030] Furthermore, after the organization relationship view of the search result is rendered, the method further includes:
[0031] Step 1, receiving a user's query instruction for a subordinate institution of a selected search institution;
[0032] Step 2: According to the query instruction, all the lower nodes of the selected search organization are fully loaded in the organizational structure view.
[0033] On the other hand, an embodiment of the present application provides a device for implementing an organizational structure view, the device comprising: an input module, a storage module, a retrieval module, an output module and a rendering module; wherein:
[0034] The input module is used to receive the index file input by the user;
[0035] The storage module is used to store the pre-built organizational structure view;
[0036] The retrieval module is used to search in a pre-built organizational structure view using an index file based on a full-text retrieval technique;
[0037] The output module is used to output the search results;
[0038] The rendering module is used to complete the rendering of the organizational relationship view of the retrieval results according to the preset loading mode based on the retrieval results.
[0039] Furthermore, the device also includes a construction module, and the construction module further includes an acquisition unit and a construction unit, wherein the acquisition unit is used to acquire each institution entity information and entity relationship information; wherein the entity information includes an institution code and an institution name; the entity relationship information includes an institution code, a superior institution code, a relationship type between the institution and the superior institution, an absolute code path, and an absolute name path; wherein the relationship type between the institution and the superior institution includes an administrative relationship and a financial relationship; and the construction unit is used to construct an organizational structure view using the acquired institution entity information and entity relationship information.
[0040] Furthermore, the construction module is also used to construct the index file according to preset index construction rules and a pre-constructed organizational view based on a full-text search engine and a Chinese word segmenter; wherein the index file includes a first index file and a second index file; wherein the second index file is an index file constructed based on general keywords of a basic general dictionary.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
[0042] The memory is used to store operation instructions;
[0043] The processor is used to execute the method described in any of the above embodiments by calling the operation instruction.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0045] The beneficial effects brought by the organizational view implementation scheme provided in the embodiment of the present application include designing an absolute coding path and an absolute name path for each node in the organizational view, and thereby constructing an organizational view model, ensuring that when using the organizational view designed above for data loading and keyword search and positioning, it is possible to avoid loading data layer by layer and rendering layer by layer compared to the prior art, thereby greatly improving the response speed. At the same time, full-text retrieval technology is used to build index files and retrieve files, and in the creation of indexes, unique industry terms and synonyms are extracted in accordance with business scenarios to expand the scope of basic general indexes, and at the same time, a semantic search interaction experience based on text similarity is provided to users, greatly improving the search success rate; at the same time, based on the technical characteristics of full-text retrieval inverted indexes, the problem of fuzzy matching of traditional database string matching failing to hit the index and low query efficiency is avoided, and the performance risks of traditional fuzzy search based on relational database tables are eradicated. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0047] Figure 1 A flowchart of a method for implementing an organizational structure view provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a process of constructing a first index file provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of the structure of an organizational structure view implementation device provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0052] Those skilled in the art can understand that, unless otherwise stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to distinguish and define objects for the purpose of introducing the scheme clearly, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0053] In addition, it should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0054] In addition, in order to more clearly introduce the technical solution of the present application, some concepts, terms or devices that may be involved in the following embodiments are introduced below to help understand the implementation solution of the organizational structure view disclosed in the present application:
[0055] Full-text search technology refers to extracting part of the information in unstructured data, reorganizing it to make it have a certain structure, and then searching for this structured data, so as to achieve the purpose of relatively fast search. This process of first establishing an index and then searching the index is called full-text search. This part of information extracted from unstructured data and then reorganized is called index. For example: dictionary. The pinyin table and radical index table of the dictionary are equivalent to the index of the dictionary. The explanation of each word is unstructured. If the dictionary does not have a syllable table and a radical index table, you can only scan it sequentially to find a word in the vast dictionary. However, some information of the word can be extracted for structured processing, such as pronunciation, which is relatively structured. It is divided into initials and finals, and only a few can be listed one by one. So the pronunciation is taken out and arranged in a certain order, and each pronunciation points to the page number of the detailed explanation of this word. When we search, we search for the pronunciation according to the structured pinyin, and then according to the page number it points to, we can find our unstructured data-that is, the explanation of the word.
[0056] The current steps of loading and retrieving organizational hierarchical relationships in the organization tree can be briefly summarized as follows:
[0057] Step 1: The user enters a keyword to search and locate the results based on the keyword index in the organization tree;
[0058] Step 2: The system performs fuzzy matching of strings based on the relational database and locates the matching organization tree node set.
[0059] Step 3: The user selects an institution node
[0060] Step 4: The system obtains the path node set from the root node to the target node based on the node selected by the user
[0061] Step 5: Request the subordinate node data step by step according to the path node order of step 4 to complete the organization tree rendering in lazy loading mode.
[0062] In addition to the problems that both full loading and lazy loading have in the current organizational view implementation schemes in the prior art, these two loading modes also have some other problems. For example, the search method based on the fuzzy matching method of traditional relational data has the problem of not being able to hit the database index and low query efficiency. In addition, due to the high frequency of operation, it will also lead to large consumption of database resources and prominent performance risks. On the other hand, the solution based on fuzzy matching of key characters has strict requirements on the keywords entered by the user. For example, the input keyword "XX Technology" cannot match "XX", "YY Branch" cannot match "YY Provincial Branch", "Capital" cannot match "Beijing", "Three Gorges" cannot match "Sanmenxia", etc., and the search experience is poor. Based on this, the following embodiments of the present invention provide an organizational view implementation method to solve at least one of the above defects. In addition, the fuzzy query based on the relational database used in the organizational tree implementation and application scheme in the prior art is based on each row in the table, using a sequential scanning method, and returning the row records in the matching data table according to the matching of the input keyword and the target column string. In the case where the amount of data in the table is large and the front and back fuzzy matching cannot hit the index, the efficiency is low and the database pressure is high.
[0063] Figure 1 A schematic diagram of a process for implementing an organizational structure view provided in an embodiment of the present application is shown. Figure 1 As shown, the method may mainly include:
[0064] S100. According to the preset index construction rules and the pre-constructed organizational structure view, the index file is constructed according to the full-text search engine and the Chinese word segmenter. The index file includes a first index file and a second index file; wherein the second index file is an index file constructed based on the general keywords of the basic general dictionary. The first index file is mainly to supplement the basic general dictionary that does not have an index. In some optional embodiments, step S100 can be omitted and step S101 can be directly applied using the already constructed index file, that is, directly accepting user input instructions to load the index file.
[0065] Figure 2 A schematic diagram of a process of constructing a first index file provided in an embodiment of the present application is shown. Figure 2 As shown, the construction of the first index file includes:
[0066] S201, obtaining target organization data; wherein the target organization belongs to a node of an organizational structure view;
[0067] S202, extracting industry keywords from the target institution data; wherein the keywords include but are not limited to the target institution's proprietary industry terms. Taking a bank organization as an example, extracting industry keywords from the target institution data can be to extract words that cannot be covered in a commonly used Chinese dictionary (basic general dictionary) based on a national commercial bank institution information database, and use them as a basis for full-text search to perform word segmentation extraction on the name of the institution to be searched (name of the target institution), for example, industry terms such as personal finance, housing finance, online finance, accounting, and financial planning can be sorted out and extracted.
[0068] S203, using a full-text search engine and a Chinese word segmenter to construct a first index file based on the industry keywords. The using a full-text search engine and a Chinese word segmenter to construct a first index file based on the keywords further includes:
[0069] Step 1: Get synonyms for each industry keyword;
[0070] Step 2: Construct an industry dictionary based on the industry keywords, wherein the industry dictionary includes industry keywords and their synonyms; in some embodiments, an industry term dictionary and an industry term synonym dictionary may be constructed separately, and a national commercial bank institution "institution name" synonym dictionary may be configured. When constructing synonyms for industry terms, the usage habits of the industry terms by ordinary users may be collected in a big data manner to construct synonyms, so that keywords with the same meaning but different writing styles input by different users can all be matched to the correct target institution, such as (finance, financial technology), (human resources, human resources), (accounting, financial accounting), (head office, head office), (personal finance department, personal finance department), (online finance department, network finance department), (channel transportation department, channel and operation management department, operation management department), etc.
[0071] Step 3: construct an index file of target industry keywords according to a word segmentation algorithm; wherein the index file of target industry keywords is the first index file.
[0072] S101, receiving an index file input by a user;
[0073] In an optional embodiment, before step S101, the method further includes step S100:
[0074] In an optional embodiment, the industry dictionary and the corresponding index keywords may be updated according to the update of the organizational data, and the updating method includes:
[0075] Step 1: Receive an update instruction from the user; wherein the update instruction may also be an update instruction pre-set by the user in the system settings;
[0076] Step 2: According to the update instruction control system, the index file of the preset dimension is updated according to the update rule; wherein the preset dimension includes but is not limited to: organization code, organization name, relationship type, absolute code path, absolute name path, organization accounting level, and organization type.
[0077] In some embodiments, the update rules can update the index files of set dimensions at the set update time. In a specific embodiment, the construction and update of the index files can be done by automatically running batch processing in the system every day and using a full update mode. For example, at 7 o'clock every morning, the index files can be fully updated based on the latest institution and institution relationship data.
[0078] S102, searching and outputting the search results in the pre-built organizational structure view using the index file according to the full-text search technology;
[0079] The organizational view, also known as the organizational tree, is a solution that takes each organization in the organization as a node and displays the relationship information between nodes in a tree structure based on the information about the hierarchical relationships between organizations. This tree structure display is called a view.
[0080] In an optional embodiment, the process of constructing the organizational structure view may include the following steps:
[0081] Step 1: Obtain entity information and entity relationship information of each institution; wherein the entity information includes institution code and institution name; the entity relationship information includes institution code, superior institution code, relationship type between the institution and the superior institution, absolute code path, and absolute name path. The relationship type between the institution and the superior institution includes administrative relationship and financial relationship, etc.
[0082] The absolute coding path refers to the set of coding points from the top node to the current node in the tree structure of the current relationship type, such as "00 / 0001 / 000104 / 00010401".
[0083] The absolute name path refers to the set of node descriptions from the top node to the current node in the tree structure of the current relationship type, such as "XX Bank / A Province Branch / B City Branch / C District Branch".
[0084] Step 2: Use the obtained organization entity information and entity relationship information to build an organizational structure view.
[0085] In an optional embodiment, the step of searching and outputting the search results in the pre-built organizational structure view using the index file includes:
[0086] Step 1, loading the index file and constructing a search formula based on the index file; wherein the search formula includes the index file, relationship type information and search limit range information; in an optional embodiment, the search limit range information includes the number of the top-level organization in the organization;
[0087] Step 2: Based on the open source full-text search engine Lucence and the open source Chinese word segmenter IK-analyzer, use basic general dictionaries and industry dictionaries to search in the organizational view. The specific steps for searching are:
[0088] First, query the corresponding absolute code path according to the top-level organization number, such as "00 / 0001". Then the absolute code path that limits the scope of the organization to be searched must be prefixed with "00 / 0001";
[0089] Secondly, based on the relationship type, limit the type of organization tree to be searched, such as distinguishing whether it is an administrative organization tree or a financial organization tree; thirdly, based on the input index keywords, search for the top 100 index documents with the highest similarity to the organization name based on the full-text retrieval mechanism.
[0090] Step 3: output the search result; wherein the search result includes at least one search result data.
[0091] In an optional embodiment, after outputting the search results, the method further includes step 4, namely:
[0092] Step 4: According to the similarity scores between each data in the search results and the index, a preset number of search results are arranged in ascending order according to the similarity scores.
[0093] Step 5: After the preset number of search results are arranged in positive order, the preset number of search results arranged in positive order may be sorted again according to the similarity score between the input keyword and the organization name and the business scenario requirements (such as the organization level). The specific sorting rules for the secondary sorting may include:
[0094] Step 5-1: Calculate the similarity between the index input by the user and the institution name in the search results based on the open source full-text search engine. The similarity calculation between the index keyword and the institution name in the search results is based on the open source TF / IDF algorithm provided by Lucence, and the 100 most similar index documents with successful matching are returned by default.
[0095] Step 5-2, analyzing the user's search habits based on the user's historical search data collected in advance;
[0096] Step 5-3: sort the search results based on the user's search habits and the calculated similarity. For example, the search results are further sorted according to "accounting level" and "organization type" based on actual business needs to adapt to the user's browsing habits. Finally, the content stored in the full-text index document is retrieved and encapsulated as a POJO (simple Java object) and returned.
[0097] The above-mentioned application embodiment improves the search efficiency in the scenario of large-scale tree nodes by introducing full-text search technology when performing index-based retrieval; and improves the user experience by semantic-based document relevance search.
[0098] S103: Based on the search results, the organizational relationship view of the search results is rendered according to a preset loading mode.
[0099] In an optional embodiment, the rendering of the organizational relationship view of the search result according to a preset loading mode includes:
[0100] Step 1: receiving a user's selection instruction for at least one retrieval data in the retrieval results;
[0101] Step 2, the selected instruction completes the construction of the organizational relationship view of the selected retrieval organization according to the absolute coding path and / or absolute name path of the organization of the selected retrieval data, wherein the preset loading mode includes a lazy loading mode.
[0102] For example, the absolute encoding path of the index document selected by the user is "00 / 0001 / 000104 / 00010401" and the absolute name path is "XX Bank / Provincial Branch A / Branch B / District Branch C". After the front end obtains the above information, it completes the rendering of the tree structure node by node as follows.
[0103] 00
XX Bank
[0104] 0001
Province A Branch
[0105] 000104
B City Branch
[0106] 00010401
C District Branch
[0107] In an optional embodiment, if the user wishes to view more subordinate nodes of the selected institution path node, the user can receive a query instruction for the subordinate institutions of the selected retrieval institution, and according to the query instruction, all the subordinate nodes of the selected retrieval institution are fully loaded in the organizational view. In a specific embodiment, the user can click the arrow on the left side of the node in the organizational view interface to load the entirety. If you want to view other branches under "Provincial Branch A", you can click the arrow on the left side of "Provincial Branch A", and the system will load all subordinate institutions under Provincial Branch A, such as "Branch D, Branch E", etc.
[0108] The above embodiment avoids the existing problem of slow page response caused by layer-by-layer loading and rendering by introducing two entity node relationships, namely, absolute coding path and absolute name path, in the design and construction of the organization view compared with the prior art.
[0109] based on Figure 1 The organizational view implementation method shown in the figure, on the other hand, the embodiment of the present application provides an organizational view implementation device, such as Figure 3 As shown, the device may include: 301 input module, 302 storage module, 303 retrieval module, 304 output module and 305 rendering module; wherein,
[0110] The 301 input module is used to receive the index file input by the user;
[0111] The storage module 302 is used to store pre-built organizational structure views;
[0112] The 303 search module is used to search in the pre-built organizational structure view using the index file according to the full-text search technology;
[0113] The output module 304 is used to output the search results;
[0114] The 305 rendering module is used to complete the rendering of the organizational relationship view of the retrieval result according to the retrieval result and a preset loading mode.
[0115] In some optional embodiments, the device also includes a 306 construction module, and the 306 construction module further includes an acquisition unit and a construction unit, wherein the acquisition unit is used to acquire each institution entity information and entity relationship information; wherein the entity information includes an institution code and an institution name; the entity relationship information includes an institution code, a superior institution code, a relationship type between the institution and the superior institution, an absolute code path, and an absolute name path; wherein the relationship type between the institution and the superior institution includes an administrative relationship and a financial relationship; and the construction unit is used to construct an organizational structure view using the acquired institution entity information and entity relationship information.
[0116] In some optional embodiments, the 306 construction module is also used to construct the index file according to preset index construction rules and a pre-constructed organizational view based on a full-text search engine and a Chinese word segmenter; wherein the index file includes a first index file and a second index file; wherein the second index file is an index file constructed based on general keywords of a basic general dictionary.
[0117] In some optional embodiments, the acquisition unit of the construction module is specifically used to acquire target organization data; wherein the target organization belongs to a node of the organizational structure view; and is also used to extract industry keywords from the target organization data; wherein the keywords include but are not limited to the target organization's proprietary industry terms;
[0118] The construction unit of the construction module is used to construct a first index file based on the industry keywords by using a full-text search engine and a Chinese word segmenter.
[0119] In some optional embodiments, the process of the construction module constructing the index file includes:
[0120] An acquisition unit, used to acquire synonyms of each industry keyword;
[0121] A construction unit is used to construct an industry dictionary based on the industry keywords, wherein the industry dictionary includes industry keywords and their synonyms; and is also used to construct an index file of the target industry keywords according to a word segmentation algorithm; wherein the index file of the target industry keywords is the first index file.
[0122] In some optional embodiments, the device further comprises 307 an updating module, and the 301 input module receives a user updating instruction;
[0123] The 302 update module is used to control the system according to the update instruction to update the index file of the preset dimension according to the update rule; wherein,
[0124] The preset dimensions include but are not limited to: institution code, institution name, relationship type, absolute code path, absolute name path, institution accounting level, and institution type;
[0125] The update rule includes but is not limited to: updating the index file of a set dimension at a set update time.
[0126] In some optional embodiments, the 301 input module is further used to load an index file and construct a search formula based on the index file; wherein the search formula includes the index file, relationship type information and search limit range information; further, the search limit range information includes the number of the top-level organization in the organization;
[0127] 303 search module, based on open source full-text search engine and open source Chinese word segmenter, using basic general dictionary and industry dictionary to search in the organizational view;
[0128] The output module 304 is used to output the search result; wherein the search result includes at least one search result data.
[0129] In some optional embodiments, the device also includes a sorting module 308, which is specifically used to arrange a preset number of search results in positive order according to the similarity scores between each data of the search results and the index; the sorting module 308 is also used to perform secondary sorting on the preset number of search results after the positive order arrangement according to preset sorting rules.
[0130] The rendering module 305 is specifically used to complete the construction of the organizational relationship view of the selected retrieval organization according to the absolute coding path and / or absolute name path of the organization of the selected retrieval data based on the user's selection instruction for at least one retrieval data in the retrieval results received by the input module 301.
[0131] It can be understood that the above-mentioned components of the organization view implementation device in this embodiment have the function of implementing Figure 1 The functions of the corresponding steps of the method in the embodiment shown in . The function can be implemented by hardware, or by hardware executing the corresponding software. The hardware or software includes one or more modules or devices corresponding to the above functions. The above modules and devices can be software and / or hardware, and the above modules and devices can be implemented separately or integrated with multiple modules and devices. For the functional description of the above modules and devices, please refer to Figure 1 The corresponding description of the method in the embodiment shown in , therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0132] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the organization view implementation device. In other embodiments of the present application, the organization view implementation device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0133] An embodiment of the present application provides an electronic device, including a processor and a memory;
[0134] A memory, used for storing operation instructions;
[0135] The processor is used to execute the organizational view implementation method provided in any implementation mode of the present application by calling an operation instruction.
[0136] As an example, Figure 4 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown. Figure 4 As shown, the electronic device 400 includes: a processor 401 and a memory 403. Among them, the processor 401 and the memory 403 are connected, such as being connected through a bus 402. Optionally, the electronic device 400 may also include a transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may also include a display screen 405 for displaying images, or receiving user operation instructions when necessary.
[0137] The processor 401 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 404 may include a receiver and a transmitter. The transceiver 404 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.
[0138] Processor 401 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0139] The processor 401 may also include one or more processing units, for example, the processor 401 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 401 for storing instructions and data. In some embodiments, the memory in the processor 401 is a high-speed cache memory. The memory may store instructions or data that the processor 401 has just used or circulated. If the processor 401 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 401 is reduced, and the efficiency of the system is improved.
[0140] The processor 401 can run the organization view implementation method provided in the embodiment of the present application to reduce the user's operation complexity, improve the intelligence of the terminal device, and enhance the user experience. The processor 401 can include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the organization view implementation method provided in the embodiment of the present application. For example, part of the algorithm in the organization view implementation method is executed by the CPU, and the other part of the algorithm is executed by the GPU to obtain faster processing efficiency.
[0141] The bus 402 may include a path to transmit information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0142] The memory 403 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0143] Optionally, the memory 403 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the application code stored in the memory 403 to implement the organization view implementation method provided in any embodiment of the present application.
[0144] The memory 403 can be used to store computer executable program codes, which include instructions. The processor 401 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the memory 403. The memory 403 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 400 (such as images, videos, etc. collected by the camera application), etc.
[0145] The memory 403 may also store one or more computer programs corresponding to the organization view implementation method provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 403 and are configured to be executed by the one or more processors 401. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.
[0146] Of course, the code of the organization view implementation method provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 401 can run the code of the organization view implementation method stored in the external memory through the external memory interface, and the processor 401 can control the operation of the organization view implementation process.
[0147] The display screen 405 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 400 may include 1 or N display screens 405, where N is a positive integer greater than 1. The display screen 405 may be used to display information input by a user or information provided to a user and various graphical user interfaces (GUIs). For example, the display screen 405 may display photos, videos, web pages, or files, etc.
[0148] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
[0149] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the organization view implementation method shown in the above method embodiment is implemented.
[0150] The computer-readable storage medium provided in the embodiment of the present application is applicable to any embodiment of the above-mentioned method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
[0151] The embodiment of the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the above-mentioned related steps to implement the method in the above-mentioned embodiment. The computer program product provided in the embodiment of the present application is applicable to any embodiment of the above-mentioned method, and therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
[0152] The organizational view implementation scheme provided in the embodiment of the present application designs an absolute coding path and an absolute name path for each node in the organizational view, and thereby constructs an organizational view model, thereby ensuring that when using the organizational view designed above for data loading and keyword search and positioning, it is possible to avoid loading data layer by layer and rendering layer by layer, thereby greatly improving the response speed. At the same time, full-text search technology is used to build index files and retrieve files. In the creation of the index, industry-specific terms and synonyms are extracted in accordance with the business scenario to expand the scope of the basic general index, and a semantic search interaction experience based on text similarity is provided to users, greatly improving the search success rate; at the same time, based on the technical characteristics of the full-text search inverted index, the problem of fuzzy matching of traditional database string matching failing to hit the index and low query efficiency is avoided, and the performance risks of fuzzy search based on relational database tables in the traditional way are eradicated.
[0153] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be discarded or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0154] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0155] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0156] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0157] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0158] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and can also make some improvements and modifications. These changes, substitutions, improvements and modifications should also be considered to be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for implementing an organizational structure view, characterized in that: The method comprises: According to preset index building rules and pre-built organizational structure views, an index file is built based on a full-text search engine and a Chinese word segmenter; wherein the index file includes a first index file and a second index file; wherein the second index file is an index file built based on general keywords of a basic general dictionary; Receive user update instructions; According to the update instruction control system, the index file of the preset dimension is updated according to the update rule; wherein, The preset dimensions include but are not limited to: institution code, institution name, relationship type, absolute code path, absolute name path, institution accounting level, and institution type; The update rules include but are not limited to: updating the index files of the set dimensions at the set update time, automatically running batch processing in the system every day, using the full update mode, and fully updating the index files according to the latest institution and institution relationship data; Receive index file input by user; According to the full-text search technology, the index file is used to search and output the search results in the pre-constructed organizational structure view, and the construction of the organizational structure view includes: obtaining each institution entity information and entity relationship information; wherein the entity information includes the institution code and the institution name; the entity relationship information includes the institution code, the superior institution code, the relationship type between the institution and the superior institution, the absolute code path, and the absolute name path; wherein the relationship type between the institution and the superior institution includes administrative relationship and financial relationship; the organizational structure view is constructed using the obtained institution entity information and entity relationship information; According to the retrieval results, the organizational relationship view rendering of the retrieval results is completed according to a preset loading mode.
2. The method for implementing an organizational structure view according to claim 1, characterized in that: Building the first index file includes: Acquire target organization data; wherein the target organization belongs to a node of an organizational structure view; Extracting industry keywords from the target institution data; wherein the keywords include but are not limited to the target institution's proprietary industry terms; A first index file based on the industry keywords is constructed using a full-text search engine and a Chinese word segmenter.
3. The method for implementing an organizational structure view according to claim 2, characterized in that: The method of using the full-text search engine and the Chinese word segmenter to construct the first index file based on the keyword further includes: Get synonyms for each industry keyword; Building an industry dictionary based on the industry keywords, wherein the industry dictionary includes industry keywords and their synonyms; An index file of target industry keywords is constructed according to a word segmentation algorithm; wherein the index file of target industry keywords is the first index file.
4. The method for implementing an organizational structure view according to claim 1, characterized in that: The method of using the index file to search in the pre-built organizational structure view and outputting the search results includes: Loading the index file and constructing a search formula based on the index file; wherein the search formula includes the index file, relationship type information and search limit range information; further, the search limit range information includes the number of the top-level organization in the organization; Based on the open source full-text search engine and open source Chinese word segmenter, search in the organizational view using basic general dictionaries and industry dictionaries; Output the search result; wherein the search result includes at least one search result data.
5. The method for implementing an organizational structure view according to claim 4, characterized in that: After outputting the search results, the method further comprises: According to the similarity scores between each data in the search results and the index, a preset number of search results are arranged in positive order according to the similarity scores.
6. The method for implementing an organizational structure view according to claim 5, characterized in that: After arranging the preset number of search results in positive order, the method further includes: The preset number of search results arranged in positive order are sorted again according to a preset sorting rule; wherein the sorting rule includes: Calculate the similarity between the index entered by the user and the institution name in the search results based on the open source full-text search engine; Analyze the user's search habits based on the user's historical search data collected in advance; The search results are sorted based on the user's search habits and the calculated similarity.
7. The method for implementing an organizational structure view according to claim 1 or 6, characterized in that: The rendering of the organizational relationship view of the search result according to the preset loading mode includes: receiving a user's selection instruction for at least one piece of search data in the search results; According to the selected instruction, the organizational relationship view of the selected retrieval organization is constructed according to the absolute coding path and / or absolute name path of the organization of the selected retrieval data.
8. The method for implementing an organizational structure view according to claim 7, characterized in that: The preset loading mode includes a lazy loading mode.
9. The method for implementing an organizational structure view according to claim 8, characterized in that: After completing the rendering of the organizational relationship view of the search result, the method further includes: Receive user's query instructions for subordinate institutions of the selected search institution; According to the query instruction, all the lower nodes of the selected search organization are fully loaded in the organizational structure view.
10. An organizational view implementation device, characterized in that: The device comprises: an input module, a storage module, a retrieval module, an output module and a rendering module; wherein, The input module is used to receive the index file input by the user; The storage module is used to store the pre-built organizational structure view; The retrieval module is used to search in a pre-built organizational structure view using an index file based on a full-text retrieval technique; The output module is used to output the search results; The rendering module is used to complete the rendering of the organizational relationship view of the retrieval result according to the preset loading mode according to the retrieval result; It also includes a construction module, which further includes an acquisition unit and a construction unit, wherein: The acquisition unit is used to acquire entity information and entity relationship information of each institution; wherein the entity information includes an institution code and an institution name; the entity relationship information includes an institution code, a superior institution code, a relationship type between the institution and the superior institution, an absolute code path, and an absolute name path; wherein the relationship type between the institution and the superior institution includes an administrative relationship and a financial relationship; The construction unit is used to construct an organizational structure view using the acquired organizational entity information and entity relationship information; The construction module is also used to construct the index file according to the preset index construction rules and the pre-constructed organizational structure view, based on the full-text search engine and the Chinese word segmenter; wherein the index file includes a first index file and a second index file; wherein the second index file is an index file constructed based on general keywords of a basic general dictionary; An input module, used for receiving user update instructions; The update module is used to control the system according to the update instruction to update the index file of the preset dimension according to the update rule; wherein, The preset dimensions include but are not limited to: institution code, institution name, relationship type, absolute code path, absolute name path, institution accounting level, and institution type; The update rules include but are not limited to: updating the index files of set dimensions at the set update time, automatically running batch processing in the system every day, adopting a full update mode, and fully updating the index files according to the latest institution and institution relationship data.
11. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 9 by calling the operation instruction.
12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
