Data query method and device, computer device, storage medium and program product
By using a unified activity list interface and business query interface, and leveraging activity codes and primary keys for data retrieval, the problem of wasted human and server resources in enterprises' diverse business activities has been solved, and efficient data retrieval has been achieved.
Patent Information
- Application Number
- CN202310132453.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-02-17
AI Technical Summary
In existing technologies, enterprises waste human resources and back-end query server resources due to their diverse business activities, making it impossible to efficiently query data.
By setting up an activity list interface and a business query interface, the user's data query function can be uniformly implemented. Data queries can be performed using activity codes and primary keys, reducing the need for separate query interfaces for each activity.
It improves the efficiency of data retrieval and saves human resources and backend query server resources.
Smart Images

Figure CN116340359B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data query technology, and in particular to a data query method, apparatus, computer equipment, storage medium and program product. Background Technology
[0002] To drive business growth, many companies plan a variety of engaging activities. For example, "Purchase a certain product to qualify for a prize draw," "Download an app to earn points," or "Purchase a product to receive a free gift." These diverse activities are linked to various rewards, and users need to use their unique information to check if they have won a prize or are eligible for a draw. Because business scenarios are diverse and activities are varied, the rewards for different scenarios may be the same. If a separate query interface is set up for each scenario and reward, it will generate a large amount of repetitive work, resulting in a significant waste of human resources and backend query server resources. Therefore, how to save human resources and backend query server resources has become a pressing technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0003] Therefore, it is necessary to provide a data query method, device, computer equipment, storage medium, and program product that can save human resources and back-end query server resources to address the above-mentioned technical problems.
[0004] Firstly, this application provides a data query method. The method includes:
[0005] Receive user information entered on the data query interface;
[0006] The user information is reviewed for eligibility according to the activity rules, and the review results are obtained.
[0007] When the review result indicates that the review has passed, the activity list interface is accessed.
[0008] In response to a trigger operation on the activity list interface, retrieve the corresponding activity primary key and activity code;
[0009] In response to the activity primary key and the activity code entered on the business query interface, a query request is sent to the query server so that the query server can retrieve the original activity data according to the query request;
[0010] The target activity data is extracted from the original activity data based on the returned parameters.
[0011] In one embodiment, obtaining the original activity data based on the query request includes:
[0012] The corresponding activity query parameters are determined based on the activity code, and the activity data table corresponding to the user information is obtained based on the activity code;
[0013] User parameters are extracted from the user information based on the activity query parameters;
[0014] The original activity data is obtained by querying the activity data table based on the user parameters and the activity primary key.
[0015] In one embodiment, retrieving the original activity data from the activity data table based on the user parameters and the activity primary key includes:
[0016] The names of the activities the user participates in are determined based on the user parameters;
[0017] Based on the activity name and the activity primary key, the corresponding activity details data can be obtained by querying the activity data table;
[0018] The original activity data is obtained by assembling the activity details data.
[0019] In one embodiment, the method further includes:
[0020] Receive activity data information entered on the configuration page;
[0021] The activity data information is stored in Hive, and an activity data table is created based on the activity data information and the activity code;
[0022] The activity data table is synchronized to Elasticsearch through a preset synchronization task, and the association between the activity code and the activity data table is established.
[0023] In one embodiment, the activity data information includes activity attribute data and activity detail data;
[0024] The step of storing the activity data information in Hive and establishing an activity data table based on the activity data information and activity code includes:
[0025] The activity attribute data is stored in MySQL, and the activity detail data is stored in Hive;
[0026] Construct an activity framework based on the activity attribute data;
[0027] The activity details data are populated into the activity frame, and the activity data table is created based on the populated activity frame and the activity code.
[0028] In one embodiment, the step of extracting the target activity data from the original activity data based on the returned parameters includes:
[0029] The original activity data is parsed and processed according to a preset format to obtain formatted data;
[0030] The target activity data is obtained by filtering the formatted data according to the returned parameters.
[0031] Secondly, this application also provides a data query device. The device includes:
[0032] The first receiving module is used to receive user information entered on the data query interface;
[0033] The eligibility review module is used to review the user information according to the activity rules and obtain the review results;
[0034] The activity list interface module is used to access the activity list interface when the review result indicates that the review has passed.
[0035] The retrieval module is used to retrieve the corresponding activity primary key and activity code in response to a trigger operation on the activity list interface;
[0036] The query module is used to send a query request to the query server in response to the activity primary key and the activity code entered on the business query interface, so that the query server can query and obtain the original activity data according to the query request;
[0037] The extraction module is used to extract the target activity data from the original activity data based on the returned parameters.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the data query method described above.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the data query method described above.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the data query method described above.
[0041] The aforementioned data query methods, devices, computer equipment, storage media, and program products enable users to query data uniformly by setting up activity list interfaces and business query interfaces. This eliminates the need to set up separate query interfaces for each activity, thereby improving the efficiency of data query and saving human resources and backend query server resources. Attached Figure Description
[0042] Figure 1 This is a diagram illustrating the application environment of a data query method in one embodiment.
[0043] Figure 2 This is a flowchart illustrating a data query method in one embodiment;
[0044] Figure 3 This is a flowchart illustrating the steps for determining the original activity data in one embodiment;
[0045] Figure 4 This is a flowchart illustrating the steps for retrieving raw activity data in one embodiment;
[0046] Figure 5 This is a flowchart illustrating the data query method in another embodiment;
[0047] Figure 6 This is a flowchart illustrating the steps of creating an activity data table in one embodiment;
[0048] Figure 7 This is a flowchart illustrating the steps for determining target activity data in one embodiment;
[0049] Figure 8 This is a structural block diagram of a data query device in one embodiment;
[0050] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The data query method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with query server 104 via a network. The data storage system can store the data that query server 104 needs to process, such as raw activity data and activity rules. The data storage system can be integrated into query server 104 or placed on the cloud or other network servers. The terminal receives user information entered on the data query interface, performs eligibility review on the user information according to the activity rules, obtains the review result, and enters the activity list interface when the review result indicates that the review is passed. Then, in response to the trigger operation on the activity list interface, it obtains the corresponding activity primary key and activity code, and in response to the activity primary key and activity code entered on the business query interface, sends a query request to the query server so that the query server can retrieve the raw activity data according to the query request. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Query server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0053] In one embodiment, such as Figure 2 As shown, a data query method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:
[0054] Step 202: Receive user information entered on the data query interface.
[0055] The data query interface refers to the interface set on the terminal for data querying. For example, this data query interface could be generated on a mobile phone. Users can enter their user information on this interface, enabling the terminal to retrieve the corresponding data based on that information and display the retrieved data on the data query interface.
[0056] User information refers to information that uniquely identifies a user and describes their attributes. This user information may include, but is not limited to, the user's ID number, mobile phone number, age, gender, income, activity card number, and CD key (software registration serial number).
[0057] For example, the terminal can pre-generate a data query interface, which has an input terminal. The user enters the corresponding user information at the input terminal, and the terminal obtains the user information.
[0058] For example, a user can click a link on another interface (such as the display interface corresponding to a social platform), and then the terminal generates and displays a data query interface based on the link. The data query interface has an input terminal, where the user enters the corresponding user information, and the terminal obtains the user information.
[0059] Step 204: Conduct eligibility review of user information according to the activity rules and obtain the review results.
[0060] The activity rules can refer to the preconditions for participating in the activity. For example, the activity rules could restrict participants to be between 25 and 45 years old and have an annual income of over 50,000. The function and purpose of these activity rules is to filter customers who meet the pre-set conditions from all users and then provide them with marketing or delivery benefits based on achievement targets. These pre-set conditions can be embedded within the activity rules.
[0061] For example, the terminal performs eligibility checks on the user information entered by the user according to the activity rules, and obtains the check results to determine whether the user is eligible to participate in the activity. When the check fails, it means that the user corresponding to the user information is not eligible to participate in the activity, that is, the corresponding data cannot be found in the data query interface.
[0062] Step 206: When the review result indicates that the review has passed, proceed to the activity list interface.
[0063] The activity list interface refers to an interface used to display various activity attribute information, such as a list displaying activity name, activity code, activity primary key, and other activity attribute information.
[0064] For example, when the review result indicates that the review has passed, it means that the user corresponding to the user information is eligible to participate in the activity. At this time, the activity list interface is displayed on the data query interface to show the activity attribute information.
[0065] Step 208: In response to the trigger operation on the activity list interface, obtain the corresponding activity primary key and activity code.
[0066] The activity primary key can refer to the number used to identify the activity. In the solution of this application, one business scenario can correspond to multiple activities. For example, a user can participate in activity A under scenario A, and can also participate in activity B under scenario A. By configuring the activity primary key for each business scenario, the specific business scenario that the user is currently participating in can be determined.
[0067] An activity code refers to an activity number used to identify the business scenario it belongs to. In the solution of this application, one activity can correspond to multiple business scenarios. For example, scenario A can participate in activity A, and scenario B can also participate in activity A. By configuring activity codes for each activity, it is determined which activity a particular business scenario belongs to. The purpose of the activity code is to allow customers to retrieve all data from different business scenarios through the same activity list interface during querying.
[0068] For example, a user can perform a triggering operation (such as a click) on the activity list interface to determine the activity primary key and activity code to be queried. The terminal then obtains the activity primary key and activity code bound to the clicked location based on the user's click operation on the activity list. For instance, if a user clicks on activity A scenario A on the activity list interface, the terminal obtains the activity primary key and activity code bound to activity A scenario A based on the user's click.
[0069] It should be noted that the activity primary key and corresponding activity code for each activity are pre-configured.
[0070] Step 210: In response to the activity primary key and activity code entered on the business query interface, a query request is sent to the query server so that the query server can retrieve the original activity data based on the query request.
[0071] The business query interface refers to the interface used to retrieve specific user data based on the activity primary key and activity code. This business query interface is a high-concurrency, multi-business scenario dynamic query interface, capable of handling query requests from multiple users simultaneously. This high-concurrency, multi-business scenario dynamic query interface is built using a distributed microservice architecture constructed with Spring Cloud, and then deployed as an interface.
[0072] Raw activity data can refer to the most original and complete activity data stored in the database of the query server.
[0073] A query request can refer to a request generated by the terminal to query data from the server. This query request can be automatically generated after the user enters the active primary key and active code in the business query interface, or it can be generated by the terminal after the user touches a specific location or button. For example, a query request generated by the terminal after the user enters the active primary key and active code in the business query interface and then touches the query button.
[0074] A query server can refer to a query engine used for data retrieval. This query server uses Nginx for service request load balancing, and during query service, it can retrieve the corresponding raw active data based on the activity code and active primary key carried in the query request, as well as a pre-set query strategy. The query strategy refers to the method by which the server automatically queries fields in the active data table. By setting query strategies, the efficiency of data retrieval can be improved, enabling fast data retrieval.
[0075] For example, the terminal interface inputs the activity primary key and activity code on the business query interface, and sends a query request to the query server via the network, so that the query server can retrieve the original activity data according to the query request.
[0076] Step 212: Extract the target activity data from the original activity data based on the returned parameters.
[0077] The returned parameters refer to the parameters displayed to the user on the terminal. These returned parameters can be pre-configured output parameters. Because different users may query different parameters, the specific parameters displayed may also differ. For example, when a user is an administrator, the parameters they need to retrieve are different from those retrieved by a regular customer.
[0078] Target activity data can refer to the activity data that is ultimately displayed on the data query interface.
[0079] For example, target activity data can be obtained by obtaining pre-configured return parameters and then extracting the original activity data based on the return parameters.
[0080] In the above data query method, the corresponding activity primary key and activity code are obtained through the activity list interface, so that the original activity data can be directly queried on the business query interface based on the activity code and activity primary key. This eliminates the need to set up a separate query interface for each activity, thereby improving the efficiency of data query and saving human resources and backend query server resources.
[0081] In one embodiment, such as Figure 3 As shown, the step "Retrieve raw activity data based on the query request" includes:
[0082] Step 302: Determine the corresponding activity query parameters based on the activity code, and obtain the activity data table corresponding to the user information based on the activity code.
[0083] Among them, the activity query parameters can refer to the query parameters used to determine the activity data.
[0084] An activity data table can refer to an information table used to represent the list of participants in an activity or various information about participating in an activity.
[0085] For example, the corresponding activity query parameter information is obtained through the activity code, and the activity data table corresponding to the user information is obtained through the pre-configured association between the activity code and the activity data table and the activity code.
[0086] Step 304: Extract user parameters from user information based on activity query parameters.
[0087] User parameters can refer to query parameters provided by the user for querying data on activities the user has participated in.
[0088] For example, first, the user information entered by the user on the data query interface is obtained, and then the user parameters are extracted from the user information according to the activity query parameters.
[0089] Step 306: Query the original activity data in the activity data table based on the user parameters and the activity primary key.
[0090] For example, after determining the user parameters used for the activity data of the user participating in the reporting form, the user participates in the activities in the activity data table according to the user parameters, and then determines the activities the user participates in in the current scenario according to the activity primary key to obtain the original activity data.
[0091] The technical solution of this application embodiment determines the corresponding activity query parameters and activity data table through activity coding, which facilitates the extraction of user parameters from user information based on the activity query parameters, so as to retrieve the original activity data from the activity data table based on the user parameters and the activity primary key. This eliminates the need to set up a separate query interface for each activity, improves the convenience of data query, and saves query server resources.
[0092] Please see Figure 4 In some embodiments, step 306 includes, but is not limited to, the following steps:
[0093] Step 402: Determine the names of the activities the user participates in based on the user parameters.
[0094] For example, after extracting user parameters from user information to represent activity data of user participation, the names of each activity participated in by the user are determined based on the user parameters.
[0095] Step 404: Query the activity data table to obtain the corresponding activity details based on the activity name and activity primary key.
[0096] Activity details data refers to actual customer business data that can only be queried and not modified. This activity details data is a type of unmodifiable factual data.
[0097] For example, activity details can be retrieved from the activity data table based on the activity name and activity primary key.
[0098] Step 406: Assemble the activity details data to obtain the original activity data.
[0099] For example, since the activity data table determined by the activity code is a database table corresponding to multiple business scenarios and has different structures, the activity detail data obtained by directly querying based on the activity primary key and activity name is relatively fragmented. It is necessary to assemble all the retrieved activity detail data to obtain the original activity data corresponding to the user information. For example, dynamic SQL assembly can be performed on the activity detail data to achieve data aggregation and obtain the original activity data.
[0100] The technical solution of this application embodiment obtains the original activity data by assembling the activity detail data obtained from the query, thereby facilitating the improvement of the flexibility of data query.
[0101] Please see Figure 5 In some embodiments, the data query method further includes, but is not limited to, the following steps:
[0102] Step 502: Receive the activity data information entered on the configuration page.
[0103] Among them, activity data information can refer to all the raw data of activities entered by business personnel or managers on the configuration interface.
[0104] The configuration interface refers to the data information configuration interface of the query server. This configuration interface is used by business personnel or administrators to configure and store information on the query server, such as storing raw data in the query server's database, configuring the association between active data tables and active codes, and configuring the return parameters and input parameters of active queries.
[0105] For example, in response to the operation of the business personnel, the terminal jumps to and displays the configuration interface so that the business personnel can enter information in the configuration interface, and the terminal then receives the activity data information entered by the business personnel in the configuration interface.
[0106] Step 504: Store the activity data information in Hive and create an activity data table based on the activity data information and activity code.
[0107] Hive is a data warehouse that provides data refinement, querying, and analysis. It is characterized by fast write speeds but slow query speeds.
[0108] For example, the received activity data information is stored in Hive, which has a fast write speed, and an activity data table is built based on the activity data information and activity code.
[0109] Step 506: Synchronize the activity data table to Elasticsearch using a preset synchronization task, and establish the association between the activity code and the activity data table.
[0110] Elasticsearch is a distributed search and analytics engine that provides high-speed data querying. Its characteristics include slow write speed, fast query speed, and lack of support for complex SQL analysis.
[0111] For example, in order to improve the speed of data query, the active data table is synchronously stored in Elasticsearch through a synchronization task, and the association between the active data table and the active code is established.
[0112] For example, by setting up a scheduling module, the activity engine can dynamically generate timed synchronization tasks, and then the scheduling module can synchronize the activity data table to Elasticsearch according to the timed synchronization tasks.
[0113] The technical solution of this application embodiment improves the data storage speed by first storing the activity data information in Hive, and then synchronizing the activity data table to ElasticSearch through a synchronization task, thereby improving the data query speed and meeting the user's high-concurrency query requirements.
[0114] like Figure 6 As shown, in some embodiments, the activity data information includes activity attribute data and activity detail data, and step 504 includes, but is not limited to, the following steps:
[0115] Step 602: Store the activity attribute data in MySQL and store the activity detail data in Hive.
[0116] The activity attribute data can refer to the attribute data of the activity itself. This activity attribute data is configured by business personnel and can be added, deleted, queried, and modified.
[0117] MySQL can refer to a relational database management system that is capable of data storage.
[0118] For example, activity attribute data, which is used to characterize the attributes of the activity itself, is stored in MySQL, and activity detail data is stored in Hive in the CDH cluster.
[0119] Step 604: Construct the activity framework based on the activity attribute data.
[0120] The activity frame can refer to the frame of an activity query, such as the frame of an activity data table.
[0121] For example, an activity framework is built based on activity attribute data.
[0122] Step 606: Fill the activity details into the activity frame, and create activity data based on the filled activity frame and activity code.
[0123] After setting up the activity framework, populate the activity details into the activity framework to obtain the activity data table.
[0124] The technical solution of this application embodiment, by establishing an activity data table, facilitates data querying for users and improves the efficiency of data querying.
[0125] like Figure 7 As shown, in some embodiments, step 212 includes, but is not limited to, the following steps:
[0126] Step 702: Parse the original activity data according to the preset format to obtain formatted data.
[0127] The preset format can refer to a pre-defined format, such as the XML format.
[0128] Formatted data can refer to the data obtained after parsing the original activity data. For example, when the default format is XML, the formatted data can be dynamic data obtained after parsing the XML format.
[0129] For example, the original activity data can be obtained through the aforementioned dynamic SQL assembly. During assembly, it is assembled in XML format, thereby realizing the dynamic return of the original activity data to the terminal. The terminal then parses the original activity data according to the XML format to obtain the formatted data.
[0130] Step 704: Filter the formatted data according to the returned parameters to obtain the target activity data.
[0131] The returned data is filtered to obtain the target activity data.
[0132] The technical solution of this application embodiment improves the convenience of data query by parsing the original activity data by setting a preset format.
[0133] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0134] Based on the same inventive concept, this application also provides a data query apparatus for implementing the data query method described above. The solution provided by this apparatus is similar to the solution described in the above method.
[0135] In one embodiment, such as Figure 8 As shown, a data query device is provided, including: a first receiving module 802, a qualification review module 804, an activity list interface module 806, an acquisition module 808, a query module 810, and an extraction module 812, wherein:
[0136] The first receiving module 802 is used to receive user information entered on the data query interface.
[0137] The qualification review module 804 is used to review user information for eligibility according to the activity rules and obtain the review results.
[0138] The activity list interface module 806 is used to access the activity list interface when the review result indicates that the review has passed.
[0139] The retrieval module 808 is used to retrieve the corresponding activity primary key and activity code in response to a trigger operation on the activity list interface.
[0140] The query module 810 is used to send a query request to the query server in response to the activity primary key and activity code entered on the business query interface, so that the query server can retrieve the original activity data according to the query request.
[0141] The extraction module 812 is used to extract the target activity data from the original activity data based on the returned parameters.
[0142] In some embodiments, the query module is further configured to determine the corresponding activity query parameters based on the activity code, obtain the activity data table corresponding to the user information based on the activity code, extract user parameters from the user information based on the activity query parameters, and query the original activity data in the activity data table based on the user parameters and the activity primary key.
[0143] In some embodiments, the query module is further configured to determine the names of the activities the user participates in based on user parameters; query the corresponding activity details in the activity data table based on the activity name and activity primary key; and assemble the activity details to obtain the original activity data.
[0144] In some embodiments, the data query device further includes:
[0145] The second receiving module is used to receive activity data information entered on the configuration page.
[0146] The Activity Data Table Creation Module is used to store activity data information in Hive and create an activity data table based on the activity data information and activity code.
[0147] The relationship establishment module is used to synchronize the activity data table to Elasticsearch through a preset synchronization task and establish the relationship between the activity code and the activity data table.
[0148] In some embodiments, the activity data table creation module is further configured to store activity attribute data using MySQL, store activity detail data in Hive; construct an activity framework based on the activity attribute data; populate the activity detail data into the activity framework, and create an activity data table based on the populated activity framework and activity code.
[0149] In some embodiments, the extraction module is further configured to parse the original activity data according to a preset format to obtain formatted data; and to filter the formatted data according to the returned parameters to obtain target activity data.
[0150] Each module in the aforementioned data query device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0151] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data query method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0152] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0153] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: receiving user information entered on a data query interface; performing eligibility review on the user information according to activity rules and obtaining a review result; when the review result indicates that the review has passed, entering an activity list interface; in response to a trigger operation on the activity list interface, obtaining the corresponding activity primary key and activity code; in response to the activity primary key and activity code entered on a business query interface, sending a query request to a query server so that the query server can retrieve the original activity data according to the query request; and extracting the target activity data from the original activity data according to the returned parameters.
[0154] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the corresponding activity query parameters based on the activity code; obtaining the activity data table corresponding to the user information based on the activity code; extracting user parameters from the user information based on the activity query parameters; and querying the original activity data in the activity data table based on the user parameters and the activity primary key.
[0155] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the names of each activity the user participates in based on user parameters; querying the corresponding activity detail data in the activity data table based on each activity name and activity primary key; and assembling the activity detail data to obtain the original activity data.
[0156] In one embodiment, when the processor executes the computer program, it also performs the following steps: receiving activity data information entered on the configuration page; storing the activity data information in Hive and creating an activity data table based on the activity data information and activity code; synchronizing the activity data table to ElasticSearch through a preset synchronization task and establishing a relationship between the activity code and the activity data table.
[0157] In one embodiment, when the processor executes the computer program, it further performs the following steps: storing activity data information in Hive and establishing an activity data table based on the activity data information and activity codes, including: storing activity attribute data using MySQL and storing activity detail data in Hive; constructing an activity framework based on the activity attribute data; populating the activity detail data into the activity framework and establishing an activity data table based on the populated activity framework and activity codes.
[0158] In one embodiment, when the processor executes the computer program, it further performs the following steps: parsing the original activity data according to a preset format to obtain formatted data; and filtering the formatted data according to the returned parameters to obtain target activity data.
[0159] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program performs the following steps: receiving user information entered on a data query interface; performing eligibility review on the user information according to activity rules and obtaining a review result; when the review result indicates that the review has passed, entering an activity list interface; in response to a trigger operation on the activity list interface, obtaining the corresponding activity primary key and activity code; in response to the activity primary key and activity code entered on a business query interface, sending a query request to a query server so that the query server can retrieve the original activity data according to the query request; and extracting the target activity data from the original activity data according to the returned parameters.
[0160] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the corresponding activity query parameters based on the activity code; obtaining the activity data table corresponding to the user information based on the activity code; extracting user parameters from the user information based on the activity query parameters; and querying the original activity data in the activity data table based on the user parameters and the activity primary key.
[0161] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the names of each activity the user participates in based on user parameters; querying the activity data table to obtain the corresponding activity details based on each activity name and activity primary key; and assembling the activity details to obtain the original activity data.
[0162] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: receiving activity data information entered on the configuration page; storing the activity data information in Hive and creating an activity data table based on the activity data information and the activity code; synchronizing the activity data table to ElasticSearch through a preset synchronization task and establishing the association between the activity code and the activity data table.
[0163] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: storing the activity attribute data using MySQL and storing the activity detail data in Hive; constructing an activity framework based on the activity attribute data; populating the activity detail data into the activity framework and creating an activity data table based on the populated activity framework and activity code.
[0164] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: parsing the original activity data according to a preset format to obtain formatted data; and filtering the formatted data according to the returned parameters to obtain target activity data.
[0165] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: receiving user information entered on a data query interface; performing eligibility review on the user information according to activity rules and obtaining a review result; when the review result indicates that the review has passed, entering an activity list interface; in response to a trigger operation on the activity list interface, obtaining the corresponding activity primary key and activity code; in response to the activity primary key and activity code entered on a business query interface, sending a query request to a query server so that the query server can retrieve the original activity data according to the query request; and extracting the target activity data from the original activity data according to the returned parameters.
[0166] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the corresponding activity query parameters based on the activity code; obtaining the activity data table corresponding to the user information based on the activity code; extracting user parameters from the user information based on the activity query parameters; and querying the original activity data in the activity data table based on the user parameters and the activity primary key.
[0167] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the names of each activity the user participates in based on user parameters; querying the activity data table to obtain the corresponding activity details based on each activity name and activity primary key; and assembling the activity details to obtain the original activity data.
[0168] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: receiving activity data information entered on the configuration page; storing the activity data information in Hive and creating an activity data table based on the activity data information and the activity code; synchronizing the activity data table to ElasticSearch through a preset synchronization task and establishing the association between the activity code and the activity data table.
[0169] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: storing the activity attribute data using MySQL and storing the activity detail data in Hive; constructing an activity framework based on the activity attribute data; populating the activity detail data into the activity framework and creating an activity data table based on the populated activity framework and activity code.
[0170] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: parsing the original activity data according to a preset format to obtain formatted data; and filtering the formatted data according to the returned parameters to obtain target activity data.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are 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.
[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data query method, characterized in that, The method includes: Receive user information entered on the data query interface; The user information is reviewed for eligibility according to the activity rules, and the review results are obtained. When the review result indicates that the review has passed, the activity list interface is accessed. In response to a trigger operation on the activity list interface, retrieve the corresponding activity primary key and activity code; In response to the activity primary key and activity code entered on the business query interface, a query request is sent to the query server, so that the query server determines the corresponding activity query parameters based on the activity code, obtains the activity data table corresponding to the user information based on the activity code, extracts user parameters from the user information based on the activity query parameters, determines the names of each activity the user is participating in based on the user parameters, queries the activity data table based on each activity name and activity primary key to obtain the corresponding activity detail data, and assembles the activity detail data to obtain the original activity data. The target activity data is extracted from the original activity data based on the returned parameters. The method further includes: Receive activity data information entered on the configuration page; the activity data information includes activity attribute data and activity detail data; The activity attribute data is stored in MySQL, and the activity detail data is stored in Hive; Construct an activity framework based on the activity attribute data; The activity details data are populated into the activity frame, and the activity data table is created based on the populated activity frame and the activity code. The activity data table is synchronized to Elasticsearch through a preset synchronization task, and the association between the activity code and the activity data table is established.
2. The method according to claim 1, characterized in that, The step of extracting the target activity data from the original activity data based on the returned parameters includes: The original activity data is parsed and processed according to a preset format to obtain formatted data; The target activity data is obtained by filtering the formatted data according to the returned parameters.
3. The method according to claim 1, characterized in that, The activity primary key is used to identify the activity.
4. The method according to claim 1, characterized in that, The activity code is used to identify the business scenario.
5. The method according to claim 1, characterized in that, The step of obtaining the activity data table corresponding to the user information based on the activity code includes: By leveraging the pre-configured association between activity codes and activity data tables, the activity data table corresponding to user information can be obtained.
6. A data query device, characterized in that, The device includes: The first receiving module is used to receive user information entered on the data query interface; The eligibility review module is used to review the user information according to the activity rules and obtain the review results; The activity list interface module is used to access the activity list interface when the review result indicates that the review has passed. The retrieval module is used to retrieve the corresponding activity primary key and activity code in response to a trigger operation on the activity list interface; The query module is used to respond to the activity primary key and activity code input on the business query interface, send a query request to the query server, so that the query server determines the corresponding activity query parameters according to the activity code, obtains the activity data table corresponding to the user information according to the activity code, extracts user parameters from the user information according to the activity query parameters, determines the names of each activity the user participates in according to the user parameters, queries the activity data table according to each activity name and activity primary key to obtain the corresponding activity detail data, and assembles the activity detail data to obtain the original activity data. The extraction module is used to extract the target activity data from the original activity data based on the returned parameters. The second receiving module is used to receive activity data information entered on the configuration page; the activity data information includes activity attribute data and activity detail data. The activity data table creation module is used to store the activity attribute data in MySQL, store the activity detail data in Hive, and construct an activity framework based on the activity attribute data; populate the activity detail data into the activity framework, and create the activity data table based on the populated activity framework and the activity code; The association establishment module is used to synchronize the activity data table to Elasticsearch through a preset synchronization task and establish the association between the activity code and the activity data table.
7. The apparatus according to claim 6, characterized in that, The extraction module is further configured to: parse the original activity data according to a preset format to obtain formatted data; and filter the formatted data according to the returned parameters to obtain the target activity data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data enquiring method, device, computer equipment and storage medium
CA3151209A1
Intelligent web enquiry interface system and its method
CN101216853A