Data query method, storage medium and computer program product
By abstracting the data items of the second-hand trading system through configuration and generating data item configuration information, the problem of complex and difficult maintenance of data query logic in the online system is solved, and efficient data query and maintenance is achieved.
Patent Information
- Application Number
- CN202210046403.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-14
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-01-14
AI Technical Summary
In existing online systems in the second-hand trading field, data query logic is complex and difficult to maintain, and data analysis and presentation of each data source need to be processed one by one.
By configuring and abstracting the data items of each data source, data item configuration information is generated. This information is used to uniformly obtain the required data item content from the data source and generate data query results.
It simplifies development logic, improves data query efficiency, facilitates maintenance, and reduces development complexity.
Smart Images

Figure CN114398396B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to computer technology, and in particular to a data query method, a storage medium, and a computer program product. Background Art
[0002] In some service areas, such as the second-hand trading field, business processing and data maintenance and display of various dimensions are usually based on online systems. System maintenance personnel, customer service personnel, product development and operation personnel and other internal personnel often need to view business data (such as transaction data). However, online systems such as trading systems usually rely on many data entities and data items. Existing technologies usually need to process the data analysis and presentation of each data source one by one, resulting in multiple development logics and difficult maintenance. Summary of the Invention
[0003] The embodiments of the present disclosure provide a data query method, a storage medium, and a computer program product to solve the problems of complex development logic and difficulty in maintenance in the prior art.
[0004] A first aspect of an embodiment of the present disclosure provides a data query method, comprising: receiving a data query request sent by a terminal device, the data query request including query parameters; obtaining corresponding data item configuration information based on the query parameters, the data item configuration information including configuration attribute information of the data item, the configuration attribute information of the data item including at least a data source identifier of the data item; obtaining the content of each data item from the corresponding data source based on the data source identifier of each data item; and generating and returning a data query result based on the content of each data item.
[0005] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes acquisition path information of the data item; obtaining the content of each data item from the corresponding data source according to the data source identifier of each data item includes: for data items with the same data source identifier, using the same data source identifier as the first data source identifier, and obtaining original data including the content of each data item from the corresponding first data source according to the first data source identifier; obtaining the content of each data item from the original data according to the acquisition path information of each data item.
[0006] In one embodiment of the present disclosure, before obtaining the original data including the content of each data item from the corresponding first data source according to the first data source identifier, the method further includes: determining whether the first data source type corresponding to the first data source identifier is a preset target type; obtaining the original data including the content of each data item from the corresponding first data source according to the first data source identifier includes: if the first data source type corresponding to the first data source identifier is the preset target type, obtaining corresponding user identification information according to the query parameter; and obtaining the original data of each data item content corresponding to each piece of user identification information from the first data source according to the user identification information.
[0007] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes the data source type of the data item; generating and returning the data query result based on the content of each data item includes: grouping the content of each data item according to the data source type to obtain a first grouping result; returning the first grouping result to the terminal device as the data query result; preferably, after grouping the content of each data item according to the data source type to obtain the first grouping result, the method also includes: for each data source type belonging to the preset target type, grouping the data item content in its corresponding group according to user identification information to obtain a second grouping result; returning the first grouping result to the terminal device as the data query result includes: returning the second grouping result to the terminal device as the data query result.
[0008] In one embodiment of the present disclosure, if the data items include a first data item, and the first data item has a parent node in the data structure in the data source, then the configuration attribute information of the first data item also includes the parent node path information of the first data item; obtaining the content of each data item from the original data according to the acquisition path information of each data item includes: for the first data item, obtaining the data item content corresponding to the first data item from the original data according to the parent node path information and the acquisition path information of the first data item.
[0009] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes a display name of the data item; generating and returning the data query result based on the content of each data item includes: generating and returning the data query result based on the content of each data item and the display name of each data item.
[0010] In one embodiment of the present disclosure, the configuration attribute information of the data item further includes the configuration validity status of the data item, which is used to indicate whether the data item needs to be queried during query.
[0011] In one embodiment of the present disclosure, if the data item includes a second data item, the configuration attribute information of the second data item also includes a data item dictionary value, and the data query result is generated and returned based on the content of each data item, including: for the second data item, the data item content corresponding to the second data item is converted into target content as the final data item content of the second data item in the data query result according to the data item dictionary value.
[0012] A second aspect of an embodiment of the present disclosure provides a data query method, comprising: obtaining query parameters input by a first user in response to a query operation of a first user; generating a data query request based on the query parameters; sending the data query request to a server, so that the server performs a query based on data item configuration information to obtain a data query result; the data item configuration information includes configuration attribute information of each data item, and the configuration attribute information of the data item includes at least a data source identifier of the data item; and receiving and displaying the data query result returned by the server.
[0013] According to a third aspect of an embodiment of the present disclosure, a data query apparatus is provided, comprising: a first receiving module for receiving a data query request sent by a terminal device, the data query request including query parameters; a first acquiring module for acquiring corresponding data item configuration information based on the query parameters, the data item configuration information including configuration attribute information of the data item, the configuration attribute information of the data item including at least a data source identifier of the data item; a second acquiring module for acquiring the content of each data item from the corresponding data source based on the data source identifier of each data item; a first processing module for generating a data query result based on the content of each data item; and a first sending module for returning the data query result to the terminal device.
[0014] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes acquisition path information of the data item; the second acquisition module includes: a first acquisition unit, which is used to use the same data source identifier as the first data source identifier for data items having the same data source identifier, and obtain the original data including the content of each data item from the corresponding first data source according to the first data source identifier; a first processing unit, which is used to obtain the content of each data item from the original data according to the acquisition path information of each data item.
[0015] In one embodiment of the present disclosure, the device also includes: a judgment module, used to judge whether the first data source type corresponding to the first data source identifier is a preset target type; the first acquisition unit, specifically used to: if the first data source type corresponding to the first data source identifier is the preset target type, obtain the corresponding user identification information according to the query parameter, and obtain the original data of each data item content corresponding to each user identification information from the first data source according to the user identification information.
[0016] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes the data source type of the data item; the first processing module is specifically used to group the contents of each data item according to the data source type, obtain a first grouping result, and use the first grouping result as the data query result.
[0017] In one embodiment of the present disclosure, the first processing module is further used to, after obtaining the first grouping result, group the data item contents in the corresponding group for each data source type belonging to the preset target type according to user identification information to obtain a second grouping result, and use the second grouping result as the data query result.
[0018] In one embodiment of the present disclosure, if the data items include a first data item, and the first data item has a parent node in the data structure in the data source, then the configuration attribute information of the first data item also includes the parent node path information of the first data item; the first processing unit is specifically used to: for the first data item, obtain the data item content corresponding to the first data item from the original data according to the parent node path information of the first data item and the acquisition path information.
[0019] In one embodiment of the present disclosure, the configuration attribute information of the data item also includes a display name of the data item; the first processing module is specifically used to generate the data query result according to the content of each data item and the display name of each data item.
[0020] In one embodiment of the present disclosure, the configuration attribute information of the data item further includes the configuration validity status of the data item, which is used to indicate whether the data item needs to be queried during query.
[0021] In one embodiment of the present disclosure, the first processing module is further used to: if the data item includes a second data item, and the configuration attribute information of the second data item also includes a data item dictionary value, then for the second data item, according to the data item dictionary value, convert the data item content corresponding to the second data item into target content as the final data item content of the second data item in the data query result.
[0022] According to a fourth aspect of the embodiments of the present disclosure, a data query device is provided, comprising: a third acquisition module, configured to acquire a query parameter input by a first user in response to a query operation of the first user; a second processing module, configured to generate a data query request based on the query parameter; a second sending module, configured to send the data query request to a server, so that the server performs a query based on data item configuration information to obtain a data query result; the data item configuration information includes configuration attribute information of the data item, and the configuration attribute information of the data item includes at least a data source identifier of the data item; a second receiving module, configured to receive the data query result returned by the server; and a display module, configured to display the data query result.
[0023] According to a fifth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any of the above embodiments of the present disclosure.
[0024] According to a sixth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0025] processor;
[0026] a memory for storing instructions executable by the processor;
[0027] The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in the first aspect of the present disclosure and various possible designs of the first aspect.
[0028] According to a seventh aspect of the embodiments of the present disclosure, a terminal device is provided, the terminal device including:
[0029] processor;
[0030] a memory for storing instructions executable by the processor;
[0031] The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in the above-mentioned second aspect of the present disclosure and various possible designs of the second aspect.
[0032] According to an eighth aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program / instruction, which implements the method described in any of the above embodiments of the present disclosure when executed by a processor.
[0033] The data query method, storage medium, and computer program product provided by the present disclosure obtain data item configuration information corresponding to each data item by abstractly configuring the data items of each data source. When querying, the corresponding data item content can be quickly and conveniently obtained from each data source based on the data item configuration information, thereby effectively improving data query efficiency. Moreover, the configuration of data items effectively reduces the complexity of development logic, facilitates maintenance, and solves the problems of complex development logic and difficult maintenance in the prior art.
[0034] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0036] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0037] Figure 1 This is an exemplary application scenario of the data query method provided by the present disclosure;
[0038] Figure 2 is a flowchart of a data query method provided by an exemplary embodiment of the present disclosure;
[0039] Figure 3 is a flowchart of step 203 provided by an exemplary embodiment of the present disclosure;
[0040] Figure 4 This is a schematic diagram of the display effect of data items that require user identity distinction provided by an exemplary embodiment of the present disclosure;
[0041] Figure 5 This is a schematic diagram of the display effect of data query results provided by an exemplary embodiment of the present disclosure;
[0042] Figure 6 is an example of data item configuration information corresponding to a data item provided by an exemplary embodiment of the present disclosure;
[0043] Figure 7 is an exemplary schematic diagram showing a query portal provided by an exemplary embodiment of the present disclosure;
[0044] Figure 8 is a flowchart of a data query method provided by yet another exemplary embodiment of the present disclosure;
[0045] Figure 9 is a structural diagram of a data query device provided by an exemplary embodiment of the present disclosure;
[0046] Figure 10 is a structural diagram of a second acquisition module provided by an exemplary embodiment of the present disclosure;
[0047] Figure 11 is a structural diagram of a data query device provided by another exemplary embodiment of the present disclosure;
[0048] Figure 12 is a structural diagram of a data query device provided by yet another exemplary embodiment of the present disclosure;
[0049] Figure 13 It is a structural diagram of an application embodiment of the electronic device disclosed in the present invention. DETAILED DESCRIPTION
[0050] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0051] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, and do not represent any specific technical meanings, nor do they indicate a necessary logical order between them.
[0052] It should also be understood that in the embodiments of the present disclosure, “a plurality of” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0053] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0054] In addition, the term "and / or" in this disclosure is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the related objects are in an "or" relationship.
[0055] It should also be understood that the description of the various embodiments in this disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced with each other. For the sake of brevity, they will not be described one by one.
[0056] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0057] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0058] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0059] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0060] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate in conjunction with numerous other general-purpose or specialized computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with terminal devices, computer systems, servers, and other electronic devices include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, among others.
[0061] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked via a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media, including storage devices.
[0062] Overview of the Disclosure
[0063] In the process of implementing the present disclosure, the inventors discovered that the online business system of the transaction system relies on many data parties and data items. For example, the transaction system relies on multiple data sources such as the contract service platform, the user authentication platform, and the capital platform. Each data source involves multiple data items. For example, the contract service platform data source involves contract number, property number, property address, signing time, transaction time, transaction status and other data items. When querying, the existing technology needs to process the data analysis and presentation of each data source one by one, which makes the development logic complex and difficult to maintain.
[0064] Exemplary Overview
[0065] Figure 1This is an exemplary application scenario of the data query method provided by the present disclosure.
[0066] In response to the above problems, the present disclosure provides a data query method for a business panorama, which configures and abstracts the different data sources it relies on and the data items in each data source, generates data item configuration information and stores it in correspondence with the business identifier. The business panorama refers to the panoramic data of a business in the entire business process. For example, the transaction panorama refers to the panoramic data of a contract transaction process. When relevant personnel such as maintenance personnel, customer service personnel, product R&D and operation personnel (called first users) need to view the panoramic data of a certain business, they can input query parameters through the terminal device, such as contract number, business number and other identifying information, which can be set according to actual needs. The terminal device can then send a data query request to the system. The data query request contains Carrying the query parameters input by the first user, the system can obtain the corresponding data item configuration information according to the query parameters, and then uniformly obtain the required data item content from the data source based on the data item configuration information, and then generate a data query result and return it to the terminal device, displaying the business panorama for the first user to view, thereby realizing data query based on the business panorama of the configuration information, effectively simplifying the development logic and facilitating maintenance. Developers only need to maintain the configuration information to ensure the maintenance of the first user's query function, thereby improving development and maintenance efficiency. When querying, there is no need to process the parsing and presentation of each data source one by one, but directly obtain the data to be displayed according to the configuration information for display, solving the problems of complex development logic and difficult maintenance in the existing technology.
[0067] Exemplary Methods
[0068] Figure 2 FIG. 1 is a flow chart of a data query method provided by an exemplary embodiment of the present disclosure. The method includes the following steps:
[0069] Step 201: Receive a data query request sent by a terminal device, where the data query request includes query parameters.
[0070] Specifically, when maintenance personnel, customer service personnel, product R&D and operations personnel (called first users) need to view a certain business, they can enter query parameters through the terminal device. The query parameters are, for example, contract numbers, business numbers, transaction point numbers and other identifying information, which can be set according to actual needs. The terminal device can then send a data query request to the system (specifically, the server that deploys the system). The data query request carries the query parameters entered by the first user, and the system can receive the data query request carrying the query parameters sent by the terminal device.
[0071] Step 202: Acquire corresponding data item configuration information according to the query parameter. The data item configuration information includes configuration attribute information of the data item. The configuration attribute information of the data item at least includes a data source identifier of the data item.
[0072] Among them, the data item configuration information is pre-configured and stored for each data item of each data source. For example, all data item configuration information can be stored in a database. When actually stored, the data item configuration information can be stored in correspondence with business identifiers such as contract numbers, business numbers, and transaction order numbers that serve as query parameters. When a first user queries, the data item configuration information corresponding to the query parameters can be obtained based on the query parameters of the first user. The data source identifier of a data item can refer to the data source name, data source number, or data source address to which the data item belongs. As long as the data source corresponding to the data item can be determined based on the data source identifier, it is sufficient. For example, if the data source identifier is a data source name, a correspondence between the data source name and the data source address can also be maintained. The corresponding data source address can be obtained from the correspondence based on the data source name, so that data can be requested from the corresponding data source based on the data source address. In order to further reduce data processing, the data source identifier can be directly set to the data source address, and the data source address corresponding to the data item can be directly obtained based on the data item configuration information. The specific setting can be based on actual needs.
[0073] The data source can refer to various service platforms that the business system relies on, such as the contract service platform, user authentication platform, capital platform and other data sources that the transaction system relies on. Each data source has its own data service function and provides data support for the system based on the data service function. The specific data service function of each data source can be set according to actual needs, and this embodiment does not limit it.
[0074] In one optional example, each data item corresponds to a piece of data item configuration information. Each piece of data item configuration information may include multiple configuration attribute information for the data item. Each piece of configuration attribute information describes an attribute of the data item. For example, one piece of configuration attribute information for a data item may be the data source type of the data item, another piece of configuration attribute information may be the data source address of the data item, another piece of configuration attribute information may be the acquisition path of the data item, i.e., the path of the data item in the data structure of the original data, and another piece of configuration attribute information may be the display name of the data item. For example, if the content of a data item is "Technology Park Road" and the display name of the data item is "Street Name", the result of the final display of the data item will be "Street Name: Technology Park Road", etc. In actual applications, the specific configuration attribute information included in the data item configuration information corresponding to each data item can be set according to the actual scenario requirements and is not limited in this embodiment.
[0075] Step 203: Acquire the content of each data item from the corresponding data source according to the data source identifier of each data item.
[0076] After obtaining the data item configuration information corresponding to the query parameter, the data source identifier of each data item can be extracted from the data item configuration information, thereby obtaining the data item content corresponding to each data item from the corresponding data source according to the data source identifier of each data item.
[0077] In one optional example, the corresponding data item contents can be collectively obtained from the corresponding data source based on the data item configuration information of each data item of each data source. For example, for multiple data items of data source A, a data request is generated to data source A based on the data item configuration information of the multiple data items, and data source A directly returns the data item contents of each data item.
[0078] In an optional example, after extracting the data source identifier corresponding to each data item, deduplication is performed to obtain non-duplicate data source identifiers, and data requests are sent to each corresponding data source based on the non-duplicate data source identifiers. Each data source returns all the data that needs to be displayed (which can be called original data), and the data item content corresponding to each data item is extracted from all the data based on the data item acquisition path information included in the data item configuration information. For example, each data source returns json structured data including multiple data item contents, and the data item content corresponding to each data item can be extracted from the json structured data based on the data item acquisition path information in the data item configuration information. Specifically, the json string can be converted into php array type data through json_decode, and the elements in the array are the data item contents. This is only an exemplary description, and the specific method can be set according to actual needs, and this embodiment does not limit it.
[0079] In an optional example, data may be requested in parallel from different data sources to improve data query efficiency.
[0080] Step 204: Generate and return data query results based on the content of each data item.
[0081] After obtaining the content of each data item, a data query result can be generated based on the content of each data item and returned to the terminal device for viewing by the first user. The specific generation method can be set according to actual needs. The generation method can refer to performing corresponding processing on the content of each data item according to the display requirements of the content of each data item. For example, if data from different data sources are to be grouped and displayed for easy viewing by the first user, the content of each data item can be grouped according to the data source type and used as the data query result. Alternatively, if each data item is to be displayed in another manner, other corresponding processing can be performed. The specific method can be set according to actual needs and is not limited in this embodiment.
[0082] The data query method provided by the embodiment of the present disclosure obtains data item configuration information corresponding to each data item by abstractly configuring the data items of each data source. When querying, the corresponding data item content can be quickly and conveniently obtained from each data source based on the data item configuration information, thereby effectively improving the efficiency of data query. In addition, the configuration of data items effectively reduces the complexity of development logic, facilitates maintenance, and solves the problems of complex development logic and difficult maintenance in the prior art.
[0083] In an alternative example, Figure 3 203 is a flowchart of an exemplary embodiment of the present disclosure. In this example, the configuration attribute information of the data item also includes the acquisition path information of the data item. Accordingly, step 203 specifically includes the following steps:
[0084] Step 2031: For data items having the same data source identifier, the same data source identifier is used as a first data source identifier, and original data including the content of each data item is obtained from the corresponding first data source according to the first data source identifier.
[0085] Specifically, in this example, after deduplicating the data source identifiers corresponding to each data item, data is requested from each corresponding data source based on the non-duplicate data source identifiers. The original data obtained by the request includes all the data that need to be displayed under the first data source, that is, the content of each data item corresponding to the data item configuration information of step 202, and may also include more other data item contents. For example, a data item in the original data may not have the corresponding data item configuration information set, or a data item does not need to be displayed, etc. Since the request for data from the data source is based on the data source identifier, the data source does not judge whether each data item is needed. The data service rules on the data source side can be set according to actual needs, and this embodiment does not limit it.
[0086] Step 2032: Acquire the content of each data item from the original data according to the acquisition path information of each data item.
[0087] Among them, the acquisition path information of the data item describes the data value acquisition path of the data item in the original data, that is, the path of the data item content corresponding to the data item in the original data. Therefore, after obtaining the original data, the data item content corresponding to each data item can be obtained from the original data based on the acquisition path information of each data item.
[0088] Exemplarily, the original data returned by each data source is json structure data including multiple data item contents. The data item content corresponding to each data item can be extracted from the json structure data according to the data item acquisition path information in the data item configuration information. Exemplarily, the json structure data is: $raw = '{″name":"BeJson","url″:″http: / / www.bejson.com″,″page″:88,″isNonProfit″:true,″address″:{″street″:″Technology Park Road.”,″city″:″A City″,″country″:″China″}}, then the json string is converted into php array type data through json_decode: $data = json_decode($raw,true).
[0089] Based on the data source identifier in the data item configuration information, the present disclosure can achieve that for each data source, all required data item contents can be obtained by accessing the data interface only once, without having to access each data item once, effectively reducing the consumption of network resources, saving query time, and further improving query efficiency.
[0090] In one optional example, before obtaining the raw data including the content of each data item from the corresponding first data source based on the first data source identifier, the method further includes: determining whether the first data source type corresponding to the first data source identifier is a preset target type. Accordingly, obtaining the raw data including the content of each data item from the corresponding first data source based on the first data source identifier includes: if the first data source type corresponding to the first data source identifier is the preset target type, obtaining corresponding user identification information based on a query parameter; and obtaining, from the first data source based on the user identification information, the raw data of each data item corresponding to each piece of user identification information.
[0091] Specifically, in some business areas, such as the second-hand housing transaction area, the business data maintained is different from the perspective of different users (called second users, such as buyers and sellers). For example, for a buyer, he paid at a certain time, and the corresponding payment data item he saw was paid. However, since the flow of funds takes time, the seller's arrival time is T+1 or T+N. Before the arrival, the payment data item seen by the seller is unpaid; for example, for intermediary service fees, it is usually stipulated that one party pays, so the relevant information about the item can only be seen by one party, and the other party will not see it; and so on. Therefore, in order to facilitate the first user to conveniently see the content that can be seen from different user perspectives during maintenance or query, it is necessary to distinguish the identity of the second user during query. During configuration, the data that needs to distinguish the user identity can be judged by the data source type, that is, several types of data sources that need to distinguish the user identity are set, which are called preset target types. When querying these data sources of preset target types, the user identification information of the corresponding different second users is first obtained according to the query parameters. The user identification information can be the mobile phone number, user ID, ID card number and other identifying information of the second users of all parties involved in the business, and then the original data corresponding to each user identification information is obtained from the corresponding data source according to the user identification information, and then the data item content corresponding to each user identification information is parsed based on the original data.
[0092] In an optional example, the configuration attribute information of each data item also includes the data source type of the data item; accordingly, based on the content of each data item, a data query result is generated and returned, including: grouping the content of each data item according to the data source type to obtain a first grouping result; and returning the first grouping result as a data query result to the terminal device.
[0093] Specifically, in order to facilitate the first user's viewing, the data items can be grouped and displayed according to the data source type, and the data items of each data source type are displayed in a display area. When querying the data to generate the data query results, the obtained data item contents can be grouped according to the data source type to obtain the first grouping result, and the first grouping result is returned to the terminal device as the data query result, so that the terminal device can display the data items of different groups in the corresponding area.
[0094] The present disclosure facilitates the first user to view relevant data item information of different business data sources by grouping and displaying them by data source type, thereby effectively improving the user experience.
[0095] In an optional example, after grouping the contents of each data item according to the data source type to obtain a first grouping result, the method further includes: for each data source type belonging to the preset target type, grouping the data item contents in the corresponding group according to user identification information to obtain a second grouping result; then returning the first grouping result as a data query result to the terminal device, including: returning the second grouping result as a data query result to the terminal device.
[0096] In situations where user identities need to be distinguished, data items for different user identities need to be displayed in separate areas during display to facilitate viewing by the first user. Therefore, when generating data query results based on the content of each data item, in addition to categorizing by data source, data sources that require distinguishing user identities are also grouped by user identity. The second grouping result of the final two-level grouping is used as the data query result, so that the terminal device can display the corresponding data according to different user identities. The user identification information can be a correspondence between business identifiers such as contract numbers, business numbers, and transaction order numbers that are pre-configured as query parameters for each business and user identities. When the first user queries, the corresponding user identification information can be directly obtained based on the query parameters.
[0097] For example, Figure 4 This is a schematic diagram showing the display of data items requiring user identity distinction, provided by an exemplary embodiment of the present disclosure. The data source type is custody agreement information, involving two second users: buyer Zhang San (mobile phone number A) and seller Li Si (mobile phone number B). This is merely an example of a data source requiring user identity distinction and does not limit the present disclosure. The specific display content will depend on the specific content of the actual data source.
[0098] In an optional example, for each data group of a data source, the display method thereof can be set according to actual needs, which is not limited in this disclosure.
[0099] for example, Figure 5 This is a schematic diagram of the display effect of data query results provided by an exemplary embodiment of the present disclosure. In a single query, the data of each data source type can be collapsed into a single message. The collapsed information of multiple data source types is displayed in list form on the query result interface of the first user. Each data source type is displayed with an expand / collapse toggle button. The user can click the toggle button to expand the data of the corresponding data source type. The details are not further described here. Optionally, a panoramic data of all data source types can be directly displayed. The specific settings can be set according to actual needs.
[0100] In an optional example, the first user may enter the business identifier in the query interface, select the data source type to be queried, and click "Query" to trigger a data query request. In this case, the query parameters include the business identifier and the data source type to be queried. The corresponding data item configuration information obtained according to the query parameters only includes the data item configuration information of the data source type selected by the first user. The subsequent processing is consistent with the above process and will not be repeated here.
[0101] In an optional example, if the data items include a first data item, and the first data item has a parent node in the data structure in the data source, the configuration attribute information of the first data item also includes the parent node path information of the first data item; accordingly, according to the acquisition path information of each data item, the content of each data item is obtained from the original data, including: for the first data item, according to the parent node path information and the acquisition path information of the first data item, the data item content corresponding to the first data item is obtained from the original data.
[0102] The first data item may be any one of the data items.
[0103] For example, as in $raw above, the first data items "street", "city" and "country" have a parent node "address" in the data structure. The parent node path information of the first data item needs to be configured in the data item configuration information corresponding to these first data items. For example, the parent node path information corresponding to "street" is address, so as to more accurately and conveniently obtain the data item content corresponding to each first data item from the original data.
[0104] It can be understood that if the original data structure has multiple levels of nodes, the parent node path information of the data item includes multiple levels of paths.
[0105] The present disclosure configures parent node path configuration attributes for data items, so that when querying the data structure of multi-level nodes, specific data item content can be accurately and conveniently obtained, effectively ensuring the accuracy of extracted data.
[0106] In one optional example, to further improve maintainability, each data item's data item configuration information can include a parent node path configuration attribute. Different attribute values can be set to distinguish whether a data item has parent node path information. For example, for data items without a parent node, the attribute value corresponding to the parent node path attribute is empty or represented by 0. For data items with a parent node, the attribute value corresponding to the parent node path attribute is the specific parent node path content. In other words, each data item has corresponding parent node path information, but the content of the parent node path information varies, and the specific configuration can be set according to actual needs.
[0107] In an optional example, the configuration attribute information of the data item also includes the display name of the data item; accordingly, generating and returning data query results based on the content of each data item includes: generating and returning data query results based on the content of each data item and the display name of each data item.
[0108] For example, the data item is "street", the corresponding data item content is "Technology Park Road", and the corresponding display name is "street name". Then the display result corresponding to the data item in the data query result is: Street name: Technology Park Road.
[0109] In an optional example, the configuration attribute information of the data item further includes the configuration validity status of the data item, which is used to indicate whether the data item needs to be queried during query.
[0110] Among them, the configuration effective status of the data item indicates whether the data item needs to be displayed in the panoramic view, that is, whether the data item needs to be queried during the query. The configuration effective status can include two states: 0 and 1. 0 means that it does not need to be displayed, and 1 means that it needs to be displayed. By configuring the configuration effective status of each data item, it is convenient to set whether the data item needs to be displayed during the query. For example, when obtaining the data item configuration information corresponding to the query parameter, only the data item configuration information with a configuration effective status of 1 can be obtained, or after obtaining all the data item configuration information corresponding to the query parameter, when requesting data from the data source based on the data source identifier corresponding to each data item, the data item configuration information with a configuration effective status of 0 can be excluded, or the data item content with a configuration effective status of 0 can be excluded when generating the data query result. The specific setting can be based on actual needs and is not limited by this disclosure.
[0111] By setting the configuration validity status of data items in the data item configuration information, the present disclosure allows relevant personnel to conveniently set whether each data item needs to be displayed in the query results, further improving the convenience of system maintenance and thus improving work efficiency.
[0112] In an optional example, if the data item includes a second data item, and the configuration attribute information of the second data item also includes a data item dictionary value, a data query result is generated and returned based on the content of each data item, including: for the second data item, the data item content corresponding to the second data item is converted into target content as the final data item content of the second data item in the data query result based on the data item dictionary value.
[0113] Among them, the second data item can be any data item among the data items. The data item dictionary value is used to represent the different results when the content corresponding to the data item is different values. It is an enumerated data, which means that it is necessary to perform a conversion according to the specific data item content in the data source during display. For example, the data item dictionary value is configured as {"0":"does not exist","1":"exists"}, and the data item content corresponding to the obtained data item is "1". Then, when generating the data query result, the data item content needs to be converted to "exists", that is, the data item content corresponding to the data item finally displayed is "exists".
[0114] In an optional example, as shown in Table 1, an example of data item configuration information corresponding to a data item provided by an exemplary embodiment of the present disclosure is provided. The data item configuration information includes seven configuration attributes of the data item, namely, the data source type, data source address, data value parent node path, data value acquisition path, data item display name, data item dictionary value, and configuration validity status.
[0115] Table 1
[0116]
[0117] In actual applications, data item configuration information can be stored in a database, such as a MySQL database.
[0118] In an alternative example, Figure 6 This is an example of data item configuration information corresponding to a data item provided by an exemplary embodiment of the present disclosure. The arrows in the figure point to explanations of each item. In addition to the configuration attributes in the above table, this example includes other configuration attributes, which can be set according to actual needs.
[0119] In an optional example, data instances from an external data source can be obtained via HTTP. In this example, the global graph data query process specifically includes:
[0120] 1. Receive a data query request for panoramic image data and obtain the query parameters entered during the query.
[0121] 2. Load the panoramic data item configuration information from the MySQL database.
[0122] 3. After deduplication based on the data source data_source in each data item configuration information, the external service (i.e., data source) to be queried is obtained. Iterative requests or parallel requests to each service are made to obtain all the data required for display in the panorama. The data obtained from each data source is in a JSON structure.
[0123] 4. Parse the json structure data obtained in step 3 according to the parent node path value_parent_node in the data item configuration information and the data item acquisition path value_path. The specific parsing method is to convert the json string into php array type data through php json_decode. For example, the json structure data is: $raw
[0124] ={″name″:″BeJson″,″url″:″http: / / www.bejson.com″,″page″:88,″isNonProfit″:true,″address″:{″street″:″Kejiyuan Road.”,″city″:″City A”,"country":″China″}}, then use json_decode to convert the JSON string into PHP array type data: $data=json_decode($raw,true), then use value_parent_node and value_path to obtain the value of, for example, street. The value_parent_node is configured as address, and the value_path is configured as street. That is, through $data[$value_parent_node][$value_path], you can get the value (data item content) corresponding to the data item "Kejiyuan Road". Then add the data item display name value_name to get the data to be displayed: Street Name: Kejiyuan Road.
[0125] 5. If the data item configuration information corresponding to a data item in step 4 includes a value_dict (i.e., data item dictionary value) configuration, it means that the retrieved data item value needs to be converted again. For example, if the retrieved data item value is 1, and the configuration in value_dict is {"0":"does not exist","1":"exists"}, then the value needs to be converted to "exists" for display.
[0126] 6. After processing and parsing all data item information, each data item is classified according to the data source type. For example, if the data source is contract, all data items are placed in a return array with the key contract.
[0127] In the above process, the data of the multi-user perspective of the panoramic image is processed according to the following process:
[0128] a. The system will mark several types of data_source data sources that need to distinguish user identities. For example, they can be controlled by configuration in the code. The data structure is: $userDiffDataSourceList = ["protocol", "contract"], where protocol and contract are enumeration values of data_source.
[0129] b. After confirming the data source that needs to be queried based on the user identity, obtain the corresponding user identification information (such as mobile phone number and user ID information) and obtain data from the corresponding data source.
[0130] c. After obtaining data from the data source, parse the data item content according to the above steps 4-5. The difference is that in the above step 6, if there is user differentiation, the user identification information needs to be used as the key in the data source structure in the return array, such as the contract data structure, to distinguish the data of different users. For example, the returned array is:
[0131] data:{Zhang San_Mobile Number A_Buyer:{Agreement List:[,…]},Li Si_Mobile Number B_Seller:{Agreement List:[,…]}}
[0132] Zhang San_Mobile Number A_Buyer: {Agreement List: [,…]}
[0133] Protocol list: [,…]
[0134] 0: {Agreement name: "Name C", Agreement number: "No. 11", Contract number: "No. 21", Agreement creation time: "2020-12-27 12:25:34", ...}
[0135] 1: {Agreement name: "Name C", Agreement number: "No. 12", Contract number: "No. 21", Agreement creation time: "2020-12-27 10:51:37", ...}
[0136] Li Si_Mobile Number B_Seller: {Agreement List: [,…]}
[0137] Protocol list: [,…]
[0138] 0: {Agreement name: "Name B", Agreement number: "No. 11", Contract number: "No. 21", Agreement creation time: "2020-12-27 12:25:34", ...}
[0139] 1: {Agreement name: "Name B", Agreement number: "No. 12", Contract number: "No. 21", Agreement creation time: "2020-12-27 10:51:37", ...}
[0140] In an optional example, after the back-end interface (server) returns the panoramic data, the front-end processes the data display through the vue.js framework. The specific implementation can achieve the effect of universal processing through multi-layer loop traversal and data type judgment, and use the element-ui display style to present it. The specific front-end processing method can be set according to actual needs, and this disclosure does not limit it.
[0141] In an alternative example, Figure 7 This is an exemplary schematic diagram showing a query portal provided by an exemplary embodiment of the present disclosure. A first user can enter a transaction order number or contract number in the query portal and click "Query" to trigger a data query request.
[0142] The data query method based on a panoramic view disclosed in the present invention can simultaneously obtain and present data information seen from the perspectives of users with different roles, solving the problem that the existing technology cannot distinguish the data seen from the perspectives of users with different C-end roles, and can support various back-end personnel to view the panoramic view of data in various dimensions of the transaction order.
[0143] The data query method provided in any of the above-mentioned embodiments of the present disclosure can be executed by any appropriate network-side device with data processing capabilities, including but not limited to a single server, a server cluster, a cloud server, etc. Alternatively, the data query method provided in the embodiments of the present disclosure can be executed by a processor, such as a processor that executes any of the data query methods mentioned in the embodiments of the present disclosure by invoking corresponding instructions stored in a memory. This will not be further described below.
[0144] Figure 8 FIG. 1 is a flow chart of a data query method provided by another exemplary embodiment of the present disclosure. The method includes the following steps:
[0145] Step 301: In response to a query operation of a first user, a query parameter input by the first user is obtained.
[0146] Primary users are maintenance personnel, customer service personnel, developers, and other personnel who need to view comprehensive business data. A query operation involves entering query parameters on the query interface and clicking a similar button, such as "Query." The specific operation method can be configured based on actual needs.
[0147] Step 302: Generate a data query request according to the query parameters.
[0148] Step 303: Send the data query request to the server so that the server performs a query based on the data item configuration information to obtain a data query result; the data item configuration information includes configuration attribute information of the data item, and the configuration attribute information of the data item includes at least the data source identifier of the data item.
[0149] Step 304: Receive and display the data query result returned by the server.
[0150] The specific display method can be set according to actual needs and is not limited in this disclosure.
[0151] It should be noted that this embodiment is a method embodiment on the terminal device side that interacts with the above-mentioned embodiment. The specific operations of each step have been described in detail in the above-mentioned embodiment and can achieve the same effect as the above-mentioned embodiment, so they will not be repeated here.
[0152] Exemplary devices
[0153] Figure 9 FIG is a structural diagram of a data query device provided by an exemplary embodiment of the present disclosure. The device of this embodiment can be used to implement the corresponding method embodiments of the present disclosure, such as Figure 9 The device shown includes: a first receiving module 501 , a first obtaining module 502 , a second obtaining module 503 , a first processing module 504 and a first sending module 505 .
[0154] The first receiving module 501 is configured to receive a data query request sent by a terminal device, where the data query request includes query parameters.
[0155] The first acquisition module 502 is used to acquire corresponding data item configuration information according to the query parameters received by the first receiving module 501. The data item configuration information includes configuration attribute information of the data item. The configuration attribute information of the data item includes at least a data source identifier of the data item.
[0156] The second acquisition module 503 is configured to acquire the content of each data item from the corresponding data source according to the data source identifier of each data item acquired by the first acquisition module 502 .
[0157] A first processing module 504 is configured to generate a data query result based on the content of each data item acquired by the second acquisition module 503;
[0158] The first sending module 505 is configured to return the data query result generated by the first processing module 504 to the terminal device.
[0159] In an alternative example, Figure 10is a schematic diagram of the structure of a second acquisition module provided by an exemplary embodiment of the present disclosure. In this example, the configuration attribute information of the data item also includes the acquisition path information of the data item. Accordingly, the second acquisition module 503 includes a first acquisition unit 5031 and a first processing unit 5032. The first acquisition unit 5031 is configured to, for data items having the same data source identifier, use the same data source identifier as the first data source identifier and, based on the first data source identifier, acquire raw data including the content of each data item from the corresponding first data source. The first processing unit 5032 is configured to acquire the content of each data item from the raw data acquired by the first acquisition unit 5031 based on the acquisition path information of each data item.
[0160] Figure 11 It is a structural diagram of a data query device provided by another exemplary embodiment of the present disclosure.
[0161] In an optional example, the apparatus disclosed herein further includes: a judgment module 506, configured to determine whether the first data source type corresponding to the first data source identifier is a preset target type; correspondingly, a first acquisition unit 5031, configured to: if the first data source type corresponding to the first data source identifier is the preset target type, obtain corresponding user identification information according to query parameters; and obtain original data of the content of each data item corresponding to each user identification information from the first data source according to the user identification information.
[0162] In an optional example, the configuration attribute information of the data item also includes the data source type of the data item; the first processing module 504 is specifically used to: group the content of each data item according to the data source type to obtain a first grouping result; and use the first grouping result as the data query result.
[0163] In an optional example, the first processing module 504 is further used to, after obtaining the first grouping result, group the data item contents in the corresponding group for each data source type belonging to the preset target type according to user identification information to obtain a second grouping result; and use the second grouping result as the data query result.
[0164] In an optional example, if the data items include a first data item, and the first data item has a parent node in the data structure in the data source, then the configuration attribute information of the first data item also includes the parent node path information of the first data item; the first processing unit 5032 is specifically used to: for the first data item, according to the parent node path information of the first data item and the acquisition path information, obtain the data item content corresponding to the first data item from the original data.
[0165] In an optional example, the configuration attribute information of the data item also includes a display name of the data item; the first processing module 504 is specifically configured to generate a data query result according to the content of each data item and the display name of each data item.
[0166] In an optional example, the configuration attribute information of the data item further includes the configuration validity status of the data item, which is used to indicate whether the data item needs to be queried during query.
[0167] In an optional example, the first processing module 504 is also used to: if the data item includes a second data item, and the configuration attribute information of the second data item also includes a data item dictionary value, then for the second data item, the data item content corresponding to the second data item is converted into target content according to the data item dictionary value as the final data item content of the second data item in the data query result.
[0168] Figure 12 Schematic diagram of the structure of a data query device provided by another exemplary embodiment of the present disclosure. The device of this embodiment can be used to implement the corresponding method embodiment (on the terminal device side) of the present disclosure, such as Figure 12 The device shown includes: a third acquisition module 601 , a second processing module 602 , a second sending module 603 , a second receiving module 604 and a display module 605 .
[0169] The third acquisition module 601 is configured to acquire a query parameter input by the first user in response to a query operation of the first user.
[0170] The second processing module 602 is configured to generate a data query request according to the query parameters obtained by the third obtaining module 601 .
[0171] The second sending module 603 is used to send the data query request to the server so that the server can query based on the data item configuration information to obtain the data query result; the data item configuration information includes the configuration attribute information of the data item, and the configuration attribute information of the data item at least includes the data source identifier of the data item.
[0172] The second receiving module 604 is configured to receive the data query result returned by the server.
[0173] The display module 605 is used to display the data query result received by the second receiving module 604.
[0174] In addition, an embodiment of the present disclosure further provides an electronic device, including:
[0175] memory for storing computer programs;
[0176] The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, implement the data query method described in any of the above server-side embodiments of the present disclosure.
[0177] Figure 13 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. Figure 13 As shown, the electronic device includes one or more processors and memory.
[0178] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0179] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the data query method of each embodiment of the present disclosure described above and / or other desired functions.
[0180] In one example, the electronic device may further include an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0181] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.
[0182] The output device can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0183] Of course, to simplify, Figure 13 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0184] In some optional examples, the present disclosure further provides a terminal device, including:
[0185] memory for storing computer programs;
[0186] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the data query method described in any of the above-mentioned terminal device side embodiments of the present disclosure is implemented.
[0187] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the data query method according to various embodiments of the present disclosure described in the above part of this specification.
[0188] The computer program product may be written in any combination of one or more programming languages to implement the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0189] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the data query method according to various embodiments of the present disclosure described in the above part of this specification.
[0190] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0191] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.
[0192] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be construed as necessarily possessed by each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.
[0193] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For system embodiments, since they are essentially identical to the method embodiments, their description is relatively simple. For relevant parts, refer to the descriptions of the method embodiments.
[0194] The block diagrams of the devices, devices, equipment, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0195] The methods and apparatus of the present disclosure may be implemented in many ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers recording media that store programs for executing the methods according to the present disclosure.
[0196] It should also be noted that in the apparatus, device, and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0197] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0198] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A data query method, characterized in that: include: receiving a data query request sent by a terminal device, wherein the data query request includes query parameters; According to the query parameter, the corresponding data item configuration information is acquired, wherein the data item configuration information includes configuration attribute information of the data item, and the configuration attribute information of the data item includes a data source identifier of the data item and a data source type of the data item; According to the data source identifier of each data item, obtain the content of each data item from the corresponding data source; Generate and return data query results based on the content of each data item; Wherein, based on the content of each data item, a data query result is generated and returned, including: Grouping the contents of each of the data items according to the data source type to obtain a first grouping result; Returning the first grouping result as the data query result to the terminal device; After grouping the contents of each data item according to the data source type to obtain a first grouping result, the method further includes: For each data source type belonging to the preset target type, the data item content in the corresponding group is further grouped according to the user identification information to obtain a second grouping result; wherein whether the data source type belongs to the preset target type is determined in advance; and the user identification information is obtained according to the query parameter if the data source type is the preset target type; The returning the first grouping result as the data query result to the terminal device includes: The second grouping result is returned to the terminal device as the data query result.
2. The method according to claim 1, characterized in that The configuration attribute information of the data item also includes acquisition path information of the data item; The step of obtaining the content of each data item from the corresponding data source according to the data source identifier of each data item includes: For data items having the same data source identifier, using the same data source identifier as a first data source identifier, and acquiring original data including the content of each data item from the corresponding first data source according to the first data source identifier; According to the acquisition path information of each data item, the content of each data item is acquired from the original data.
3. The method according to claim 2, characterized in that Before acquiring the original data including the content of each data item from the corresponding first data source according to the first data source identifier, the method further includes: Determining whether the first data source type corresponding to the first data source identifier is a preset target type; The acquiring the original data including the content of each data item from the corresponding first data source according to the first data source identifier includes: If the first data source type corresponding to the first data source identifier is a preset target type, acquiring corresponding user identification information according to the query parameter; The original data of the content of each data item corresponding to each piece of user identification information is obtained from the first data source according to the user identification information.
4. The method according to claim 2, characterized in that If the data items include a first data item, and the first data item has a parent node in the data structure in the data source, the configuration attribute information of the first data item further includes the path information of the parent node of the first data item; The step of acquiring the content of each data item from the original data according to the acquisition path information of each data item includes: For the first data item, according to the parent node path information and the acquisition path information of the first data item, obtain data item content corresponding to the first data item from the original data; and / or, The configuration attribute information of the data item also includes a display name of the data item; Generating and returning data query results based on the content of each data item includes: The data query result is generated and returned according to the content of each data item and the display name of each data item.
5. The method according to claim 1, wherein The configuration attribute information of the data item also includes the configuration validity status of the data item, which is used to indicate whether the data item needs to be queried during query.
6. The method according to any one of claims 1 to 5, characterized in that If the data item includes a second data item, and the configuration attribute information of the second data item further includes a data item dictionary value, the generating and returning of a data query result according to the content of each of the data items further includes: For the second data item, the data item content corresponding to the second data item is converted into target content according to the data item dictionary value as the final data item content of the second data item in the data query result.
7. A data query method, characterized in that: include: In response to a query operation by the first user, obtaining a query parameter input by the first user; generating a data query request according to the query parameters; Sending the data query request to a server so that the server performs a query based on the data item configuration information to obtain a data query result; the data item configuration information includes configuration attribute information of the data item, and the configuration attribute information of the data item includes a data source identifier of the data item and a data source type of the data item; receiving and displaying a data query result returned by the server; the data query result is obtained by: grouping the contents of each data item according to the data source type to obtain a first grouping result, and then, for each data source type belonging to a preset target type, further grouping the contents of the data items in the corresponding group according to user identification information to obtain a second grouping result; wherein whether the data source type belongs to the preset target type is determined in advance; The user identification information is acquired according to the query parameter when the data source type is a preset target type.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data query method and device
CN106649630A
Data query method and device and electronic equipment
CN108108439A
Database processing and data query method and equipment
CN108959330A
Data query method and system and computing device
CN111814029A