Data query method, device and equipment in OA system and medium
By configuring a search engine in the OA system and utilizing index tables and field relationship tables, the problems of excessive indexes and fields in multi-process data queries in the OA system were solved, achieving efficient data querying and reducing system load and maintenance costs.
Patent Information
- Application Number
- CN202211111364.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-09-13
AI Technical Summary
Using the original database directly for data queries in the existing OA system will increase the system load and maintenance costs. Furthermore, when adding new processes, it may be necessary to rebuild the index, resulting in too many indexes or too many fields.
By configuring a search engine in the OA system and using an index table containing the same first column name and second column names in different processes, combined with a field relationship table, it is possible to query data from multiple OA processes.
This effectively reduced the number of fields in the index, lowered the system load, simplified the data query process in the new workflow, and improved the user experience.
Smart Images

Figure CN115470210B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data query method, apparatus, device, and medium in an OA system. Background Technology
[0002] Data query function is one of the more commonly used functions in OA (Office Automation System). However, considering the user query permissions and the performance of the original database in the OA system, directly using the original database in the OA system for querying may increase the load and maintenance cost of the OA system and reduce the user experience.
[0003] To solve the above problems, a search engine can be set up in the OA system and an index can be created. By searching the index, relevant data in the OA system can be retrieved.
[0004] However, since there are many processes in the OA system, creating a separate index for each process would result in too many indexes in the search engine; if different fields in each process are integrated into one index, it would result in too many fields in a single index, and when a new process is added, it may be necessary to rebuild the index. Summary of the Invention
[0005] This invention provides a data query method, apparatus, device, and medium for an OA system, which enables the querying of all data tables in the OA system using an index in a search engine.
[0006] According to one aspect of the present invention, a data query method is provided in an OA system, executed by a search engine configured in the OA system, the method comprising:
[0007] The index table is used to find the target index row that matches the user's query. The index table includes the first column name, which has the same meaning in all OA processes, and the second column name, which has different meanings in different OA processes.
[0008] Retrieve the target query column set from the target index row, and obtain the names of each target column included in the target query column set;
[0009] Based on the OA process corresponding to the target index row, the target column name is matched and searched in the field relationship table. The field relationship table stores the special column name of each second column name in different OA processes.
[0010] The target column name found in the target query column set is replaced with the special column name, and the replaced target query column set is used as the query result for the user query.
[0011] According to another aspect of the present invention, a data query device for an OA system is provided, which is executed by a search engine configured in the OA system, comprising:
[0012] The target index row query module is used to query the target index row that matches the user's query in the index table. The index table includes the first column name, which has the same meaning in all OA processes, and the second column name, which has different meanings in different OA processes.
[0013] The target query column set acquisition module is used to obtain the target query column set from the target index row and to obtain the names of each target column included in the target query column set;
[0014] The dedicated column name matching and lookup module is used to match and look up each target column name in the field relationship table according to the OA process corresponding to the target index row. The field relationship table stores the dedicated column names of each second column name in different OA processes.
[0015] The query result generation module is used to replace the target column name with a special column name found in the target query column set, and use the replaced target query column set as the query result for the user's query.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute the data query method in the OA system according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the data query method in the OA system according to any embodiment of the present invention.
[0021] The technical solution of this invention, by parsing the user query, obtaining the target index row and target query column set in the index table, matching and searching each target column name in the field relationship table according to the OA process corresponding to the target index row, and generating query results, realizes the querying of multiple OA process data in the OA system through an index in a search engine.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a data query method in an OA system according to Embodiment 1 of the present invention;
[0025] Figure 2 This is a flowchart of another data query method in an OA system provided according to Embodiment 2 of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a data query device in an OA system according to Embodiment 3 of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the data query method in the OA system of this invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] Example 1
[0031] Figure 1 This is a flowchart illustrating a data query method in an OA system according to Embodiment 1 of the present invention. This embodiment is applicable to situations where a target query column set is obtained based on the user's query expression and query permissions, the specific column names of each second column name are obtained based on a field relationship table, and query results are generated. This method can be executed by a data query device in an OA system, which can be implemented in hardware and / or software. This data query device in an OA system can be configured within a search engine configured in an OA system with data processing capabilities. Figure 1 As shown, the method includes:
[0032] S110. Query the target index row in the index table that matches the user query.
[0033] Preferably, the search engine configured in the OA system can be the Elasticsearch search engine.
[0034] For an OA system with multiple processes (such as leave application process, expense reimbursement process, etc.), the specific content of each process (such as the number of leave days, the reason for reimbursement, etc.) can be stored in the original database of the OA system in the form of a data table. The data table can contain data names and data items.
[0035] In one specific implementation, if Zhang San's leave application process involves 3 days of leave, then the data table corresponding to this process can contain a data name named "leave days" and a data item with the content "3 days".
[0036] Through data reporting operations between the original database and the search engine, data from all tables in the original database can be stored in the index table of the search engine. Each index row in the index table can store all data items from a data table.
[0037] The index table includes a first column name that has the same meaning in all OA processes, and a second column name that has different meanings in different OA processes.
[0038] In one specific implementation, if each data table in the original database contains data names named "Name" and "Department", then the column names "Name" and "Department" can both be used as the first column name in the index table. The content stored under the "Name" column is all personal names, and the content stored under the "Department" column is all department names.
[0039] Furthermore, the content stored under each second column name can have different meanings in the OA process. For example, a leave application form might contain "Reason for Leave," and an expense report form might contain "Reimbursement Request." To reduce the number of fields in the index, both the "Reason for Leave" and "Reimbursement Request" data items can be stored under a single second column name. The above examples are only to illustrate the specific uses of the first and second column names and do not limit the number of first and second column names or the content stored in each column. In a real OA system, there will be multiple different processes, so each second column name may store multiple data items with different meanings.
[0040] Optionally, the second column can be named with names that do not have specific meaning, such as "Sd1", "Sd2", "Sd3".
[0041] In a specific embodiment, as shown in Table 1, the index table contains three index rows. The first and third rows contain data for two different OA leave application processes, and the second row contains data for one OA expense reimbursement process. The index table contains five index columns: "Name" and "Department" are the first column names, and "Sd1", "Sd2", and "Sd3" are the second column names. The "Name" column stores the name of the applicant for each process, the "Department" column stores the department of the applicant for each process, the "Sd1" column stores the reason for leave in the OA leave application process and the reason for reimbursement in the OA expense reimbursement process, the "Sd2" column stores the number of leave days in the OA leave application process and the reimbursement amount in the OA expense reimbursement process, and the "Sd3" column stores the reimbursement items in the OA expense reimbursement process.
[0042] Table 1
[0043] Name department Sd1 Sd2 Sd3 Zhang San Part Two Personal leave 1 day Zhang San Part Two On business trip 500 yuan stay Li Si Five sick leave 2 days
[0044] User queries can include at least one query term. If the user query matches a field in the index table, the target field can be directly retrieved from the index table. If the user query is more complex, a fuzzy search can be used to fuzzily match a specific field and retrieve the target query field that meets the criteria from the index table. The target index row contains all index rows of the target query field.
[0045] S120. Obtain the target query column set in the target index row, and obtain the names of each target column included in the target query column set.
[0046] Preferably, different query permissions can be assigned to each query user in the search engine in advance. After obtaining the target index row that matches the user's query, the fields that the user is allowed to query can be filtered according to the query user's query permissions. The fields that the user is allowed to query and the target column names that match each field can constitute the target query column set.
[0047] S130. Based on the OA process corresponding to the target index row, match and search for each target column name in the field relationship table. The field relationship table stores the special column name of each second column name in different OA processes.
[0048] Optionally, the OA process corresponding to each target index row can be stored as a field under an index column, or the key fields of each index row can be identified as identifiers.
[0049] The field relationship table is a pre-configured table that contains the mapping relationship between each data name in the OA process data table and each column name in the index table. By querying the field relationship table, you can quickly obtain the correspondence between each target column name included in the target query column set and each data name in the OA process data table.
[0050] In a specific embodiment, as shown in Table 1, after a user searches for "Li Si," assuming the user does not have permission to query "department," the user can query the "Name," "Sd1," and "Sd2" columns in the third index row. After obtaining that the OA process corresponding to the third index row is the OA leave application process, the column names can be queried in the field relationship table. For example, the dedicated column name for "Sd1" in the OA leave application process is "Reason for Leave," and the dedicated column name for "Sd2" in the OA leave application process is "Number of Leave Days." This is just a simple example; in actual applications, the field relationship table can be adaptively configured according to the data situation in the OA system.
[0051] The advantage of this setup is that by creating a field relationship table, data with different meanings in multiple OA processes can be stored in a single index column. This allows you to obtain the specific column name of the target query field in the OA process, effectively reducing the number of fields in the index.
[0052] S140. Replace the target column name with the special column name found in the target query column set, and use the replaced target query column set as the query result for the user query.
[0053] It is understandable that if the data retrieved from the search engine is used directly as the query result, when users see the second column name which has no specific meaning, they cannot intuitively understand the relationship between the second column name and the special column name in the OA process. Therefore, the special column name found can be used to replace the second column name, and the set of target query columns containing the special column name can be used as the query result.
[0054] The technical solution of this invention, by parsing the user query, obtaining the target index row and target query column set in the index table, matching and searching each target column name in the field relationship table according to the OA process corresponding to the target index row, and generating query results, realizes the querying of multiple OA process data in the OA system through an index in a search engine.
[0055] Example 2
[0056] Figure 2 This is a flowchart of a data query method in an OA system according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further details the process of establishing and updating the index table. Figure 2 As shown, the method includes:
[0057] S210. In the database that matches the search engine, obtain the data table corresponding to each OA process, and build an index table framework based on the maximum number of column names included in each data table.
[0058] Preferably, the number of indexes in the index table can be greater than the maximum number of column names included in each data table. When a new data table is generated in the OA system and the number of column names in the new data table is greater than the number of historical column names, the reserved redundant index columns can be filled.
[0059] S220. Parse the column names in each data table to determine the first column name and special column name corresponding to each OA process, and establish the second column name according to the number of special column names included in each OA process.
[0060] Specifically, based on the number of dedicated column names included in each OA process, each second column name can be created, which may include:
[0061] Based on the number of dedicated column names included in each OA process, obtain the maximum number of dedicated column names and create a second column name of the maximum number of dedicated column names.
[0062] S230. Assign a second column name to each special column name corresponding to each OA process, and establish a field relationship table based on the assignment results.
[0063] The advantage of this setup is that by assigning a second column name to each dedicated column name corresponding to each OA process, the OA process data is integrated into the search engine, and the problem of inconsistent dedicated column names in the OA process is solved.
[0064] S240. Fill the index table frame with the names of each first column and each second column to obtain the initialized index table, and fill the index table with the data from each data table according to the field relationship table.
[0065] Furthermore, if a new data table is stored in the OA database, the specific steps for updating the index table may include:
[0066] When a new data table corresponding to the new OA process is detected in the database, the column names in the new data table are parsed to determine the first column name and the new special column name corresponding to the new OA process respectively.
[0067] If the number of new special column names is less than or equal to the number of second column names in the index table, then assign second column names to each special column name corresponding to the new OA process, and update the field relationship table according to the assignment results;
[0068] Based on the updated field relationship table, populate the index table with the data from the new data table;
[0069] If the number of new special column names is greater than the number of second column names in the index table, then generate new second column names that match the difference in number, and update the index table based on the new second column names;
[0070] Assign a second column name to each dedicated column name corresponding to the new OA process, and update the field relationship table according to the assignment results;
[0071] Based on the updated field relationship table, populate the index table with the data from the new data table.
[0072] S250. Parse the user query and obtain at least one query segment.
[0073] S260. Match each query word with the field values in the index table, and determine the index row where the field value matched by the query word is located as the target search row.
[0074] S270. Obtain the target query column set in the target index row, and obtain the name of each target column included in the target query column set.
[0075] Specifically, retrieving the target query column set from the target index row can include:
[0076] Obtain query permissions that match the requester's query;
[0077] Based on the query permissions, the target query column set is obtained by filtering the target index row.
[0078] S280. Based on the OA process corresponding to the target index row, match and search for each target column name in the field relationship table. The field relationship table stores the special column name of each second column name in different OA processes.
[0079] Specifically, the matching and searching of each target column name in the field relationship table based on the OA process corresponding to the target index row can include:
[0080] In the field relationship table, obtain the target mapping relationship that matches the OA process corresponding to the target index row. The target mapping relationship includes at least one second column name and a special column name corresponding to each second column name.
[0081] Match each target column name with the second column name in the target mapping relationship.
[0082] S290. Replace the target column name with the special column name found in the target query column set, and use the replaced target query column set as the query result for the user query.
[0083] The technical solution of this invention effectively reduces the number of fields in the index by constructing an index table framework based on the maximum number of column names included in each data table, and reserves redundant index columns, ensuring the feasibility of adding data tables in the future.
[0084] Example 3
[0085] Figure 3 This is a schematic diagram of the structure of a data query device in an OA system provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a target index row query module 310, a target query column set acquisition module 320, a dedicated column name matching and search module 330, and a query result generation module 340.
[0086] The target index row query module 310 is used to query the target index row that matches the user query in the index table. The index table includes the first column name, which has the same meaning in each OA process, and the second column name, which has different meanings in different OA processes.
[0087] The target query column set acquisition module 320 is used to obtain the target query column set in the target index row and obtain the name of each target column included in the target query column set.
[0088] The dedicated column name matching and lookup module 330 is used to match and look up each target column name in the field relationship table according to the OA process corresponding to the target index row. The field relationship table stores the dedicated column names of each second column name in different OA processes.
[0089] The query result generation module 340 is used to replace the target column name with a special column name found in the target query column set, and use the replaced target query column set as the query result for the user query.
[0090] The technical solution of this invention, by parsing the user query, obtaining the target index row and target query column set in the index table, matching and searching each target column name in the field relationship table according to the OA process corresponding to the target index row, and generating query results, realizes the querying of multiple OA process data in the OA system through an index in a search engine.
[0091] Based on the above embodiments, the target index row query module 310 can be specifically used for:
[0092] Parse the user query and obtain at least one query word;
[0093] Each query word is matched with the field values in the index table, and the index row containing the field value matched by the query word is determined as the target search row.
[0094] Based on the above embodiments, the target query column set acquisition module 320 can be specifically used for:
[0095] Obtain query permissions that match the requester's query;
[0096] Based on the query permissions, the target query column set is obtained by filtering the target index row.
[0097] Based on the above embodiments, the dedicated column name matching and lookup module 330 can be specifically used for:
[0098] In the field relationship table, obtain the target mapping relationship that matches the OA process corresponding to the target index row. The target mapping relationship includes at least one second column name and a special column name corresponding to each second column name.
[0099] Match each target column name with the second column name in the target mapping relationship.
[0100] Based on the above embodiments, an index table generation module may also be included, specifically used for:
[0101] In the database that matches the search engine, retrieve the data table corresponding to each OA process, and build an index table framework based on the maximum number of column names included in each data table;
[0102] Parse the column names in each data table to determine the first column name and special column name corresponding to each OA process, and create the second column name according to the number of special column names included in each OA process;
[0103] Assign a second column name to each dedicated column name corresponding to each OA process, and establish a field relationship table based on the assignment results;
[0104] Fill the index table frame with the names of each first column and each second column to obtain the initialized index table. Then, according to the field relationship table, fill the index table with the data from each data table.
[0105] Based on the above embodiments, the index table generation module can also be specifically used for:
[0106] Based on the number of dedicated column names included in each OA process, obtain the maximum number of dedicated column names and create a second column name of the maximum number of dedicated column names.
[0107] Based on the above embodiments, an index table update module may also be included, specifically used for:
[0108] When a new data table corresponding to the new OA process is detected in the database, the column names in the new data table are parsed to determine the first column name and the new special column name corresponding to the new OA process respectively.
[0109] If the number of new special column names is less than or equal to the number of second column names in the index table, then assign second column names to each special column name corresponding to the new OA process, and update the field relationship table according to the assignment results;
[0110] Based on the updated field relationship table, populate the index table with the data from the new data table;
[0111] If the number of new special column names is greater than the number of second column names in the index table, then generate new second column names that match the difference in number, and update the index table based on the new second column names;
[0112] Assign a second column name to each dedicated column name corresponding to the new OA process, and update the field relationship table according to the assignment results;
[0113] Based on the updated field relationship table, populate the index table with the data from the new data table.
[0114] The data query device in the OA system provided in this embodiment of the invention can execute the data query method in the OA system provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0115] Example 4
[0116] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0117] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0118] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] Processor 41 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the data query method in the OA system as described in the embodiments of the present invention. That is:
[0120] The index table is used to find the target index row that matches the user's query. The index table includes the first column name, which has the same meaning in all OA processes, and the second column name, which has different meanings in different OA processes.
[0121] Retrieve the target query column set from the target index row, and retrieve the names of each target column included in the target query column set;
[0122] Based on the OA process corresponding to the target index row, the target column name is matched and searched in the field relationship table. The field relationship table stores the special column name of each second column name in different OA processes.
[0123] The target column name found in the target query column set is replaced with the special column name, and the replaced target query column set is used as the query result for the user query.
[0124] In some embodiments, the data query method in the OA system may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the data query method in the OA system described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to execute the data query method in the OA system by any other suitable means (e.g., by means of firmware).
[0125] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0129] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0130] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0131] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A data query method in an office automation (OA) system, characterized in that, The process is executed by the search engine configured in the office automation (OA) system, including: The index table is used to find the target index row that matches the user's query. The index table includes the first column name, which has the same meaning in all OA processes, and the second column name, which has different meanings in different OA processes. Retrieve the target query column set from the target index row, and retrieve the names of each target column included in the target query column set; Based on the OA process corresponding to the target index row, the target column name is matched and searched in the field relationship table. The field relationship table stores the special column name of each second column name in different OA processes. The target column name found in the target query column set is replaced with the special column name, and the replaced target query column set is used as the query result for the user query. Before querying the target index row that matches the user's query in the index table, the process also includes: In the database that matches the search engine, retrieve the data table corresponding to each OA process, and build an index table framework based on the maximum number of column names included in each data table; Parse the column names in each data table to determine the first column name and special column name corresponding to each OA process, and create the second column name according to the number of special column names included in each OA process; Assign a second column name to each dedicated column name corresponding to each OA process, and establish a field relationship table based on the assignment results; Fill the index table frame with the names of each first column and each second column to obtain the initialized index table, and fill the index table with the data from each data table according to the field relationship table. Specifically, based on the number of dedicated column names included in each OA process, a second column name is created, including: Based on the number of dedicated column names included in each OA process, obtain the maximum number of dedicated column names and create a second column name of the maximum number of dedicated column names.
2. The method according to claim 1, characterized in that, Retrieve the target index row in the index table that matches the user's query, including: Parse the user query and obtain at least one query word; Each query word is matched with the field values in the index table, and the index row containing the field value matched by the query word is determined as the target search row.
3. The method according to claim 1, characterized in that, Retrieve the target query column set from the target index row, including: Obtain query permissions that match the requester's query; Based on the query permissions, the target query column set is obtained by filtering the target index row.
4. The method according to claim 1, characterized in that, Based on the OA process corresponding to the target index row, match and search for each target column name in the field relationship table, including: In the field relationship table, obtain the target mapping relationship that matches the OA process corresponding to the target index row. The target mapping relationship includes at least one second column name and a special column name corresponding to each second column name. Match each target column name with the second column name in the target mapping relationship.
5. The method according to claim 1, characterized in that, Also includes: When a new data table corresponding to the new OA process is detected in the database, the column names in the new data table are parsed to determine the first column name and the new special column name corresponding to the new OA process respectively. If the number of new special column names is less than or equal to the number of second column names in the index table, then assign second column names to each special column name corresponding to the new OA process, and update the field relationship table according to the assignment results; Based on the updated field relationship table, populate the index table with the data from the new data table; If the number of new special column names is greater than the number of second column names in the index table, then generate new second column names that match the difference in number, and update the index table based on the new second column names; Assign a second column name to each dedicated column name corresponding to the new OA process, and update the field relationship table according to the assignment results; Based on the updated field relationship table, populate the index table with the data from the new data table.
6. A data query device in an office automation (OA) system, characterized in that, The process is executed by the search engine configured in the office automation (OA) system, including: The target index row query module is used to query the target index row that matches the user's query in the index table. The index table includes the first column name, which has the same meaning in all OA processes, and the second column name, which has different meanings in different OA processes. The target query column set acquisition module is used to obtain the target query column set from the target index row and to obtain the name of each target column included in the target query column set; The dedicated column name matching and lookup module is used to match and look up each target column name in the field relationship table according to the OA process corresponding to the target index row. The field relationship table stores the dedicated column names of each second column name in different OA processes. The query result generation module is used to replace the target column name with a special column name found in the target query column set, and use the replaced target query column set as the query result for the user's query. The data query device in the office automation (OA) system also includes an index table generation module, specifically used for: In the database that matches the search engine, retrieve the data table corresponding to each OA process, and build an index table framework based on the maximum number of column names included in each data table; Parse the column names in each data table to determine the first column name and special column name corresponding to each OA process, and create the second column name according to the number of special column names included in each OA process; Assign a second column name to each dedicated column name corresponding to each OA process, and establish a field relationship table based on the assignment results; Fill the index table frame with the names of each first column and each second column to obtain the initialized index table, and fill the index table with the data from each data table according to the field relationship table. The index table generation module is also specifically used for: Based on the number of dedicated column names included in each OA process, obtain the maximum number of dedicated column names and create a second column name of the maximum number of dedicated column names.
7. An electronic device, the electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data query method in the office automation (OA) system as described in any one of claims 1-5.
8. A computer-readable storage medium storing computer instructions for causing a processor to execute a data query method in an office automation (OA) system as described in any one of claims 1-5.
Citation Information
Patent Citations
Data query method and device, storage medium and electronic equipment
CN113849499A
Data query method and device based on HBase and computer equipment
CN114090589A