Data query method and device, equipment, storage medium and program product
By displaying only fields within the preset range in the historical business flow table and storing other fields as files, setting file paths based on primary key information, the problem of low efficiency of querying sub-databases and tables is solved, and the efficiency of massive data query and users are improved Experience.
Patent Information
- Application Number
- CN202411177645.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-26
AI Technical Summary
In the prior art, the use of database and table query method results in low data query efficiency, complicated and time-consuming operation, especially when queries of massive data, the user experience is reduced.
Query multiple target records corresponding to the query fields in the historical business flow table, only fields within the preset range in each target record are displayed, other fields are placed in the file, and the file name and file path are set according to the primary key information, so that Subsequent file reviews, and users can click the details button to view other fields.
It improves the efficiency of massive data query, simplifies operational processes, reduces operation and maintenance costs, and improves user experience.
Smart Images

Figure CN119149493A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data, and in particular to a data query method, device, equipment, storage medium and program product. Background Art
[0002] After business processing based on the computer system, a large amount of historical business data will be generated, and historical business data query processing can be performed based on the data query function.
[0003] In the prior art, a method of querying by using separate libraries and tables is adopted, in which data is stored by using vertical or horizontal separate libraries, and then data is queried by using vertical or horizontal separate libraries.
[0004] However, in the above method, the method of querying by separate databases and tables is adopted, which requires multiple database and table query operations, and the operation is complicated and time-consuming, resulting in low data query efficiency. Summary of the invention
[0005] The present application provides a data query method, device, equipment, storage medium and program product to solve the technical problem of low data query efficiency caused by using a database and table query method.
[0006] In a first aspect, the present application provides a data query method, comprising: in response to a first query request from a user, obtaining at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located; if it is determined that the number of fields of the target record is greater than a preset number, then displaying the first field in the target record and displaying a detail button corresponding to the target record; wherein the number of fields is the number of business table fields in the target record. the total number of; the first field is a business table field within a preset range in the target record; according to the second field in the target record, a first file corresponding to the target record is generated; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; the first file is stored in a file system; according to the primary key information corresponding to the target record, the file name and file path of the first file are determined; wherein the primary key information represents the unique identifier corresponding to each second field in the target record; in response to the user clicking the target details button, the second field in the target record corresponding to the target details button is displayed.
[0007] In a possible design, the file name and file path of the first file are determined according to the primary key information corresponding to the target record, including: determining the primary key information and description information corresponding to the target record; and determining the file name of the first file according to the primary key information and the description information; wherein the description information represents the type of the business table where the target record is located; and determining the file path of the first file according to the primary key information corresponding to the target record.
[0008] In a possible design, determining the primary key information corresponding to the target record includes:
[0009] Determine a time field and an identification field in the target record; wherein the time field represents the time data in the business data represented by each second field in the target record, and the identification field represents the identification data in the business data represented by each second field in the target record; determine the primary key information corresponding to the target record based on the time field and the identification field.
[0010] In one possible design, the method also includes: if it is determined that the business table field corresponding to the first query field does not exist in the historical business flow table, then adding a business table field corresponding to the first query field to the current business flow table; and migrating the business flow table to the historical business flow table.
[0011] In one possible design, after migrating the business flow table to the historical business flow table, it also includes: determining at least one associated business table associated with the business flow table; wherein the associated business table includes at least one business record; storing each of the associated business tables in a second file in the file system; wherein the second file has a file name and a file path.
[0012] In one possible design, the method also includes: in response to the user's second query request, determining a target file name corresponding to the second query request; wherein the second query request includes a second query field representing a data query condition; and based on the target file name, querying the file corresponding to the target file name from the file system.
[0013] In a second aspect, the present application provides a data query device, which includes: an acquisition module, which is used to respond to a user's first query request and obtain at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where the business table field corresponding to the first query field is located; a first display module, which is used to display the first field in the target record and display the details button corresponding to the target record if it is determined that the number of fields in the target record is greater than a preset number; wherein the number of fields is the total number of business table fields in the target record. number; the first field is a business table field within a preset range in the target record; a generation module is used to generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; the first file is stored in a file system; a determination module is used to determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents the unique identifier corresponding to each second field in the target record; a second display module is used to display the second field in the target record corresponding to the target details button in response to the user clicking the target details button.
[0014] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0015] The memory stores computer-executable instructions;
[0016] The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0018] In a fifth aspect, the present application provides a computer program product, comprising: a computer program, wherein the computer program is used to implement the method described in the first aspect when executed by a processor.
[0019] The data query method, device, equipment, storage medium and program product provided by the present application query multiple target records corresponding to the query fields in the historical business flow table, only display the fields within a preset range in each target record, put the other fields in the first file, and set the file name and file path of the first file according to the primary key information of the other fields to facilitate subsequent file retrieval. At the same time, the user can click the target details button to view other fields in the corresponding target record; thereby, the efficiency of massive data query can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] Figure 1 A schematic diagram of an application scenario provided for this application;
[0022] Figure 2 A flowchart of a data query method provided in an embodiment of the present application;
[0023] Figure 3 A flowchart of another data query method provided in an embodiment of the present application;
[0024] Figure 4 A flowchart of another data query method provided in an embodiment of the present application;
[0025] Figure 5 A flowchart of another data query method provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of the structure of a data query device provided in an embodiment of the present application;
[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0030] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0031] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0032] Figure 1 A schematic diagram of an application scenario provided by this application. Figure 1 As shown, the specific application scenario of the present application includes an electronic device 101 and a user 102. The user 102 can perform historical business data query processing through the data query function of the electronic device 101.
[0033] In one example, the method of database and table sharding is generally used in historical data query, which is mainly divided into vertical database sharding and horizontal database sharding; among them, vertical database sharding is generally stored in databases according to the dimensions of business or data hotspots, and then the database sharding query operation is performed according to the dimensions of business or data hotspots based on the electronic device 101; horizontal database sharding is to split the business data as evenly as possible into different tables for storage based on certain rules, and then perform database sharding query operations from different tables based on the electronic device 101.
[0034] However, the above method uses a method of querying by separate databases and tables, which requires multiple database and table query operations, which is complicated and time-consuming, resulting in low data query efficiency. In addition, historical queries involve the association of multiple table queries and the aggregation of results after multiple database executions, or require the introduction of new product tools, which has high operation and maintenance costs. In addition, users make multiple queries in different time periods, which reduces user experience.
[0035] In response to the above technical problems, this application proposes the following technical ideas: by querying multiple target records corresponding to the query fields in the historical business flow table, only the fields within the preset range in each target record are displayed, and the other fields are placed in the first file, and the file name and file path of the first file are set according to the primary key information of the other fields for subsequent file retrieval. At the same time, the user can click the target details button to view other fields in the corresponding target record. In this way, the problem of low data query efficiency caused by the use of sub-library and sub-table query in the prior art can be solved.
[0036] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0037] Figure 2 A flow chart of a data query method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the method includes:
[0038] 201. In response to a first query request from a user, obtain at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located.
[0039] Exemplarily, the execution subject of this embodiment may be an electronic device, hereinafter referred to as the device. The device may be a physical device or a virtual device that executes the data query method. Usually, when a user establishes a historical business flow table through a device, the table structure is the same or similar to the current business table. At the end of the day or at a certain moment, there will be a scheduled task to migrate the data that meets the conditions from the current business table to the historical business flow table. Furthermore, the historical business flow table includes multiple business records, and each business record includes at least one business table field that represents the business data; for example, as shown in Table 1, in the bus management system, there is a historical mainstream water meter for the following buses.
[0040] Table 1 Historical mainstream water meters for buses
[0041]
[0042] When the user needs to query data, the user operates the device and selects the preset query field displayed on the device interface to input a query request to the device. The query request includes a first query field for representing the data query condition. For example, the query condition for the history of bus management includes the start time of using the bus, the end time of using the bus, the applicant, the passenger, and the license plate number. The device responds to the user's first query request, and selects the historical business flow table as the query main table according to the correspondence between the query field and the business table field, and queries from the historical business flow table to obtain one or more business records where the business table fields corresponding to the first query field are located, that is, the target records.
[0043] 202. If it is determined that the number of fields of the target record is greater than the preset number, the first field in the target record is displayed, and a detail button corresponding to the target record is displayed; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record.
[0044] Exemplarily, based on the historical list query function, the device first determines the total number of business table fields in each target record found, that is, the number of fields of the target record, and determines whether the number of fields of the target record is greater than the preset number. If it is determined that the number of fields of the target record is greater than the preset number, that is, there are too many business table fields in the target record in the historical mainstream water meter, then the business table field within the preset range in the target record, that is, the first field, is determined, and only the first field in each target record is displayed through the list query. Based on the historical detail display function, the detail button corresponding to each target record is displayed to instruct the user to query the specific details of the target record. For example, as shown in Table 2, the query list that has been queried displays the first field in each target record.
[0045] Table 2 Query list
[0046] Transaction ID Application Date applicant Passengers License plate number 20240101123045666a123456 20240101 Zhang San Li Si SeaA11111
[0047] 203. Generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; and the first file is stored in the file system.
[0048] Exemplarily, after the device determines the first field in each target record, it determines the other business table fields in each target record except the first fields as the second sub-segment, and generates a text file corresponding to each target record, that is, the first file, stores the second field in each target record in the corresponding first file, and stores the first file in the file system for processing.
[0049] 204. Determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents a unique identifier corresponding to each second field in the target record.
[0050] Exemplarily, when storing the first file corresponding to each target record, the device sets the file name of each corresponding first file and the file path of the first file according to the unique identifier corresponding to each second field in each target record, that is, the primary key information; for example, other fields are put into a text file, the file name of the file is "20240101123045666a123456.dat", and the field format can be key:value or json.
[0051] 205. In response to a user clicking operation on a target detail button, display a second field in the target record corresponding to the target detail button.
[0052] Exemplarily, based on the historical details display function, the user generally selects one of the target records from the displayed query list and clicks the details button corresponding to the selected target record, that is, the target details button. The device responds to the click operation and displays the second field in the target record corresponding to the target details button; for example: after clicking the details button of a record in the historical query results, the application form information, vehicle dispatch information, approval opinion details, vehicle information, driver information, etc. of the corresponding record are displayed. At this time, the user can query the business data corresponding to all the business table fields of the target record.
[0053] In this embodiment, a data query method is provided, which queries multiple target records corresponding to the query fields in the historical business flow table, only displays the fields within a preset range in each target record, and puts the other fields into a first file. The file name and file path of the first file are set according to the primary key information of the other fields to facilitate subsequent file retrieval. At the same time, the user can click the target details button to view other fields in the corresponding target record; thereby, the efficiency of massive data query is improved.
[0054] Figure 3 A flowchart of another data query method provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the method includes:
[0055] 301. In response to a first query request from a user, obtain at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located.
[0056] Exemplarily, this step may refer to step 201 and will not be described in detail here.
[0057] 302. If it is determined that the number of fields of the target record is greater than the preset number, the first field in the target record is displayed, and a detail button corresponding to the target record is displayed; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record.
[0058] Exemplarily, this step may refer to step 202 and will not be described in detail here.
[0059] 303. Generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; and the first file is stored in the file system.
[0060] Exemplarily, this step may refer to step 203 and will not be described in detail here.
[0061] 304. Determine the primary key information and description information corresponding to the target record; and determine the file name of the first file according to the primary key information and the description information; wherein the description information represents the type of the business table where the target record is located.
[0062] Exemplarily, the device determines the primary key information and description information corresponding to the target record based on the second field in each target record, wherein the description information represents the type of the business table where the target record is located, such as an approval opinion table, a vehicle table, etc.; according to the primary key information and description information corresponding to each target record, the file name of the first file corresponding to the target record is set. For example, the content of the approval opinion table can be implemented as "20240101123045666a123456-opinion.dat".
[0063] In one example, determining the primary key information corresponding to the target record in step 304 includes the following steps:
[0064] The first step of step 304 is to determine the time field and identification field in the target record; wherein the time field represents the time data in the business data represented by each second field in the target record, and the identification field represents the identification data in the business data represented by each second field in the target record.
[0065] The second step of step 304 is to determine the primary key information corresponding to the target record according to the time field and the identification field.
[0066] Exemplarily, in order to ensure uniqueness when setting the primary key, time information and personal identification information are generally added, that is, the device can first determine the time field and identification field in each target record, the time field represents the time data in the business data represented by each second field in the target record, that is, time information, such as application time and vehicle departure time; the identification field represents the identification data in the business data represented by each second field in the target record, that is, personal identification information, such as driver number; according to the time field and identification field in each target record, the primary key information corresponding to each target record is determined; for example, the time field in the target record is 20240101123045666, the identification field is a123456, then the obtained primary key information is 20240101123045666a123456, the description field is opinion, then the obtained file name is 20240101123045666a123456-opinion.dat.
[0067] 305. Determine the file path of the first file according to the primary key information corresponding to the target record.
[0068] Exemplarily, in order to be able to quickly access each file, the device sets the file path of the first file corresponding to the target record according to the primary key information corresponding to each determined target record, that is, the file path can be segmented, for example, by time interval and personal identification, to facilitate file positioning. For example, "regular expression" and other methods can be used to calculate the path. When the file name is "20240101123045666a123456-opinion.dat", you know that the file path is: / home / ap / nas / 20240101 / 1230 / 45 / 666 / a123456 / -opinion.dat.
[0069] 306. In response to a user clicking operation on a target detail button, display a second field in the target record corresponding to the target detail button.
[0070] Exemplarily, this step may refer to step 205 and will not be described in detail here.
[0071] In this embodiment, based on the above embodiment, a time field and an identification field are added to the primary key information to set the file name and file path; thus, a faster response can be achieved even in massive data, thereby improving the query efficiency of massive data.
[0072] Figure 4 A flowchart of another data query method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method includes:
[0073] 401. In response to a first query request from a user, obtain at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located.
[0074] Exemplarily, this step may refer to step 201 and will not be described in detail here.
[0075] 402. If it is determined that the number of fields of the target record is greater than the preset number, the first field in the target record is displayed, and a detail button corresponding to the target record is displayed; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record.
[0076] Exemplarily, this step may refer to step 202 and will not be described in detail here.
[0077] 403. Generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except for each first field; the first file includes each second field in the target record; and the first file is stored in the file system.
[0078] Exemplarily, this step may refer to step 203 and will not be described in detail here.
[0079] 404. Determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents a unique identifier corresponding to each second field in the target record.
[0080] Exemplarily, this step may refer to step 204 and will not be described in detail here.
[0081] 405. In response to a user clicking operation on a target detail button, display a second field in the target record corresponding to the target detail button.
[0082] Exemplarily, this step may refer to step 205 and will not be described in detail here.
[0083] 406. If it is determined that the business table field corresponding to the first query field does not exist in the historical business flow table, then a business table field corresponding to the first query field is added to the current business flow table.
[0084] Exemplarily, after step 401, when the device performs data query, if it is determined that the table field corresponding to the query field is not in the historical business flow table, the business table field corresponding to the first query field is directly stored in the current business flow table.
[0085] 407. Migrate the business flow table to the historical business flow table.
[0086] Exemplarily, based on the scheduled task, when the device migrates at the end of the day, each business table field in the business flow water table is synchronously migrated to the historical mainstream water table, so as to facilitate subsequent data query.
[0087] 408. Determine at least one associated business table associated with the business flow table; wherein the associated business table includes at least one business record.
[0088] Exemplarily, based on a scheduled task, when the device migrates data that meets the conditions from the business flow meter to the historical mainstream water meter at the end of the day, it determines multiple associated business tables associated with the business flow meter, as shown in the following tables, wherein each associated business table includes at least one business record.
[0089] Table 3 Mainstream water meters
[0090]
[0091] Table 4: Vehicle dispatch table
[0092] Transaction ID Vehicle ID Driver ID Passengers …… 20240101123045666a123456 CAR001 DR001 Li Si ……
[0093] Table 5 Approval Opinion Form
[0094] Transaction ID Approval Time Approver Opinion … 20240101123045666a123456 20240101 13:01 Wang Wu agree … 20240101123045666a123456 20240101 13:41 Zhao Liu agree … 20240101123045666a123456 20240101 13:55 Sun Qi disagree …
[0095] Table 6 Vehicle table
[0096] Vehicle ID License plate number brand model CAR001 SeaA11111 GL8 MPV
[0097] Table 7 Driver table
[0098] Driver ID Name Driver's license type …… DR001 Eighth C1 ……
[0099] 409. Store each associated business table in a second file in the file system; wherein the second file has a file name and a file path.
[0100] Exemplarily, the device converts the data of each associated business table into a file, that is, stores it in a second file in the file system. The second file also has a file name and a file path. The file name and file path setting of the second file can refer to the file name and file path setting process of the first file, which will not be repeated here; for example, the file name can be set to "primary key + description.dat", the table field format can be key: value or json, and the content of the approval opinion table can be "20240101123045666a123456-opinion.dat".
[0101] In this embodiment, based on the above embodiment, through data migration, each related business table is stored as a file to facilitate subsequent file query and improve data query efficiency. At the same time, by storing in the form of files, the increase in data volume only requires expanding the disk, which is relatively low in cost.
[0102] Figure 5 A flow chart of another processing method provided in the embodiment of the present application is as follows: Figure 5 As shown, the method includes:
[0103] 501. In response to a first query request from a user, obtain at least one target record from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located.
[0104] Exemplarily, this step may refer to step 201 and will not be described in detail here.
[0105] 502. If it is determined that the number of fields of the target record is greater than the preset number, the first field in the target record is displayed, and a detail button corresponding to the target record is displayed; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record.
[0106] Exemplarily, this step may refer to step 202 and will not be described in detail here.
[0107] 503. Generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; and the first file is stored in the file system.
[0108] Exemplarily, this step may refer to step 203 and will not be described in detail here.
[0109] 504. Determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents a unique identifier corresponding to each second field in the target record.
[0110] Exemplarily, this step may refer to step 204 and will not be described in detail here.
[0111] 505. In response to a user clicking operation on a target detail button, display a second field in the target record corresponding to the target detail button.
[0112] Exemplarily, this step may refer to step 205 and will not be described in detail here.
[0113] 506. In response to a second query request from the user, determine a target file name corresponding to the second query request; wherein the second query request includes a second query field representing a data query condition.
[0114] Exemplarily, when the user performs a data query again, the device responds to the second query request input by the user, and according to the second query field representing the data query condition in the second query request and based on the correspondence between the first query field and the file name, the target file name corresponding to the second query field can be determined.
[0115] 507. According to the target file name, query the file system for the file corresponding to the target file name.
[0116] Exemplarily, based on the determined target file name, the device can use methods such as "regular expression" to perform path calculation on the target file name to obtain the file path corresponding to the target file name. Through the file path, the file corresponding to the target file name can be queried from the file system to complete the data query process.
[0117] In this embodiment, based on the above embodiment, the file corresponding to the query field is quickly located through the relationship between the query field, the business table field, the file name, and the file path, so as to improve the data query efficiency.
[0118] Figure 6 A schematic diagram of a data query device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device comprises:
[0119] The acquisition module 601 is used to obtain at least one target record from the historical business flow table in response to the user's first query request; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is the business record where the business table field corresponding to the first query field is located.
[0120] The first display module 602 is used to display the first field in the target record and the detail button corresponding to the target record if it is determined that the number of fields in the target record is greater than the preset number; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record.
[0121] Generation module 603 is used to generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except each first field; the first file includes each second field in the target record; and the first file is stored in the file system.
[0122] The determination module 604 is used to determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents the unique identifier corresponding to each second field in the target record.
[0123] The second display module 605 is used to display the second field in the target record corresponding to the target detail button in response to the user clicking the target detail button.
[0124] In one possible design, the determination module 604 is specifically used to: determine the primary key information and description information corresponding to the target record; and determine the file name of the first file based on the primary key information and description information; wherein the description information represents the type of the business table where the target record is located; and determine the file path of the first file based on the primary key information corresponding to the target record.
[0125] In one possible design, the determination module 604 is specifically configured to:
[0126] Determine the time field and identification field in the target record; wherein the time field represents the time data in the business data represented by each second field in the target record, and the identification field represents the identification data in the business data represented by each second field in the target record; determine the primary key information corresponding to the target record based on the time field and the identification field.
[0127] In one possible design, the device is also used to: if it is determined that the business table field corresponding to the first query field does not exist in the historical business flow table, then add a business table field corresponding to the first query field in the current business flow table; and migrate the business flow table to the historical business flow table.
[0128] In one possible design, the device is also specifically used to: determine at least one associated business table associated with the business flow table; wherein the associated business table includes at least one business record; store each associated business table in a second file in the file system; wherein the second file has a file name and a file path.
[0129] In one possible design, the device is also specifically used to: in response to a user's second query request, determine a target file name corresponding to the second query request; wherein the second query request includes a second query field representing a data query condition; and based on the target file name, query a file corresponding to the target file name from the file system.
[0130] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.
[0131] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. Each module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The functions of each module. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0132] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device includes: a memory 701, a processor 702; the memory 701; and a memory for storing instructions executable by the processor 702.
[0133] The processor 702 is configured to execute the method provided in the above embodiment.
[0134] The electronic device further includes a receiver 703 and a transmitter 704. The receiver 703 is used to receive instructions and data sent by other devices, and the transmitter 704 is used to send instructions and data to external devices.
[0135] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solutions in the above embodiments.
[0136] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution in the above embodiment.
[0137] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution in the above embodiments can be implemented.
[0138] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0139] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0140] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0141] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0142] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0143] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0144] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0145] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0146] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0147] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0148] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0149] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data query method, It is characterized in that The method comprises: In response to a first query request from a user, at least one target record is obtained from a historical business flow table; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located; If it is determined that the number of fields of the target record is greater than the preset number, the first field in the target record is displayed, and a detail button corresponding to the target record is displayed; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record; Generate a first file corresponding to the target record according to the second field in the target record; wherein the second field is other business table fields in the target record except the first fields; the first file includes the second fields in the target record; and the first file is stored in a file system; Determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents the unique identifier corresponding to each second field in the target record; In response to the user clicking an object detail button, a second field in the object record corresponding to the object detail button is displayed.
2. The method according to claim 1, It is characterized in that Determining the file name and file path of the first file according to the primary key information corresponding to the target record includes: Determine the primary key information and description information corresponding to the target record; and determine the file name of the first file according to the primary key information and the description information; wherein the description information represents the type of the business table where the target record is located; The file path of the first file is determined according to the primary key information corresponding to the target record.
3. The method according to claim 2, It is characterized in that Determining the primary key information corresponding to the target record includes: Determine a time field and an identification field in the target record; wherein the time field represents the time data in the business data represented by each second field in the target record, and the identification field represents the identification data in the business data represented by each second field in the target record; The primary key information corresponding to the target record is determined according to the time field and the identification field.
4. The method according to claim 1, It is characterized in that The method further comprises: If it is determined that the business table field corresponding to the first query field does not exist in the historical business flow table, then adding a business table field corresponding to the first query field to the current business flow table; The business flow table is migrated to the historical business flow table.
5. The method according to claim 4, It is characterized in that After the business flow table is migrated to the historical business flow table, the method further includes: Determine at least one associated business table associated with the business flow table; wherein the associated business table includes at least one business record; Each of the associated business tables is stored in a second file in the file system; wherein the second file has a file name and a file path.
6. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: In response to a second query request of the user, determining a target file name corresponding to the second query request; wherein the second query request includes a second query field representing a data query condition; According to the target file name, the file corresponding to the target file name is searched from the file system.
7. A data query device, It is characterized in that The device comprises: an acquisition module, configured to acquire at least one target record from a historical business flow table in response to a first query request of a user; wherein the first query request includes a first query field representing a data query condition; the historical business flow table includes at least one business record, and the business record includes at least one business table field representing business data; the target record is a business record where a business table field corresponding to the first query field is located; A first display module, configured to display the first field in the target record and a detail button corresponding to the target record if it is determined that the number of fields in the target record is greater than a preset number; wherein the number of fields is the total number of business table fields in the target record; and the first field is a business table field within a preset range in the target record; A generating module, configured to generate a first file corresponding to the target record according to a second field in the target record; wherein the second field is other business table fields in the target record except for each first field; the first file includes each second field in the target record; and the first file is stored in a file system; A determination module, configured to determine the file name and file path of the first file according to the primary key information corresponding to the target record; wherein the primary key information represents a unique identifier corresponding to each second field in the target record; The second display module is used to display a second field in the target record corresponding to the target detail button in response to the user clicking the target detail button.
8. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, It is characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
Citation Information
Patent Citations
Data checking method, device and equipment of distributed system and medium
CN115718728A
Track data processing method and device, electronic equipment and storage medium
CN116842282A
Data storage method, data query method and related devices
CN117972012A
Collection query driven generation of inverted index for raw machine data
US20170139996A1
Non-transitory computer readable storage medium and artificial intelligence inference system and method
US20230401257A1
